Skip to content

Commit

Permalink
Merge bitcoin-core/gui#812: Fix create unsigned transaction fee bump
Browse files Browse the repository at this point in the history
671b7a3 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 671b7a3
  hebasto:
    ACK 671b7a3, tested on Ubuntu 24.04.

Tree-SHA512: 5b9ec5a1b91c014c05c83c63daaa8ba33f9dc1bfa930442315a0913db710df17a1b6bb4ad39f1419a7054f37ebedb7ad52e1c5d3d2fb444b1676162e89a4efd2
  • Loading branch information
hebasto committed May 12, 2024
2 parents ee94913 + 671b7a3 commit b940619
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/qt/walletmodel.cpp
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit b940619

Please sign in to comment.