mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-06-28 12:29:51 +00:00
CW-520-Enable-user-to-choose-12-or-24-seed-words-for-BCH-and-ETH (#1181)
* seed phrase option UI * bch seed length option * eth seed lengh option * update preseed info * update localization files
This commit is contained in:
parent
36361ef329
commit
8237b89d56
38 changed files with 137 additions and 14 deletions
|
@ -20,7 +20,14 @@ class EthereumWalletService extends WalletService<EthereumNewWalletCredentials,
|
|||
|
||||
@override
|
||||
Future<EthereumWallet> create(EthereumNewWalletCredentials credentials) async {
|
||||
final mnemonic = bip39.generateMnemonic();
|
||||
|
||||
final strength = (credentials.seedPhraseLength == 12)
|
||||
? 128
|
||||
: (credentials.seedPhraseLength == 24)
|
||||
? 256
|
||||
: 128;
|
||||
|
||||
final mnemonic = bip39.generateMnemonic(strength: strength);
|
||||
final wallet = EthereumWallet(
|
||||
walletInfo: credentials.walletInfo!,
|
||||
mnemonic: mnemonic,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue