From f0f7b3f012d208609f183a6f266d832d5526ce7c Mon Sep 17 00:00:00 2001 From: Eirik0 Date: Tue, 7 May 2019 08:55:26 -0600 Subject: [PATCH] Fix summing available funds --- src/wallet/asyncrpcoperation_saplingmigration.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wallet/asyncrpcoperation_saplingmigration.cpp b/src/wallet/asyncrpcoperation_saplingmigration.cpp index cb3f2c9d2..cb97bf040 100644 --- a/src/wallet/asyncrpcoperation_saplingmigration.cpp +++ b/src/wallet/asyncrpcoperation_saplingmigration.cpp @@ -77,7 +77,7 @@ bool AsyncRPCOperation_saplingmigration::main_impl() { } CAmount availableFunds = 0; for (const CSproutNotePlaintextEntry& sproutEntry : sproutEntries) { - availableFunds = sproutEntry.plaintext.value(); + availableFunds += sproutEntry.plaintext.value(); } // If the remaining amount to be migrated is less than 0.01 ZEC, end the migration. if (availableFunds < CENT) {