Skip to content

Commit

Permalink
give native token instead of wrapped native token (#771)
Browse files Browse the repository at this point in the history
  • Loading branch information
artursapek authored Jan 13, 2025
1 parent 5ea41d9 commit e824c8f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions connect/src/protocols/tokenBridge/tokenTransfer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import type {
import {
TokenBridge,
UniversalAddress,
canonicalAddress,
deserialize,
isNative,
isTokenId,
Expand Down Expand Up @@ -559,6 +560,10 @@ export namespace TokenTransfer {
lookup.chain,
lookup.address as UniversalAddress,
);
const destWrappedNative = await dstTb.getWrappedNative();
if (canonicalAddress({ chain: dstChain.chain, address: destWrappedNative }) === canonicalAddress({ chain: dstChain.chain, address: nativeAddress })) {
return { chain: dstChain.chain, address: 'native' }
}
return { chain: dstChain.chain, address: nativeAddress };
}

Expand Down

0 comments on commit e824c8f

Please sign in to comment.