Change parseTxAcceptedNtfnParams to accept a float64 returned by btcd.

This commit is contained in:
Alex Akselrod 2015-04-17 14:20:39 -04:00
parent 34c87a7340
commit 05f1d6c89a

View file

@ -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
}