diff --git a/eip712_cosmos.go b/eip712_cosmos.go index 15fe1d27..85aca9e2 100644 --- a/eip712_cosmos.go +++ b/eip712_cosmos.go @@ -1,4 +1,4 @@ -package sdk_go +package sdk import ( "bytes" diff --git a/eip712_cosmos_test.go b/eip712_cosmos_test.go index 9ab216e1..300532ed 100644 --- a/eip712_cosmos_test.go +++ b/eip712_cosmos_test.go @@ -1,4 +1,4 @@ -package sdk_go +package sdk import ( "encoding/json" diff --git a/typeddata/typed_data.go b/typeddata/typed_data.go index 8af1e5b1..39a8be0e 100644 --- a/typeddata/typed_data.go +++ b/typeddata/typed_data.go @@ -997,12 +997,12 @@ func traverseFields( if prefix == typeDefPrefix { if len(typeMap[rootType]) == n { - return + return nil } } else { typeDef := sanitizeTypedef(prefix) if len(typeMap[typeDef]) == n { - return + return nil } } @@ -1035,7 +1035,7 @@ func traverseFields( err = cdc.UnpackAny(any, &anyWrapper.Value) if err != nil { err = errors.Wrap(err, "failed to unpack Any in msg struct") - return + return err } fieldType = reflect.TypeOf(anyWrapper) @@ -1142,7 +1142,7 @@ func traverseFields( err = traverseFields(cdc, typeMap, rootType, fieldPrefix, fieldType, field) if err != nil { - return + return errors.WithStack(err) } continue