mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-11-16 17:27:37 +00:00
26 lines
581 B
Dart
26 lines
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;
|
||
|
}
|
||
|
}
|