We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e28ec2d commit a496512Copy full SHA for a496512
packages/assets-controllers/src/token-prices-service/codefi-v2.ts
@@ -462,11 +462,13 @@ export class CodefiTokenPricesServiceV2
462
hexToNumber(asset.chainId).toString(),
463
);
464
465
- const nativeAsset =
466
- HEX_CHAIN_ID_TO_CAIP19_NATIVE_ASSET_MAP[asset.chainId];
+ const nativeAddress = getNativeTokenAddress(asset.chainId);
467
468
return {
469
- assetId: nativeAsset ?? `${caipChainId}/erc20:${asset.address}`,
+ assetId:
+ nativeAddress.toLowerCase() === asset.address.toLowerCase()
470
+ ? HEX_CHAIN_ID_TO_CAIP19_NATIVE_ASSET_MAP[asset.chainId]
471
+ : `${caipChainId}/erc20:${asset.address}`,
472
address: asset.address,
473
chainId: asset.chainId,
474
};
0 commit comments