Skip to content

Commit 3bfb513

Browse files
Fuzzbawlsfurszy
authored andcommitted
RPC: drop "ed" suffix from input arguments for shield export commands
Also drop the "ed" suffix from return error messages in these two commands. Github-Pull: #2119 Rebased-From: c15c5c6
1 parent 9bc65af commit 3bfb513

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/wallet/rpcdump.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -885,13 +885,13 @@ UniValue exportsaplingviewingkey(const JSONRPCRequest& request)
885885
{
886886
if (request.fHelp || request.params.size() != 1)
887887
throw std::runtime_error(
888-
"exportsaplingviewingkey \"shielded_addr\"\n"
889-
"\nReveals the viewing key corresponding to 'shielded addr'.\n"
888+
"exportsaplingviewingkey \"shield_addr\"\n"
889+
"\nReveals the viewing key corresponding to 'shield_addr'.\n"
890890
"Then the importsaplingviewingkey can be used with this output\n"
891891
+ HelpRequiringPassphrase() + "\n"
892892

893893
"\nArguments:\n"
894-
"1. \"shielded_addr\" (string, required) The shielded addr for the viewing key\n"
894+
"1. \"shield_addr\" (string, required) The shield addr for the viewing key\n"
895895

896896
"\nResult:\n"
897897
"\"vkey\" (string) The viewing key\n"
@@ -909,28 +909,28 @@ UniValue exportsaplingviewingkey(const JSONRPCRequest& request)
909909
std::string strAddress = request.params[0].get_str();
910910
auto address = KeyIO::DecodePaymentAddress(strAddress);
911911
if (!IsValidPaymentAddress(address)) {
912-
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid shielded addr");
912+
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid shield addr");
913913
}
914914
const libzcash::SaplingPaymentAddress &sapAddr = *boost::get<libzcash::SaplingPaymentAddress>(&address);
915915
auto vk = pwalletMain->GetSaplingScriptPubKeyMan()->GetViewingKeyForPaymentAddress(sapAddr);
916916
if (vk) {
917917
return KeyIO::EncodeViewingKey(vk.get());
918918
} else {
919-
throw JSONRPCError(RPC_WALLET_ERROR, "Wallet does not hold private key or viewing key for this shielded addr");
919+
throw JSONRPCError(RPC_WALLET_ERROR, "Wallet does not hold private key or viewing key for this shield addr");
920920
}
921921
}
922922

923923
UniValue exportsaplingkey(const JSONRPCRequest& request)
924924
{
925925
if (request.fHelp || request.params.size() != 1)
926926
throw std::runtime_error(
927-
"exportsaplingkey \"shielded addr\"\n"
928-
"\nReveals the key corresponding to the 'shielded addr'.\n"
927+
"exportsaplingkey \"shield_addr\"\n"
928+
"\nReveals the key corresponding to the 'shield_addr'.\n"
929929
"Then the importsaplingkey can be used with this output\n"
930930
+ HelpRequiringPassphrase() + "\n"
931931

932932
"\nArguments:\n"
933-
"1. \"addr\" (string, required) The shielded addr for the private key\n"
933+
"1. \"addr\" (string, required) The shield addr for the private key\n"
934934

935935
"\nResult:\n"
936936
"\"key\" (string) The private key\n"
@@ -950,14 +950,14 @@ UniValue exportsaplingkey(const JSONRPCRequest& request)
950950

951951
auto address = KeyIO::DecodePaymentAddress(strAddress);
952952
if (!IsValidPaymentAddress(address)) {
953-
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid shielded addr");
953+
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid shield addr");
954954
}
955955
libzcash::SaplingPaymentAddress addr = *boost::get<libzcash::SaplingPaymentAddress>(&address);
956956

957957
// Sapling support
958958
Optional<libzcash::SaplingExtendedSpendingKey> sk = pwalletMain->GetSaplingScriptPubKeyMan()->GetSpendingKeyForPaymentAddress(addr);
959959
if (!sk) {
960-
throw JSONRPCError(RPC_WALLET_ERROR, "Wallet does not hold private key for this shielded addr");
960+
throw JSONRPCError(RPC_WALLET_ERROR, "Wallet does not hold private key for this shield addr");
961961
}
962962
return KeyIO::EncodeSpendingKey(libzcash::SpendingKey(sk.get()));
963963
}

0 commit comments

Comments
 (0)