Skip to content

Commit 621adee

Browse files
authored
Remove legacy logic from TokenList filter function (#3368)
The purpose of this change is to make the TokenList show the token when the search query matches the token exactly. There was some additional filtering logic that is no longer needed. If the token has 0 balance it will be grayed out.
1 parent 059e0fa commit 621adee

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

wormhole-connect/src/views/v2/Bridge/AssetPicker/TokenList.tsx

-16
Original file line numberDiff line numberDiff line change
@@ -305,22 +305,6 @@ const TokenList = (props: Props) => {
305305
filterFn={(token, query) => {
306306
if (query.length === 0) return true;
307307

308-
const chain = props.selectedChainConfig.key;
309-
310-
// Exclude frankenstein tokens with no balance
311-
const balance = balances?.[token.key]?.balance;
312-
const hasBalance = balance && sdkAmount.units(balance) > 0n;
313-
314-
if (isFrankensteinToken(token, chain) && !hasBalance) {
315-
return false;
316-
}
317-
318-
// Exclude wormhole-wrapped tokens with no balance
319-
// unless it's canonical
320-
if (props.isSource && token.isTokenBridgeWrappedToken && !hasBalance) {
321-
return false;
322-
}
323-
324308
const queryLC = query.toLowerCase();
325309

326310
const symbolMatch = [token.symbol, token.name].some((criteria) =>

0 commit comments

Comments
 (0)