Skip to content

Commit

Permalink
[bug] Cannot add token to the wallet - W (#2409)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielisaacgeslin authored Aug 20, 2024
1 parent c55ad33 commit d0a20ba
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions wormhole-connect/src/views/Redeem/AddToWallet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {

import config from 'config';
import { MAINNET_CHAINS } from 'config/mainnet';
import { TokenConfig } from 'config/types';
import { TokenConfig, Route } from 'config/types';
import { RootState } from 'store';
import { setWalletModal } from 'store/router';
import {
Expand Down Expand Up @@ -55,6 +55,7 @@ function AddToEVMWallet({ token, address }: AddTokenProps) {
const { classes } = useStyles();

const txData = useSelector((state: RootState) => state.redeem.txData)!;
const route = useSelector((state: RootState) => state.redeem.route)!;
const receiverWallet = useSelector(
(state: RootState) => state.wallet[TransferWallet.RECEIVING],
);
Expand All @@ -76,7 +77,9 @@ function AddToEVMWallet({ token, address }: AddTokenProps) {
address: address,
symbol: token.symbol,
decimals: getTokenDecimals(
config.wh.toChainId(txData.toChain),
config.wh.toChainId(
route === Route.Bridge ? txData.fromChain : txData.toChain,
),
token.tokenId || 'native',
),
// evm chain id
Expand Down

0 comments on commit d0a20ba

Please sign in to comment.