-
Notifications
You must be signed in to change notification settings - Fork 43
twelve words backup screen UI and logic #78
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
Conversation
@@ -14,7 +14,7 @@ class KeyGeneratorService { | |||
const seedAsUint8Array = Buffer.from(seed, 'hex'); | |||
const left32BitsOfSeed = seedAsUint8Array.slice(0, nacl.sign.seedLength); | |||
const { publicKey, secretKey } = nacl.sign.keyPair.fromSeed(left32BitsOfSeed); | |||
return { publicKey: Buffer.from(publicKey).toString('hex'), secretKey: Buffer.from(secretKey).toString('hex'), seed }; | |||
return { publicKey: Buffer.from(publicKey).toString('hex'), secretKey: Buffer.from(secretKey).toString('hex'), seed, resolvedMnemonic }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rename to mnemonic
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will clash with "mnemonic" param in wallet actions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can rename it like this { mnemonic: returnedMnemonic }
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renaming on destructuring still does not solve the issue. Unless I change the "mnemonic" parmam name in the saveNewWallet fuction to something else, like so:
in keyGenService:
return { publicKey: Buffer.from(publicKey).toString('hex'), secretKey: Buffer.from(secretKey).toString('hex'), seed, mnemonic: resolvedMnemonic };
in wallet actions:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK np, this brings us back to how it was coded to begin with.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's not the same, the important thing is not breaking the app with untested changes
In this commit:
Create 12 words backup page. Displaying the words only for now. (no print or copy yet).