Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/rpcdump.cpp
Show First 20 Lines • Show All 79 Lines • ▼ Show 20 Lines | for (const auto &dest : GetAllDestinationsForKey(key.GetPubKey())) { | ||||
} | } | ||||
strAddr += EncodeDestination(dest, config); | strAddr += EncodeDestination(dest, config); | ||||
strLabel = EncodeDumpString(pwallet->mapAddressBook[dest].name); | strLabel = EncodeDumpString(pwallet->mapAddressBook[dest].name); | ||||
fLabelFound = true; | fLabelFound = true; | ||||
} | } | ||||
} | } | ||||
if (!fLabelFound) { | if (!fLabelFound) { | ||||
strAddr = EncodeDestination( | strAddr = EncodeDestination( | ||||
GetDestinationForKey(key.GetPubKey(), g_address_type), config); | GetDestinationForKey(key.GetPubKey(), | ||||
pwallet->m_default_address_type), | |||||
config); | |||||
} | } | ||||
return fLabelFound; | return fLabelFound; | ||||
} | } | ||||
UniValue importprivkey(const Config &config, const JSONRPCRequest &request) { | UniValue importprivkey(const Config &config, const JSONRPCRequest &request) { | ||||
CWallet *const pwallet = GetWalletForJSONRPCRequest(request); | CWallet *const pwallet = GetWalletForJSONRPCRequest(request); | ||||
if (!EnsureWalletIsAvailable(pwallet, request.fHelp)) { | if (!EnsureWalletIsAvailable(pwallet, request.fHelp)) { | ||||
return NullUniValue; | return NullUniValue; | ||||
▲ Show 20 Lines • Show All 1,384 Lines • Show Last 20 Lines |