Skip to content

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 force-pushed the fix-jsonrpcparams-no-undefined branch from 1e421de to 4e5c07f Compare August 24, 2023 04:44
@legobeat legobeat marked this pull request as ready for review August 24, 2023 04:48
@legobeat legobeat requested a review from a team as a code owner August 24, 2023 04:48
@legobeat legobeat requested review from a team and kumavis August 28, 2023 01:18
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