Skip to content

Commit

Permalink
fix: handle web3 accounts connected in BuyWarningModal
Browse files Browse the repository at this point in the history
  • Loading branch information
r41ph committed Jan 8, 2025
1 parent 014992a commit 11671a7
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion web-marketplace/src/pages/BuyCredits/BuyCredits.Form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 11671a7

Please sign in to comment.