An advanced Ethereum/EVM mobile wallet
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
alpha-wallet-ios/TrustTests/Factories/FakeKeystore.swift

32 lines
735 B

// Copyright SIX DAY LLC. All rights reserved.
import Foundation
@testable import Trust
struct FakeKeystore: Keystore {
var hasAccounts: Bool {
return accounts.count > 0
}
var accounts: [Account]
var recentlyUsedAccount: Account?
init(
accounts: [Account] = [],
recentlyUsedAccount: Account? = .none
) {
self.accounts = accounts
self.recentlyUsedAccount = recentlyUsedAccount
}
}
extension FakeKeystore {
static func make(
accounts: [Account] = [],
recentlyUsedAccount: Account? = .none
) -> FakeKeystore {
return FakeKeystore(
accounts: accounts,
recentlyUsedAccount: recentlyUsedAccount
)
}
}