Skip to content

Commit 57b8336

Browse files
committed
Merge #740: Show own outputs on PSBT signing window
4da243b qt: show own outputs on PSBT signing window (Hernan Marino) Pull request description: This fixes #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 4da243b jarolrod: ACK 4da243b Tree-SHA512: fa9901d2acc84472c11afcd0a59a859db598cdf5cea755b492178d3e7434b70d9bd8f554928938a2ff9920c8f397fef814ce14b416556c30fba0c3c1f62cd722
2 parents 01e5d6b + 4da243b commit 57b8336

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/qt/psbtoperationsdialog.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,8 @@ std::string PSBTOperationsDialog::renderTransaction(const PartiallySignedTransac
182182
tx_description.append(tr(" * Sends %1 to %2")
183183
.arg(BitcoinUnits::formatWithUnit(BitcoinUnit::BTC, out.nValue))
184184
.arg(QString::fromStdString(EncodeDestination(address))));
185+
// Check if the address is one of ours
186+
if (m_wallet_model != nullptr && m_wallet_model->wallet().txoutIsMine(out)) tx_description.append(" (" + tr("own address") + ")");
185187
tx_description.append("<br>");
186188
}
187189

0 commit comments

Comments
 (0)