mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-17 17:33:47 +00:00
Update types.go
This commit is contained in:
parent
341647f186
commit
b2457f32ed
1 changed files with 10 additions and 0 deletions
|
|
@ -498,6 +498,16 @@ func (typedData *TypedData) encodeArrayValue(encValue interface{}, encType strin
|
|||
|
||||
arrayBuffer := new(bytes.Buffer)
|
||||
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 {
|
||||
if reflect.TypeOf(item).Kind() == reflect.Slice ||
|
||||
reflect.TypeOf(item).Kind() == reflect.Array {
|
||||
|
|
|
|||
Loading…
Reference in a new issue