diff --git a/lib/di.dart b/lib/di.dart index 5a4fe165f..e695d6e57 100644 --- a/lib/di.dart +++ b/lib/di.dart @@ -655,7 +655,7 @@ Future setup( () => IoniaService(getIt.get(), getIt.get())); getIt.registerFactory( - () => IoniaViewModel(ioniaService: getIt.get(), ioniaMerchantService: getIt.get())); + () => IoniaViewModel(ioniaService: getIt.get())); getIt.registerFactory(() => IoniaCreateAccountPage(getIt.get())); diff --git a/lib/view_model/ionia/ionia_view_model.dart b/lib/view_model/ionia/ionia_view_model.dart index 2f8c54e21..cc2483890 100644 --- a/lib/view_model/ionia/ionia_view_model.dart +++ b/lib/view_model/ionia/ionia_view_model.dart @@ -1,7 +1,6 @@ import 'package:cake_wallet/ionia/ionia_service.dart'; import 'package:cake_wallet/ionia/ionia_create_state.dart'; import 'package:cake_wallet/ionia/ionia_merchant.dart'; -import 'package:cake_wallet/ionia/ionia_merchant_service.dart'; import 'package:cake_wallet/ionia/ionia_virtual_card.dart'; import 'package:mobx/mobx.dart'; part 'ionia_view_model.g.dart'; @@ -10,7 +9,7 @@ class IoniaViewModel = IoniaViewModelBase with _$IoniaViewModel; abstract class IoniaViewModelBase with Store { - IoniaViewModelBase({this.ioniaService, this.ioniaMerchantService}) + IoniaViewModelBase({this.ioniaService}) : createUserState = IoniaCreateStateSuccess(), otpState = IoniaOtpSendDisabled(), cardState = IoniaNoCardState(), ioniaMerchants = [] { @@ -20,8 +19,6 @@ abstract class IoniaViewModelBase with Store { _getAuthStatus().then((value) => isLoggedIn = value); } - final IoniaMerchantService ioniaMerchantService; - final IoniaService ioniaService; @observable @@ -100,6 +97,6 @@ abstract class IoniaViewModelBase with Store { } Future> _getMerchants()async{ - return await ioniaMerchantService.getMerchants(); + return await ioniaService.getMerchants(); } }