web3.eth.personal.sign typing is wrong
Is there an existing issue for this?
- [X] I have searched the existing issues
Current Behavior
When using web3.eth.personal.sign with TypeScript, there's a mandatory 3rd parameter (password), but it's not actually required. The typing for sign is:
sign(
dataToSign: string,
address: string,
password: string,
callback?: (error: Error, signature: string) => void
): Promise<string>;
But should be:
sign(
dataToSign: string,
address: string,
password?: string,
callback?: (error: Error, signature: string) => void
): Promise<string>;
Expected Behavior
The 3rd param to be optional
Steps to Reproduce
signature.value = await web3.eth.personal.sign('some string', '0xsomeaccount')
Web3.js Version
1.7.1
Environment
- Operating System: Mac OS
- Browser: Chrome
- Node.js Version: 16.14.0
- NPM Version: 8.3.1
Anything Else?
No response
@TheDutchCoder Thanks for reaching to us with the feedback. We are currently occupied in 4.x rewrite which will not have that issue. For 1.x we will keep it in pipeline and work as we get some bandwidth.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions. If you believe this was a mistake, please comment.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions. If you believe this was a mistake, please comment.
May I ask what is the workaround for this issue if I am using TypeScript and it throws me errors? Just ignore the line? I would think this seems like a relatively straightforward fix, if I create a PR would the devs be interested in reviewing and merging it?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions. If you believe this was a mistake, please comment.