Open bigboydiamonds opened 2 weeks ago
The changes to the synapse-interface
package introduce a "refunded" status for transactions. Several components now handle this new status, impacting the user interface and transaction handling logic. Key updates include enhanced status checks in transaction components, new hooks to manage refund status, added properties to transaction interfaces, and new ABI files for smart contract interactions.
File Path | Change Summary |
---|---|
.../_Transaction/_Transaction.tsx , .../_Transaction/components/Transactions.tsx , .../index.tsx |
Added routerAddress to components and their props. Added status handling for 'refunded'. |
.../_Transaction/components/TransactionSupport.tsx |
Updated logic to handle 'refunded' status, removed isReverted declaration. |
.../_Transaction/components/AnimatedProgressBar.tsx , .../TimeRemaining.tsx |
Added 'refunded' as a new status to these components. |
.../_Transaction/helpers/getEstimatedTimeStatus.ts , .../_Transaction/helpers/calculateEstimatedTimeStatus.ts |
Added logic for isCheckTxForRefund when elapsedTime exceeds four hours in seconds. |
.../_Transaction/helpers/useBridgeTxUpdater.ts |
Added refund transaction logic and new useEffect to handle isTxRefunded . |
.../_Transaction/helpers/useTxRefundStatus.ts |
Introduced custom hook useTxRefundStatus to track refund status, including smart contract interaction. |
.../constants/abis/fastBridge.json , .../constants/abis/fastBridgeRouter.json |
Added new ABI files defining functions, events, and errors related to fast bridge protocol and router contract. |
.../_transactions/reducer.ts |
Added routerAddress and 'refunded' status to _TransactionDetails interface, introduced refundTransaction action. |
.../transactions/actions.ts |
Added routerAddress property to PendingBridgeTransaction interface. |
.../utils/hooks/use_TransactionsListener.ts |
Added routerAddress to the properties in use_TransactionsListener function. |
sequenceDiagram
participant User
participant UI Component
participant useTxRefundStatus
participant Smart Contract
User ->> UI Component : Initiates transaction check
UI Component ->> useTxRefundStatus : Calls hook to check refund status
useTxRefundStatus ->> Smart Contract : Queries refund status
Smart Contract -->> useTxRefundStatus : Returns refund status
useTxRefundStatus -->> UI Component : Updates refund status
UI Component -->> User : Displays transaction status
π In code, a change quite grand,
Transactions now take a stand,
Refunded status, new and bright,
Propels our bridge to greater heights.
From four hours, checks now steer,
Refund logic makes it clear!
ππ»π
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Latest commit: |
d7c6388
|
Status: | β Deploy successful! |
Preview URL: | https://4d4100f6.sanguine-fe.pages.dev |
Branch Preview URL: | https://fe-refund-transaction.sanguine-fe.pages.dev |
Latest commit: |
d7c6388
|
Status: | β Deploy successful! |
Preview URL: | https://99fa08b1.sanguine.pages.dev |
Branch Preview URL: | https://fe-refund-transaction.sanguine.pages.dev |
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 26.26025%. Comparing base (
d0f1508
) to head (d7c6388
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Summary by CodeRabbit
New Features
routerAddress
property to transaction-related components for enhanced routing logic.Enhancements
TransactionSupport
,AnimatedProgressBar
, andTimeRemaining
.Bug Fixes
c9fdbfe7009ba17678d1d597f69e9fb3791ece3e: synapse-interface preview link 1d4b7ac92fed2c94b7aec19d7028716579c0998b: synapse-interface preview link d7968bdbf97f904bd7420492cf7520383bc0f62c: synapse-interface preview link