Skip to content

Commit

Permalink
internal/ethapi: fix Call handle revert error
Browse files Browse the repository at this point in the history
  • Loading branch information
JukLee0ira authored and gzliudan committed Dec 28, 2024
1 parent 48d1f22 commit 517f4a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/ethapi/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -1448,7 +1448,7 @@ func (s *PublicBlockChainAPI) Call(ctx context.Context, args TransactionArgs, bl
return nil, err
}
// If the result contains a revert reason, try to unpack and return it.
if result.Failed() && len(result.Return()) > 0 {
if result.Failed() {
return nil, newRevertError(result.Return())
}
return result.Return(), nil
Expand Down

0 comments on commit 517f4a1

Please sign in to comment.