Fix variable shadowing in change address derivation & add change IVK to the keystore.
This commit is contained in:
parent
acacc044fc
commit
ae2213dcdc
|
@ -313,6 +313,8 @@ bool CBasicKeyStore::AddUnifiedFullViewingKey(
|
|||
if (saplingKey.has_value()) {
|
||||
auto ivk = saplingKey.value().fvk.in_viewing_key();
|
||||
mapSaplingKeyUnified.insert(std::make_pair(ivk, ufvk.GetKeyID()));
|
||||
auto changeIvk = saplingKey.value().GetInternalDFVK().fvk.in_viewing_key();
|
||||
mapSaplingKeyUnified.insert(std::make_pair(changeIvk, ufvk.GetKeyID()));
|
||||
}
|
||||
|
||||
// We can't reasonably add the transparent component here, because
|
||||
|
|
|
@ -136,7 +136,6 @@ std::optional<RecipientAddress> ZcashdUnifiedFullViewingKey::GetChangeAddress(co
|
|||
}
|
||||
},
|
||||
[&](const SaplingChangeRequest& req) {
|
||||
std::optional<RecipientAddress> addr;
|
||||
// currently true by construction, as a UFVK must have a shielded component
|
||||
if (saplingKey.has_value()) {
|
||||
addr = saplingKey.value().GetChangeAddress();
|
||||
|
|
Loading…
Reference in New Issue