wallet: provide valid values if invalid estimate mode passed

Co-authored-by: Murch <murch@murch.one>
This commit is contained in:
Jon Atack
2020-11-10 12:29:01 +01:00
parent 6da3afbaee
commit 449b730579
10 changed files with 20 additions and 16 deletions

View File

@@ -1070,7 +1070,7 @@ static RPCHelpMan estimatesmartfee()
if (!request.params[1].isNull()) {
FeeEstimateMode fee_mode;
if (!FeeModeFromString(request.params[1].get_str(), fee_mode)) {
throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid estimate_mode parameter");
throw JSONRPCError(RPC_INVALID_PARAMETER, InvalidEstimateModeErrorMessage());
}
if (fee_mode == FeeEstimateMode::ECONOMICAL) conservative = false;
}