Fix monetary unit
This commit is contained in:
parent
7d69fb9ba6
commit
36d4ae08e8
1 changed files with 1 additions and 1 deletions
|
@ -543,7 +543,7 @@ func handleCreateRawTransaction(s *rpcServer, cmd interface{}, closeChan <-chan
|
||||||
params := s.cfg.ChainParams
|
params := s.cfg.ChainParams
|
||||||
for encodedAddr, amount := range c.Amounts {
|
for encodedAddr, amount := range c.Amounts {
|
||||||
// Ensure amount is in the valid range for monetary amounts.
|
// Ensure amount is in the valid range for monetary amounts.
|
||||||
if amount <= 0 || amount > btcutil.MaxSatoshi {
|
if amount <= 0 || amount*btcutil.SatoshiPerBitcoin > btcutil.MaxSatoshi {
|
||||||
return nil, &btcjson.RPCError{
|
return nil, &btcjson.RPCError{
|
||||||
Code: btcjson.ErrRPCType,
|
Code: btcjson.ErrRPCType,
|
||||||
Message: "Invalid amount",
|
Message: "Invalid amount",
|
||||||
|
|
Loading…
Reference in a new issue