From 6a4e40c2f58077b77b7336b8a078854cb5a07ae7 Mon Sep 17 00:00:00 2001 From: r41ph Date: Thu, 12 Dec 2024 17:13:30 +0000 Subject: [PATCH] fix: remove user constrain for USD case warning modal --- web-marketplace/src/pages/BuyCredits/BuyCredits.Form.tsx | 9 --------- .../src/pages/BuyCredits/BuyCredits.utils.tsx | 3 --- 2 files changed, 12 deletions(-) diff --git a/web-marketplace/src/pages/BuyCredits/BuyCredits.Form.tsx b/web-marketplace/src/pages/BuyCredits/BuyCredits.Form.tsx index 0609b80a19..c3a022ff8b 100644 --- a/web-marketplace/src/pages/BuyCredits/BuyCredits.Form.tsx +++ b/web-marketplace/src/pages/BuyCredits/BuyCredits.Form.tsx @@ -250,11 +250,6 @@ export const BuyCreditsForm = ({ [cardSellOrders, filteredCryptoSellOrders, paymentOption], ); - const isWeb2UserWithoutWallet = - !!privActiveAccount?.email && !activeAccount?.addr; - - const isVisitingUser = !activeAccount && !privActiveAccount; - const purchase = usePurchase({ paymentOption, retiring, @@ -322,13 +317,11 @@ export const BuyCreditsForm = ({ }); warningModalContent.current = getWarningModalContent( currency, - isWeb2UserWithoutWallet, creditsInRequestedSellOrders, _, allowedDenomsData, data, creditsInAllSellOrders, - isVisitingUser, ); } } @@ -343,10 +336,8 @@ export const BuyCreditsForm = ({ paymentMethodId, confirmationTokenId, currency, - isWeb2UserWithoutWallet, _, allowedDenomsData, - isVisitingUser, ], ); diff --git a/web-marketplace/src/pages/BuyCredits/BuyCredits.utils.tsx b/web-marketplace/src/pages/BuyCredits/BuyCredits.utils.tsx index ab7c1d44bd..7b1c12e0d4 100644 --- a/web-marketplace/src/pages/BuyCredits/BuyCredits.utils.tsx +++ b/web-marketplace/src/pages/BuyCredits/BuyCredits.utils.tsx @@ -66,17 +66,14 @@ export const getOrderedSellOrders = ( export const getWarningModalContent = ( currency: { askDenom: string; askBaseDenom: string } | undefined, - isWeb2UserWithoutWallet: boolean, creditsInRequestedSellOrders: number, _: TranslatorType, allowedDenomsData: QueryAllowedDenomsResponse | undefined, data: BuyCreditsSchemaTypes, creditsInAllSellOrders: number | undefined, - isVisitingUser: boolean, ): BuyWarningModalContent | undefined => { if ( currency?.askDenom === USD_DENOM && - (isWeb2UserWithoutWallet || isVisitingUser) && !creditsInRequestedSellOrders && creditsInAllSellOrders ) {