mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-12-26 21:50:27 +00:00
ce21098e98
* CW-488 minor code cleanup * Add Derivation Path selector for BTC and LTC * CW-488 Initial Passphrase Impl * CW-488 Final Passphrase Impl * Quick Fix of language Service * CW-488 Implement PR Suggestions * CW-488 Implement PR Suggestions * CW-488 Implement Passphrase for Bitcoin Cash * CW-488 Implement Passphrase for Bitcoin Cash * CW-488 Implement Passphrase for Bitcoin Cash * remove monero and wownero support for passphrase until merged [skip ci] * CW-488 Apply requested change * CW-488 Add Passphrase to QR * CW-488 Fix Seed generation * CW-488 Implement Electrum Passphrases * CW-488 Add Seed Length Selector to BIP39 Seeds * CW-488 Minor fix [skip ci] --------- Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com>
34 lines
1.1 KiB
Dart
34 lines
1.1 KiB
Dart
import 'package:cake_wallet/entities/seed_type.dart';
|
|
import 'package:cake_wallet/store/app_store.dart';
|
|
import 'package:cake_wallet/store/seed_settings_store.dart';
|
|
import 'package:mobx/mobx.dart';
|
|
|
|
part 'seed_settings_view_model.g.dart';
|
|
|
|
class SeedSettingsViewModel = SeedSettingsViewModelBase with _$SeedSettingsViewModel;
|
|
|
|
abstract class SeedSettingsViewModelBase with Store {
|
|
SeedSettingsViewModelBase(this._appStore, this._seedSettingsStore);
|
|
|
|
@computed
|
|
MoneroSeedType get moneroSeedType => _appStore.settingsStore.moneroSeedType;
|
|
|
|
@action
|
|
void setMoneroSeedType(MoneroSeedType seedType) => _appStore.settingsStore.moneroSeedType = seedType;
|
|
|
|
@computed
|
|
BitcoinSeedType get bitcoinSeedType => _appStore.settingsStore.bitcoinSeedType;
|
|
|
|
@action
|
|
void setBitcoinSeedType(BitcoinSeedType derivationType) =>
|
|
_appStore.settingsStore.bitcoinSeedType = derivationType;
|
|
|
|
@computed
|
|
String? get passphrase => this._seedSettingsStore.passphrase;
|
|
|
|
@action
|
|
void setPassphrase(String? passphrase) => this._seedSettingsStore.passphrase = passphrase;
|
|
|
|
final AppStore _appStore;
|
|
final SeedSettingsStore _seedSettingsStore;
|
|
}
|