MCPcopy Create free account
hub / github.com/6boris/web3-template / validate

Method validate

api/interface/web3/defi.pb.validate.go:53–69  ·  view source on GitHub ↗
(all bool)

Source from the content-addressed store, hash-verified

51}
52
53func (m *GetTokenPriceRequest) validate(all bool) error {
54 if m == nil {
55 return nil
56 }
57
58 var errors []error
59
60 // no validation rules for SourceToken
61
62 // no validation rules for TargetToken
63
64 if len(errors) > 0 {
65 return GetTokenPriceRequestMultiError(errors)
66 }
67
68 return nil
69}
70
71// GetTokenPriceRequestMultiError is an error wrapping multiple validation
72// errors returned by GetTokenPriceRequest.ValidateAll() if the designated

Callers 2

ValidateMethod · 0.95
ValidateAllMethod · 0.95

Calls 1

Tested by

no test coverage detected