mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-01-26 04:26:00 +00:00
Remove IoniaMerchantService from IoniaViewModel
This commit is contained in:
parent
aab6d89afa
commit
06a6d8d8bb
2 changed files with 3 additions and 6 deletions
|
@ -655,7 +655,7 @@ Future setup(
|
|||
() => IoniaService(getIt.get<FlutterSecureStorage>(), getIt.get<IoniaApi>()));
|
||||
|
||||
getIt.registerFactory(
|
||||
() => IoniaViewModel(ioniaService: getIt.get<IoniaService>(), ioniaMerchantService: getIt.get<IoniaMerchantService>()));
|
||||
() => IoniaViewModel(ioniaService: getIt.get<IoniaService>()));
|
||||
|
||||
getIt.registerFactory(() => IoniaCreateAccountPage(getIt.get<IoniaViewModel>()));
|
||||
|
||||
|
|
|
@ -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<List<IoniaMerchant>> _getMerchants()async{
|
||||
return await ioniaMerchantService.getMerchants();
|
||||
return await ioniaService.getMerchants();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue