feat: asset-controller tempo adjustments before migration#8638
feat: asset-controller tempo adjustments before migration#8638
Conversation
a8b2d27 to
3c5a04a
Compare
5d3fb3f to
d8ff44d
Compare
|
@metamaskbot preview |
|
@metamaskbot publish-preview |
|
Preview builds have been published. Learn how to use preview builds in other projects. Expand for full list of packages and versions. |
bbb1432 to
f3b6869
Compare
|
@metamaskbot publish-preview |
|
Preview builds have been published. Learn how to use preview builds in other projects. Expand for full list of packages and versions. |
f3b6869 to
f21d252
Compare
| }; | ||
|
|
||
| if (!shouldSkipNative) { | ||
| assetsBalance[accountId][nativeAssetId] = { amount: '0' }; |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit f21d252. Configure here.
| '0xa729': 'eip155:42793/erc20:0x0000000000000000000000000000000000000000', // Etherlink - Native symbol: XTZ (Tezos L2) | ||
| '0xab5': 'eip155:2741/erc20:0x0000000000000000000000000000000000000000', // Abstract - Native symbol: ETH | ||
| '0x1079': 'eip155:4217/erc20:0x20c0000000000000000000000000000000000000', // Tempo Mainnet - Pseudo-Native symbol: pathUSD | ||
| '0x1079': 'eip155:4217/slip44:60', // Tempo Mainnet - No native asset |
There was a problem hiding this comment.
Note: Setting this to erc20:0x0000000000000000000000000000000000000000 led the various errors, such as disappearance of pathUSD (ERC20 token) or disappearance of all tokens from assets list when trying to fix through the state.
Setting eip155:4217/slip44:60 works. Since there is not actual native asset, eip155:4217/slip44:60 is no less correct than erc20:0x0000000000000000000000000000000000000000 and is consistent with the default pre-population of nativeAssetIdentifiers.
| '0xa867': 'eip155:43111/erc20:0x0000000000000000000000000000000000000000', // Hemi - Native symbol: ETH | ||
| '0xa86a': 'eip155:43114/slip44:9005', // Avalanche C-Chain - Native symbol: AVAX | ||
| '0xa5bf': 'eip155:42431/erc20:0x20c0000000000000000000000000000000000000', // Tempo Testnet Moderato - Pseudo-Native symbol: pathUSD | ||
| '0xa5bf': 'eip155:42431/slip44:60', // Tempo Testnet Moderato - No native asset |
There was a problem hiding this comment.
Note: Setting this to erc20:0x0000000000000000000000000000000000000000 led the various errors, such as disappearance of pathUSD (ERC20 token) or disappearance of all tokens from assets list when trying to fix through the state.
Setting eip155:4217/slip44:60 works. Since there is not actual native asset, eip155:4217/slip44:60 is no less correct than erc20:0x0000000000000000000000000000000000000000 and is consistent with the default pre-population of nativeAssetIdentifiers.
c62a696 to
eb597b1
Compare
|
@metamaskbot publish-preview |
2 similar comments
|
@metamaskbot publish-preview |
|
@metamaskbot publish-preview |
eb597b1 to
4e0ae1b
Compare
|
@metamaskbot publish-preview |
|
Preview builds have been published. Learn how to use preview builds in other projects. Expand for full list of packages and versions. |

Explanation
This PR prevents native balance fetches on Tempo chains for the native asset for:
getBalancestarted to return an error from Tempo's RPC - currently returns4242424242424242424242424242424242424242424242424242424242424242424242424242but Tempo might change it to an error message in the future.References
Checklist
Note
Medium Risk
Moderate risk: changes
RpcDataSourcebalance-fetch behavior and error fallbacks for specific chains, which could affect portfolio balances/metadata if the skip list or chain IDs are incorrect.Overview
Prevents RPC native-balance fetching on Tempo chains by introducing
shouldSkipNativeForCaipChainIdand using it to omit native assets fromRpcDataSourcerequests (including error-path defaulting) and fromAssetsControllernative-token hiding logic.Updates token price support metadata so Tempo chains (
0x1079,0xa5bf) are treated as having no native asset (removing the prior pseudo-native mapping), and adds/adjusts unit tests to cover native-skip behavior including multicall fallback paths.Reviewed by Cursor Bugbot for commit 4e0ae1b. Bugbot is set up for automated code reviews on this repo. Configure here.