From f46c6232b001e4a1bfb8b61e514710cee9e04a9d Mon Sep 17 00:00:00 2001 From: Ebube Date: Tue, 1 Aug 2023 12:05:27 +0100 Subject: [PATCH] updated error scenario for the modal header --- src/components/MyWallet/Popup/ConfirmAddFund.jsx | 2 -- src/components/MyWallet/Popup/CreditPopup.jsx | 3 ++- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/components/MyWallet/Popup/ConfirmAddFund.jsx b/src/components/MyWallet/Popup/ConfirmAddFund.jsx index edbb68f..991b1e4 100644 --- a/src/components/MyWallet/Popup/ConfirmAddFund.jsx +++ b/src/components/MyWallet/Popup/ConfirmAddFund.jsx @@ -134,8 +134,6 @@ function ConfirmAddFund({ callback: (response) => { debouncedSuccessPayment(); //delays the call for 5 secs - if (response?.status === "successful") - return dispatch(tableReload({ type: "WALLETTABLE" })); setTimeout(() => { closePaymentModal(); setConfirmCredit((prev) => ({ diff --git a/src/components/MyWallet/Popup/CreditPopup.jsx b/src/components/MyWallet/Popup/CreditPopup.jsx index d186081..b8ecccd 100644 --- a/src/components/MyWallet/Popup/CreditPopup.jsx +++ b/src/components/MyWallet/Popup/CreditPopup.jsx @@ -25,7 +25,8 @@ const CreditPopup = ({ details, onClose, situation, walletItem }) => {

{confirmCredit?.show?.acceptConfirm?.state && - confirmCredit?.data?.internal_return < 0 ? ( + (confirmCredit?.data?.internal_return < 0 || + confirmCredit?.data?.status !== "successful") ? ( "Credit Unsuccessful" ) : ( <>