From 11671a726279503508adfa99fd96a9b571acd456 Mon Sep 17 00:00:00 2001 From: r41ph Date: Wed, 8 Jan 2025 14:10:08 +0000 Subject: [PATCH] fix: handle web3 accounts connected in BuyWarningModal --- web-marketplace/src/pages/BuyCredits/BuyCredits.Form.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/web-marketplace/src/pages/BuyCredits/BuyCredits.Form.tsx b/web-marketplace/src/pages/BuyCredits/BuyCredits.Form.tsx index d52ecf43a1..790b8b4325 100644 --- a/web-marketplace/src/pages/BuyCredits/BuyCredits.Form.tsx +++ b/web-marketplace/src/pages/BuyCredits/BuyCredits.Form.tsx @@ -559,9 +559,16 @@ export const BuyCreditsForm = ({ if (!activeWalletAddr) { // no connected wallet address setConnectWalletModal(atom => void (atom.open = true)); - } else { + } else if (!isConnected) { // user logged in with web2 but not connected to the wallet address associated to his/er account setSwitchWalletModalAtom(atom => void (atom.open = true)); + } else { + // web3 account connected + handleSave( + { ...data, paymentOption: PAYMENT_OPTIONS.CRYPTO }, + activeStep, + ); + handleActiveStep(0); } } else if (action) { navigate(action);