accounts/abi fixed error handling

This commit is contained in:
Marius van der Wijden 2020-05-11 13:44:24 +02:00
parent a910f54ba7
commit 8d09b08053

View file

@ -170,6 +170,9 @@ func NewType(t string, internalType string, components []ArgumentMarshaling) (ty
return Type{}, err
}
fieldName, err := overloadedArgName(c.Name, overloadedNames)
if err != nil {
return Type{}, err
}
overloadedNames[fieldName] = fieldName
fields = append(fields, reflect.StructField{
Name: fieldName, // reflect.StructOf will panic for any exported field.