diff options
author | Andrew Chow <github@achow101.com> | 2022-12-20 15:19:39 -0500 |
---|---|---|
committer | Andrew Chow <github@achow101.com> | 2022-12-20 15:30:17 -0500 |
commit | cbcad79eefd741fcfa0fb45615b6030575310f62 (patch) | |
tree | 0c1a655a2888d92b0c301e08cee89ce6f4e16c66 /src/qt | |
parent | 497f26552b36a113f9312da557ad4b58e149524d (diff) | |
parent | 2c07cfacd1745844a1d3c57f2e8617549b9815d7 (diff) |
Merge bitcoin/bitcoin#21576: rpc, gui: bumpfee signer support
2c07cfacd1745844a1d3c57f2e8617549b9815d7 gui: bumpfee signer support (Sjors Provoost)
7e02a3329797211ed5d35e5f5e7b919c099b78ba rpc: bumpfee signer support (Sjors Provoost)
304ece994504220c355577170409b9200941f2af rpc: document bools in FillPSBT() calls (Sjors Provoost)
Pull request description:
The `bumpfee` RPC call and GUI fee bump interface now work with an external signer.
ACKs for top commit:
achow101:
ACK 2c07cfacd1745844a1d3c57f2e8617549b9815d7
furszy:
code review ACK 2c07cfac
jarolrod:
tACK 2c07cfa
Tree-SHA512: 0c7b931f76fac67c9e33b9b935f29af6f69ac67a5ffcc586ed2f1676feac427735b1d971723b29ef332bb6fb5762949598ebbf728587e8f0ded95a9bfbb3e7a4
Diffstat (limited to 'src/qt')
-rw-r--r-- | src/qt/walletmodel.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/qt/walletmodel.cpp b/src/qt/walletmodel.cpp index ed0602594b..32c0402d45 100644 --- a/src/qt/walletmodel.cpp +++ b/src/qt/walletmodel.cpp @@ -522,7 +522,9 @@ bool WalletModel::bumpFee(uint256 hash, uint256& new_hash) 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.")); } - auto confirmationDialog = new SendConfirmationDialog(tr("Confirm fee bump"), questionString, "", "", SEND_CONFIRM_DELAY, !m_wallet->privateKeysDisabled(), getOptionsModel()->getEnablePSBTControls(), nullptr); + const bool enable_send{!wallet().privateKeysDisabled() || wallet().hasExternalSigner()}; + const bool always_show_unsigned{getOptionsModel()->getEnablePSBTControls()}; + auto confirmationDialog = new SendConfirmationDialog(tr("Confirm fee bump"), questionString, "", "", SEND_CONFIRM_DELAY, enable_send, always_show_unsigned, nullptr); confirmationDialog->setAttribute(Qt::WA_DeleteOnClose); // TODO: Replace QDialog::exec() with safer QDialog::show(). const auto retval = static_cast<QMessageBox::StandardButton>(confirmationDialog->exec()); @@ -540,6 +542,7 @@ bool WalletModel::bumpFee(uint256 hash, uint256& new_hash) // Short-circuit if we are returning a bumped transaction PSBT to clipboard if (retval == QMessageBox::Save) { + // "Create Unsigned" clicked PartiallySignedTransaction psbtx(mtx); bool complete = false; const TransactionError err = wallet().fillPSBT(SIGHASH_ALL, /*sign=*/false, /*bip32derivs=*/true, nullptr, psbtx, complete); @@ -555,7 +558,7 @@ bool WalletModel::bumpFee(uint256 hash, uint256& new_hash) return true; } - assert(!m_wallet->privateKeysDisabled()); + assert(!m_wallet->privateKeysDisabled() || wallet().hasExternalSigner()); // sign bumped transaction if (!m_wallet->signBumpTransaction(mtx)) { |