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

Error: "n.data.substring is not a function", when setting web.eth.handleRevert = true #6007

Closed
mconnelly8 opened this issue Apr 11, 2023 · 2 comments · Fixed by #6045
Closed
Assignees
Labels
4.x 4.0 related Bug Addressing a bug

Comments

@mconnelly8
Copy link

No description provided.

@mconnelly8
Copy link
Author

#5999

@mconnelly8 mconnelly8 added 4.x 4.0 related Bug Addressing a bug Investigate labels Apr 11, 2023
@Muhammad-Altabba
Copy link
Contributor

Muhammad-Altabba commented Apr 12, 2023

Turned out that MetaMask sometimes returns the data inside originalError. As mentioned here: #4454 (comment)

So, this issue would be about implementing the same as #5962 but for version 4.x

And here is the place where the modifications are needed:

errorArgs = decodeParameters([...errorAbi.inputs], error.data.substring(10));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.x 4.0 related Bug Addressing a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants