diff options
Diffstat (limited to 'src/rpcserver.cpp')
-rw-r--r-- | src/rpcserver.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rpcserver.cpp b/src/rpcserver.cpp index 201fc5eba8..03c123a361 100644 --- a/src/rpcserver.cpp +++ b/src/rpcserver.cpp @@ -120,8 +120,8 @@ void RPCTypeCheckObj(const UniValue& o, CAmount AmountFromValue(const UniValue& value) { - if (!value.isNum()) - throw JSONRPCError(RPC_TYPE_ERROR, "Amount is not a number"); + if (!value.isNum() && !value.isStr()) + throw JSONRPCError(RPC_TYPE_ERROR, "Amount is not a number or string"); CAmount amount; if (!ParseFixedPoint(value.getValStr(), 8, &amount)) throw JSONRPCError(RPC_TYPE_ERROR, "Invalid amount"); |