diff --git a/packages/bridge-ui-v2/src/components/Bridge/NFTBridgeSteps/ImportStep.svelte b/packages/bridge-ui-v2/src/components/Bridge/NFTBridgeSteps/ImportStep.svelte index c56f63ea67c..36cf5994e80 100644 --- a/packages/bridge-ui-v2/src/components/Bridge/NFTBridgeSteps/ImportStep.svelte +++ b/packages/bridge-ui-v2/src/components/Bridge/NFTBridgeSteps/ImportStep.svelte @@ -74,7 +74,6 @@ enteredIds = ''; isOwnerOfAllToken = false; detectedTokenType = null; - amountComponent?.clearAmount(); }; const changeNFTView = () => { diff --git a/packages/bridge-ui-v2/src/components/NFTs/NFTCards/NFTCardGrid.svelte b/packages/bridge-ui-v2/src/components/NFTs/NFTCards/NFTCardGrid.svelte index ff5ce8885f1..2be3af817e8 100644 --- a/packages/bridge-ui-v2/src/components/NFTs/NFTCards/NFTCardGrid.svelte +++ b/packages/bridge-ui-v2/src/components/NFTs/NFTCards/NFTCardGrid.svelte @@ -40,14 +40,9 @@ {nftsGroup[0].type} -
+
{#each nftsGroup as nft} - {@const collectionAddress = nft.addresses[chainId]} - {#if collectionAddress === undefined} -
TODO: Address for {nft.name} is undefined
- {:else} - - {/if} + {/each}
{#if Object.keys(collections).length > 1 || nfts.length > 3} diff --git a/packages/bridge-ui-v2/src/components/NFTs/NFTDisplay.svelte b/packages/bridge-ui-v2/src/components/NFTs/NFTDisplay.svelte index 8e597b3af1b..14c91c118f8 100644 --- a/packages/bridge-ui-v2/src/components/NFTs/NFTDisplay.svelte +++ b/packages/bridge-ui-v2/src/components/NFTs/NFTDisplay.svelte @@ -17,7 +17,7 @@ export let nftView: NFTView = NFTView.LIST; - $: size = nfts?.length && nfts?.length > 3 ? 'max-h-[350px] min-h-[350px]' : 'max-h-[249px] min-h-[249px]'; + $: size = nfts?.length && nfts?.length > 2 ? 'max-h-[350px] min-h-[350px]' : 'max-h-[249px] min-h-[249px]'; $: outerClasses = 'relative m bg-neutral rounded-[20px] overflow-hidden ' + size; $: innerClasses = 'overflow-y-auto p-[24px] ' + size; diff --git a/packages/bridge-ui-v2/src/libs/token/fetchNFTImageUrl.ts b/packages/bridge-ui-v2/src/libs/token/fetchNFTImageUrl.ts index c3e3b5ac29b..0567a6165be 100644 --- a/packages/bridge-ui-v2/src/libs/token/fetchNFTImageUrl.ts +++ b/packages/bridge-ui-v2/src/libs/token/fetchNFTImageUrl.ts @@ -111,9 +111,15 @@ const crossChainFetchNFTMetadata = async (token: NFT, srcChainId: number, destCh address: vaultAddress, }); - const isBridgedToken = await srcChainTokenVault.read.isBridgedToken([token.addresses[srcChainId]]); + const tokenAddress = token.addresses[srcChainId]; + + const bridgedAddress = (await srcChainTokenVault.read.canonicalToBridged([ + BigInt(srcChainId), + tokenAddress, + ])) as Address; + // if the token has no metadata but is also not bridged, we do not need to continue searching - if (!isBridgedToken) throw new Error('Token is not bridged'); + if (!bridgedAddress) throw new Error('Token is not bridged'); canonicalAddress = await findCanonicalTokenAddress(token, srcChainId, destChainId); if (!canonicalAddress) return null;