From 4146ae997424a8f2cd3098c3f837238280432a1f Mon Sep 17 00:00:00 2001 From: Ramin Date: Tue, 22 Nov 2022 17:27:43 +0330 Subject: [PATCH 1/3] remove donation being processed toast when tx is mined --- src/components/modals/DonateModal.tsx | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/src/components/modals/DonateModal.tsx b/src/components/modals/DonateModal.tsx index abe37dd2fe..748c62e796 100644 --- a/src/components/modals/DonateModal.tsx +++ b/src/components/modals/DonateModal.tsx @@ -65,8 +65,8 @@ const DonateModal = (props: IDonateModalProps) => { const dispatch = useAppDispatch(); const { isAnimating, closeModal } = useModalAnimation(setShowModal); const isDonatingToGiveth = donationToGiveth > 0; - const { formatMessage } = useIntl(); + const [donating, setDonating] = useState(false); const [firstDonationSaved, setFirstDonationSaved] = useState(false); const [secondDonationSaved, setSecondDonationSaved] = useState(false); @@ -74,6 +74,7 @@ const DonateModal = (props: IDonateModalProps) => { const [secondTxHash, setSecondTxHash] = useState(''); const [isFirstTxSuccess, setIsFirstTxSuccess] = useState(false); const [secondTxStatus, setSecondTxStatus] = useState(); + const [processFinished, setProcessFinished] = useState(false); const [failedModalType, setFailedModalType] = useState(); @@ -111,6 +112,8 @@ const DonateModal = (props: IDonateModalProps) => { }; const delayedCloseModal = (txHash1: string, txHash2?: string) => { + setProcessFinished(true); + setDonating(false); const txHash = txHash2 ? [txHash1, txHash2] : [txHash1]; setTimeout(() => { closeModal(); @@ -278,7 +281,7 @@ const DonateModal = (props: IDonateModalProps) => { )} - {firstDonationSaved && ( + {firstDonationSaved && !processFinished && ( { Date: Mon, 28 Nov 2022 18:03:29 +0300 Subject: [PATCH 2/3] update package version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index cb4924a605..83eb34f838 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "givethdapp", - "version": "2.5.0", + "version": "2.5.1", "private": true, "scripts": { "build": "next build", From e2b3066dda1454d2a0656a2d95a11c0d47af3638 Mon Sep 17 00:00:00 2001 From: Cherik Date: Mon, 28 Nov 2022 18:04:22 +0300 Subject: [PATCH 3/3] update package version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 83eb34f838..2f19476751 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "givethdapp", - "version": "2.5.1", + "version": "2.5.2", "private": true, "scripts": { "build": "next build",