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

Type of callback for web3.eth.accounts.signTransaction is incorrect #3278

Closed
michaelsbradleyjr opened this issue Dec 17, 2019 · 0 comments · Fixed by #3280
Closed

Type of callback for web3.eth.accounts.signTransaction is incorrect #3278

michaelsbradleyjr opened this issue Dec 17, 2019 · 0 comments · Fixed by #3280
Labels
1.x 1.0 related issues Types Incorrect or missing types

Comments

@michaelsbradleyjr
Copy link
Contributor

michaelsbradleyjr commented Dec 17, 2019

Expected behavior

tsc should consider that the type of the callback that may be supplied to web3.eth.accounts.signTransaction corresponds to the implementation's calls of that callback in https://github.com/ethereum/web3.js/blob/1.x/packages/web3-eth-accounts/src/index.js#L127.

Actual behavior

The typing in https://github.com/ethereum/web3.js/blob/1.x/packages/web3-eth-accounts/types/index.d.ts#L22 results in tsc wanting the callback to have the type () => void.

Versions

Web3.js 1.2.4.

@nivida nivida added 1.x 1.0 related issues Types Incorrect or missing types labels Dec 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.x 1.0 related issues Types Incorrect or missing types
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants