Skip to content

Commit

Permalink
fix: Filter native token for meson
Browse files Browse the repository at this point in the history
  • Loading branch information
wenty22 committed Dec 27, 2024
1 parent d13f59d commit 008c36a
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,16 @@ export class MesonAdapter extends BaseAdapter<IMesonChain[], IMesonChain, IMeson
const chainId = chain.chainId === 'tron' ? 728126428 : Number(chain.chainId);

const filteredTokens = chain.tokens.filter((token) => {
const tokenAddress = token.addr ?? '0x0000000000000000000000000000000000000000';

const isExcludedToken = this.checkIsExcludedToken({
excludedList: this.excludedTokens?.[chainId],
tokenSymbol: token?.symbol?.toUpperCase(),
tokenAddress: token.addr ?? '0x0000000000000000000000000000000000000000',
tokenAddress,
});

// native token transfer requires smart contract deployment. Ignore it for now.
return !isExcludedToken && !isNativeToken(token.addr);
return !isExcludedToken && !isNativeToken(tokenAddress);
});

if (filteredTokens.length > 0 && this.chainMap.has(chainId)) {
Expand Down

0 comments on commit 008c36a

Please sign in to comment.