mirror of
https://github.com/btcsuite/btcd.git
synced 2024-11-20 02:09:04 +01:00
Change parseTxAcceptedNtfnParams to accept a float64 returned by btcd.
This commit is contained in:
parent
34c87a7340
commit
05f1d6c89a
12
notify.go
12
notify.go
@ -525,9 +525,15 @@ func parseTxAcceptedNtfnParams(params []json.RawMessage) (*wire.ShaHash,
|
||||
return nil, 0, err
|
||||
}
|
||||
|
||||
// Unmarshal second parameter as an integer.
|
||||
var amt int64
|
||||
err = json.Unmarshal(params[1], &amt)
|
||||
// Unmarshal second parameter as a floating point number.
|
||||
var famt float64
|
||||
err = json.Unmarshal(params[1], &famt)
|
||||
if err != nil {
|
||||
return nil, 0, err
|
||||
}
|
||||
|
||||
// Bounds check amount.
|
||||
amt, err := btcutil.NewAmount(famt)
|
||||
if err != nil {
|
||||
return nil, 0, err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user