From b0d547e07addea7dac45471b60c5ca2154f0d484 Mon Sep 17 00:00:00 2001 From: Ahmad Abdolsaheb Date: Thu, 4 Apr 2024 08:40:30 +0300 Subject: [PATCH] fix: clean wallet amount on prop change (#54281) --- client/src/components/Donation/wallets-button.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/client/src/components/Donation/wallets-button.tsx b/client/src/components/Donation/wallets-button.tsx index 0c7e65b312b..7f305c5ab50 100644 --- a/client/src/components/Donation/wallets-button.tsx +++ b/client/src/components/Donation/wallets-button.tsx @@ -72,6 +72,11 @@ const WalletsButton = ({ checkPaymentPossibility(false); } }); + + return () => { + setPaymentRequest(null); + checkPaymentPossibility(false); + }; }, [label, amount, stripe, postPayment, handlePaymentButtonLoad]); const displayRefreshError = (): void => {