Default Value to 0 for NewTxArgs

This commit is contained in:
Taylor Gerring
2015-04-02 13:55:53 +02:00
parent 118ad22ee5
commit 015453f5b3
2 changed files with 10 additions and 4 deletions

View File

@ -198,7 +198,7 @@ func (args *NewTxArgs) UnmarshalJSON(b []byte) (err error) {
var num int64
if ext.Value == nil {
return NewValidationError("value", "is required")
num = 0
} else {
if err := numString(ext.Value, &num); err != nil {
return err