Use `ZTXOSelector::IncludesSapling` rather than selector internals.

This commit is contained in:
Kris Nuttycombe 2022-01-25 09:13:08 -07:00
parent b8a5131af9
commit db104a6329
1 changed files with 1 additions and 1 deletions

View File

@ -1508,7 +1508,7 @@ bool CWallet::SelectorMatchesAddress(
[&](const libzcash::SproutPaymentAddress& addr) { return false; }, [&](const libzcash::SproutPaymentAddress& addr) { return false; },
[&](const libzcash::SaplingPaymentAddress& a1) { return a0 == a1; }, [&](const libzcash::SaplingPaymentAddress& a1) { return a0 == a1; },
[&](const AccountZTXOPattern& acct) { [&](const AccountZTXOPattern& acct) {
if (acct.GetReceiverTypes().empty() || acct.GetReceiverTypes().count(ReceiverType::Sapling) > 0) { if (acct.IncludesSapling()) {
const auto meta = self->GetUFVKMetadataForReceiver(a0); const auto meta = self->GetUFVKMetadataForReceiver(a0);
if (meta.has_value()) { if (meta.has_value()) {
// use the coin if the account id corresponding to the UFVK is // use the coin if the account id corresponding to the UFVK is