Use method middleware for watchAsset#9943
Merged
Conversation
Collaborator
Builds ready [7444e79]
Page Load Metrics (439 ± 52 ms)
|
b274085 to
e44a459
Compare
Collaborator
Builds ready [a39500b]
Page Load Metrics (467 ± 39 ms)
|
Member
Author
|
I just realized that #8640 will add another method to the method middleware, so this is not urgent. Nevertheless, it's here when we're ready! |
Collaborator
Builds ready [fb817ac]
Page Load Metrics (519 ± 59 ms)
|
Collaborator
Builds ready [e817079]
Page Load Metrics (456 ± 41 ms)
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR moves the
wallet_watchAsset(alsometamask_watchAsset) implementation to the method middleware. The functionality is unchanged. This was a planned change, but I did it now because an upcoming PR will remove theweb3usage logging method, which would leave the method middleware temporarily unused.This method will be further refactored and moved out of the preferences controller once the approval controller is merged.
There are no e2e tests for this method, but I tested it manually with the following:
Ref: https://eips.ethereum.org/EIPS/eip-747