aboutsummaryrefslogtreecommitdiff
path: root/src/qt
diff options
context:
space:
mode:
authorHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2023-07-16 19:34:28 +0100
committerHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2023-07-16 19:43:11 +0100
commit57b8336dfed6312003cf34cd5ae7099f77115e73 (patch)
tree525fe329492c0e4b05eafb2dc07696ad98a9a634 /src/qt
parent01e5d6b105861ebf1216df6f1682004e44dd2544 (diff)
parent4da243ba023f2987e97fc62886c6ebc70d6ee50a (diff)
downloadbitcoin-57b8336dfed6312003cf34cd5ae7099f77115e73.tar.xz
Merge bitcoin-core/gui#740: Show own outputs on PSBT signing window
4da243ba023f2987e97fc62886c6ebc70d6ee50a qt: show own outputs on PSBT signing window (Hernan Marino) Pull request description: This fixes https://github.com/bitcoin-core/gui/issues/732 . It allows you to identify your own addresses in the outputs of a transaction in the PSBT signing window. This enables easy identification of change outputs, and prevents certain attacks where someone (co-signers of a multisig, or others ) might trick you into signing a transaction while they are stealing the change, since prior to this modification there was no easy way of knowing this. The identification of the output is similar to the way this is done in the transaction details window. A sample output is : ![image](https://github.com/bitcoin-core/gui/assets/87907936/48b8a652-7570-466b-9a34-cc0303c86d8c) ACKs for top commit: achow101: ACK 4da243ba023f2987e97fc62886c6ebc70d6ee50a jarolrod: ACK 4da243ba023f2987e97fc62886c6ebc70d6ee50a Tree-SHA512: fa9901d2acc84472c11afcd0a59a859db598cdf5cea755b492178d3e7434b70d9bd8f554928938a2ff9920c8f397fef814ce14b416556c30fba0c3c1f62cd722
Diffstat (limited to 'src/qt')
-rw-r--r--src/qt/psbtoperationsdialog.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/qt/psbtoperationsdialog.cpp b/src/qt/psbtoperationsdialog.cpp
index fe52e11157..26f1696de1 100644
--- a/src/qt/psbtoperationsdialog.cpp
+++ b/src/qt/psbtoperationsdialog.cpp
@@ -182,6 +182,8 @@ std::string PSBTOperationsDialog::renderTransaction(const PartiallySignedTransac
tx_description.append(tr(" * Sends %1 to %2")
.arg(BitcoinUnits::formatWithUnit(BitcoinUnit::BTC, out.nValue))
.arg(QString::fromStdString(EncodeDestination(address))));
+ // Check if the address is one of ours
+ if (m_wallet_model != nullptr && m_wallet_model->wallet().txoutIsMine(out)) tx_description.append(" (" + tr("own address") + ")");
tx_description.append("<br>");
}