Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
4.x 4.0 related Bug Addressing a bug
Projects
None yet
Development

No branches or pull requests

2 participants