Open EHaracic opened 2 years ago
@danjm @bschorchit Think that we need to refine this ticket. We had some discussions before but im my opinion we need to discuss it once again.
Answering the open question, here is the design for the refresh accounts button. Some things looks different on the design file, but the only two changes needed are:
My accounts
text.
User Story
As a user, I want MetaMask to auto-detect my accounts with balance even when I have some accounts in between them that doesn’t hold any balance so I don’t get confused and think that I’ve somehow lost important accounts.
Goals We want to start auto-detecting accounts for the current network every time the user logs in, switch networks or click a refresh account link. We also want to check if the next 3 accounts have funds.
Figma/Notion links
Notion:https://www.notion.so/Auto-detect-3-accounts-past-an-account-with-balance-e9e41b0067ff445e9e7b0cc46ab85fe2
Figma: https://www.figma.com/file/33geacOStnlnJeBZhquDn7/Refresh-Accounts?node-id=0%3A1
Acceptance criteria
We want to check if the next 3 accounts have funds.
Steps to Reproduce the issue:
NOTE: Some things looks different on the design file in comparison with the current extension version.
Create 4 PR-s for following tasks:
Notes
Scenarios:
Slack discussion, method and notes: https://consensys.slack.com/archives/C02GH833686/p1645707181601199?thread_ts=1645700370.317969&cid=C02GH833686
Auto-detecting acccounts algorithm
begin Take an index of the last account in the list Add next account Check the balance While account balance > 0 add next account check balance End while
Repeat if the balance == 0 add next account check balance end if If if the balance > 0 go to step 1 Until the number of accounts with 0 balance is = 3
Remove the accounts with 0 balance from end of the list. Do not remove it if it is the only account on the list end
Open questions
No open questions