diff --git a/packages/checkout/src/views/Checkout/PaymentMethodSelect/OrderSummary/index.tsx b/packages/checkout/src/views/Checkout/PaymentMethodSelect/OrderSummary/index.tsx index 2ac64029c..521b45a13 100644 --- a/packages/checkout/src/views/Checkout/PaymentMethodSelect/OrderSummary/index.tsx +++ b/packages/checkout/src/views/Checkout/PaymentMethodSelect/OrderSummary/index.tsx @@ -8,6 +8,7 @@ import { useSelectPaymentModal } from '../../../../hooks/useSelectPaymentModal.j export const OrderSummary = () => { const { selectPaymentSettings } = useSelectPaymentModal() + const isFree = Number(selectPaymentSettings!.price) == 0 const chain = selectPaymentSettings!.chain const network = findSupportedNetwork(chain) const chainId = network?.chainId || 137 @@ -62,6 +63,30 @@ export const OrderSummary = () => { const fiatExchangeRate = dataCoinPrices?.[0].price?.value || 0 const priceFiat = (fiatExchangeRate * Number(formattedPrice)).toFixed(2) + const PriceSection = () => { + if (isFree) { + return ( + + Free + + ) + } + + return ( + <> +
+ + + {`${displayPrice} ${dataCurrencyInfo?.symbol} on ${network?.title}`} + +
+ + {`$${priceFiat} USD`} + + + ) + } + return (
@@ -90,15 +115,7 @@ export const OrderSummary = () => { {dataCollectionInfo?.name || null} -
- - - {`${displayPrice} ${dataCurrencyInfo?.symbol} on ${network?.title}`} - -
- - {`$${priceFiat} USD`} - +
) diff --git a/packages/checkout/src/views/Checkout/PaymentMethodSelect/PayWithCrypto/index.tsx b/packages/checkout/src/views/Checkout/PaymentMethodSelect/PayWithCrypto/index.tsx index c32f50f7e..e50730836 100644 --- a/packages/checkout/src/views/Checkout/PaymentMethodSelect/PayWithCrypto/index.tsx +++ b/packages/checkout/src/views/Checkout/PaymentMethodSelect/PayWithCrypto/index.tsx @@ -60,6 +60,8 @@ export const PayWithCryptoTab = ({ skipOnCloseCallback }: PayWithCryptoTabProps) slippageBps } = selectPaymentSettings + const isFree = Number(price) == 0 + const network = findSupportedNetwork(chain) const chainId = network?.chainId || 137 @@ -533,9 +535,19 @@ export const PayWithCryptoTab = ({ skipOnCloseCallback }: PayWithCryptoTabProps) ) } - return ( -
-
+ const PriceSection = () => { + if (isFree) { + return ( +
+ + This item is free, click Confirm to mint to your wallet + +
+ ) + } + + return ( +
+ ) + } + + return ( +
+
{isError && ( @@ -578,7 +596,7 @@ export const PayWithCryptoTab = ({ skipOnCloseCallback }: PayWithCryptoTabProps)