Conversation
…unify-state selectors When assets-unify-state is enabled, assetsInfo stores native EVM tokens using slip44:60 (EVM generic coin type) while assetsPrice may use a chain-specific slip44 (e.g. slip44:9005 for AVAX on Avalanche C-Chain). This mismatch caused two selectors to silently skip affected native tokens: - getCurrencyRateControllerCurrencyRates: no conversion rate for AVAX, making token.secondary undefined on the token list - getTokenRatesControllerMarketData: no market data for AVAX, making pricePercentChange1d undefined and hiding the % change badge Both selectors now fall back to a chain-prefix scan when the direct assetId lookup misses, bridging the key mismatch without changing stored state.
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
Builds ready [6997581]
⚡ Performance Benchmarks
🌐 Dapp Page Load BenchmarksCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
|
Builds ready [ef0e39e]
⚡ Performance Benchmarks
🌐 Dapp Page Load BenchmarksCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
| continue; | ||
| } | ||
|
|
||
| // assetsInfo may use slip44:60 (EVM standard) for native tokens while assetsPrice |
There was a problem hiding this comment.
Is there something we can do in the future to stop assetsInfo having the wrong assetId?
There was a problem hiding this comment.
we can hardcode a list but this is not the best approach




Description
When assets-unify-state is enabled, assetsInfo stores native EVM tokens using slip44:60 (EVM generic coin type) while assetsPrice may use a chain-specific slip44 (e.g. slip44:9005 for AVAX on Avalanche C-Chain).
This mismatch caused two selectors to silently skip affected native tokens:
Both selectors now fall back to a chain-prefix scan when the direct assetId lookup misses, bridging the key mismatch without changing stored state.
Changelog
CHANGELOG entry: resolve slip44 key mismatch for native tokens in assets-unify-state selectors
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
after.mov
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Medium Risk
Touches rate/market-data selectors used for token pricing and currency conversion; the new chain-prefix fallback could select an unintended slip44 entry if multiple native-price keys exist for a chain.
Overview
Fixes assets-unify-state selectors to handle native EVM tokens when
assetsInfousesslip44:60butassetsPriceuses a chain-specificslip44(e.g. AVAX).getCurrencyRateControllerCurrencyRatesnow falls back to any nativeslip44:*price entry for the same chain when a direct lookup misses.Similarly,
getTokenRatesControllerMarketDataadds a guarded fallback (only for nativeslip44assets) to find matching native metadata inassetsInfo, preventing misattribution of ERC-20 prices.Expands
assets-migration.test.tswith many new edge-case tests across the migrated selectors (dedupingcustomAssets, skipping missing metadata/non-EVM assets, multi-account/multi-chain behavior, decimal parsing), including explicit coverage for the slip44 mismatch scenarios.Written by Cursor Bugbot for commit ef0e39e. This will update automatically on new commits. Configure here.