diff --git a/src/wallet/walletdb.h b/src/wallet/walletdb.h index ab0d4ab0d..ee278e8df 100644 --- a/src/wallet/walletdb.h +++ b/src/wallet/walletdb.h @@ -367,6 +367,10 @@ class CSerializeRecipientAddress { recipient = saplingAddr; break; } + case libzcash::ReceiverType::Orchard: { + // TODO ORCHARD: Handle when we add Orchard to RecipientAddress + break; + } } } diff --git a/src/zcash/address/unified.cpp b/src/zcash/address/unified.cpp index 3c31d33d2..97b46ed15 100644 --- a/src/zcash/address/unified.cpp +++ b/src/zcash/address/unified.cpp @@ -31,14 +31,11 @@ bool libzcash::HasTransparent(const std::set& receiverTypes) { } Receiver libzcash::RecipientAddressToReceiver(const RecipientAddress& recipient) { - Receiver recipientReceiver; - std::visit(match { - [&](const CKeyID& key) { recipientReceiver = key; }, - [&](const CScriptID& scriptId) { recipientReceiver = scriptId; }, - [&](const libzcash::SaplingPaymentAddress& addr) { recipientReceiver = addr; } + return std::visit(match { + [](const CKeyID& key) { return Receiver(key); }, + [](const CScriptID& scriptId) { return Receiver(scriptId); }, + [](const libzcash::SaplingPaymentAddress& addr) { return Receiver(addr); } }, recipient); - - return recipientReceiver; } std::optional ZcashdUnifiedSpendingKey::ForAccount(