Feat/add asset action
Summary by CodeRabbit
-
New Features
- Introduced a new action bar in asset detail view, allowing users to quickly access Buy/Sell, Send, and Swap options for tokens.
- Added an informational section explaining account backup and restoration in the wallet restore flow.
-
Improvements
- Enhanced token send screens to automatically select the correct token based on route parameters for Ethereum and Solana.
- Increased the popup interval for rate prompts from 14 to 30 days.
- Improved tooltip display and collection name truncation in NFT categories.
- Enlarged the onboarding container for better layout.
- Triggered a backup after renaming an account to ensure data safety.
-
Bug Fixes
- Improved attribute binding and event handling in asset and network views for more consistent UI behavior.
-
Chores
- Updated multiple dependencies and development tools across packages for improved stability and compatibility.
Walkthrough
The changes introduce a new asset-detail-action Vue component for asset action buttons and update related components to integrate this feature. Logic for selecting a token in send-transaction flows is improved by matching route parameters to assets. Event handling is extended to propagate buy/sell actions upward through the component hierarchy.
Changes
| File(s) | Change Summary |
|---|---|
packages/extension/src/providers/ethereum/ui/send-transaction/index.vue.../solana/ui/send-transaction/index.vue |
Renamed NFT data parameter from paramNFTData to tokenParamData. Enhanced asset selection logic in fetchAssets to select the token matching the contract address from route parameters, falling back to the first asset if no match is found. |
packages/extension/src/ui/action/views/asset-detail-view/components/asset-detail-action.vue |
Added new Vue component rendering action buttons ("Buy/Sell", "Send", "Swap") with event emission and navigation logic. Includes scoped styling and icon imports. |
packages/extension/src/ui/action/views/asset-detail-view/index.vue |
Integrated asset-detail-action component, conditionally rendered for non-custom tokens. Added event handler and emit logic for buy/sell actions. |
packages/extension/src/ui/action/views/network-assets/components/network-assets-item.vue |
Added listener for open:buy-action event from asset-detail-view. Implemented method and emit logic to propagate buy/sell action event with token payload. |
packages/extension/src/ui/action/views/network-assets/index.vue |
Added v-bind="$attrs" to pass all parent attributes to each network-assets-item in the asset list. No logic or event changes. |
Sequence Diagram(s)
sequenceDiagram
participant User
participant AssetDetailView
participant AssetDetailAction
participant NetworkAssetsItem
participant NetworkAssets
User->>AssetDetailAction: Clicks "Buy/Sell" button
AssetDetailAction-->>AssetDetailView: Emits open:buy-action (token)
AssetDetailView-->>NetworkAssetsItem: Emits open:buy-action (token)
NetworkAssetsItem-->>NetworkAssets: Emits open:buy-action (token)
sequenceDiagram
participant Route
participant SendTransactionView
participant AssetFetcher
Route->>SendTransactionView: Navigates with tokenParamData
SendTransactionView->>AssetFetcher: fetchAssets()
AssetFetcher-->>SendTransactionView: Returns asset list
SendTransactionView->>SendTransactionView: Selects asset matching tokenParamData.contract (if present), else first asset
[!TIP]
⚡️ Faster reviews with caching
- CodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 16th. To opt out, configure
Review - Disable Cacheat either the organization or repository level. If you prefer to disable all data retention across your organization, simply turn off theData Retentionsetting under your Organization Settings.Enjoy the performance boost—your workflow just got faster.
📜 Recent review details
Configuration used: .coderabbit.yaml Review profile: CHILL Plan: Pro
📥 Commits
Reviewing files that changed from the base of the PR and between 7bc9d08a14e88ad97cae6d5a326ae53eb189bd70 and 7385dc642491c2059a6c85b169b6d90fd128b697.
📒 Files selected for processing (1)
packages/extension/src/providers/ethereum/ui/send-transaction/index.vue(4 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- packages/extension/src/providers/ethereum/ui/send-transaction/index.vue
⏰ Context from checks skipped due to timeout of 90000ms (3)
- GitHub Check: buildAll
- GitHub Check: test
- GitHub Check: test
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
🪧 Tips
Chat
There are 3 ways to chat with CodeRabbit:
- Review comments: Directly reply to a review comment made by CodeRabbit. Example:
I pushed a fix in commit <commit_id>, please review it.Generate unit testing code for this file.Open a follow-up GitHub issue for this discussion.
- Files and specific lines of code (under the "Files changed" tab): Tag
@coderabbitaiin a new review comment at the desired location with your query. Examples:@coderabbitai generate unit testing code for this file.@coderabbitai modularize this function.
- PR comments: Tag
@coderabbitaiin a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:@coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.@coderabbitai read src/utils.ts and generate unit testing code.@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.@coderabbitai help me debug CodeRabbit configuration file.
Support
Need help? Create a ticket on our support page for assistance with any issues or questions.
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.
CodeRabbit Commands (Invoked using PR comments)
@coderabbitai pauseto pause the reviews on a PR.@coderabbitai resumeto resume the paused reviews.@coderabbitai reviewto trigger an incremental review. This is useful when automatic reviews are disabled for the repository.@coderabbitai full reviewto do a full review from scratch and review all the files again.@coderabbitai summaryto regenerate the summary of the PR.@coderabbitai generate docstringsto generate docstrings for this PR.@coderabbitai generate sequence diagramto generate a sequence diagram of the changes in this PR.@coderabbitai resolveresolve all the CodeRabbit review comments.@coderabbitai configurationto show the current CodeRabbit configuration for the repository.@coderabbitai helpto get help.
Other keywords and placeholders
- Add
@coderabbitai ignoreanywhere in the PR description to prevent this PR from being reviewed. - Add
@coderabbitai summaryto generate the high-level summary at a specific location in the PR description. - Add
@coderabbitaianywhere in the PR title to generate the title automatically.
Documentation and Community
- Visit our Documentation for detailed information on how to use CodeRabbit.
- Join our Discord Community to get help, request features, and share feedback.
- Follow us on X/Twitter for updates and announcements.
:briefcase: Build Files chrome: enkrypt-chrome-7385dc64.zip firefox: enkrypt-firefox-7385dc64.zip
:syringe: Virus total analysis chrome: 7385dc64 firefox: 7385dc64