func (t *Trade) Validate() error {
	if t.OrderHash.String() == "" {
		return errors.New("Order Hash missing")
	}

	if t.Hash.String() == "" {
		return errors.New("Trade Hash missing")
	}

	if t.Amount.Sign() == 0 {
		return errors.New("Amount missing or amount null")
	}

	if t.Taker.String() == "" {
		return errors.New("Taker address is not set")
	}

	if t.Signature == nil {
		return errors.New("Signature is not set")
	}

	return nil
}
// Valid verifies that all the fields of a struct are set and
// not null
Valid verifies that all the fields of a struct are set and
not null
// Valid verifies that all the fields of a struct are set and // not null
func (t *Trade) Validate() error {
	if t.OrderHash.String() == "" {
		return errors.New("Order Hash missing")
	}
	if t.Hash.String() == "" {
		return errors.New("Trade Hash missing")
	}
	if t.Amount.Sign() == 0 {
		return errors.New("Amount missing or amount null")
	}
	if t.Taker.String() == "" {
		return errors.New("Taker address is not set")
	}
	if t.Signature == nil {
		return errors.New("Signature is not set")
	}
	return nil
}
func ( t * Trade ) Validate ( ) error { if t . OrderHash . String ( ) == " " { return errors . New ( " " ) } if t . Hash . String ( ) == " " { return errors . New ( " " ) } if t . Amount . Sign ( ) == 0 { return errors . New ( " " ) } if t . Taker . String ( ) == " " { return errors . New ( " " ) } if t . Signature == nil { return errors . New ( " " ) } return nil }
Valid verifies that all the fields of a struct are set and
not null
Valid verifies that all the fields of a struct are set and not null