mirror of
https://github.com/bitcoin/bitcoin.git
synced 2024-11-20 10:38:42 +01:00
gui: bumpfee signer support
Specifically this enables the Send button in the fee bump dialog for wallets with external signer support. Similar to 2efdfb88aa
.
This commit is contained in:
parent
7e02a33297
commit
2c07cfacd1
@ -508,7 +508,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());
|
||||
@ -526,6 +528,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, false /* sign */, true /* bip32derivs */, nullptr, psbtx, complete);
|
||||
@ -541,7 +544,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)) {
|
||||
|
Loading…
Reference in New Issue
Block a user