From c56dbbefcbd06da3484bfd47bd64474a6ad7202f Mon Sep 17 00:00:00 2001 From: Christopher Howard Date: Mon, 21 Oct 2024 12:06:33 -0400 Subject: [PATCH] fix: assign mainnetAddress correctly in token search (#1734) Co-authored-by: brdy <41711440+BrodyHughes@users.noreply.github.com> --- src/core/resources/search/parseTokenSearch.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/resources/search/parseTokenSearch.ts b/src/core/resources/search/parseTokenSearch.ts index 271ca9cd76..935a9171b0 100644 --- a/src/core/resources/search/parseTokenSearch.ts +++ b/src/core/resources/search/parseTokenSearch.ts @@ -8,6 +8,7 @@ export function parseTokenSearch( chainId: ChainId, ): SearchAsset { const networkInfo = asset.networks[chainId]; + const mainnetInfo = asset.networks[ChainId.mainnet]; return { ...asset, @@ -15,7 +16,7 @@ export function parseTokenSearch( chainId, decimals: networkInfo ? networkInfo.decimals : asset.decimals, isNativeAsset: isNativeAsset(asset.address, chainId), - mainnetAddress: asset.uniqueId as AddressOrEth, + mainnetAddress: mainnetInfo?.address as AddressOrEth, uniqueId: `${networkInfo?.address || asset.uniqueId}_${chainId}`, }; }