Skip to content
This repository was archived by the owner on Feb 23, 2021. It is now read-only.

Conversation

@valentinewallace
Copy link
Contributor

Closes #1198.

*/
initRestoreWallet() {
this._store.seedMnemonic = Array(24).fill('');
this._store.restoreSeedMnemonic = Array(24).fill('');
Copy link
Contributor

@tanx tanx Jul 1, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So the seed words were empty because the user navigated to RestoreWallet after the seed had been set by wallet.generateSeed? Couldn't we just call wallet.generateSeed() in wallet.initSeed()?

Copy link
Contributor Author

@valentinewallace valentinewallace Jul 1, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That works, fixed!

Note that we still need this call to generateSeed(), so initSeed's generateSeed() call will be redundant most of the time.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for looking into this variant. I just noticed that we use wallet.generateSeed to check if a wallet already exists. Calling it twice without handling the error would create another potential error case. I think you made the right call in the first version of your PR to add store.restoreSeedMnemonic. I reopened that variant in #1247 and am closing this one.

@tanx tanx closed this Jul 5, 2019
@tanx tanx deleted the dev/blank-seed branch July 5, 2019 12:30
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Seed is empty for some users (can be solved by restarting)

3 participants