blockchainethereumblockchain-walleterc20erc721walletxdaidappdecentralizederc1155erc875iosswifttokens
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.
32 lines
735 B
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
|
|
)
|
|
}
|
|
}
|
|
|