Introduce wrappers around CZCPaymentAddress
This patch removes the need for the intermediary Base58 type
CZCPaymentAddress, by providing {Encode,Decode}PaymentAddress
functions that directly operate on the conversion between strings
and libzcash::PaymentAddress.
This commit is contained in:
@@ -254,11 +254,8 @@ UniValue z_validatepaymentdisclosure(const UniValue& params, bool fHelp)
|
||||
|
||||
// Check the payment address is valid
|
||||
PaymentAddress zaddr = pd.payload.zaddr;
|
||||
CZCPaymentAddress address;
|
||||
if (!address.Set(zaddr)) {
|
||||
errs.push_back("Payment disclosure refers to an invalid payment address");
|
||||
} else {
|
||||
o.push_back(Pair("paymentAddress", address.ToString()));
|
||||
{
|
||||
o.push_back(Pair("paymentAddress", EncodePaymentAddress(zaddr)));
|
||||
|
||||
try {
|
||||
// Decrypt the note to get value and memo field
|
||||
|
||||
Reference in New Issue
Block a user