-
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
fixes defaultBlock property handling #3247
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Only thing that might be helpful is to add a regression test for this that uses the reproduction case in #3244.
// Regression test for #3244, should not throw.
it('formats the default block correctly', async function(){
const accounts = await web3.eth.getAccounts();
const latestBlock = await web3.eth.getBlockNumber();
web3.eth.defaultBlock = latestBlock - 1
await web3.eth.getBalance(accounts[0])
})
…om default options and eth.getBalance tests extended with a defaultBlock fallback case
I've added an additional test case to the |
Description
Fixes #3244
Type of change
Checklist:
npm run dtslint
with success and extended the tests and types if necessary.npm run test:unit
with success and extended the tests if necessary.npm run build-all
and tested the resulting file/'s fromdist
folder in a browser.CHANGELOG.md
file in the root folder.