From 57e1876daac2b9fce468adea3466e7ee63e6ab05 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Tue, 26 Oct 2021 17:45:05 -0400 Subject: [PATCH] Hush allows duplicate zaddr recipients --- src/sendtab.cpp | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/sendtab.cpp b/src/sendtab.cpp index 1c6582d..3b1e593 100644 --- a/src/sendtab.cpp +++ b/src/sendtab.cpp @@ -506,24 +506,14 @@ Tx MainWindow::createTxFromSendPage() { if (Settings::getInstance()->getAllowCustomFees()) { tx.fee = ui->minerFeeAmt->text().toDouble(); - } - else { + } else { tx.fee = Settings::getMinerFee(); } if (Settings::getInstance()->getAutoShield() && sendChangeToSapling) { auto saplingAddr = std::find_if(rpc->getAllZAddresses()->begin(), rpc->getAllZAddresses()->end(), [=](auto i) -> bool { - // We're finding a sapling address that is not one of the To addresses, because zcash doesn't allow duplicated addresses - // TODO: Should we disable this in Hush? What are the privacy and chain analysis considerations? bool isSapling = Settings::getInstance()->isSaplingAddress(i); if (!isSapling) return false; - - // Also check all the To addresses - for (auto t : tx.toAddrs) { - if (t.addr == i) - return false; - } - return true; });