aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrew Chow <github@achow101.com>2022-08-25 15:40:08 -0400
committerAndrew Chow <github@achow101.com>2022-08-25 16:25:53 -0400
commite664af29760527e75cd7e290be5f102b6d29ebee (patch)
treeb450196ef352875dc25c8b7a6be527609ff4c3ba /src
parent6b56873b41974ced7aad87a4b38abe360c34eed3 (diff)
Apply label to all scriptPubKeys of imported combo()
Diffstat (limited to 'src')
-rw-r--r--src/wallet/wallet.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp
index 3d989d90f8..42a9279892 100644
--- a/src/wallet/wallet.cpp
+++ b/src/wallet/wallet.cpp
@@ -3632,9 +3632,13 @@ ScriptPubKeyMan* CWallet::AddWalletDescriptor(WalletDescriptor& desc, const Flat
return nullptr;
}
- CTxDestination dest;
- if (!internal && ExtractDestination(script_pub_keys.at(0), dest)) {
- SetAddressBook(dest, label, "receive");
+ if (!internal) {
+ for (const auto& script : script_pub_keys) {
+ CTxDestination dest;
+ if (ExtractDestination(script, dest)) {
+ SetAddressBook(dest, label, "receive");
+ }
+ }
}
}