Skip to content

Commit

Permalink
Fix: remote token selection (#7)
Browse files Browse the repository at this point in the history
* fix: remote token selection

* fix: lint
  • Loading branch information
marthendalnunes authored Apr 5, 2024
1 parent 06f1fdf commit 989d80d
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -252,16 +252,16 @@ export function Erc721CollectionSelector({
value={tokenAddress}
className={cn("flex cursor-pointer gap-x-2.5 py-2")}
onSelect={() => {
const tokenAddress = (
chainType === "L1"
? token.address
: token.extensions?.bridgeInfo?.[chainId]
?.tokenAddress
) as Address
handleSelect(tokenAddress)
const l1Token = token.address as Address
const l2Token = token.extensions?.bridgeInfo?.[chainId]
handleSelect(
(chainType === "L1" ? l1Token : l2Token) as Address
)
setSelectedUnlistedToken(undefined)
setDestinationNetwork?.(undefined)
setRemoteToken?.(token.address as Address)
setRemoteToken?.(
(chainType === "L1" ? l2Token : l1Token) as Address
)
setTokenMetadata?.({
logoURI: selectedTokenData?.logoURI,
name: selectedTokenData?.name ?? undefined,
Expand Down

0 comments on commit 989d80d

Please sign in to comment.