aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/rpc
diff options
context:
space:
mode:
Diffstat (limited to 'src/wallet/rpc')
-rw-r--r--src/wallet/rpc/backup.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/wallet/rpc/backup.cpp b/src/wallet/rpc/backup.cpp
index 3e1ec667e0..401c0b2d23 100644
--- a/src/wallet/rpc/backup.cpp
+++ b/src/wallet/rpc/backup.cpp
@@ -394,14 +394,8 @@ RPCHelpMan removeprunedfunds()
uint256 hash(ParseHashV(request.params[0], "txid"));
std::vector<uint256> vHash;
vHash.push_back(hash);
- std::vector<uint256> vHashOut;
-
- if (pwallet->ZapSelectTx(vHash, vHashOut) != DBErrors::LOAD_OK) {
- throw JSONRPCError(RPC_WALLET_ERROR, "Could not properly delete the transaction.");
- }
-
- if(vHashOut.empty()) {
- throw JSONRPCError(RPC_INVALID_PARAMETER, "Transaction does not exist in wallet.");
+ if (auto res = pwallet->ZapSelectTx(vHash); !res) {
+ throw JSONRPCError(RPC_WALLET_ERROR, util::ErrorString(res).original);
}
return UniValue::VNULL;