mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-18 18:02:24 +00:00
Update ethclient/ethclient.go
Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>
This commit is contained in:
parent
2b50c7bcfd
commit
f17139da36
1 changed files with 1 additions and 2 deletions
|
|
@ -637,8 +637,7 @@ func RevertErrorData(err error) ([]byte, bool) {
|
|||
var ec rpc.Error
|
||||
var ed rpc.DataError
|
||||
if errors.As(err, &ec) && errors.As(err, &ed) && ec.ErrorCode() == 3 {
|
||||
eds, ok := ed.ErrorData().(string)
|
||||
if ok {
|
||||
if eds, ok := ed.ErrorData().(string); ok {
|
||||
revertData, err := hexutil.Decode(eds)
|
||||
if err == nil {
|
||||
return revertData, true
|
||||
|
|
|
|||
Loading…
Reference in a new issue