From 9bc73588a2534cb3d065bee830ee562f1dca8292 Mon Sep 17 00:00:00 2001 From: Pierre Seznec Date: Fri, 30 Aug 2024 16:25:28 +0200 Subject: [PATCH] fix asset selector --- src/lib/token/AssetSelector.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/token/AssetSelector.tsx b/src/lib/token/AssetSelector.tsx index 9c881e0b..00f3458c 100644 --- a/src/lib/token/AssetSelector.tsx +++ b/src/lib/token/AssetSelector.tsx @@ -40,8 +40,8 @@ export function AssetSelector(props: AssetSelectorProps) { }); } - const selectedAssetKey: number = selectedAsset - ? assets?.indexOf(selectedAsset) || 0 + const selectedAssetKey = selectedAsset + ? assets?.findIndex((asset) => asset.address === selectedAsset.address) || 0 : 0; return (