mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-01-26 20:46:21 +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>()));
|
() => IoniaService(getIt.get<FlutterSecureStorage>(), getIt.get<IoniaApi>()));
|
||||||
|
|
||||||
getIt.registerFactory(
|
getIt.registerFactory(
|
||||||
() => IoniaViewModel(ioniaService: getIt.get<IoniaService>(), ioniaMerchantService: getIt.get<IoniaMerchantService>()));
|
() => IoniaViewModel(ioniaService: getIt.get<IoniaService>()));
|
||||||
|
|
||||||
getIt.registerFactory(() => IoniaCreateAccountPage(getIt.get<IoniaViewModel>()));
|
getIt.registerFactory(() => IoniaCreateAccountPage(getIt.get<IoniaViewModel>()));
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
import 'package:cake_wallet/ionia/ionia_service.dart';
|
import 'package:cake_wallet/ionia/ionia_service.dart';
|
||||||
import 'package:cake_wallet/ionia/ionia_create_state.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.dart';
|
||||||
import 'package:cake_wallet/ionia/ionia_merchant_service.dart';
|
|
||||||
import 'package:cake_wallet/ionia/ionia_virtual_card.dart';
|
import 'package:cake_wallet/ionia/ionia_virtual_card.dart';
|
||||||
import 'package:mobx/mobx.dart';
|
import 'package:mobx/mobx.dart';
|
||||||
part 'ionia_view_model.g.dart';
|
part 'ionia_view_model.g.dart';
|
||||||
|
@ -10,7 +9,7 @@ class IoniaViewModel = IoniaViewModelBase with _$IoniaViewModel;
|
||||||
|
|
||||||
abstract class IoniaViewModelBase with Store {
|
abstract class IoniaViewModelBase with Store {
|
||||||
|
|
||||||
IoniaViewModelBase({this.ioniaService, this.ioniaMerchantService})
|
IoniaViewModelBase({this.ioniaService})
|
||||||
: createUserState = IoniaCreateStateSuccess(),
|
: createUserState = IoniaCreateStateSuccess(),
|
||||||
otpState = IoniaOtpSendDisabled(),
|
otpState = IoniaOtpSendDisabled(),
|
||||||
cardState = IoniaNoCardState(), ioniaMerchants = [] {
|
cardState = IoniaNoCardState(), ioniaMerchants = [] {
|
||||||
|
@ -20,8 +19,6 @@ abstract class IoniaViewModelBase with Store {
|
||||||
_getAuthStatus().then((value) => isLoggedIn = value);
|
_getAuthStatus().then((value) => isLoggedIn = value);
|
||||||
}
|
}
|
||||||
|
|
||||||
final IoniaMerchantService ioniaMerchantService;
|
|
||||||
|
|
||||||
final IoniaService ioniaService;
|
final IoniaService ioniaService;
|
||||||
|
|
||||||
@observable
|
@observable
|
||||||
|
@ -100,6 +97,6 @@ abstract class IoniaViewModelBase with Store {
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<List<IoniaMerchant>> _getMerchants()async{
|
Future<List<IoniaMerchant>> _getMerchants()async{
|
||||||
return await ioniaMerchantService.getMerchants();
|
return await ioniaService.getMerchants();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue