Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/assets-controller/CHANGELOG.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -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]
Expand Down
20 changes: 8 additions & 12 deletions packages/assets-controller/src/defaults.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -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,
};

/**
Expand DownExpand Up@@ -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]],
]);

/**
Expand All@@ -97,7 +93,7 @@ export const DEFAULT_ASSET_METADATA: ReadonlyMap<string, AssetMetadata> =
[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],
Comment thread
maxime-oe marked this conversation as resolved.
]);

/**
Expand Down