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

BREAKING: Refactor RPC method params and add tests #922

Merged
merged 3 commits into from Nov 14, 2022

Conversation

david0xd
Copy link
Contributor

@david0xd david0xd commented Nov 7, 2022

This PR will update the way of passing RPC method parameters.

All parameters will now be following the new convention where object-like named parameters are required.
All RPC methods that were accepting parameters as an array [] are updated and appropriate tests are added.

Updated are the following methods:

  • wallet_snap_*
  • snap_manageState
  • snap_notify
  • wallet_invokeSnap

All of these mentioned and the rest of the untouched methods in this PR require a plain object structure {} for passing parameters.

Fixes: #870

@david0xd david0xd self-assigned this Nov 7, 2022
@david0xd david0xd force-pushed the dd/rpc-method-params-refactoring branch from 060f80c to 0b98939 Compare November 9, 2022 10:21
@david0xd david0xd changed the title Refactor RPC method params and add tests [BREAKING] Refactor RPC method params and add tests Nov 9, 2022
@david0xd david0xd force-pushed the dd/rpc-method-params-refactoring branch from 91b70c2 to 81298b3 Compare November 10, 2022 17:23
@FrederikBolding FrederikBolding changed the title [BREAKING] Refactor RPC method params and add tests BREAKING: Refactor RPC method params and add tests Nov 11, 2022
Fix jest conf after rebase

Add manageState tests and refactor it

Update jest config after rebase

Add refactoring for invoke snap method

Add some overall refactoring

Refactor update state validation process and add more tests
@david0xd david0xd force-pushed the dd/rpc-method-params-refactoring branch from 9ba9781 to 4e0661f Compare November 14, 2022 11:07
@david0xd david0xd marked this pull request as ready for review November 14, 2022 11:09
@david0xd david0xd requested a review from a team as a code owner November 14, 2022 11:09
@david0xd david0xd merged commit af98e50 into main Nov 14, 2022
@david0xd david0xd deleted the dd/rpc-method-params-refactoring branch November 14, 2022 12:48
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.

Standardize RPC method parameters
2 participants