@@ -102,8 +102,8 @@ static UniValue FinishTransaction(const std::shared_ptr<CWallet> pwallet, const
102
102
bool complete;
103
103
pwallet->FillPSBT (psbtx, complete, std::nullopt , /* sign=*/ false , /* bip32derivs=*/ true );
104
104
const auto err{pwallet->FillPSBT (psbtx, complete, std::nullopt , /* sign=*/ true , /* bip32derivs=*/ false )};
105
- if (err) {
106
- throw JSONRPCPSBTError (* err);
105
+ if (err != PSBTResult::OK ) {
106
+ throw JSONRPCPSBTError (err);
107
107
}
108
108
109
109
CMutableTransaction mtx;
@@ -1171,7 +1171,7 @@ static RPCHelpMan bumpfee_helper(std::string method_name)
1171
1171
PartiallySignedTransaction psbtx (mtx);
1172
1172
bool complete = false ;
1173
1173
const auto err{pwallet->FillPSBT (psbtx, complete, std::nullopt , /* sign=*/ false , /* bip32derivs=*/ true )};
1174
- CHECK_NONFATAL (! err);
1174
+ CHECK_NONFATAL (err == PSBTResult::OK );
1175
1175
CHECK_NONFATAL (!complete);
1176
1176
DataStream ssTx{};
1177
1177
ssTx << psbtx;
@@ -1631,8 +1631,8 @@ RPCHelpMan walletprocesspsbt()
1631
1631
if (sign) EnsureWalletIsUnlocked (*pwallet);
1632
1632
1633
1633
const auto err{wallet.FillPSBT (psbtx, complete, nHashType, sign, bip32derivs, nullptr , finalize)};
1634
- if (err) {
1635
- throw JSONRPCPSBTError (* err);
1634
+ if (err != PSBTResult::OK ) {
1635
+ throw JSONRPCPSBTError (err);
1636
1636
}
1637
1637
1638
1638
UniValue result (UniValue::VOBJ);
@@ -1770,8 +1770,8 @@ RPCHelpMan walletcreatefundedpsbt()
1770
1770
bool bip32derivs = request.params [4 ].isNull () ? true : request.params [4 ].get_bool ();
1771
1771
bool complete = true ;
1772
1772
const auto err{wallet.FillPSBT (psbtx, complete, std::nullopt , /* sign=*/ false , /* bip32derivs=*/ bip32derivs)};
1773
- if (err) {
1774
- throw JSONRPCPSBTError (* err);
1773
+ if (err != PSBTResult::OK ) {
1774
+ throw JSONRPCPSBTError (err);
1775
1775
}
1776
1776
1777
1777
// Serialize the PSBT
0 commit comments