From bee3b3fabd28509ad1591ef3d2dd344784a567ba Mon Sep 17 00:00:00 2001 From: Hwee-Boon Yar Date: Wed, 25 Jul 2018 13:22:49 +0800 Subject: [PATCH] Fix tests to work on simulators with a clean slate --- AlphaWallet/InCoordinator.swift | 1 - AlphaWalletTests/Coordinators/InCoordinatorTests.swift | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/AlphaWallet/InCoordinator.swift b/AlphaWallet/InCoordinator.swift index 479111a69..b55d5f9b1 100644 --- a/AlphaWallet/InCoordinator.swift +++ b/AlphaWallet/InCoordinator.swift @@ -394,7 +394,6 @@ class InCoordinator: Coordinator { } private func fetchXMLAssetDefinitions() { - let keystore = try! EtherKeystore() let migration = MigrationInitializer(account: keystore.recentlyUsedWallet!, chainID: config.chainID) migration.perform() let web3 = self.web3(for: config.server) diff --git a/AlphaWalletTests/Coordinators/InCoordinatorTests.swift b/AlphaWalletTests/Coordinators/InCoordinatorTests.swift index b09441926..4c5179ed3 100644 --- a/AlphaWalletTests/Coordinators/InCoordinatorTests.swift +++ b/AlphaWalletTests/Coordinators/InCoordinatorTests.swift @@ -8,10 +8,12 @@ class InCoordinatorTests: XCTestCase { func testShowTabBar() { let config: Config = .make() + let wallet: Wallet = .make() + let coordinator = InCoordinator( navigationController: FakeNavigationController(), wallet: .make(), - keystore: FakeEtherKeystore(), + keystore: FakeKeystore(wallets: [wallet]), config: config )