Skip to content

Commit

Permalink
fix: remove user constrain for USD case warning modal
Browse files Browse the repository at this point in the history
  • Loading branch information
r41ph committed Dec 12, 2024
1 parent 82d97ab commit 6a4e40c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
9 changes: 0 additions & 9 deletions web-marketplace/src/pages/BuyCredits/BuyCredits.Form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -322,13 +317,11 @@ export const BuyCreditsForm = ({
});
warningModalContent.current = getWarningModalContent(
currency,
isWeb2UserWithoutWallet,
creditsInRequestedSellOrders,
_,
allowedDenomsData,
data,
creditsInAllSellOrders,
isVisitingUser,
);
}
}
Expand All @@ -343,10 +336,8 @@ export const BuyCreditsForm = ({
paymentMethodId,
confirmationTokenId,
currency,
isWeb2UserWithoutWallet,
_,
allowedDenomsData,
isVisitingUser,
],
);

Expand Down
3 changes: 0 additions & 3 deletions web-marketplace/src/pages/BuyCredits/BuyCredits.utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
) {
Expand Down

0 comments on commit 6a4e40c

Please sign in to comment.