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

Refactor remaining web3-provider-engine methods #5627

Merged
merged 2 commits into from
Apr 6, 2023

Conversation

Gudahtt
Copy link
Member

@Gudahtt Gudahtt commented Jan 27, 2023

Development & PR Process

  1. Follow MetaMask Mobile Coding Standards
  2. Add release-xx label to identify the PR slated for a upcoming release (will be used in release discussion)
  3. Add needs-dev-review label when work is completed
  4. Add needs-qa label when dev review is completed
  5. Add QA Passed label when QA has signed off

Description

The remaining non-static methods from web3-provider-engine have been migrated to RPCMethodMiddleware.ts with the rest of the method handlers. The two methods left were personal_ecRecover and parity_checkRequest.

personal_ecRecover will recover the signing account from a signature. This operation requires no private keys. Commonly dapps will do this themselves. Persumably it was added to the dapp API at some point for convenience. It has been preserved just to avoid making breaking changes to the dapp API.

parity_checkRequest would return the result of a parity signature or transaction. It returned null if none were found. The parity signature and request methods have been throwing an error for some time now, so there is never any result to check. As a result, this method has been returning null for all requests in practice. It has been preserved just to avoid making breaking changes to the dapp API.

Issue

This relates to #5513

Checklist

  • There is a related GitHub issue
  • Tests are included if applicable
  • Any added code is fully documented

@Gudahtt Gudahtt force-pushed the refactor-remaining-web3-provider-engine-methods branch from f3f8850 to e469a70 Compare January 27, 2023 14:29
@Gudahtt Gudahtt marked this pull request as ready for review January 27, 2023 14:29
@Gudahtt Gudahtt requested a review from a team as a code owner January 27, 2023 14:29
@Gudahtt Gudahtt force-pushed the refactor-remaining-web3-provider-engine-methods branch from e469a70 to d9b319b Compare January 27, 2023 15:30
Copy link
Contributor

@BelfordZ BelfordZ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice catch!

@Gudahtt Gudahtt marked this pull request as draft March 8, 2023 03:09
@Gudahtt Gudahtt force-pushed the refactor-remaining-web3-provider-engine-methods branch from d9b319b to 75510d1 Compare March 16, 2023 01:59
@Gudahtt Gudahtt marked this pull request as ready for review March 16, 2023 02:01
@Gudahtt

This comment was marked as resolved.

@Gudahtt Gudahtt added the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label Mar 16, 2023
The remaining non-static methods from `web3-provider-engine` have been
migrated to `RPCMethodMiddleware.ts` with the rest of the method
handlers. The two methods left were `personal_ecRecover` and
`parity_checkRequest`.

`personal_ecRecover` will recover the signing account from a signature.
This operation requires no private keys. Commonly dapps will do this
themselves. Persumably it was added to the dapp API at some point for
convenience. It has been preserved just to avoid making breaking
changes to the dapp API.

`parity_checkRequest` would return the result of a parity signature or
transaction. It returned `null` if none were found. The parity
signature and request methods have been throwing an error for some time
now, so there is never any result to check. As a result, this method
has been returning `null` for all requests in practice. It has been
preserved just to avoid making breaking changes to the dapp API.

This relates to #5513
@Gudahtt Gudahtt force-pushed the refactor-remaining-web3-provider-engine-methods branch from 75510d1 to 47672a2 Compare April 5, 2023 23:48
Copy link
Contributor

@Cal-L Cal-L left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently discussing next steps on removing parity rpc methods. https://consensys.slack.com/archives/CBW7S9FSN/p1680805775457939
Since there is no change in functionality here, LGTM

@Gudahtt Gudahtt merged commit 9515d43 into main Apr 6, 2023
13 checks passed
@Gudahtt Gudahtt deleted the refactor-remaining-web3-provider-engine-methods branch April 6, 2023 19:49
@Gudahtt Gudahtt removed the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label Apr 6, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Apr 6, 2023
@Gudahtt Gudahtt added Spot Check on the Release Build If a ticket doesn't require feature QA, but does require some form of manual spot checking team-mobile-client release-6.4.0 PR for release 6.4.0 team-wallet-framework labels Apr 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-6.4.0 PR for release 6.4.0 Spot Check on the Release Build If a ticket doesn't require feature QA, but does require some form of manual spot checking team-mobile-platform team-wallet-framework
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants