aboutsummaryrefslogtreecommitdiff
path: root/src/rpcserver.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <[email protected]>2015-07-10 16:49:32 +0200
committerWladimir J. van der Laan <[email protected]>2015-07-10 16:50:46 +0200
commitc52e8b300a7a5c65f2a1c2e52a8129280de2c301 (patch)
treef6c1abeabbd7dc1e8691ac11045228d4a1403157 /src/rpcserver.cpp
parentMerge pull request #5486 (diff)
parentrpc: Accept scientific notation for monetary amounts in JSON (diff)
downloaddiscoin-c52e8b300a7a5c65f2a1c2e52a8129280de2c301.tar.xz
discoin-c52e8b300a7a5c65f2a1c2e52a8129280de2c301.zip
Merge pull request #6379
9cc9152 rpc: Accept scientific notation for monetary amounts in JSON (Wladimir J. van der Laan)
Diffstat (limited to 'src/rpcserver.cpp')
-rw-r--r--src/rpcserver.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rpcserver.cpp b/src/rpcserver.cpp
index 287cfb2f1..aeb51fed5 100644
--- a/src/rpcserver.cpp
+++ b/src/rpcserver.cpp
@@ -124,7 +124,7 @@ CAmount AmountFromValue(const UniValue& value)
if (!value.isReal() && !value.isNum())
throw JSONRPCError(RPC_TYPE_ERROR, "Amount is not a number");
CAmount amount;
- if (!ParseMoney(value.getValStr(), amount))
+ if (!ParseFixedPoint(value.getValStr(), 8, &amount))
throw JSONRPCError(RPC_TYPE_ERROR, "Invalid amount");
if (!MoneyRange(amount))
throw JSONRPCError(RPC_TYPE_ERROR, "Amount out of range");