Skip to content

Commit 384436e

Browse files
committed
fix: fix native token selection in near bridge
1 parent 84ff353 commit 384436e

File tree

1 file changed

+3
-1
lines changed
  • packages/bridging/src/providers/near-intents

1 file changed

+3
-1
lines changed

packages/bridging/src/providers/near-intents/util.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,9 @@ export const getTokenByAddressAndChainId = (
4848
return tokens.find((token) => {
4949
const chainId = NEAR_INTENTS_BLOCKCHAIN_CHAIN_IDS[token.blockchain as NearBlockchainKey]
5050
if (!chainId) return false
51-
if (targetTokenAddress.toLowerCase() === ETH_ADDRESS.toLowerCase()) return chainId === targetTokenChainId
51+
if (targetTokenAddress.toLowerCase() === ETH_ADDRESS.toLowerCase()) {
52+
return chainId === targetTokenChainId && !token.contractAddress
53+
}
5254
const tokenAddress = token.contractAddress || ETH_ADDRESS
5355
return tokenAddress?.toLowerCase() === targetTokenAddress.toLowerCase() && chainId === targetTokenChainId
5456
})

0 commit comments

Comments
 (0)