Skip to content

Conversation

@1y8ws7
Copy link

@1y8ws7 1y8ws7 commented Sep 24, 2021

This a fix for the abscent "receipt" event which is expected on web3.eth.sendTransaction. A current workaround is to poll for the receipt. With this fix we'll be able to use a direct event, which is more efficient.

Under the hood, web3 implementation for the receipt event relies on the newHeads subscription, which in turn uses eth_getBlockByNumber rpc method call in eth-json-rpc-filters package. That call fails, because of the 0 padding for the requested block number.

This fix was already done in the upstream repo: MetaMask/eth-json-rpc-filters#7.
We've back-ported this fix in a fork here: https://github.com/yodaplus/eth-json-rpc-filters/commits/3.0.3.

This PR updates the eth-json-rpc-filters package to the patched fork.

Additionally, package-lock.json is normalize to npm@6.4.1, which is a standard bundled version for node@8.15.0, defined in .nvmrc.

@1y8ws7 1y8ws7 force-pushed the receipt-event-fix branch from 4a27f42 to e73b9c5 Compare November 8, 2021 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant