fix: prevent marking x-chain wrapped as native (#4921)

This commit is contained in:
Zach Pomerantz 2022-10-13 11:34:27 -07:00 committed by GitHub
parent f6b08e8ed1
commit 4f74267144
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -97,5 +97,10 @@ export function unwrapToken<T extends { address: string | null } | null>(chainId
if (address !== nativeAddress) return token
const nativeToken = nativeOnChain(chainId)
return { ...token, ...nativeToken, address: NATIVE_CHAIN_ID }
return {
...token,
...nativeToken,
address: NATIVE_CHAIN_ID,
extensions: undefined, // prevents marking cross-chain wrapped tokens as native
}
}