MetaMask / MetaMask/metamask-extension
Fix prompt for backing SRP
@filipsekulic is already working on this.
Since Oct 14, 2022.
- 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.

### **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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.