|
|
|
@ -11,15 +11,12 @@ protocol InCoordinatorDelegate: class { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
enum Tabs { |
|
|
|
|
case browser |
|
|
|
|
case transactions |
|
|
|
|
case tokens |
|
|
|
|
case settings |
|
|
|
|
|
|
|
|
|
var className: String { |
|
|
|
|
switch self { |
|
|
|
|
case .browser: |
|
|
|
|
return String(describing: BrowserViewController.self) |
|
|
|
|
case .tokens: |
|
|
|
|
return String(describing: TokensViewController.self) |
|
|
|
|
case .transactions: |
|
|
|
@ -129,17 +126,6 @@ class InCoordinator: Coordinator { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
let coordinator = BrowserCoordinator(session: session, keystore: keystore) |
|
|
|
|
coordinator.delegate = self |
|
|
|
|
coordinator.start() |
|
|
|
|
coordinator.rootViewController.tabBarItem = UITabBarItem( |
|
|
|
|
title: NSLocalizedString("browser.tabbar.item.title", value: "Browser", comment: ""), |
|
|
|
|
image: R.image.dapps_icon(), |
|
|
|
|
selectedImage: nil |
|
|
|
|
) |
|
|
|
|
addCoordinator(coordinator) |
|
|
|
|
tabBarController.viewControllers?.insert(coordinator.navigationController, at: 0) |
|
|
|
|
|
|
|
|
|
if inCoordinatorViewModel.tokensAvailable { |
|
|
|
|
let tokenCoordinator = TokensCoordinator( |
|
|
|
|
session: session, |
|
|
|
@ -386,9 +372,3 @@ extension InCoordinator: PaymentCoordinatorDelegate { |
|
|
|
|
removeCoordinator(coordinator) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
extension InCoordinator: BrowserCoordinatorDelegate { |
|
|
|
|
func didSentTransaction(transaction: SentTransaction, in coordinator: BrowserCoordinator) { |
|
|
|
|
handlePendingTransaction(transaction: transaction) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|