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

fix: add symbol check on network add custom form #9177

Merged
merged 6 commits into from
Apr 29, 2024

Conversation

salimtb
Copy link
Contributor

@salimtb salimtb commented Apr 9, 2024

Description

Problem: When adding tokens, just like on Extension, we should add in a warning for users when the symbol doesn’t match the detected symbol.

following an initial investigation, here's what we found lacking in the mobile version:

  1. Mobile version only conducts network verification during network editing.
  2. The way the mobile version suggests the network symbol differs from the extension.
  3. The warning symbol on mobile varies from the extension in both appearance and content.

Related issues

Fixes: #9237

Manual testing steps

  1. Go to add custom network form
  2. Add any network
  3. if symbol is incorrect , warning ,message should be displayed

Screenshots/Recordings

Before

before.mov

After

after.mov

Pre-merge author checklist

  • I’ve followed MetaMask Coding Standards.
  • I've completed the PR template to the best of my ability
  • 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.

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 April 9, 2024 13:36
Copy link
Contributor

github-actions bot commented Apr 9, 2024

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.

@NicholasEllul
Copy link
Contributor

@salimtb please ignore the scan failure for now. Our team is investigating the issue 👍

@salimtb
Copy link
Contributor Author

salimtb commented Apr 9, 2024

@salimtb please ignore the scan failure for now. Our team is investigating the issue 👍

thnx for letting me know @NicholasEllul

@salimtb salimtb added team-assets needs-assets-ux-review A shared label between the Assets and UX team to flag PRs ready for consolidated team review. labels Apr 9, 2024
Copy link
Contributor

@darkwing darkwing left a comment

Choose a reason for hiding this comment

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

A few nits

@salimtb salimtb requested a review from darkwing April 15, 2024 13:31
bergeron
bergeron previously approved these changes Apr 16, 2024
Copy link
Contributor

github-actions bot commented Apr 18, 2024

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: 1bfeed8
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/f10c5ca6-c169-402e-a4f9-f7ea41e4bf72

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

@salimtb salimtb removed the Run Smoke E2E Triggers smoke e2e on Bitrise label Apr 18, 2024
@salimtb salimtb requested a review from bergeron April 18, 2024 11:20
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

@Cal-L Cal-L added the Run Smoke E2E Triggers smoke e2e on Bitrise label Apr 18, 2024
@salimtb salimtb added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Apr 18, 2024
@MetaMask MetaMask deleted a comment from github-actions bot Apr 18, 2024
@salimtb salimtb added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Apr 18, 2024
@MetaMask MetaMask deleted a comment from github-actions bot Apr 18, 2024
@salimtb salimtb added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Apr 22, 2024
Copy link
Contributor

github-actions bot commented Apr 22, 2024

https://bitrise.io/ Bitrise

❌❌❌ pr_smoke_e2e_pipeline failed on Bitrise! ❌❌❌

Commit hash: 3264b03
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/9d15d8cf-19a8-4daf-bcae-b042e7751846

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 0% with 20 lines in your changes are missing coverage. Please review.

Project coverage is 45.81%. Comparing base (f7466da) to head (3264b03).
Report is 44 commits behind head on main.

Files Patch % Lines
...Settings/NetworksSettings/NetworkSettings/index.js 0.00% 20 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9177      +/-   ##
==========================================
+ Coverage   45.58%   45.81%   +0.23%     
==========================================
  Files        1289     1298       +9     
  Lines       31973    32028      +55     
  Branches     3314     3328      +14     
==========================================
+ Hits        14574    14674     +100     
+ Misses      16528    16472      -56     
- Partials      871      882      +11     

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

@salimtb salimtb added the Run Smoke E2E Triggers smoke e2e on Bitrise label Apr 23, 2024
@salimtb salimtb added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Apr 24, 2024
Copy link
Contributor

github-actions bot commented Apr 24, 2024

https://bitrise.io/ Bitrise

❌❌❌ pr_smoke_e2e_pipeline failed on Bitrise! ❌❌❌

Commit hash: b84d61c
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/fd9ddb4d-2212-47b5-afc1-53a9630aca78

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

@cortisiko cortisiko added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Apr 24, 2024
Copy link
Contributor

github-actions bot commented Apr 24, 2024

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: 6ebe1c6
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/d3d32b4d-1b29-4603-9703-d24bf7ff1b60

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

@tommasini
Copy link
Contributor

@salimtb , I was trying to see if it would be possible to confirm to add network after fill the symbol property (Because by the recordings it seems that the warning only displays after the text input being unfocused) and I notice that the confirm button doesn't appear to me at all on the simulator, am I doing something wrong?
https://github.com/MetaMask/metamask-mobile/assets/46944231/3d314bd9-37d1-4a5b-afd2-636c47159ee8

Copy link

sonarcloud bot commented Apr 29, 2024

@salimtb salimtb added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Apr 29, 2024
Copy link
Contributor

github-actions bot commented Apr 29, 2024

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: a476d44
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/4c606429-314d-43c8-8cda-990f9a166724

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

@salimtb
Copy link
Contributor Author

salimtb commented Apr 29, 2024

@salimtb , I was trying to see if it would be possible to confirm to add network after fill the symbol property (Because by the recordings it seems that the warning only displays after the text input being unfocused) and I notice that the confirm button doesn't appear to me at all on the simulator, am I doing something wrong? https://github.com/MetaMask/metamask-mobile/assets/46944231/3d314bd9-37d1-4a5b-afd2-636c47159ee8

hey @tommasini ,
can you check again now if you have the same behavior ? i think something wrong happened after a rebase

@salimtb salimtb merged commit fc70576 into main Apr 29, 2024
35 checks passed
@salimtb salimtb deleted the add-missing-symbol-warning branch April 29, 2024 11:20
@github-actions github-actions bot locked and limited conversation to collaborators Apr 29, 2024
@metamaskbot metamaskbot added the release-7.23.0 Issue or pull request that will be included in release 7.23.0 label Apr 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs-assets-ux-review A shared label between the Assets and UX team to flag PRs ready for consolidated team review. release-7.23.0 Issue or pull request that will be included in release 7.23.0 Run Smoke E2E Triggers smoke e2e on Bitrise team-assets
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Add in missing warning when token symbol differs from detected symbol in Mobile
9 participants