mirror of
https://github.com/pezkuwichain/pezkuwi-extension.git
synced 2026-10-22 11:46:21 +00:00
Generate new mnemonics with wasm-crypto again
mnemonicGenerate was forced onto the JavaScript path because wasm-crypto 7.5.18 had no bip39Generate. 7.5.20 has it: 1000 phrases of 12 to 24 words generated through wasm were all valid and distinct, and wasm and JavaScript derive the same mini secret from each. The call is back to the upstream form, which uses wasm when it is ready.
This commit is contained in:
1 parent
71e20f843d
commit
cf9c1df03d
1 file changed
+1
-2
@@ -325,8 +325,7 @@ export default class Extension {
|
||||
}
|
||||
|
||||
private seedCreate ({ length = SEED_DEFAULT_LENGTH, seed: _seed, type }: RequestSeedCreate): ResponseSeedCreate {
|
||||
// Use onlyJs=true because wasm-crypto doesn't implement bip39Generate
|
||||
const seed = _seed || mnemonicGenerate(length, undefined, true);
|
||||
const seed = _seed || mnemonicGenerate(length);
|
||||
|
||||
return {
|
||||
address: keyring.createFromUri(getSuri(seed, type), {}, type).address,
|
||||
|
||||
Reference in new issue
Block a user