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

Sign has invalid types and bug when using context wallet #6075

Closed
mpetrunic opened this issue May 9, 2023 · 0 comments
Closed

Sign has invalid types and bug when using context wallet #6075

mpetrunic opened this issue May 9, 2023 · 0 comments
Assignees
Labels
4.x 4.0 related Bug Addressing a bug

Comments

@mpetrunic
Copy link
Contributor

mpetrunic commented May 9, 2023

Method: https://github.com/web3/web3.js/blob/4.x/packages/web3-eth/src/web3_eth.ts#L1076

Docs indicate that you can only get string or buffer as a return type. But the actual typescript return type is:
image

Bug #1: return type should be explicitly written to depend on passed in format(either string or buffer)

Bug #2: From digging through the code, seems like there is actually a bug in the underlying rpc method wrapper where https://github.com/web3/web3.js/blob/4.x/packages/web3-eth/src/rpc_method_wrappers.ts#LL885C40-L885C40 response is not formatted according to input params.

Expected behavior

consistent return type that depends on submitted params

Actual behavior

Steps to reproduce the behavior

  1. [First step]
  2. [Second step]
  3. [and so on...]

Logs

Environment

@mpetrunic mpetrunic added Bug Addressing a bug 4.x 4.0 related labels May 9, 2023
@luu-alex luu-alex self-assigned this May 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.x 4.0 related Bug Addressing a bug
Projects
None yet
Development

No branches or pull requests

2 participants