diff --git a/src/bitcoin-tx.cpp b/src/bitcoin-tx.cpp index f21db40f3c3..017e8e1e6c5 100644 --- a/src/bitcoin-tx.cpp +++ b/src/bitcoin-tx.cpp @@ -556,7 +556,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; + int64_t amount; if (!ParseFixedPoint(value.getValStr(), 8, &amount)) throw std::runtime_error("Invalid amount"); if (!MoneyRange(amount)) diff --git a/src/rpc/util.cpp b/src/rpc/util.cpp index 80b08d0140c..fedde2eba35 100644 --- a/src/rpc/util.cpp +++ b/src/rpc/util.cpp @@ -99,7 +99,7 @@ CAmount AmountFromValue(const UniValue& value, int decimals) { if (!value.isNum() && !value.isStr()) throw JSONRPCError(RPC_TYPE_ERROR, "Amount is not a number or string"); - CAmount amount; + int64_t amount; if (!ParseFixedPoint(value.getValStr(), decimals, &amount)) throw JSONRPCError(RPC_TYPE_ERROR, "Invalid amount"); if (!MoneyRange(amount)) diff --git a/src/test/util/transaction_utils.cpp b/src/test/util/transaction_utils.cpp index b65a9568c65..cf4ed934669 100644 --- a/src/test/util/transaction_utils.cpp +++ b/src/test/util/transaction_utils.cpp @@ -7,7 +7,7 @@ #include