From 61420fc85d832a730bfb41265746de21d78d8e1c Mon Sep 17 00:00:00 2001 From: Mohammad Ranjbar Z Date: Mon, 10 May 2021 21:06:37 +0430 Subject: [PATCH] Unset pendingAmountRemaining from Waiting, Committed and ToApprove donations related to #432 --- src/blockchain/pledges.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/blockchain/pledges.js b/src/blockchain/pledges.js index beb98ea8..1ca3cc05 100644 --- a/src/blockchain/pledges.js +++ b/src/blockchain/pledges.js @@ -269,7 +269,14 @@ const pledges = (app, liquidPledging) => { mined: true, token, }; - + if ( + mutation.status === DonationStatus.WAITING || + mutation.status === DonationStatus.COMMITTED || + mutation.status === DonationStatus.TO_APPROVE + ) { + // should unset pendingAmountRemaining when delegation donation is mined + mutation.pendingAmountRemaining = undefined; + } // Propagate comment and actionTakerAddress for donations created by direct donating if ( donations.length === 1 &&