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: display snap name #11511

Merged
merged 36 commits into from
Nov 8, 2024
Merged

feat: display snap name #11511

merged 36 commits into from
Nov 8, 2024

Conversation

k-g-j
Copy link
Contributor

@k-g-j k-g-j commented Sep 30, 2024

Description

This PR updates the display of snap accounts in the MetaMask mobile app. Previously, all snap accounts were shown with a generic “Snaps (Beta)” label. This change replaces the generic label with the specific name of the snap when available, providing users with clearer and more useful information about their snap accounts.

Key changes include:

  • Creation of the getInternalAccountByAddress utility function to retrieve account information of the InternalAccount type.
  • Modification of getAccountLabelTextByKeyring to return the snap name for snap accounts, or “Snaps (Beta)” if the name is unavailable.
  • Updates to affected components to display the correct snap name in the account list.
  • Unit tests added to verify the new functionality.

Related issues

Fixes: https://github.com/MetaMask/accounts-planning/issues/603

Manual testing steps

  1. Build the mobile client in Flask
  2. Navigate to the SSK dapp, install the snap, and create a snap account
  3. Open the account list
  4. You should see a tag under your new snap account that says "MetaMask Simple Snap Keyring"
  5. Note: we do not have any snaps yet that do not have names, so we will need to rely on the jest unit tests for the "Snaps (Beta)" rendering behavior

Screenshots/Recordings

Before

After

Pre-merge author checklist

Pre-merge reviewer checklist

  • I’ve manually tested the PR by running the app and testing the modified behavior.
  • I confirm that this PR addresses all acceptance criteria described in the issue and includes the necessary testing evidence such as screenshots and recordings.

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.

@k-g-j k-g-j force-pushed the feat/display-snap-name branch from 33f78fd to 2a6239b Compare October 15, 2024 20:49
@k-g-j k-g-j marked this pull request as ready for review October 16, 2024 15:20
@k-g-j k-g-j requested review from a team as code owners October 16, 2024 15:20
owencraston
owencraston previously approved these changes Oct 17, 2024
Copy link
Contributor

@owencraston owencraston left a comment

Choose a reason for hiding this comment

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

Looks great!

Simulator Screenshot - iPhone 16 Pro - 2024-10-17 at 16 36 28

@k-g-j k-g-j added the Run Smoke E2E Triggers smoke e2e on Bitrise label Oct 18, 2024
Copy link
Contributor

github-actions bot commented Oct 18, 2024

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: 73b5448
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/72595d2b-4574-4631-9b48-72e0642ebba9

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

jpuri
jpuri previously approved these changes Oct 18, 2024
Copy link
Contributor

@jpuri jpuri left a comment

Choose a reason for hiding this comment

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

Changes in files owned by confirmations team look good.

@k-g-j k-g-j enabled auto-merge October 18, 2024 17:54
@owencraston owencraston force-pushed the feat/display-snap-name branch from 80e9b96 to 7e1653b Compare October 18, 2024 19:26
brianacnguyen
brianacnguyen previously approved these changes Oct 23, 2024
@k-g-j k-g-j removed the Run Smoke E2E Triggers smoke e2e on Bitrise label Oct 24, 2024
@k-g-j k-g-j dismissed stale reviews from owencraston, brianacnguyen, and jpuri via a8172bc October 24, 2024 20:44
@k-g-j k-g-j added the Run Smoke E2E Triggers smoke e2e on Bitrise label Oct 24, 2024
Copy link
Contributor

github-actions bot commented Oct 24, 2024

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: a8172bc
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/ac68cbd6-42d3-4589-8b4b-71962e706570

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

@k-g-j k-g-j removed the Run Smoke E2E Triggers smoke e2e on Bitrise label Oct 24, 2024
@owencraston owencraston added the Run Smoke E2E Triggers smoke e2e on Bitrise label Oct 25, 2024
Copy link
Contributor

github-actions bot commented Oct 25, 2024

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: 51e8d6f
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/49bee9d8-1edb-4550-b4e3-746384b0e42a

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

owencraston
owencraston previously approved these changes Oct 25, 2024
@owencraston owencraston force-pushed the feat/display-snap-name branch from 51e8d6f to d403cae Compare November 5, 2024 02:55
@owencraston owencraston added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Nov 5, 2024
@owencraston owencraston force-pushed the feat/display-snap-name branch from f450b1a to 147696d Compare November 7, 2024 21:01
@metamaskbot metamaskbot added external-contributor INVALID-PR-TEMPLATE PR's body doesn't match template labels Nov 7, 2024
@owencraston
Copy link
Contributor

owencraston commented Nov 7, 2024

Based on design discussion with @brianacnguyen and @eriknson we have decided to move the account type pill below the address in the send flow to match how it looks in the main address list.

Simulator Screenshot - iPhone 13 mini - 2024-11-07 at 13 28 18

Simulator Screenshot - iPhone 13 mini - 2024-11-07 at 13 43 38

@owencraston owencraston added Run Smoke E2E Triggers smoke e2e on Bitrise and removed INVALID-PR-TEMPLATE PR's body doesn't match template Run Smoke E2E Triggers smoke e2e on Bitrise labels Nov 7, 2024
Copy link
Contributor

github-actions bot commented Nov 7, 2024

https://bitrise.io/ Bitrise

🔄🔄🔄 pr_smoke_e2e_pipeline started on Bitrise...🔄🔄🔄

Commit hash: b7d1a9f
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/d764eda8-d182-45ee-abc6-78e47e94e2cc

Note

  • This comment will auto-update when build completes
  • 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

@metamaskbot metamaskbot added the INVALID-PR-TEMPLATE PR's body doesn't match template label Nov 7, 2024
@owencraston owencraston added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Nov 7, 2024
Copy link
Contributor

github-actions bot commented Nov 7, 2024

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: edda460
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/e7f4fef9-b1cf-4362-812b-cc6e4335be69

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

Copy link

sonarqubecloud bot commented Nov 7, 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

@owencraston owencraston disabled auto-merge November 8, 2024 00:31
@owencraston owencraston added this pull request to the merge queue Nov 8, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 8, 2024
@owencraston owencraston added this pull request to the merge queue Nov 8, 2024
Merged via the queue into main with commit 1c27676 Nov 8, 2024
48 checks passed
@owencraston owencraston deleted the feat/display-snap-name branch November 8, 2024 01:32
@github-actions github-actions bot locked and limited conversation to collaborators Nov 8, 2024
@gauthierpetetin gauthierpetetin added the release-7.36.0 Issue or pull request that will be included in release 7.36.0 label Nov 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-UI external-contributor INVALID-PR-TEMPLATE PR's body doesn't match template mobile-snaps release-7.36.0 Issue or pull request that will be included in release 7.36.0 Run Smoke E2E Triggers smoke e2e on Bitrise team-accounts
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants