Skip to content

Commit

Permalink
GUI/PSBT: Make sure all existing signatures are fully combined before…
Browse files Browse the repository at this point in the history
… checking for completeness

Github-Pull: bitcoin#18027
Rebased-From: a6cb0b0
  • Loading branch information
gwillen authored and luke-jr committed Aug 9, 2020
1 parent b854c40 commit 165a270
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/qt/psbtoperationsdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ void PSBTOperationsDialog::openWithPSBT(PartiallySignedTransaction psbtx)

bool complete;
size_t n_could_sign;
FinalizePSBT(psbtx); // Make sure all existing signatures are fully combined before checking for completeness.
TransactionError err = m_wallet_model->wallet().fillPSBT(SIGHASH_ALL, false /* sign */, true /* bip32derivs */, m_transaction_data, complete, &n_could_sign);
if (err != TransactionError::OK) {
showStatus(tr("Failed to load transaction: %1")
Expand Down Expand Up @@ -182,8 +183,9 @@ std::string PSBTOperationsDialog::renderTransaction(const PartiallySignedTransac
QStringList alternativeUnits;
for (const BitcoinUnits::Unit u : BitcoinUnits::availableUnits())
{
if(u != m_client_model->getOptionsModel()->getDisplayUnit())
if(u != m_client_model->getOptionsModel()->getDisplayUnit()) {
alternativeUnits.append(BitcoinUnits::formatHtmlWithUnit(u, totalAmount));
}
}
tx_description.append(QString("<b>%1</b>: <b>%2</b>").arg(tr("Total Amount"))
.arg(BitcoinUnits::formatHtmlWithUnit(m_client_model->getOptionsModel()->getDisplayUnit(), totalAmount)));
Expand Down

0 comments on commit 165a270

Please sign in to comment.