diff --git a/packages/assets-controller/CHANGELOG.md b/packages/assets-controller/CHANGELOG.md index 0c985e6132..00fbfba879 100644 --- a/packages/assets-controller/CHANGELOG.md +++ b/packages/assets-controller/CHANGELOG.md @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed +- Fix Arc native USDC never appearing until the account receives its first deposit, by default-tracking the native asset id (`eip155:5042/slip44:5042`) instead of the `0x3600...` ERC20 identity so `assetsInfo` metadata is seeded up front ([#9869](https://github.com/MetaMask/core/pull/9869)) - Properly filter empty (`''`) selected account group event ([#9825](https://github.com/MetaMask/core/pull/9825)) ## [13.1.2] diff --git a/packages/assets-controller/src/defaults.ts b/packages/assets-controller/src/defaults.ts index 6c587cddf8..613819c700 100644 --- a/packages/assets-controller/src/defaults.ts +++ b/packages/assets-controller/src/defaults.ts @@ -32,20 +32,16 @@ const MUSD_METADATA: FungibleAssetMetadata = { }; /** - * Harcoded metadata for USDC on Arc (5042/0x13b2). - * USDC exists as both native (18 decimals) and ERC20 (6 decimals). - * We choose to force-hide the native version to avoid double listing using - * `CHAIN_IDS_WITH_NO_NATIVE_TOKEN`. - * In the meantime, the code below force-shows USDC the ERC20 token. + * Arc's native USDC also exists as its own ERC20 (`0x3600...`); Accounts API + * resolves that identity without ever seeding native `assetsInfo` metadata. */ -const USDC_ON_ARC_ASSET_ID = - 'eip155:5042/erc20:0x3600000000000000000000000000000000000000'; +const ARC_NATIVE_ASSET_ID = 'eip155:5042/slip44:5042'; -const USDC_ON_ARC_METADATA: FungibleAssetMetadata = { - type: 'erc20', +const ARC_NATIVE_METADATA: FungibleAssetMetadata = { + type: 'native', symbol: 'USDC', name: 'USDC', - decimals: 6, + decimals: 18, }; /** @@ -76,7 +72,7 @@ export const DEFAULT_TRACKED_ASSETS_BY_CHAIN: ReadonlyMap< ['eip155:1' as ChainId, [musdAssetId('eip155:1' as ChainId)]], ['eip155:59144' as ChainId, [musdAssetId('eip155:59144' as ChainId)]], ['eip155:143' as ChainId, [musdAssetId('eip155:143' as ChainId)]], - ['eip155:5042' as ChainId, [USDC_ON_ARC_ASSET_ID]], + ['eip155:5042' as ChainId, [ARC_NATIVE_ASSET_ID]], ]); /** @@ -97,7 +93,7 @@ export const DEFAULT_ASSET_METADATA: ReadonlyMap = [musdAssetId('eip155:1' as ChainId), MUSD_METADATA], [musdAssetId('eip155:59144' as ChainId), MUSD_METADATA], [musdAssetId('eip155:143' as ChainId), MUSD_METADATA], - [USDC_ON_ARC_ASSET_ID, USDC_ON_ARC_METADATA], + [ARC_NATIVE_ASSET_ID, ARC_NATIVE_METADATA], ]); /**