2020-07-06 20:09:03 +00:00
|
|
|
import 'package:mobx/mobx.dart';
|
2021-12-24 12:37:24 +00:00
|
|
|
import 'package:cw_core/wallet_base.dart';
|
2020-07-06 20:09:03 +00:00
|
|
|
|
|
|
|
part 'wallet_seed_view_model.g.dart';
|
|
|
|
|
|
|
|
class WalletSeedViewModel = WalletSeedViewModelBase with _$WalletSeedViewModel;
|
|
|
|
|
|
|
|
abstract class WalletSeedViewModelBase with Store {
|
|
|
|
WalletSeedViewModelBase(WalletBase wallet)
|
|
|
|
: name = wallet.name,
|
2023-08-23 12:33:20 +00:00
|
|
|
seed = wallet.seed!;
|
2020-07-06 20:09:03 +00:00
|
|
|
|
|
|
|
@observable
|
|
|
|
String name;
|
|
|
|
|
|
|
|
@observable
|
|
|
|
String seed;
|
2024-12-11 20:19:52 +00:00
|
|
|
|
|
|
|
List<String> get seedSplit => seed.split(' ');
|
|
|
|
|
|
|
|
int get columnCount => seedSplit.length <= 16 ? 2 : 3;
|
2020-07-06 20:09:03 +00:00
|
|
|
}
|