feat: define account name during creation#25191
Merged
Conversation
…snap-confirmations-bypass # Conflicts: # yarn.lock
…t-name-during-creation # Conflicts: # package.json # yarn.lock
…t-name-during-creation # Conflicts: # app/scripts/lib/snap-keyring/snap-keyring.ts # yarn.lock
…t-name-during-creation # Conflicts: # package.json # ui/components/multichain/create-account/create-account.tsx # yarn.lock
There was a problem hiding this comment.
PR Summary
(updates since last review)
The pull request introduces a feature allowing users to define account names during the creation process, either suggested by the Snap or inputted by the user.
- Updated
app/scripts/metamask-controller.js: Enhanced account creation flow to support setting and retrieving account names. - Modified
ui/components/multichain/create-btc-account/create-btc-account.tsx: Integrated account name input and suggestion functionality. - Added
test/e2e/tests/confirmations/alerts/queued-confirmations.spec.ts: Introduced end-to-end tests for queued confirmations feature. - Updated
ui/pages/confirmations/components/confirm/info/row/text-token-units.tsx: Added a new component for displaying token values with precision. - Modified
shared/constants/metametrics.ts: Added new event names and queue types for enhanced tracking of confirmation events.
No file(s) reviewed, no comment(s)
Edit PR Review Bot Settings
…proper switching with waiting for window handles
Collaborator
Builds ready [a3fcb3a]
Page Load Metrics (71 ± 10 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Collaborator
Builds ready [36c7403]
Page Load Metrics (174 ± 188 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
jpuri
previously approved these changes
Jul 26, 2024
ccharly
reviewed
Jul 26, 2024
| accountsController.setAccountName.bind(accountsController), | ||
|
|
||
| setAccountLabel: (address, label) => { | ||
| this.preferencesController.setAccountLabel(address, label); |
Contributor
There was a problem hiding this comment.
For tracking purposes:
This is ok to remove that line, because AccountsController and PreferencesController keep their state "in sync" (calling setAccountName on one, will call the other, and reversely)
…that account is not created in create-snap-account.spec
…t-name-during-creation # Conflicts: # test/e2e/accounts/common.ts
jpuri
approved these changes
Jul 26, 2024
matthewwalsh0
approved these changes
Jul 26, 2024
ccharly
approved these changes
Jul 26, 2024
|
Collaborator
Builds ready [1f02535]
Page Load Metrics (56 ± 6 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Description
Changes the add snap account flow to include a final modal that allows snaps to suggest a name for the new account or for the user to input a name for their new account. The new snap account is now created with a name either inputted by the user, suggested by the snap, or the default fallback account name.
Related issues
Fixes: https://github.com/MetaMask/accounts-planning/issues/261
Manual testing steps
Testing with preinstalled snap
Testing with account management snap
Screenshots/Recordings
Demos
Preinstalled snap flow
Screen.Recording.2024-06-11.at.3.25.57.PM.mov
Account management snap flow
Screen.Recording.2024-06-11.at.3.23.35.PM.mov
Pre-merge author checklist
Pre-merge reviewer checklist