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

fix(bridge-ui): defaulting to source chain explorer for link to canonical address #16701

Merged
merged 5 commits into from
Apr 11, 2024
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
10 changes: 5 additions & 5 deletions packages/bridge-ui/src/libs/token/getCanonicalInfoForToken.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,15 +183,15 @@ const _getStatus = async ({ address, srcChainId, destChainId, type }: CheckCanon
// if both are zero we are dealing with a canonical address
canonicalTokenAddress = srcChainTokenAddress;
// But either chain passed could be the canonical chain, so we need to check which one
const checkSrcChainForCanonicalChain = (await srcTokenVaultContract.read.canonicalToBridged([
srcChainId,
const checkDestChainForCanonicalChain = (await destTokenVaultContract.read.canonicalToBridged([
destChainId,
srcChainTokenAddress,
])) as Address;

if (checkSrcChainForCanonicalChain === zeroAddress) {
canonicalChain = destChainId;
} else {
if (checkDestChainForCanonicalChain === zeroAddress) {
canonicalChain = srcChainId;
} else {
canonicalChain = destChainId;
}
} else if (destCanonicalCheck !== zeroAddress) {
// if the destination is not zero, we found a canonical address there
Expand Down
Loading