Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove legacy logic from TokenList filter function #3368

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 0 additions & 16 deletions wormhole-connect/src/views/v2/Bridge/AssetPicker/TokenList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -305,22 +305,6 @@ const TokenList = (props: Props) => {
filterFn={(token, query) => {
if (query.length === 0) return true;

const chain = props.selectedChainConfig.key;

// Exclude frankenstein tokens with no balance
const balance = balances?.[token.key]?.balance;
const hasBalance = balance && sdkAmount.units(balance) > 0n;

if (isFrankensteinToken(token, chain) && !hasBalance) {
return false;
}

// Exclude wormhole-wrapped tokens with no balance
// unless it's canonical
if (props.isSource && token.isTokenBridgeWrappedToken && !hasBalance) {
return false;
}

const queryLC = query.toLowerCase();

const symbolMatch = [token.symbol, token.name].some((criteria) =>
Expand Down
Loading