-
Notifications
You must be signed in to change notification settings - Fork 5k
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 issue with boolean typed receipt status #2548
Conversation
1 similar comment
awesome, some of my team was having this issue in certain system configurations |
This isn't an issue of Web3.js. Ganache has to be aligned with the JSON-RPC spec. |
@nivida As you see here the observer is calling the This casts the status field to a boolean here. I guess my fix is still too hacky for this though, what do you propose? Should the transaction receipt formatter still be casting to a bool like this? |
I wouldn't consider this hacky, but rather robustifying the receipt status check to handle varying upstream formatting with consistent semantics. Just my $0.02 |
@nivida This error is thrown when using Web3 against Geth 1.8 - no Ganache anywhere in the ecosystem. Here's my receipt from a Geth IPC connection in Web3:
And a Node.js REPL can demonstrate the error:
The parsing scheme is located in two places in Web3.js and prevents legitimately completed transactions being parsed without a large error handling block:
|
@SwissArmyBud |
Description
The
status
field of the transaction receipt is sometimes returned as a boolean, not hex. This was causing web3 to think the transaction reverted when it had actually succeeded.Type of change
Checklist:
npm run test
in the root folder with success and extended the tests if necessary.npm run build
in the root folder and tested it in the browser and with node.npm run dtslint
in the root folder and tested that all my types are correct