cake_wallet/lib/entities/seed_phrase_length.dart
Serhii 8237b89d56
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
2023-11-17 15:45:42 +02:00

26 lines
No EOL
581 B
Dart

import 'package:cake_wallet/generated/i18n.dart';
enum SeedPhraseLength {
twelveWords(12),
twentyFourWords(24);
const SeedPhraseLength(this.value);
final int value;
static SeedPhraseLength deserialize({required int raw}) =>
SeedPhraseLength.values.firstWhere((e) => e.value == raw);
@override
String toString() {
String label = '';
switch (this) {
case SeedPhraseLength.twelveWords:
label = '12 Words';
break;
case SeedPhraseLength.twentyFourWords:
label = '24 Words';
break;
}
return label;
}
}