wallet: remove CWallet::GetExternalSigner()

This commit is contained in:
fanquake
2021-04-13 18:12:39 +08:00
parent 06a0673351
commit aaa4e5a45b
2 changed files with 1 additions and 17 deletions

View File

@@ -3594,19 +3594,6 @@ void ReserveDestination::ReturnDestination()
address = CNoDestination();
}
#ifdef ENABLE_EXTERNAL_SIGNER
ExternalSigner CWallet::GetExternalSigner()
{
const std::string command = gArgs.GetArg("-signer", "");
if (command == "") throw std::runtime_error(std::string(__func__) + ": restart bitcoind with -signer=<cmd>");
std::vector<ExternalSigner> signers;
ExternalSigner::Enumerate(command, signers, Params().NetworkIDString());
if (signers.empty()) throw std::runtime_error(std::string(__func__) + ": No external signers found");
// TODO: add fingerprint argument in case of multiple signers
return signers[0];
}
#endif
bool CWallet::DisplayAddress(const CTxDestination& dest)
{
#ifdef ENABLE_EXTERNAL_SIGNER
@@ -3619,7 +3606,7 @@ bool CWallet::DisplayAddress(const CTxDestination& dest)
if (signer_spk_man == nullptr) {
return false;
}
ExternalSigner signer = GetExternalSigner(); // TODO: move signer in spk_man
ExternalSigner signer = ExternalSignerScriptPubKeyMan::GetExternalSigner();
return signer_spk_man->DisplayAddress(scriptPubKey, signer);
#else
return false;