Skip to content

Commit 3d076ae

Browse files
committed
ethcoder: fix 'assignment to entry in nil map'
1 parent 9f6c9dd commit 3d076ae

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

ethcoder/typed_data_json.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,10 @@ func (t *TypedData) UnmarshalJSON(data []byte) error {
133133
dec := json.NewDecoder(bytes.NewReader(data))
134134
dec.UseNumber()
135135

136-
var raw TypedDataRaw
136+
raw := TypedDataRaw{
137+
Types: TypedDataTypes{},
138+
Message: map[string]any{},
139+
}
137140
if err := dec.Decode(&raw); err != nil {
138141
return err
139142
}

0 commit comments

Comments
 (0)