cryptoadvance / specter-desktop

A desktop GUI for Bitcoin Core optimised to work with hardware wallets
MIT License
793 stars 236 forks source link

Duplicating a Wallet on Accident #1924

Open Hodldeez opened 1 year ago

Hodldeez commented 1 year ago

I was instructed to write this report from an admin on Telegram:

My original question was: Hi! I had to reset my MyNode (thus my specter desktop was not able to connect). When I reset my node, it took a while for Specter to catch up. My wallet wasn't showing up in Specter so I ended up adding a new wallet from my coldcard when I should have just been patient. Now there are two wallets displayed but they are obviously from the same seed phrase so every transation I do is doubled in my wallets overview. Can I delete the "new" wallet I added without affecting my original and primary wallet?

Admin replied: Yes, you can. We should improve the UX to inform the user that he is duplicating a wallet. Would you mind opening a GitHub issue with your context so it doesn’t get lost.

Thank you.

moritzwietersheim commented 1 year ago

Related to PR #1772

moneymanolis commented 1 year ago

As a first step it would enough to inform the user that he is duplicating a wallet in the UI. Ideally, one would then also give him a screen with "Do you really want to duplicate, this can cause issues"

PaarthAgarwal commented 1 year ago

As a first step it would enough to inform the user that he is duplicating a wallet in the UI. Ideally, one would then also give him a screen with "Do you really want to duplicate, this can cause issues"

Can you point me to the relevant files for this fix?

moneymanolis commented 1 year ago

@PaarthAgarwal a bit more generic answer, since you can apply this approach more generally:

You go to the screen in question

in this case:

grafik

And then you can search the code for key words, like "Single Signature". This would bring you to a jinja file (new_wallet_type.jinja in this case) and there you see the front end code and within this jinja file you can also find the corresponding backend endpoints. In this case it is a bit poorly done (usually a url_for is used which shows clearly to which endpoint a form etc. is submitting to) but the relevant endpoints are in wallets.py.