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

[safe-event-emitter-provider] Invalid default params #4595

Closed
Gudahtt opened this issue Aug 12, 2024 · 0 comments · Fixed by #4603
Closed

[safe-event-emitter-provider] Invalid default params #4595

Gudahtt opened this issue Aug 12, 2024 · 0 comments · Fixed by #4603
Assignees
Labels
bug Something isn't working team-wallet-framework

Comments

@Gudahtt
Copy link
Member

Gudahtt commented Aug 12, 2024

The SafeEventEmitterProvider is failing to send net_version requests correctly because it's using an empty object as the default params when none are provided.

While some methods do use an object for params, the vast majority use an array instead. Passing an empty object as the params for a method that has array parameters can result in failure (as is the case for net_version).

We should remove the default params altogether, or use an array as the default if we need to keep some default for some reason).

The suspected culprit is this line: https://github.com/MetaMask/core/blob/main/packages/eth-json-rpc-provider/src/safe-event-emitter-provider.ts#L38

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working team-wallet-framework
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants