accounts/abi: delete duplicate error check (#29136)

This commit is contained in:
Daniel Liu 2025-01-14 10:56:16 +08:00
parent b6f3007af1
commit 85059ed0d7

View file

@ -178,9 +178,6 @@ func NewType(t string, internalType string, components []ArgumentMarshaling) (ty
return Type{}, errors.New("abi: purely anonymous or underscored field is not supported")
}
fieldName := ResolveNameConflict(name, func(s string) bool { return used[s] })
if err != nil {
return Type{}, err
}
used[fieldName] = true
if !isValidFieldName(fieldName) {
return Type{}, fmt.Errorf("field %d has invalid name", idx)