eth/tracers: refactor exporting js buffer #27472 (#1336)

This commit is contained in:
Daniel Liu 2025-09-09 15:05:47 +08:00 committed by GitHub
parent a5eab7eddb
commit 525a84eae4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -85,7 +85,7 @@ func fromBuf(vm *goja.Runtime, bufType goja.Value, buf goja.Value, allowString b
if !obj.Get("constructor").SameAs(bufType) {
break
}
b := obj.Get("buffer").Export().(goja.ArrayBuffer).Bytes()
b := obj.Export().([]byte)
return b, nil
}
return nil, errors.New("invalid buffer type")