cake_wallet/lib/entities/cake_2fa_preset_options.dart
Omar Hatem e5408a388e
v4.10.0 & v1.7.0 (#1113)
* New versions

* update the new version text after macos [skip ci]

* add cake-wallet headers

* add nano/banano to getAddressFromStringPattern

* Revert "Exolix integration (#1080)"

This reverts commit 9eb6867ab9.

* fix: Bug in conditions check and clean up of repeated code in switch cases (#1117)

* update build numbers [skip ci]

---------

Co-authored-by: fosse <matt.cfosse@gmail.com>
Co-authored-by: Adegoke David <64401859+Blazebrain@users.noreply.github.com>
2023-10-09 18:18:59 +03:00

38 lines
1.2 KiB
Dart

import 'package:cw_core/enumerable_item.dart';
class Cake2FAPresetsOptions extends EnumerableItem<int> with Serializable<int> {
const Cake2FAPresetsOptions({required String super.title, required int super.raw});
static const narrow = Cake2FAPresetsOptions(title: 'Narrow', raw: 0);
static const normal = Cake2FAPresetsOptions(title: 'Normal', raw: 1);
static const aggressive = Cake2FAPresetsOptions(title: 'Aggressive', raw: 2);
static const none = Cake2FAPresetsOptions(title: 'None', raw: 3);
static Cake2FAPresetsOptions deserialize({required int raw}) {
switch (raw) {
case 0:
return Cake2FAPresetsOptions.narrow;
case 1:
return Cake2FAPresetsOptions.normal;
case 2:
return Cake2FAPresetsOptions.aggressive;
case 3:
return Cake2FAPresetsOptions.none;
default:
throw Exception(
'Incorrect Cake 2FA Preset $raw for Cake2FAPresetOptions deserialize',
);
}
}
}
enum VerboseControlSettings {
accessWallet,
addingContacts,
sendsToContacts,
sendsToNonContacts,
sendsToInternalWallets,
exchangesToInternalWallets,
securityAndBackupSettings,
creatingNewWallets,
}