MetaMask / MetaMask/metamask-extension

Fix prompt for backing SRP

Open
#13,277 10 comments 0 reactions 1 assignee View on GitHub

@filipsekulic is already working on this.

Since Oct 14, 2022.

PS-team team-accounts-framework team-core-extension-ux type-enhancement ux-enhancement ux-papercuts
Dominant language
TypeScript
Stars
13.2k
Forks
5.6k
Avg merge
2d 5h
Merged PRs (30d)
451

Description

### **User Story**
As a user, I want to only get the prompt for backing my SRP once I have non-zero token balances

Figma/Notion links:

Notion: https://www.notion.so/As-a-user-I-want-to-only-get-the-prompt-for-backing-my-SRP-once-I-have-non-zero-token-balances-70f7780fe14f470aa8454704b55cf76b

### Context:

Currently, we show this prompt once the user has non-zero funds for the base token (e.g ETH) or once they add a token to their list.

As it obscures part of the UI, prevents the user from interacting with what's behind it and cannot be closed, we should **update it to also check if the added token has a non-zero balance** and, if yes, only then show the prompt.

We should also **exclude testnet assets** from this non-zero balance detection as those tokens don't have value.

We should also exclude hardware wallet accounts from this non-zero balance detection as those keys are not generated with MetaMask Secret Recovery Phrase so backing it up won’t make the user more safe.

![image](https://user-images.githubusercontent.com/49436614/148919732-50e7e647-ff64-4f8b-b193-7d15d083726a.png)

### **Acceptance Criteria**

1. Don't show the banner when the users only have balance on testnets;
2. Don't show the banner when the users have added new tokens with zero balance (and don't have any other non-zero balance in their wallet).
3. Don’t show the banner when the users only have balance on hardware accounts.
4. The banner is show in all networks even if the user doesn't have balance on that specific network (but meets one of other criterias needed for the warning to be shown).

### **Open question(s)**
- How to the do QA because we don't have value on the main assets (Eth or others main tokens)?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.