Open gamalielhere opened 5 days ago
The changes introduce a new Vue component, send-alert.vue
, designed to display error messages related to transaction issues in the Solana UI. The existing send-transaction
component has been modified to replace the previous alert system with this new component, which conditionally renders based on a computed property that evaluates various error conditions. Additionally, several computed properties and a new method have been added to enhance error handling and validation processes within the send-transaction
component. The swap functionality has also seen improvements in error messaging related to minimum swap amounts.
File Path | Change Summary |
---|---|
packages/extension/src/providers/solana/ui/send-transaction/index.vue |
- Replaced previous alert with <send-alert> component.- Added computed properties: hasMinimumForRent , errorMsg , nativeValue , nativePrice , priceDifference .- Added method: checkIfToIsRentExempt . |
packages/extension/src/providers/solana/ui/send-transaction/components/send-alert.vue |
- Introduced new component send-alert.vue with props interface IProps for displaying error messages. |
packages/extension/src/ui/action/views/swap/index.vue |
- Updated error handling in pickBestQuote function for minimum swap amounts, clarifying messaging for users. |
packages/swap/src/providers/rango/index.ts |
- Modified debug function for cosmetic changes and improved formatting in debug logging statements. |
packages/extension/src/libs/cache-fetch/index.ts |
- Updated error handling logic in cacheFetch to check for error property in JSON response. |
packages/extension/src/providers/solana/libs/api.ts |
- Changed URL in getTokenInfo method and increased cache duration for token list fetch. |
packages/swap/src/providers/changelly/index.ts |
- Enhanced logging formatting in debug messages across various methods. |
packages/extension/src/ui/action/views/swap/views/swap-best-offer/index.vue |
- Modified template for conditional rendering of error messages and refined selectTrade method. |
sequenceDiagram
participant User
participant SendTransaction
participant SendAlert
User->>SendTransaction: Initiate transaction
SendTransaction->>SendTransaction: Check balance, address, NFT validity
SendTransaction->>SendTransaction: Compute errorMsg
alt Error conditions met
SendTransaction->>SendAlert: Render <send-alert> with errorMsg
else No errors
SendTransaction->>SendTransaction: Proceed with transaction
end
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-3716d402.zip firefox: enkrypt-firefox-3716d402.zip
:syringe: Virus total analysis chrome: 3716d402 firefox: 3716d402
Summary by CodeRabbit
New Features
send-transaction
component to provide users with clear feedback on transaction eligibility, including checks for balance sufficiency and address validity.Bug Fixes
Improvements