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: Update @metamask/assets-controllers patch #6898

Merged
merged 1 commit into from
Aug 22, 2023

Conversation

Gudahtt
Copy link
Member

@Gudahtt Gudahtt commented Jul 25, 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 @metamask/assets-controllers patch added as part of the permission system implementation has been updated to more closely match how the feature was implemented upstream.

This should be functionally equivalent except that the function signature of addToken has changed; the image and name parameters were moved into an "options bag" parameter that also includes interactingAddress. All references to this method in the codebase have been updated accordingly.

Issue

This relates to https://github.com/MetaMask/mobile-planning/issues/877

Checklist

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

@Gudahtt Gudahtt marked this pull request as ready for review July 25, 2023 18:58
@Gudahtt Gudahtt requested a review from a team as a code owner July 25, 2023 18:58
@Gudahtt Gudahtt force-pushed the update-assets-controllers-patch branch from 82d6165 to de55ddb Compare July 25, 2023 19:37
@Gudahtt Gudahtt added the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label Jul 25, 2023
@Gudahtt Gudahtt added the No QA Needed/E2E Only Apply this label when your PR does not need any QA effort. label Jul 25, 2023
@Gudahtt Gudahtt force-pushed the update-assets-controllers-patch branch 3 times, most recently from fed0c61 to e17be4a Compare July 25, 2023 20:41
@Gudahtt Gudahtt force-pushed the update-assets-controllers-patch branch 8 times, most recently from cbe4c21 to 4b2febc Compare July 27, 2023 18:41
Copy link
Contributor

@mcmire mcmire left a comment

Choose a reason for hiding this comment

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

Sorry for the delay in reviewing. Just one question.

patches/@metamask+assets-controllers+5.0.0.patch Outdated Show resolved Hide resolved
@Gudahtt Gudahtt force-pushed the update-assets-controllers-patch branch from 4b2febc to 994bab4 Compare August 3, 2023 16:59
@Gudahtt Gudahtt force-pushed the update-assets-controllers-patch branch 2 times, most recently from 32cae15 to c3e0c56 Compare August 16, 2023 17:39
@Gudahtt Gudahtt changed the base branch from main to update-controller-packages-v44 August 16, 2023 17:39
@Gudahtt Gudahtt marked this pull request as draft August 16, 2023 17:39
@Gudahtt
Copy link
Member Author

Gudahtt commented Aug 16, 2023

This has been rebased onto #6872 because it conflicts with it, and we anticipate that being merged first. I've moved this to draft for now since this can't be merged until #6872 is merged, but it is reviewable.

@codecov-commenter
Copy link

codecov-commenter commented Aug 16, 2023

Codecov Report

Merging #6898 (32e5b32) into main (c08760f) will not change coverage.
Report is 1 commits behind head on main.
The diff coverage is 28.57%.

@@           Coverage Diff           @@
##             main    #6898   +/-   ##
=======================================
  Coverage   32.73%   32.73%           
=======================================
  Files         993      993           
  Lines       26614    26614           
  Branches     2083     2083           
=======================================
  Hits         8713     8713           
  Misses      17487    17487           
  Partials      414      414           
Files Changed Coverage Δ
app/components/UI/AddCustomToken/index.js 31.48% <0.00%> (ø)
...mponents/UI/Ramp/hooks/useHandleSuccessfulOrder.ts 0.00% <0.00%> (ø)
...pp/components/UI/SearchTokenAutocomplete/index.tsx 4.34% <0.00%> (ø)
app/components/UI/Swaps/QuotesView.js 2.38% <0.00%> (ø)
app/components/UI/Swaps/index.js 3.70% <0.00%> (ø)
app/components/Views/SendFlow/Confirm/index.js 43.95% <100.00%> (ø)
...nents/hooks/useAddressBalance/useAddressBalance.ts 80.43% <100.00%> (ø)

@Gudahtt Gudahtt force-pushed the update-assets-controllers-patch branch from c3e0c56 to c5a3479 Compare August 17, 2023 20:22
@Gudahtt
Copy link
Member Author

Gudahtt commented Aug 17, 2023

Cal-L
Cal-L previously approved these changes Aug 17, 2023
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.

LGTM

@Gudahtt Gudahtt force-pushed the update-controller-packages-v44 branch from 7e7deec to 0489284 Compare August 18, 2023 13:17
@Gudahtt Gudahtt force-pushed the update-assets-controllers-patch branch from c5a3479 to bd84729 Compare August 18, 2023 13:17
@Gudahtt Gudahtt force-pushed the update-controller-packages-v44 branch from 0489284 to 3736e24 Compare August 18, 2023 13:22
@Gudahtt Gudahtt force-pushed the update-assets-controllers-patch branch from bd84729 to 61d86c2 Compare August 18, 2023 13:23
@Gudahtt Gudahtt force-pushed the update-controller-packages-v44 branch 2 times, most recently from c1f50fe to 9a23657 Compare August 22, 2023 16:35
Base automatically changed from update-controller-packages-v44 to main August 22, 2023 18:41
@Gudahtt Gudahtt dismissed Cal-L’s stale review August 22, 2023 18:41

The base branch was changed.

The `@metamask/assets-controllers` patch added as part of the
permission system implementation [1] has been updated to more closely
match how the feature was implemented upstream [2]. It should be
functionally equivalent.

This relates to MetaMask/mobile-planning#877

[1]: #5062
[2]: MetaMask/core#1124
@Gudahtt Gudahtt force-pushed the update-assets-controllers-patch branch from 61d86c2 to 32e5b32 Compare August 22, 2023 18:41
@Gudahtt Gudahtt marked this pull request as ready for review August 22, 2023 18:42
@Gudahtt Gudahtt requested a review from Cal-L August 22, 2023 18:50
@sonarcloud
Copy link

sonarcloud bot commented Aug 22, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 8 Code Smells

34.6% 34.6% Coverage
2.1% 2.1% Duplication

warning The version of Java (11.0.20) you have used to run this analysis is deprecated and we will stop accepting it soon. Please update to at least Java 17.
Read more here

Copy link
Member

@cortisiko cortisiko left a comment

Choose a reason for hiding this comment

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

🚀 🚀 🚀

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.

Lgtm

@Gudahtt Gudahtt merged commit 30e9e40 into main Aug 22, 2023
11 checks passed
@Gudahtt Gudahtt deleted the update-assets-controllers-patch branch August 22, 2023 21:06
@github-actions github-actions bot locked and limited conversation to collaborators Aug 22, 2023
@github-actions github-actions bot removed the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label Aug 22, 2023
@metamaskbot metamaskbot added the release-7.7.0 Issue or pull request that will be included in release 7.7.0 label Aug 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
No QA Needed/E2E Only Apply this label when your PR does not need any QA effort. release-7.7.0 Issue or pull request that will be included in release 7.7.0 team-wallet-framework
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants