Skip to content

Commit dadff3d

Browse files
Modernize by replacing Split with Cut. (#2087)
1 parent 94a2003 commit dadff3d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

pkg/proto/eth_typed_data.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ func (typedData *ethereumTypedData) handleEncodeDataArray(encType string, encVal
203203
return nil, dataMismatchError(encType, encValue)
204204
}
205205
arrayBuffer := bytes.Buffer{}
206-
parsedType := strings.Split(encType, "[")[0]
206+
parsedType, _, _ := strings.Cut(encType, "[")
207207
for _, item := range arrayValue {
208208
if typedData.Types[parsedType] != nil {
209209
mapValue, has := item.(map[string]any)

0 commit comments

Comments
 (0)