wallet, refactor: Convert uint256 to Txid in wallet interfaces

In most cases throughout the wallet, the implicit conversion from `Txid` to
`const uint256&` works. However, `commitBumpTransaction` requires a `uint256&`
out parameter, so `bumped_txid` in `feebumper::CommitTransaction` is also
updated here to use `Txid`.
This commit is contained in:
marcofleon
2025-03-28 16:51:31 +00:00
parent b3214cefe6
commit c8ed51e62b
6 changed files with 24 additions and 28 deletions

View File

@@ -561,15 +561,11 @@ bool WalletModel::bumpFee(Txid hash, Txid& new_hash)
return false;
}
// commit the bumped transaction
// Temporary uint256 variable needed for commitBumpTransaction out parameter.
uint256 bumped_txid_result;
if(!m_wallet->commitBumpTransaction(hash, std::move(mtx), errors, bumped_txid_result)) {
if(!m_wallet->commitBumpTransaction(hash, std::move(mtx), errors, new_hash)) {
QMessageBox::critical(nullptr, tr("Fee bump error"), tr("Could not commit transaction") + "<br />(" +
QString::fromStdString(errors[0].translated)+")");
return false;
}
// Assign the received txid back to the new_hash.
new_hash = Txid::FromUint256(bumped_txid_result);
return true;
}