Remove unused tokensStorages, assetDefinitionStore, analyticsCoordinator dependencies from ActivitiesCoordinator #3951

pull/3952/head
Krypto Pank 3 years ago
parent 7bd0fbfb11
commit 0ba9f3191e
  1. 10
      AlphaWallet/Activities/Coordinators/ActivitiesCoordinator.swift
  2. 2
      AlphaWallet/InCoordinator.swift

@ -8,11 +8,7 @@ protocol ActivitiesCoordinatorDelegate: AnyObject {
}
class ActivitiesCoordinator: NSObject, Coordinator {
private let analyticsCoordinator: AnalyticsCoordinator
private let sessions: ServerDictionary<WalletSession>
private let tokensStorages: ServerDictionary<TokensDataStore>
private let assetDefinitionStore: AssetDefinitionStore
private let activitiesService: ActivitiesServiceType
weak var delegate: ActivitiesCoordinatorDelegate?
@ -25,19 +21,13 @@ class ActivitiesCoordinator: NSObject, Coordinator {
private var subscriptionKey: Subscribable<ActivitiesViewModel>.SubscribableKey!
init(
analyticsCoordinator: AnalyticsCoordinator,
sessions: ServerDictionary<WalletSession>,
navigationController: UINavigationController = .withOverridenBarAppearence(),
tokensStorages: ServerDictionary<TokensDataStore>,
assetDefinitionStore: AssetDefinitionStore,
activitiesService: ActivitiesServiceType
) {
self.activitiesService = activitiesService
self.analyticsCoordinator = analyticsCoordinator
self.sessions = sessions
self.navigationController = navigationController
self.tokensStorages = tokensStorages
self.assetDefinitionStore = assetDefinitionStore
super.init()
subscriptionKey = activitiesService.subscribableViewModel.subscribe { [weak self] viewModel in

@ -455,7 +455,7 @@ class InCoordinator: NSObject, Coordinator {
}
private func createActivityCoordinator(activitiesService: ActivitiesServiceType) -> ActivitiesCoordinator {
let coordinator = ActivitiesCoordinator(analyticsCoordinator: analyticsCoordinator, sessions: walletSessions, tokensStorages: tokensStorages, assetDefinitionStore: assetDefinitionStore, activitiesService: activitiesService)
let coordinator = ActivitiesCoordinator(sessions: walletSessions, activitiesService: activitiesService)
coordinator.delegate = self
coordinator.rootViewController.tabBarItem = UITabBarItem(title: R.string.localizable.activityTabbarItemTitle(), image: R.image.tab_transactions(), selectedImage: nil)
coordinator.start()

Loading…
Cancel
Save