From a98d967ba43c07bce940396e283ad7d553252905 Mon Sep 17 00:00:00 2001 From: ebube Date: Mon, 27 Nov 2023 01:12:24 -0800 Subject: [PATCH] Fixed the credit issues --- src/components/MyWallet/Popup/AddFundDollars.jsx | 1 + src/components/MyWallet/Popup/AddFundPop.jsx | 1 + src/components/MyWallet/Popup/ConfirmAddFund.jsx | 4 ++-- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/MyWallet/Popup/AddFundDollars.jsx b/src/components/MyWallet/Popup/AddFundDollars.jsx index 7b0d0a4..c3d3563 100644 --- a/src/components/MyWallet/Popup/AddFundDollars.jsx +++ b/src/components/MyWallet/Popup/AddFundDollars.jsx @@ -160,6 +160,7 @@ function AddFundDollars(props) { let stateData = { amount: Number(props.input) * 100, + card_uid: "", //added card_uid as empty string currency: props.walletItem?.code, }; diff --git a/src/components/MyWallet/Popup/AddFundPop.jsx b/src/components/MyWallet/Popup/AddFundPop.jsx index dddb6ed..c4f761a 100644 --- a/src/components/MyWallet/Popup/AddFundPop.jsx +++ b/src/components/MyWallet/Popup/AddFundPop.jsx @@ -71,6 +71,7 @@ function AddFundPop({ // Prepare state data for API call let stateData = { amount: Number(input) * 100, + card_uid: "", //added card_uid as empty string currency: walletItem?.code, }; diff --git a/src/components/MyWallet/Popup/ConfirmAddFund.jsx b/src/components/MyWallet/Popup/ConfirmAddFund.jsx index aae9b2b..ecf1934 100644 --- a/src/components/MyWallet/Popup/ConfirmAddFund.jsx +++ b/src/components/MyWallet/Popup/ConfirmAddFund.jsx @@ -45,7 +45,7 @@ function ThePaymentText({ value, type }) { * @returns {JSX.Element} - The rendered component. */ function AmountSection({ currency, amount, country }) { - const formattedAmount = amount?.toFixed(2); + const formattedAmount = (+amount * 0.01)?.toFixed(2); const gapClassName = country === "US" ? "gap-14" : "gap-4"; return ( @@ -87,7 +87,7 @@ function TransactionFeeSection({ currency, fee, country }) { */ function TotalSection({ currency, amount, fee, country }) { const total = Number(amount) + Number(fee); - const formattedTotal = total?.toFixed(2); + const formattedTotal = (total * 0.01)?.toFixed(2); const gap = country === "US" ? "gap-[8rem]" : "gap-[6.3rem]";