Skip to content

Commit

Permalink
fix parsing of peercoin units
Browse files Browse the repository at this point in the history
  • Loading branch information
backpacker69 committed Feb 27, 2019
1 parent 6a73b9c commit 8e18947
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/bitcoin-tx.cpp
Expand Up @@ -510,7 +510,7 @@ static CAmount AmountFromValue(const UniValue& value)
if (!value.isNum() && !value.isStr())
throw std::runtime_error("Amount is not a number or string");
CAmount amount;
if (!ParseFixedPoint(value.getValStr(), 8, &amount))
if (!ParseFixedPoint(value.getValStr(), 6, &amount))
throw std::runtime_error("Invalid amount");
if (!MoneyRange(amount))
throw std::runtime_error("Amount out of range");
Expand Down
2 changes: 1 addition & 1 deletion src/rpc/server.cpp
Expand Up @@ -109,7 +109,7 @@ CAmount AmountFromValue(const UniValue& value)
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))
if (!ParseFixedPoint(value.getValStr(), 6, &amount))
throw JSONRPCError(RPC_TYPE_ERROR, "Invalid amount");
if (!MoneyRange(amount))
throw JSONRPCError(RPC_TYPE_ERROR, "Amount out of range");
Expand Down

0 comments on commit 8e18947

Please sign in to comment.