@@ -2253,16 +2253,15 @@ void ReserveDestination::ReturnDestination()
2253
2253
bool CWallet::DisplayAddress (const CTxDestination& dest)
2254
2254
{
2255
2255
CScript scriptPubKey = GetScriptForDestination (dest);
2256
- const auto spk_man = GetScriptPubKeyMan (scriptPubKey);
2257
- if (spk_man == nullptr ) {
2258
- return false ;
2259
- }
2260
- auto signer_spk_man = dynamic_cast <ExternalSignerScriptPubKeyMan*>(spk_man);
2261
- if (signer_spk_man == nullptr ) {
2262
- return false ;
2256
+ for ( const auto & spk_man : GetScriptPubKeyMans (scriptPubKey)) {
2257
+ auto signer_spk_man = dynamic_cast <ExternalSignerScriptPubKeyMan *>(spk_man);
2258
+ if (signer_spk_man == nullptr ) {
2259
+ continue ;
2260
+ }
2261
+ ExternalSigner signer = ExternalSignerScriptPubKeyMan::GetExternalSigner ();
2262
+ return signer_spk_man-> DisplayAddress (scriptPubKey, signer) ;
2263
2263
}
2264
- ExternalSigner signer = ExternalSignerScriptPubKeyMan::GetExternalSigner ();
2265
- return signer_spk_man->DisplayAddress (scriptPubKey, signer);
2264
+ return false ;
2266
2265
}
2267
2266
2268
2267
bool CWallet::LockCoin (const COutPoint& output, WalletBatch* batch)
@@ -3035,9 +3034,10 @@ ScriptPubKeyMan* CWallet::GetScriptPubKeyMan(const OutputType& type, bool intern
3035
3034
return it->second ;
3036
3035
}
3037
3036
3038
- std::set<ScriptPubKeyMan*> CWallet::GetScriptPubKeyMans (const CScript& script, SignatureData& sigdata ) const
3037
+ std::set<ScriptPubKeyMan*> CWallet::GetScriptPubKeyMans (const CScript& script) const
3039
3038
{
3040
3039
std::set<ScriptPubKeyMan*> spk_mans;
3040
+ SignatureData sigdata;
3041
3041
for (const auto & spk_man_pair : m_spk_managers) {
3042
3042
if (spk_man_pair.second ->CanProvide (script, sigdata)) {
3043
3043
spk_mans.insert (spk_man_pair.second .get ());
@@ -3046,17 +3046,6 @@ std::set<ScriptPubKeyMan*> CWallet::GetScriptPubKeyMans(const CScript& script, S
3046
3046
return spk_mans;
3047
3047
}
3048
3048
3049
- ScriptPubKeyMan* CWallet::GetScriptPubKeyMan (const CScript& script) const
3050
- {
3051
- SignatureData sigdata;
3052
- for (const auto & spk_man_pair : m_spk_managers) {
3053
- if (spk_man_pair.second ->CanProvide (script, sigdata)) {
3054
- return spk_man_pair.second .get ();
3055
- }
3056
- }
3057
- return nullptr ;
3058
- }
3059
-
3060
3049
ScriptPubKeyMan* CWallet::GetScriptPubKeyMan (const uint256& id) const
3061
3050
{
3062
3051
if (m_spk_managers.count (id) > 0 ) {
0 commit comments