Skip to content

Commit 2c07cfa

Browse files
committed
gui: bumpfee signer support
Specifically this enables the Send button in the fee bump dialog for wallets with external signer support. Similar to 2efdfb8.
1 parent 7e02a33 commit 2c07cfa

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/qt/walletmodel.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,9 @@ bool WalletModel::bumpFee(uint256 hash, uint256& new_hash)
508508
questionString.append(tr("Warning: This may pay the additional fee by reducing change outputs or adding inputs, when necessary. It may add a new change output if one does not already exist. These changes may potentially leak privacy."));
509509
}
510510

511-
auto confirmationDialog = new SendConfirmationDialog(tr("Confirm fee bump"), questionString, "", "", SEND_CONFIRM_DELAY, !m_wallet->privateKeysDisabled(), getOptionsModel()->getEnablePSBTControls(), nullptr);
511+
const bool enable_send{!wallet().privateKeysDisabled() || wallet().hasExternalSigner()};
512+
const bool always_show_unsigned{getOptionsModel()->getEnablePSBTControls()};
513+
auto confirmationDialog = new SendConfirmationDialog(tr("Confirm fee bump"), questionString, "", "", SEND_CONFIRM_DELAY, enable_send, always_show_unsigned, nullptr);
512514
confirmationDialog->setAttribute(Qt::WA_DeleteOnClose);
513515
// TODO: Replace QDialog::exec() with safer QDialog::show().
514516
const auto retval = static_cast<QMessageBox::StandardButton>(confirmationDialog->exec());
@@ -526,6 +528,7 @@ bool WalletModel::bumpFee(uint256 hash, uint256& new_hash)
526528

527529
// Short-circuit if we are returning a bumped transaction PSBT to clipboard
528530
if (retval == QMessageBox::Save) {
531+
// "Create Unsigned" clicked
529532
PartiallySignedTransaction psbtx(mtx);
530533
bool complete = false;
531534
const TransactionError err = wallet().fillPSBT(SIGHASH_ALL, false /* sign */, true /* bip32derivs */, nullptr, psbtx, complete);
@@ -541,7 +544,7 @@ bool WalletModel::bumpFee(uint256 hash, uint256& new_hash)
541544
return true;
542545
}
543546

544-
assert(!m_wallet->privateKeysDisabled());
547+
assert(!m_wallet->privateKeysDisabled() || wallet().hasExternalSigner());
545548

546549
// sign bumped transaction
547550
if (!m_wallet->signBumpTransaction(mtx)) {

0 commit comments

Comments
 (0)