|
|
@ -3083,7 +3083,7 @@ UniValue getalldata(const UniValue& params, bool fHelp,const CPubKey&) |
|
|
|
for (auto addr : zs_addresses) { |
|
|
|
libzcash::SaplingExtendedSpendingKey extsk; |
|
|
|
if (pwalletMain->GetSaplingExtendedSpendingKey(addr, extsk)) { |
|
|
|
auto pt = libzcash::SaplingNotePlaintext::decrypt( |
|
|
|
auto pt = libzcash::SaplingNotePlaintext::decrypt( Params().GetConsensus(), chainActive.Height(), |
|
|
|
wtx.vShieldedOutput[op.n].encCiphertext,extsk.expsk.full_viewing_key().in_viewing_key(),wtx.vShieldedOutput[op.n].ephemeralKey,wtx.vShieldedOutput[op.n].cm); |
|
|
|
|
|
|
|
if (txType == 0 && pwalletMain->IsLockedNote(op)) |
|
|
@ -4804,7 +4804,7 @@ UniValue z_viewtransaction(const UniValue& params, bool fHelp, const CPubKey& my |
|
|
|
} |
|
|
|
auto op = res->second; |
|
|
|
auto wtxPrev = pwalletMain->mapWallet.at(op.hash); |
|
|
|
auto decrypted = wtxPrev.DecryptSaplingNote(op).get(); |
|
|
|
auto decrypted = wtxPrev.DecryptSaplingNote(Params().GetConsensus(), chainActive.Height(), op).get(); |
|
|
|
auto notePt = decrypted.first; |
|
|
|
auto pa = decrypted.second; |
|
|
|
|
|
|
@ -4840,14 +4840,14 @@ UniValue z_viewtransaction(const UniValue& params, bool fHelp, const CPubKey& my |
|
|
|
SaplingPaymentAddress pa; |
|
|
|
bool isOutgoing; |
|
|
|
|
|
|
|
auto decrypted = wtx.DecryptSaplingNote(op); |
|
|
|
auto decrypted = wtx.DecryptSaplingNote(Params().GetConsensus(), chainActive.Height(), op); |
|
|
|
if (decrypted) { |
|
|
|
notePt = decrypted->first; |
|
|
|
pa = decrypted->second; |
|
|
|
isOutgoing = false; |
|
|
|
} else { |
|
|
|
// Try recovering the output
|
|
|
|
auto recovered = wtx.RecoverSaplingNote(op, ovks); |
|
|
|
auto recovered = wtx.RecoverSaplingNote(Params().GetConsensus(), chainActive.Height(), op, ovks); |
|
|
|
if (recovered) { |
|
|
|
notePt = recovered->first; |
|
|
|
pa = recovered->second; |
|
|
|