Skip to content

Commit

Permalink
prefer local chain image over custom (#5772)
Browse files Browse the repository at this point in the history
  • Loading branch information
walmat authored May 24, 2024
1 parent 0360e3f commit cf2b961
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/__swaps__/screens/Swap/components/AnimatedChainImage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,18 +83,20 @@ export function AnimatedChainImage({
return base;
}

const url = getCustomChainIconUrlWorklet(asset.value.chainId, asset.value.address);
if (url) {
base.source.url = url;
return base;
}

if (networkBadges[asset.value.chainId]) {
if (!showMainnetBadge && asset.value.chainId === ChainId.mainnet) {
return base;
}
base.source.url = networkBadges[asset.value.chainId];
return base;
}

const url = getCustomChainIconUrlWorklet(asset.value.chainId, asset.value.address);
if (url) {
base.source.url = url;
return base;
}

return base;
});

Expand Down

0 comments on commit cf2b961

Please sign in to comment.