-
Notifications
You must be signed in to change notification settings - Fork 393
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
BIP 44 derivation path #42
Conversation
f590350
to
fcb5d2a
Compare
@@ -112,10 +112,11 @@ const useStyles = makeStyles((theme) => ({ | |||
}, | |||
})); | |||
|
|||
function BalanceListItem({ publicKey }) { | |||
export function BalanceListItem({ publicKey, expandable }) { |
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.
Re-used this component for the derivable accounts component, but without the ability to expand into details.
src/pages/LoginPage.js
Outdated
successMessage: 'Wallet created', | ||
}); | ||
callAsync( | ||
storeMnemonicAndSeed(mnemonic, seed, password, DERIVATION_PATH.bip44), |
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.
All newly created wallets will use BIP 44.
fcb5d2a
to
bfa030e
Compare
bfa030e
to
f518fd7
Compare
f518fd7
to
fc2442b
Compare
7b5c60f
to
60198c7
Compare
@@ -6,7 +6,7 @@ import { EventEmitter } from 'events'; | |||
|
|||
export async function generateMnemonicAndSeed() { | |||
const bip39 = await import('bip39'); | |||
const mnemonic = bip39.generateMnemonic(128); | |||
const mnemonic = bip39.generateMnemonic(256); |
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.
Switching to use 24 word mnemonics so that we derive the same keys for ledger.
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.
LGTM
Why not derive to the address level? |
Addresses https://github.com/project-serum/spl-token-wallet/issues/9.
BIP 44 derivation path update.
All newly created wallets will use BIP 44, defaulting to the path
m/44'/501'/0'/0'
. Existing wallets are unchanged. And restored (from mnemonic) wallets have the option to choose betweenm/44'/501'/0'/0'
,m/44'/501'/0'
, and the old deprecated path.