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

Open
wants to merge 27 commits into
base: main
Choose a base branch
from
Open

feat: display snap name #11511

wants to merge 27 commits into from

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

Simulator Screenshot - iPhone 15 Pro - 2024-10-16 at 11 43 53

After

Simulator Screenshot - iPhone 15 Pro - 2024-10-17 at 15 45 16

Simulator Screenshot - iPhone 15 Pro - 2024-10-17 at 15 48 22

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.

devin-ai-integration bot and others added 21 commits October 15, 2024 16:47
Link to Devin run:
https://preview.devin.ai/devin/1b5085c4c16446edbf1768153a885382

If you have any feedback, you can leave comments in the PR and I'll
address them in the app!

Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>

parent 5b6a58802bcdb96763c475a1eba3603a9323a0a4
author Kate Johnson <[email protected]> 1726169678 -0400
committer Kate Johnson <[email protected]> 1727199130 -0400

parent 5b6a58802bcdb96763c475a1eba3603a9323a0a4
author Kate Johnson <[email protected]> 1726169678 -0400
committer Kate Johnson <[email protected]> 1727199127 -0400

parent 5b6a58802bcdb96763c475a1eba3603a9323a0a4
author Kate Johnson <[email protected]> 1726169678 -0400
committer Kate Johnson <[email protected]> 1727198968 -0400

parent 5b6a58802bcdb96763c475a1eba3603a9323a0a4
author Kate Johnson <[email protected]> 1726169678 -0400
committer Kate Johnson <[email protected]> 1727198956 -0400

parent 5b6a58802bcdb96763c475a1eba3603a9323a0a4
author Kate Johnson <[email protected]> 1726169678 -0400
committer Kate Johnson <[email protected]> 1727198918 -0400

parent 5b6a58802bcdb96763c475a1eba3603a9323a0a4
author Kate Johnson <[email protected]> 1726169678 -0400
committer Kate Johnson <[email protected]> 1727198912 -0400

parent 5b6a58802bcdb96763c475a1eba3603a9323a0a4
author Kate Johnson <[email protected]> 1726169678 -0400
committer Kate Johnson <[email protected]> 1727198902 -0400

parent 5b6a58802bcdb96763c475a1eba3603a9323a0a4
author Kate Johnson <[email protected]> 1726169678 -0400
committer Kate Johnson <[email protected]> 1727198892 -0400

revert: android and settings changes

chore: reverted unnecessary changes from main

feat: fixed test for new snaps tag
@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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant