diff --git a/src/navigation/services/buy-crypto/screens/BuyCryptoRoot.tsx b/src/navigation/services/buy-crypto/screens/BuyCryptoRoot.tsx index 954573fb2..761587ebb 100644 --- a/src/navigation/services/buy-crypto/screens/BuyCryptoRoot.tsx +++ b/src/navigation/services/buy-crypto/screens/BuyCryptoRoot.tsx @@ -642,7 +642,7 @@ const BuyCryptoRoot: React.FC< modalTitle={'Select Destination'} onDismiss={(newWallet?: Wallet) => { hideModal('walletSelector'); - if (newWallet) { + if (newWallet?.currencyAbbreviation) { setWallet(newWallet); } }} diff --git a/src/navigation/services/swap-crypto/screens/SwapCryptoRoot.tsx b/src/navigation/services/swap-crypto/screens/SwapCryptoRoot.tsx index efdd90dc1..07adea9f1 100644 --- a/src/navigation/services/swap-crypto/screens/SwapCryptoRoot.tsx +++ b/src/navigation/services/swap-crypto/screens/SwapCryptoRoot.tsx @@ -182,7 +182,7 @@ const SwapCryptoRoot: React.FC = () => { setRateData(undefined); const coinsTo = cloneDeep(swapCryptoSupportedCoinsFrom).filter( - coin => coin !== fromWallet.currencyAbbreviation.toLowerCase(), + coin => coin !== fromWallet.currencyAbbreviation?.toLowerCase(), ); setSwapCryptoSupportedCoinsTo(coinsTo); @@ -201,14 +201,15 @@ const SwapCryptoRoot: React.FC = () => { if (fromWalletSelected) { setFromWalletData( SupportedCurrencyOptions.find( - ({id}) => id === fromWalletSelected?.credentials.coin, + ({id}) => + id === fromWalletSelected.currencyAbbreviation.toLowerCase(), ), ); } if (toWalletSelected) { setToWalletData( SupportedCurrencyOptions.find( - ({id}) => id === toWalletSelected?.credentials.coin, + ({id}) => id === toWalletSelected.currencyAbbreviation.toLowerCase(), ), ); } @@ -894,7 +895,7 @@ const SwapCryptoRoot: React.FC = () => { modalTitle={'Select Source Wallet'} onDismiss={(fromWallet: Wallet) => { hideModal('fromWalletSelector'); - if (fromWallet) { + if (fromWallet?.currencyAbbreviation) { setFromWallet(fromWallet); } }} @@ -907,7 +908,7 @@ const SwapCryptoRoot: React.FC = () => { modalTitle={'Select Destination'} onDismiss={(toWallet?: Wallet) => { hideModal('walletSelector'); - if (toWallet) { + if (toWallet?.currencyAbbreviation) { setToWallet(toWallet); } }}