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

feat: migrate to native primary currency #8720

Merged
merged 2 commits into from
Mar 19, 2024

Conversation

salimtb
Copy link
Contributor

@salimtb salimtb commented Feb 24, 2024

Description

The primary currency toggle provides unnecessary overhead for every asset feature we build. The Extension team is removing it for Extension and we will do so as well for Mobile.
the default one on mobile will be Native.

Related issues

Fixes: #1846

Manual testing steps

  1. Go the setting page
  2. Go to general
  3. Primary currency toggle is removed, the default one is Native

Screenshots/Recordings

Before

Screenshot 2024-02-24 at 15 53 46

After

Screenshot 2024-02-24 at 15 42 12

Pre-merge author checklist

  • I’ve followed MetaMask Coding Standards.
  • I've clearly explained what problem this PR is solving and how it is solved.
  • I've linked related issues
  • I've included manual testing steps
  • I've included screenshots/recordings if applicable
  • I’ve included tests if applicable
  • I’ve documented my code using JSDoc format if applicable
  • I’ve applied the right labels on the PR (see labeling guidelines). Not required for external contributors.
  • I’ve properly set the pull request status:
    • In case it's not yet "ready for review", I've set it to "draft".
    • In case it's "ready for review", I've changed it from "draft" to "non-draft".

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

@salimtb salimtb requested a review from a team as a code owner February 24, 2024 14:54
@salimtb salimtb marked this pull request as draft February 24, 2024 14:54
Copy link
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@salimtb salimtb added team-mobile-ux DEPRECATED: please use "team-wallet-ux" label instead team-assets Run Smoke E2E Triggers smoke e2e on Bitrise labels Feb 24, 2024
Copy link
Contributor

E2E test started on Bitrise: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/0602c987-5a60-45c1-ac43-73c4a8d1b53a
You can also kick off another Bitrise E2E smoke test by removing and re-applying the (Run Smoke E2E) label

@codecov-commenter
Copy link

codecov-commenter commented Feb 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 43.77%. Comparing base (4de7cef) to head (1f8f04f).
Report is 10 commits behind head on main.

❗ Current head 1f8f04f differs from pull request most recent head 4835a60. Consider uploading reports for the commit 4835a60 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8720      +/-   ##
==========================================
+ Coverage   43.74%   43.77%   +0.02%     
==========================================
  Files        1273     1274       +1     
  Lines       31103    31124      +21     
  Branches     3161     3168       +7     
==========================================
+ Hits        13606    13623      +17     
- Misses      16684    16688       +4     
  Partials      813      813              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@salimtb salimtb force-pushed the salim/remove-primary-currency-toggle branch from 0a2ac76 to 7af5342 Compare February 24, 2024 15:12
@salimtb salimtb added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Feb 24, 2024
Copy link
Contributor

E2E test started on Bitrise: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/17d52963-c977-454a-9269-849bbfdbb795
You can also kick off another Bitrise E2E smoke test by removing and re-applying the (Run Smoke E2E) label

@salimtb salimtb force-pushed the salim/remove-primary-currency-toggle branch from 7af5342 to e35de21 Compare February 25, 2024 00:16
@salimtb salimtb marked this pull request as ready for review February 26, 2024 09:43
Copy link
Contributor

E2E test started on Bitrise: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/6bdf4db5-c5c2-469d-8f74-4bad5666bc11
You can also kick off another Bitrise E2E smoke test by removing and re-applying the (Run Smoke E2E) label

@gauthierpetetin gauthierpetetin added the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label Feb 26, 2024
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.

Hey @salimtb a few more test scenarios come to mind:

  • Changing your currency conversion from USD to CAD and submit a txn
  • Change your currency conversion from USD to DAI, ETC and submit a txn

Does this PR require migrations? If so here is another scenario to test:

  • Test with a version of the app where you select Fiat as your primary currency
  • Upgrade to the app with this version. Does the app break? try visiting the general view does the app break? Try to submit another txn.

@salimtb salimtb force-pushed the salim/remove-primary-currency-toggle branch from e35de21 to 6bcf50d Compare March 1, 2024 15:25
@salimtb salimtb removed the Run Smoke E2E Triggers smoke e2e on Bitrise label Mar 4, 2024
@salimtb
Copy link
Contributor Author

salimtb commented Mar 4, 2024

hey @cortisiko ,
you can find here the list of requested test

@salimtb salimtb requested a review from cortisiko March 4, 2024 17:13
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.

@salimtb, I have reviewed your testing.

The idea of removing the fiat toggle makes sense to me. I'm concerned that omitting the fiat conversion of the total transaction amount on the confirmation screen could cause user confusion.

see this video at the 17-19 second mark

@salimtb salimtb force-pushed the salim/remove-primary-currency-toggle branch 2 times, most recently from 970bbbc to 3ce37d9 Compare March 14, 2024 15:51
@salimtb salimtb requested a review from cortisiko March 14, 2024 16:05
@salimtb salimtb force-pushed the salim/remove-primary-currency-toggle branch from 3ce37d9 to 7f8e10b Compare March 14, 2024 17:14
@cortisiko
Copy link
Member

Thanks for providing testing artifacts @salimtb. Everything looks ✅ from a quality perspective.

@salimtb salimtb force-pushed the salim/remove-primary-currency-toggle branch from 7f8e10b to fe066be Compare March 15, 2024 23:32
@salimtb salimtb dismissed cortisiko’s stale review March 15, 2024 23:37

changes was addressed

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.

Left some comments

app/store/migrations/035.ts Outdated Show resolved Hide resolved
app/store/migrations/035.ts Outdated Show resolved Hide resolved
app/store/migrations/035.ts Outdated Show resolved Hide resolved
app/store/migrations/035.ts Outdated Show resolved Hide resolved
app/store/migrations/035.test.ts Outdated Show resolved Hide resolved
app/store/migrations/035.ts Outdated Show resolved Hide resolved
app/store/migrations/035.test.ts Outdated Show resolved Hide resolved
app/store/migrations/035.ts Outdated Show resolved Hide resolved
app/store/migrations/035.ts Outdated Show resolved Hide resolved
@salimtb salimtb force-pushed the salim/remove-primary-currency-toggle branch from 1f8f04f to 4835a60 Compare March 19, 2024 11:42
Copy link

sonarcloud bot commented Mar 19, 2024

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!

@salimtb salimtb merged commit 4c45aa2 into main Mar 19, 2024
30 checks passed
@salimtb salimtb deleted the salim/remove-primary-currency-toggle branch March 19, 2024 14:39
@github-actions github-actions bot locked and limited conversation to collaborators Mar 19, 2024
@github-actions github-actions bot removed the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label Mar 19, 2024
@metamaskbot metamaskbot added the release-7.20.0 Issue or pull request that will be included in release 7.20.0 label Mar 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-7.20.0 Issue or pull request that will be included in release 7.20.0 team-assets team-mobile-ux DEPRECATED: please use "team-wallet-ux" label instead
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

6 participants