Switch btcctl to use btcutil.Amount.
This commit is contained in:
parent
e68d46f556
commit
f7ce37f8c1
1 changed files with 5 additions and 1 deletions
|
@ -129,7 +129,11 @@ func toSatoshi(val string) (interface{}, error) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return int64(btcutil.SatoshiPerBitcoin * idx), nil
|
amt, err := btcutil.NewAmount(idx)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return int64(amt), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// toInt attempts to convert the passed string to an integer. It returns the
|
// toInt attempts to convert the passed string to an integer. It returns the
|
||||||
|
|
Loading…
Reference in a new issue