Open gamalielhere opened 6 days ago
The changes in this pull request introduce several enhancements across multiple components related to token management in a blockchain application. A new method removeErc20Token
is added for removing custom ERC20 tokens, while the EvmNetwork
class sees improvements in token handling and formatting. The asset-detail-view
component gains conditional rendering for custom tokens, and the network-assets-item
component is updated to support fetching and managing custom tokens. The updates aim to improve the user interface and maintainability of the code.
File Path | Change Summary |
---|---|
packages/extension/src/libs/tokens-state/index.ts |
Added method async removeErc20Token(chainName: NetworkNames, address: string): Promise<boolean> to TokensState class for removing custom ERC20 tokens. Minor formatting changes to addErc20Token method. |
packages/extension/src/providers/ethereum/types/evm-network.ts |
Updated EvmNetwork class and EvmNetworkOptions interface. Enhanced getAllTokenInfo method for better asset handling and formatting. Adjusted customTokens filtering logic for clarity. |
packages/extension/src/ui/action/views/asset-detail-view/index.vue |
Introduced conditional rendering for custom tokens, added props isCustomToken and removeToken , and updated template structure to include delete action for custom tokens. |
packages/extension/src/ui/action/views/network-assets/components/custom-evm-token.vue |
Enhanced display logic for token symbols with conditional rendering and tooltip for long symbols. Adjusted CSS for layout improvements. |
packages/extension/src/ui/action/views/network-assets/components/network-assets-item.vue |
Added prop network , computed property isCustomToken , and methods removeToken and fetchCustomTokens . Updated template to bind new properties for better token management. |
packages/extension/src/ui/action/views/network-assets/index.vue |
Added prop :network to network-assets-item component and an event listener @update:tokens . Updated addCustomAsset method to refresh asset list after adding a custom asset. |
sequenceDiagram
participant User
participant AssetDetailView
participant TokensState
participant NetworkAssetsItem
User->>AssetDetailView: Request to delete custom token
AssetDetailView->>TokensState: removeErc20Token(chainName, address)
TokensState-->>AssetDetailView: Promise<boolean>
AssetDetailView->>NetworkAssetsItem: Emit update:tokens
NetworkAssetsItem->>NetworkAssetsItem: Fetch updated tokens
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-a030dc60.zip firefox: enkrypt-firefox-a030dc60.zip
:syringe: Virus total analysis chrome: a030dc60 firefox: a030dc60
Summary by CodeRabbit
Release Notes
New Features
Bug Fixes
Improvements