aboutsummaryrefslogtreecommitdiff
path: root/src/qt/walletmodel.cpp
diff options
context:
space:
mode:
authorMarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz>2023-10-25 12:13:44 +0200
committerMarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz>2023-10-25 22:46:55 +0200
commit1111475b41698260cda0f25a96c051fd18d66129 (patch)
tree0784d1913befd9ae240f640552d082aac4cc3ad3 /src/qt/walletmodel.cpp
parentfa5ccc4137fdd14a75a6fc860b8ff6fc455cb55d (diff)
bugfix: Mark CNoDestination and PubKeyDestination constructor explicit
This should fix the bug reported in https://github.com/bitcoin/bitcoin/pull/28246#discussion_r1371640502, which caused the GUI to not detect the destination type of recipients, thus picking the wrong change destination type. Also, add missing lifetimebound attribute to a getter method.
Diffstat (limited to 'src/qt/walletmodel.cpp')
-rw-r--r--src/qt/walletmodel.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/qt/walletmodel.cpp b/src/qt/walletmodel.cpp
index ee3327530c..a45579fa0d 100644
--- a/src/qt/walletmodel.cpp
+++ b/src/qt/walletmodel.cpp
@@ -187,8 +187,7 @@ WalletModel::SendCoinsReturn WalletModel::prepareTransaction(WalletModelTransact
setAddress.insert(rcp.address);
++nAddresses;
- CScript scriptPubKey = GetScriptForDestination(DecodeDestination(rcp.address.toStdString()));
- CRecipient recipient = {scriptPubKey, rcp.amount, rcp.fSubtractFeeFromAmount};
+ CRecipient recipient{DecodeDestination(rcp.address.toStdString()), rcp.amount, rcp.fSubtractFeeFromAmount};
vecSend.push_back(recipient);
total += rcp.amount;