Skip to content

Commit

Permalink
fix: destWalletAddress
Browse files Browse the repository at this point in the history
  • Loading branch information
micaelae committed Feb 25, 2025
1 parent 925b939 commit 6bd256c
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions ui/pages/bridge/prepare/prepare-bridge-page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ import { useCountdownTimer } from '../../../hooks/bridge/useCountdownTimer';
import {
getCurrentKeyring,
getSelectedEvmInternalAccount,
getSelectedInternalAccount,
getTokenList,
} from '../../../selectors';
import { isHardwareKeyring } from '../../../helpers/utils/hardware';
Expand All @@ -98,6 +97,7 @@ import { useIsMultichainSwap } from '../hooks/useIsMultichainSwap';
import { useMultichainSelector } from '../../../hooks/useMultichainSelector';
import { formatChainIdToCaip } from '../../../../shared/modules/bridge-utils/caip-formatters';
import {
getLastSelectedNonEvmAccount,
getMultichainIsEvm,
getMultichainTransactions,
} from '../../../selectors/multichain';
Expand Down Expand Up @@ -158,12 +158,12 @@ const PrepareBridgePage = () => {

const isEvm = useMultichainSelector(getMultichainIsEvm);
const selectedEvmAccount = useSelector(getSelectedEvmInternalAccount);
const selectedMultichainAccount = useMultichainSelector(
getSelectedInternalAccount,
);

const lastSelectedNonEvmAccount = useSelector(getLastSelectedNonEvmAccount);

const selectedAccount = isEvm
? selectedEvmAccount
: selectedMultichainAccount;
: lastSelectedNonEvmAccount;

const keyring = useSelector(getCurrentKeyring);
// @ts-expect-error keyring type is wrong maybe?
Expand Down Expand Up @@ -318,7 +318,7 @@ const PrepareBridgePage = () => {
(toChain?.chainId &&
formatChainIdToCaip(toChain.chainId) === MultichainNetworks.SOLANA) ||
isSwap
? selectedMultichainAccount?.address
? lastSelectedNonEvmAccount?.address
: selectedEvmAccount?.address,
}),
[
Expand All @@ -327,13 +327,13 @@ const PrepareBridgePage = () => {
toToken?.address,
fromAmount,
fromChain?.chainId,
isSwap,
toChain?.chainId,
providerConfig?.rpcUrl,
slippage,
selectedAccount?.address,
isSwap,
selectedMultichainAccount?.address,
selectedEvmAccount?.address,
lastSelectedNonEvmAccount?.address,
],
);

Expand Down

0 comments on commit 6bd256c

Please sign in to comment.