mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-02-02 19:26:27 +00:00
fix fresh install bug
This commit is contained in:
parent
3006679560
commit
045852ec4d
2 changed files with 3 additions and 6 deletions
|
@ -560,8 +560,7 @@ Future setup(
|
|||
(WalletType? type, _) => NodeCreateOrEditViewModel(
|
||||
_nodeSource,
|
||||
type ?? getIt.get<AppStore>().wallet!.type,
|
||||
getIt.get<SettingsStore>(),
|
||||
getIt.get<NodeListViewModel>()
|
||||
getIt.get<SettingsStore>()
|
||||
));
|
||||
|
||||
getIt.registerFactoryParam<NodeCreateOrEditPage, Node?, bool?>(
|
||||
|
|
|
@ -13,8 +13,7 @@ class NodeCreateOrEditViewModel = NodeCreateOrEditViewModelBase
|
|||
with _$NodeCreateOrEditViewModel;
|
||||
|
||||
abstract class NodeCreateOrEditViewModelBase with Store {
|
||||
NodeCreateOrEditViewModelBase(this._nodeSource, this._walletType, this._settingsStore,
|
||||
this.nodeListViewModel)
|
||||
NodeCreateOrEditViewModelBase(this._nodeSource, this._walletType, this._settingsStore)
|
||||
: state = InitialExecutionState(),
|
||||
connectionState = InitialExecutionState(),
|
||||
useSSL = false,
|
||||
|
@ -68,7 +67,6 @@ abstract class NodeCreateOrEditViewModelBase with Store {
|
|||
final WalletType _walletType;
|
||||
final Box<Node> _nodeSource;
|
||||
final SettingsStore _settingsStore;
|
||||
final NodeListViewModel nodeListViewModel;
|
||||
|
||||
@action
|
||||
void reset() {
|
||||
|
@ -103,7 +101,7 @@ abstract class NodeCreateOrEditViewModelBase with Store {
|
|||
try {
|
||||
state = IsExecutingState();
|
||||
if (editingNode != null) {
|
||||
await nodeListViewModel.delete(editingNode);
|
||||
await _nodeSource.delete(editingNode.key);
|
||||
}
|
||||
final node =
|
||||
Node(uri: uri, type: _walletType, login: login, password: password,
|
||||
|
|
Loading…
Reference in a new issue