aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormerge-script <32963518+hebasto@users.noreply.github.com>2024-05-12 15:30:34 +0100
committermerge-script <32963518+hebasto@users.noreply.github.com>2024-05-12 15:30:34 +0100
commitb94061902e52132489fe296c12396798700f1f35 (patch)
treef683bd46169312b5ab2fe40464fe1786df92619c
parentee9491369faaa755ae1d248b8f32456fd656a5f4 (diff)
parent671b7a32516d62e1e79393ded4b45910bd08010a (diff)
downloadbitcoin-b94061902e52132489fe296c12396798700f1f35.tar.xz
Merge bitcoin-core/gui#812: Fix create unsigned transaction fee bump
671b7a32516d62e1e79393ded4b45910bd08010a gui: fix create unsigned transaction fee bump (furszy) Pull request description: Fixes #810. Not much to explain; we were requiring the wallet to be unlocked for the unsigned transaction creation process. Fix this by moving the unlock wallet request to the signed transaction creation process. ACKs for top commit: pablomartin4btc: tACK 671b7a32516d62e1e79393ded4b45910bd08010a hebasto: ACK 671b7a32516d62e1e79393ded4b45910bd08010a, tested on Ubuntu 24.04. Tree-SHA512: 5b9ec5a1b91c014c05c83c63daaa8ba33f9dc1bfa930442315a0913db710df17a1b6bb4ad39f1419a7054f37ebedb7ad52e1c5d3d2fb444b1676162e89a4efd2
-rw-r--r--src/qt/walletmodel.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/qt/walletmodel.cpp b/src/qt/walletmodel.cpp
index fe000bcbb8..87ad98a4cc 100644
--- a/src/qt/walletmodel.cpp
+++ b/src/qt/walletmodel.cpp
@@ -529,12 +529,6 @@ bool WalletModel::bumpFee(uint256 hash, uint256& new_hash)
return false;
}
- WalletModel::UnlockContext ctx(requestUnlock());
- if(!ctx.isValid())
- {
- return false;
- }
-
// Short-circuit if we are returning a bumped transaction PSBT to clipboard
if (retval == QMessageBox::Save) {
// "Create Unsigned" clicked
@@ -549,10 +543,15 @@ bool WalletModel::bumpFee(uint256 hash, uint256& new_hash)
DataStream ssTx{};
ssTx << psbtx;
GUIUtil::setClipboard(EncodeBase64(ssTx.str()).c_str());
- Q_EMIT message(tr("PSBT copied"), tr("Copied to clipboard", "Fee-bump PSBT saved"), CClientUIInterface::MSG_INFORMATION);
+ Q_EMIT message(tr("PSBT copied"), tr("Fee-bump PSBT copied to clipboard"), CClientUIInterface::MSG_INFORMATION | CClientUIInterface::MODAL);
return true;
}
+ WalletModel::UnlockContext ctx(requestUnlock());
+ if (!ctx.isValid()) {
+ return false;
+ }
+
assert(!m_wallet->privateKeysDisabled() || wallet().hasExternalSigner());
// sign bumped transaction