Update types.go
This commit is contained in:
parent
341647f186
commit
b2457f32ed
|
@ -498,6 +498,16 @@ func (typedData *TypedData) encodeArrayValue(encValue interface{}, encType strin
|
||||||
|
|
||||||
arrayBuffer := new(bytes.Buffer)
|
arrayBuffer := new(bytes.Buffer)
|
||||||
parsedType := strings.Split(encType, "[")[0]
|
parsedType := strings.Split(encType, "[")[0]
|
||||||
|
|
||||||
|
// Special handling for bytes arrays
|
||||||
|
if parsedType == "bytes" {
|
||||||
|
bytesValue, err := typedData.EncodePrimitiveValue(encType, encValue, depth)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return bytesValue, nil
|
||||||
|
}
|
||||||
|
|
||||||
for _, item := range arrayValue {
|
for _, item := range arrayValue {
|
||||||
if reflect.TypeOf(item).Kind() == reflect.Slice ||
|
if reflect.TypeOf(item).Kind() == reflect.Slice ||
|
||||||
reflect.TypeOf(item).Kind() == reflect.Array {
|
reflect.TypeOf(item).Kind() == reflect.Array {
|
||||||
|
|
Loading…
Reference in New Issue