Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix jsonrpc payload and response types (#4743)
* Make JsonRpcPayload's `params` field optional Currently jsonrpc.js uses `params: params || []` in the `toPayload` function, so this type update makes the `params` field optional to match. * Fix JsonRpcResponse type Update `id` to accept `string | number` - this now matches the `isValidResponse` function in `jsonrpc.js`. Update `error` to accept an object with optional `code`, `data`, and non-optional `message` fields to more closely match the [JSON RPC spec](https://www.jsonrpc.org/specification#error_object) and the `ErrorResponse` function in `errors.js`. * Remove errant spaces * Add PR #443 to CHANGELOG Co-authored-by: jdevcs <[email protected]>
- Loading branch information