fix: assets ctrl hide arc erc20 usdc#9277
Open
maxime-oe wants to merge 1 commit into
Open
Conversation
db5b017 to
574b60e
Compare
Contributor
Author
|
@metamaskbot publish-preview |
Contributor
|
Preview builds have been published. Learn how to use preview builds in other projects. Expand for full list of packages and versions. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Explanation
Arc chain has USDC as native coin, but also provides an ERC20 interface at address
0x3600000000000000000000000000000000000000which follows the ERC20 standard.However this ERC20 address points to the same balance as the native, leading to double counting total balance.
This PR adds a map in which some tokens can be explicitly ignored when computing balance total. The code acts at the same location as the Asset Preference "hide" feature.
References
Checklist
Note
Low Risk
Small, hardcoded exclusion in balance aggregation selectors only; no auth, persistence, or fetch pipeline changes.
Overview
Prevents Arc mainnet ERC20 USDC (
eip155:5042/erc20:0x3600…0000) from being included when balances are merged for portfolio totals and related selectors.Adds
MERGE_BALANCES_IGNORE_LISTinbalance.tsand treats listed asset IDs like user-hidden assets inmergeBalancesIntoMap, so that token no longer inflates aggregated fiat totals when the same economic balance may already be represented elsewhere on Arc (e.g. native vs ERC20 USDC). Documents the change under Unreleased inCHANGELOG.md.Reviewed by Cursor Bugbot for commit 574b60e. Bugbot is set up for automated code reviews on this repo. Configure here.