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:
Serhii 2023-11-17 15:45:42 +02:00 committed by GitHub
parent 36361ef329
commit 8237b89d56
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
38 changed files with 137 additions and 14 deletions

View file

@ -32,8 +32,13 @@ class BitcoinCashWalletService extends WalletService<BitcoinCashNewWalletCredent
@override
Future<BitcoinCashWallet> create(
credentials) async {
final strength = (credentials.seedPhraseLength == 12)
? 128
: (credentials.seedPhraseLength == 24)
? 256
: 128;
final wallet = await BitcoinCashWalletBase.create(
mnemonic: await Mnemonic.generate(),
mnemonic: await Mnemonic.generate(strength: strength),
password: credentials.password!,
walletInfo: credentials.walletInfo!,
unspentCoinsInfo: unspentCoinsInfoSource);