MetaMask / metamask-mobile

Mobile web browser providing access to websites that use the Ethereum blockchain
https://metamask.io
Other
2.16k stars 1.12k forks source link

[Bug]: forced MM SRP backup when imported account balance is positive #9034

Open NicolasMassart opened 7 months ago

NicolasMassart commented 7 months ago

Describe the bug

MM displays a popup to force me to backup the hot MM SRP when I import an account that has positive balance.

This is first annoying, but also confusing and dangerous as the user may misunderstand what SRP it is about, why we ask for this SRP to be backed-up when it actually has no balance, why they are told they have positive balance, ...

[!NOTE] It happens at least with Ledger and private key imports. This is the exact same thing, none of PK or Ledger SRP is related to the newly generated SRP.

Expected behavior

MM should not force backup of SRP when the balance is positive on an imported account.

Screenshots/Recordings

Ledger import PK import
image image

https://github.com/MetaMask/metamask-mobile/assets/4677568/ded350b0-956d-4459-a398-6db847fa7429

Steps to reproduce

  1. Install fresh MM app
  2. create a new account
  3. do not backup SRP
  4. once in the wallet, import a new account from private key. Account must have non zero balance
  5. Popup that forces SRP backup appears and you can't escape until you backup the SRP that has no value on it.

Error messages or log output

No response

Version

7.18.1

Build type

None

Device

Moto Edge 30 Fusion

Operating system

Android

Additional context

No response

Severity

No response

github-actions[bot] commented 3 months ago

This issue has been automatically marked as stale because it has not had recent activity in the last 90 days. It will be closed in 7 days. Thank you for your contributions.

github-actions[bot] commented 2 months ago

This issue was closed because there has been no follow activity in 7 days. If you feel this was closed in error please provide evidence on the current production app in a new issue or comment in the existing issue to a maintainer. Thank you for your contributions.

NicolasMassart commented 2 months ago

This issue is still happening and I experienced it when testing https://github.com/MetaMask/metamask-mobile/pull/10727 I had zero balance on the network native coin but had some in MMGDAO tokens and it blocked me by forcing me to save the initial SRP that I don't care of. This initial unsaved SRP was created only to be able to import a ledger account. I have no reason to backup it.

hesterbruikman commented 2 months ago

We'll need to think through the desired behavior here as the client isn't aware that you have no intention of using the newly created MM SRP. The issue seems to be that you require an MM SRP in the first place. @gantunesr Can you explain why currently an MM SRP is required before a private key or Ledger can be imported?