Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wallet Reset Bug #4517

Closed
dt665m opened this issue Nov 14, 2023 · 6 comments · Fixed by #4557
Closed

Wallet Reset Bug #4517

dt665m opened this issue Nov 14, 2023 · 6 comments · Fixed by #4557
Assignees
Labels
bug Functionality broken bug-p4 Non-critical functionality broken for few users, or there are clear workarounds

Comments

@dt665m
Copy link

dt665m commented Nov 14, 2023

Hi All. I just created a new wallet through the normal process. I think somewhere, I had another tab open that had the initial create/import wallet page. After the first tab successfully created the wallet, I found the old tab was still at the initial create "creat wallet page. The first wallet that was generated (one that already has a password and was working in the extension view) was wiped.

I'm not EXACTLY sure how this all happened so I don't have exact repro steps. I just know I used the extension tab to navigate the new wallet and then one of the older browser tabs was still in the creation steps and even though I already had a wallet, the full page tab overwrote it / wiped it.

Hopefully someone can repro this and fix it. Could be a thorn in a new web3 user's butt.

@314159265359879
Copy link
Contributor

Hi @dt665m thanks for reporting! I will investigate and see if I can reproduce this.

@314159265359879 314159265359879 self-assigned this Nov 15, 2023
@314159265359879 314159265359879 added the bug Functionality broken label Nov 15, 2023
@314159265359879
Copy link
Contributor

Thanks again for the report, good catch. I will check with the team what we can do to improve this.

Steps to reproduce
0. Install wallet extension or sign out.

  1. Top right menu, open in new tab. (this is tab 1)
  2. Create new wallet
  3. Copy and save Secret Key
  4. Click "I've backed it up"
    wait, you can also wait on the screen before "enter password", it will lead to the same result.
    image

Tab 2
5. Top right menu in the extension modal, open in new tab (this is tab 2)
6. Create new wallet
7. Copy and save Secret Key
8. Click "I've backed it up"
9. Enter password and click "continue".
10. Check receive address (Stacks), copy and store it.

Tab 1 again
11. Go back to the first tab
12. Enter password and click "continue"
13. Check receive address (Stacks), copy and store it.

  1. See error: The receiver address (at 13) is different from the one generated with tab 2 (at 10). The wallet extension modal also shows the address from tab 1.

Possible solutions
Is it possible to allow a maximum of one tab when the wallet is still being set up? To avoid this issue?
Other possible solutions?

2023-11-17_10-40-57.mp4

@314159265359879 314159265359879 removed their assignment Nov 17, 2023
@pete-watters
Copy link
Contributor

While not ideal I'm not sure what we can do to mitigate this. You are essentially creating two different wallets when you do this.

When testing these kind of double tab issues, if you consider how Gmail works for example. If you open your inbox in two tabs and begin to read mail in one, they don't appear unread in the other.

We can speak about this as a team in case we can do something but I'm not sure right now

@pete-watters pete-watters self-assigned this Nov 17, 2023
@markmhendrickson markmhendrickson added the bug-p4 Non-critical functionality broken for few users, or there are clear workarounds label Nov 20, 2023
@dt665m
Copy link
Author

dt665m commented Nov 21, 2023

just a suggestion, but you might be able to use the window.on('storage',callback) as a way to communicate between tabs. It's common to use this for coordinated tabbed logout. I'm not an extension developer so I don't know if this method will work in the extension environments. Conceptually, you could have each tab listening to a store into localstorage that represents a wallet was created and skip some steps.

@kyranjamie
Copy link
Collaborator

@pete-watters I suggest that we close all other windows/use route guards to prevent a user getting in this situation during onboarding

@pete-watters
Copy link
Contributor

@dt665m : Thank you for reporting this problem. I have implemented a fix whereby excess tabs are automatically closed when creating a wallet and it will be available in the next release.

kyranjamie pushed a commit that referenced this issue Nov 28, 2023
## [6.17.0](v6.16.1...v6.17.0) (2023-11-28)

### Features

* extended add-network page with the option to add bitcoin network too ([870574a](870574a))
* support bitcoin ledger, closes [#2893](#2893) ([8a81f58](8a81f58))
* updated dlc-tools package, modified accept bitcoin contract rpc params ([0742719](0742719))

### Bug Fixes

* account circle numbers and delete unused code ([a6588dc](a6588dc))
* add background state for ledger connect modal ([41fef37](41fef37))
* align heading text left, closes [#4423](#4423) ([31ddc89](31ddc89))
* allow users to click input when populated, closes [#4582](#4582) ([222a854](222a854))
* axios get request for config ([3ad4b06](3ad4b06))
* bitcoin fees tx size calc ([3f5718c](3f5718c))
* filter network dust amounts when sending all ([b7a34a9](b7a34a9))
* fixed previously saved network loading ([c8724b4](c8724b4))
* give more margin to Continue button in extension mode, closes [#4423](#4423) ([8d61e93](8d61e93))
* mark ui bugs ([e9da651](e9da651))
* minor ui bugs ([0095ebc](0095ebc))
* **popup:** avatar circle on stacks transactions ([8dbfefe](8dbfefe))
* provider name in tests ([6b75267](6b75267))
* psbt bare utxo signing ([954e707](954e707))
* qr code ([b035f20](b035f20))
* remove not working onFocusborder, to be fixed in [#4583](#4583) ([cddf09b](cddf09b))
* sign out and close all tabs on create wallet, closes [#4517](#4517) ([0b47dea](0b47dea))
* skip bitcoin contract tests ([83c4d04](83c4d04))

### Internal

* fix type errors ([98f5ddf](98f5ddf))
* icon tokens ([91403d7](91403d7))
* migrate icons ([fbc6580](fbc6580))
* post-release merge back ([c3c7bd1](c3c7bd1))
* remove bitcoinjs-lib from inscription send ([97854b0](97854b0))
* remove patch file ([be8b040](be8b040))
* remove remaining old icon libraries ([1fa4e6c](1fa4e6c))
* remove stacks ui ([99fb117](99fb117))
* remove unneeded parent button, closes [#4550](#4550) ([c44a7bb](c44a7bb))
* update font and color for receive asset ([800fa3e](800fa3e))
* update panda ([2807b50](2807b50))
* update readme ([c86f2ab](c86f2ab))
* use tokens for border radius ([b387903](b387903))
pete-watters added a commit to Nithishvb/extension that referenced this issue Jan 17, 2024
pete-watters pushed a commit to Nithishvb/extension that referenced this issue Jan 17, 2024
## [6.17.0](leather-io/extension@v6.16.1...v6.17.0) (2023-11-28)

### Features

* extended add-network page with the option to add bitcoin network too ([870574a](leather-io@870574a))
* support bitcoin ledger, closes [leather-io#2893](leather-io#2893) ([8a81f58](leather-io@8a81f58))
* updated dlc-tools package, modified accept bitcoin contract rpc params ([0742719](leather-io@0742719))

### Bug Fixes

* account circle numbers and delete unused code ([a6588dc](leather-io@a6588dc))
* add background state for ledger connect modal ([41fef37](leather-io@41fef37))
* align heading text left, closes [leather-io#4423](leather-io#4423) ([31ddc89](leather-io@31ddc89))
* allow users to click input when populated, closes [leather-io#4582](leather-io#4582) ([222a854](leather-io@222a854))
* axios get request for config ([3ad4b06](leather-io@3ad4b06))
* bitcoin fees tx size calc ([3f5718c](leather-io@3f5718c))
* filter network dust amounts when sending all ([b7a34a9](leather-io@b7a34a9))
* fixed previously saved network loading ([c8724b4](leather-io@c8724b4))
* give more margin to Continue button in extension mode, closes [leather-io#4423](leather-io#4423) ([8d61e93](leather-io@8d61e93))
* mark ui bugs ([e9da651](leather-io@e9da651))
* minor ui bugs ([0095ebc](leather-io@0095ebc))
* **popup:** avatar circle on stacks transactions ([8dbfefe](leather-io@8dbfefe))
* provider name in tests ([6b75267](leather-io@6b75267))
* psbt bare utxo signing ([954e707](leather-io@954e707))
* qr code ([b035f20](leather-io@b035f20))
* remove not working onFocusborder, to be fixed in [leather-io#4583](leather-io#4583) ([cddf09b](leather-io@cddf09b))
* sign out and close all tabs on create wallet, closes [leather-io#4517](leather-io#4517) ([0b47dea](leather-io@0b47dea))
* skip bitcoin contract tests ([83c4d04](leather-io@83c4d04))

### Internal

* fix type errors ([98f5ddf](leather-io@98f5ddf))
* icon tokens ([91403d7](leather-io@91403d7))
* migrate icons ([fbc6580](leather-io@fbc6580))
* post-release merge back ([c3c7bd1](leather-io@c3c7bd1))
* remove bitcoinjs-lib from inscription send ([97854b0](leather-io@97854b0))
* remove patch file ([be8b040](leather-io@be8b040))
* remove remaining old icon libraries ([1fa4e6c](leather-io@1fa4e6c))
* remove stacks ui ([99fb117](leather-io@99fb117))
* remove unneeded parent button, closes [leather-io#4550](leather-io#4550) ([c44a7bb](leather-io@c44a7bb))
* update font and color for receive asset ([800fa3e](leather-io@800fa3e))
* update panda ([2807b50](leather-io@2807b50))
* update readme ([c86f2ab](leather-io@c86f2ab))
* use tokens for border radius ([b387903](leather-io@b387903))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Functionality broken bug-p4 Non-critical functionality broken for few users, or there are clear workarounds
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants