-
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
Exposing web3.eth.Contract.setProvider() as per public documentation #4822
Exposing web3.eth.Contract.setProvider() as per public documentation #4822
Conversation
Pull Request Test Coverage Report for Build 2246294533
💛 - Coveralls |
@@ -29,6 +29,8 @@ export class Contract { | |||
options?: ContractOptions | |||
); | |||
|
|||
static setProvider(provider: string): void; |
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.
The setProvider
accepts an additional parameter for accounts as well.
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.
Hiya, thanks good point. Added TS defs for optional accounts
parameter as suggested.
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.
And parameter provider
is of type provider
too (from web3-core
). Fixing.
Hiya. Can someone rerun the flaky |
@sdesalas The |
Updating latest changes from upstream. |
6b27967
into
web3:junaid/4822web3EthContractSetProviderexposingtests
Wohooo! 🙌 |
Description
Fixes #4770
setProvider "does not exist on type 'typeof import(..." in typescript.
Type of change
*.ts
Type DefinitionsChecklist:
npm run dtslint
with success and extended the tests and types if necessary.npm run test:unit
with success.npm run test:cov
and my test cases cover all the lines and branches of the added code.npm run build
and testeddist/web3.min.js
in a browser.CHANGELOG.md
file in the root folder (Not a notable change).