From 32f7a700bc8cac924981d40faf507a41af9cf3ef Mon Sep 17 00:00:00 2001 From: Emre Bogazliyanlioglu Date: Mon, 23 Sep 2024 18:05:17 +0300 Subject: [PATCH] [Redesign] Exclude Frankenstein tokens when no wallet connected Signed-off-by: Emre Bogazliyanlioglu --- .../views/v2/Bridge/AssetPicker/TokenList.tsx | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/wormhole-connect/src/views/v2/Bridge/AssetPicker/TokenList.tsx b/wormhole-connect/src/views/v2/Bridge/AssetPicker/TokenList.tsx index f2983fe7e..91c13cd40 100644 --- a/wormhole-connect/src/views/v2/Bridge/AssetPicker/TokenList.tsx +++ b/wormhole-connect/src/views/v2/Bridge/AssetPicker/TokenList.tsx @@ -91,11 +91,6 @@ const TokenList = (props: Props) => { return; } - // Exclude tokens with no balance on source list - if (props.isSource && noBalance && props.wallet?.address) { - return; - } - // Exclude wormhole-wrapped tokens with no balance // unless it's canonical if ( @@ -163,11 +158,14 @@ const TokenList = (props: Props) => { } }); - // Finally: If no wallet is connected, fill up any remaining space from supported tokens - if (!props.wallet?.address) { + // Finally: If this is destination token or no wallet is connected, + // fill up any remaining space from supported and non-Frankenstein tokens + if (!props.isSource || !props.wallet?.address) { props.tokenList?.forEach((t) => { - // Adding remaining tokens - if (!tokenSet.has(t.key)) { + if ( + !tokenSet.has(t.key) && + !isFrankensteinToken(t, selectedChainConfig.key) + ) { addToken(t); } });