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

Fix JsonRpcRequest to be valid json #130

Merged
merged 1 commit into from
Aug 28, 2023

Conversation

legobeat
Copy link
Contributor

@legobeat legobeat commented Aug 24, 2023

fix/types: JsonRpcParams should be valid JSON values

undefined is not valid JSON.

https://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf (Section 5):

A JSON value can be an object, array, number, string, true, false, or null.

Resolves: #129

Related type error: https://github.com/MetaMask/providers/actions/runs/5959652471/job/16165741468?pr=275

@legobeat legobeat force-pushed the fix-jsonrpcparams-no-undefined branch from 2e2f5d4 to 0018d5b Compare August 24, 2023 04:05
@legobeat legobeat force-pushed the fix-jsonrpcparams-no-undefined branch 2 times, most recently from e1e1ba4 to 1e421de Compare August 24, 2023 04:41
@legobeat legobeat changed the title WIP: fix JsonRpcRequest to be valid json Fix JsonRpcRequest to be valid json Aug 24, 2023
fix/types: JsonRpcParams should be valid JSON values

`undefined` is not valid JSON.

https://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf
(Section 5):

    A JSON value can be an object, array, number, string, true, false, or null.
@legobeat legobeat merged commit 2c612ff into MetaMask:main Aug 28, 2023
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

JsonRpcRequest allows non-JSON values
2 participants