remove SeedProvider protoco
This commit is contained in:
parent
4a01865a7d
commit
18b8d622c2
|
@ -132,12 +132,6 @@ extension AppDelegate {
|
|||
}
|
||||
}
|
||||
|
||||
extension DemoAppConfig: SeedProvider {
|
||||
func seed() throws -> [UInt8] {
|
||||
DemoAppConfig.seed
|
||||
}
|
||||
}
|
||||
|
||||
extension Initializer {
|
||||
static var shared: Initializer {
|
||||
AppDelegate.shared.sharedWallet // AppDelegate or DIE.
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
//
|
||||
// SeedProvider.swift
|
||||
// ZcashLightClientKit
|
||||
//
|
||||
// Created by Francisco Gindre on 13/09/2019.
|
||||
// Copyright © 2019 Electric Coin Company. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
/**
|
||||
Describes an interface for an entity that provides seed bytes
|
||||
*/
|
||||
public protocol SeedProvider {
|
||||
func seed() throws -> [UInt8]
|
||||
}
|
|
@ -249,13 +249,3 @@ class TestSynchronizerBuilder {
|
|||
}
|
||||
}
|
||||
|
||||
class StubSeedProvider: SeedProvider {
|
||||
|
||||
let bytes: [UInt8]
|
||||
init(bytes: [UInt8]) {
|
||||
self.bytes = bytes
|
||||
}
|
||||
func seed() -> [UInt8] {
|
||||
self.bytes
|
||||
}
|
||||
}
|
||||
|
|
|
@ -39,7 +39,7 @@ class WalletTests: XCTestCase {
|
|||
outputParamsURL: try! __outputParamsURL()
|
||||
)
|
||||
|
||||
XCTAssertNoThrow(try wallet.initialize(viewingKeys: ["zxviewtestsapling1qwxyzvdmqqqqpqy3knx32fpja779wzg76kmglgguvr74g773f3aw3gy37rar6y9d37knvskz6thnea55s05cz3a7q38835hq4w58yevn763cn2wf7k2mpj247ynxpt9qm0nn39slkz5dk572hxr43pxqtg5kz3pqcj8z8uhz0l2vx8gxe90uf4pgw7ks23f0hz2hm47k9ym42cmns3tenhxzlyur2nvx68h4fmk9nrs44ymcqz434zsuxpvhklrjzn00gc43fdghn5szc5x2w"]))
|
||||
XCTAssertNoThrow(try wallet.initialize(viewingKeys: ["zxviewtestsapling1qwxyzvdmqqqqpqy3knx32fpja779wzg76kmglgguvr74g773f3aw3gy37rar6y9d37knvskz6thnea55s05cz3a7q38835hq4w58yevn763cn2wf7k2mpj247ynxpt9qm0nn39slkz5dk572hxr43pxqtg5kz3pqcj8z8uhz0l2vx8gxe90uf4pgw7ks23f0hz2hm47k9ym42cmns3tenhxzlyur2nvx68h4fmk9nrs44ymcqz434zsuxpvhklrjzn00gc43fdghn5szc5x2w"], walletBirthday: 663194))
|
||||
|
||||
// fileExists actually sucks, so attempting to delete the file and checking what happens is far better :)
|
||||
XCTAssertNoThrow( try FileManager.default.removeItem(at: dbData!) )
|
||||
|
@ -48,12 +48,6 @@ class WalletTests: XCTestCase {
|
|||
}
|
||||
}
|
||||
|
||||
struct SampleSeedProvider: SeedProvider {
|
||||
func seed() throws -> [UInt8] {
|
||||
Array("testreferencealicetestreferencealice".utf8)
|
||||
}
|
||||
}
|
||||
|
||||
struct WalletBirthdayProvider {
|
||||
static var testBirthday: WalletBirthday {
|
||||
WalletBirthday()
|
||||
|
|
|
@ -112,7 +112,7 @@ extension Bundle {
|
|||
}
|
||||
|
||||
|
||||
class TestSeed: SeedProvider {
|
||||
class TestSeed {
|
||||
|
||||
/**
|
||||
test account: "still champion voice habit trend flight survey between bitter process artefact blind carbon truly provide dizzy crush flush breeze blouse charge solid fish spread"
|
||||
|
|
Loading…
Reference in New Issue