Open NickKelly1 opened 1 week ago
The changes in this pull request focus on enhancing the transaction handling and status management within the swap functionality of the application. Key updates include the transition from using transactionHashes
to transactions
, which are now structured as objects containing both a transaction hash and a timestamp. This change affects various components, including Vue files and provider classes, improving how transactions are processed, validated, and displayed. Additional methods have been introduced for managing activity states, and the user interface has been updated to reflect new transaction statuses, including "dropped."
File | Change Summary |
---|---|
packages/extension/src/ui/action/views/swap/index.vue |
Updated sendAction method to change transaction handling from transactionHashes to transactions . Modified input handling with debounce for address resolution and improved validation logic. |
packages/extension/src/ui/action/views/swap/libs/send-transactions.ts |
Changed return type of executeSwap from Promise<string[]> to Promise<{ hash: string, sentAt: number }[]> . Updated transaction handling to include timestamps. |
packages/extension/src/ui/action/views/swap/views/swap-best-offer/index.vue |
Adjusted sendAction method to reflect changes in transaction structure, replacing hashes with txs . |
packages/swap/src/providers/changelly/index.ts |
Added getStatus method to retrieve swap transaction status and a utility function fixBaseAndTrimDecimals for handling decimal precision. |
packages/swap/src/providers/jupiter/index.ts |
Updated getStatus method to accept transactions instead of transactionHashes , enhancing error handling for transaction statuses. |
packages/swap/src/providers/oneInch/index.ts |
Modified getStatus method to use transactions instead of transactionHashes , improving error handling. |
packages/swap/src/providers/paraswap/index.ts |
Updated getStatus method to reflect new transactions structure. |
packages/swap/src/providers/rango/index.ts |
Changed getStatus method to use transactions , enhancing logic for determining transaction status. |
packages/swap/src/providers/zerox/index.ts |
Modified getStatus method to handle transactions instead of transactionHashes . |
packages/swap/src/types/index.ts |
Introduced new type StatusOptionTransaction and updated StatusOptions interface to use transactions . |
packages/swap/tests/changelly.test.ts |
Updated tests to reflect changes in input structure for getStatusObject . |
packages/extension/src/libs/activity-state/index.ts |
Added new methods for managing activity data, including updateActivity , setCacheTime , and others. |
packages/extension/src/providers/solana/libs/api.ts |
Refactored getTransactionStatus method to use async/await for improved readability. |
packages/extension/src/types/activity.ts |
Added new enum value dropped to ActivityStatus and reformatted rawInfo property for clarity. |
packages/extension/src/ui/action/views/network-activity/components/network-activity-transaction.vue |
Enhanced transaction status handling to include ActivityStatus.dropped . |
packages/extension/src/ui/action/views/network-activity/index.vue |
Improved activity checking logic to handle "dropped" statuses and streamlined provider checks. |
getStatus
method to handle transaction data structures align with the main PR's updates to transaction handling in the swap functionality, particularly regarding the transition from transactionHashes
to transactions
.[!WARNING]
Rate limit exceeded
@NickKelly1 has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 16 minutes and 20 seconds before requesting another review.
⌛ How to resolve this issue?
After the wait time has elapsed, a review can be triggered using the `@coderabbitai review` command as a PR comment. Alternatively, push new commits to this PR. We recommend that you space out your commits to avoid hitting the rate limit.🚦 How do rate limits work?
CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our [FAQ](https://docs.coderabbit.ai/faq) for further information.📥 Commits
Reviewing files that changed from the base of the PR and between c0bbe9a4e3d5555b1272d07e10447f265f9f1c8f and 216798ba403ccd36fcafc0f5088d4066224935bb.
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?
:briefcase: Build Files chrome: enkrypt-chrome-216798ba.zip firefox: enkrypt-firefox-216798ba.zip
:syringe: Virus total analysis chrome: 216798ba firefox: 216798ba
If a Solana Jupiter swap transaction fails to be mined within 3 minutes then consider it dropped
Sets up ability to add the same functionality to Solana transactions from Rango and Changelly too.
Summary by CodeRabbit
Release Notes
New Features
Bug Fixes
Documentation
Style
Tests