Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix error: "n.data.substring is not a function" #6000

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,7 @@ Released with 1.0.0-beta.37 code base.
### Fixed

- Improved the error propagation in `web3-providers-http` package to effectively propagate useful error infomation about failed HTTP connections (#5955)

- Fix error: "n.data.substring is not a function", that is raised when there is a revert and `web.eth.handleRevert = true` (#6000)
### Changed

- `transaction.type` is now formatted to a hex string before being send to provider (#5979)
Expand Down
2 changes: 1 addition & 1 deletion packages/web3-core-method/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,7 @@ Method.prototype.buildCall = function () {
if (!err && method.isRevertReasonString(result)){
reasonData = result.substring(10);
} else if (err && err.data){
reasonData = err.data.substring(10);
reasonData = (err.data.data || err.data).substring(10);
}

if (reasonData){
Expand Down