mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-04-29 14:59:39 -04:00
Update PSBT Operations Dialog for v2
This commit is contained in:
parent
5c9072f37f
commit
44174d76d0
1 changed files with 5 additions and 5 deletions
|
@ -180,15 +180,15 @@ QString PSBTOperationsDialog::renderTransaction(const PartiallySignedTransaction
|
|||
QString tx_description;
|
||||
QLatin1String bullet_point(" * ");
|
||||
CAmount totalAmount = 0;
|
||||
for (const CTxOut& out : psbtx.tx->vout) {
|
||||
for (const PSBTOutput& out : psbtx.outputs) {
|
||||
CTxDestination address;
|
||||
ExtractDestination(out.scriptPubKey, address);
|
||||
totalAmount += out.nValue;
|
||||
ExtractDestination(*out.script, address);
|
||||
totalAmount += *out.amount;
|
||||
tx_description.append(bullet_point).append(tr("Sends %1 to %2")
|
||||
.arg(BitcoinUnits::formatWithUnit(BitcoinUnit::BTC, out.nValue))
|
||||
.arg(BitcoinUnits::formatWithUnit(BitcoinUnit::BTC, *out.amount))
|
||||
.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") + ")");
|
||||
if (m_wallet_model != nullptr && m_wallet_model->wallet().txoutIsMine(CTxOut(*out.amount, *out.script))) tx_description.append(" (" + tr("own address") + ")");
|
||||
tx_description.append("<br>");
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue