From adb48ba50772f0e6c5e29e9b0977e7f73d9ea2b6 Mon Sep 17 00:00:00 2001 From: Francisco Gindre Date: Wed, 15 Feb 2023 19:27:52 -0300 Subject: [PATCH] [#541] Adopt Latest main commit of SDK (#542) * [#541] Adopt Latest main commit of SDK This adopts commit `cf60f44aa83938432c81361917406483ff42c719` from `main` branch of ZcashLightClientKit. It includes changes to remove a fake "defaultBirthday" and use the real `BlockHeight.ofLatestCheckpoint()` function that allows the wallets to fetch the latest checkpoint available from bundle and define it as the birthday. Also "defaultBirthday" birthday was incorrectly being used as a replacement for Sapling Activation height which is the minimum birthday supported by the wallet in terms of shielded pools. Wallets with lower heights that have only transparent funds could in theory work, but they won't be able to see sprout funds. Also the the SDK won't provide a birthday prior to sapling activation. removes references to `LightWalletService` since this class has been made internal to the SDK only. adopts FsBlockDb and adds a FsBlockDbRoot directory dependency for the Databases dependencies. Which should be renamed in a later commit Closes #541 * Fix SwiftLint issues --- .swiftlint.yml | 1 - secant.xcodeproj/project.pbxproj | 7 ++++--- .../xcshareddata/swiftpm/Package.resolved | 8 ++++---- .../Dependencies/DatabaseFiles/DatabaseFiles.swift | 1 + .../DatabaseFiles/DatabaseFilesInterface.swift | 1 + .../DatabaseFiles/DatabaseFilesLiveKey.swift | 6 ++++++ .../DatabaseFiles/DatabaseFilesTestKey.swift | 2 ++ .../Dependencies/WalletStorage/WalletStorage.swift | 4 ++-- .../ZcashSDKEnvironmentInterface.swift | 4 +--- .../ZcashSDKEnvironmentLiveKey.swift | 14 +++----------- .../ZcashSDKEnvironmentTestKey.swift | 14 +++----------- .../Features/ImportWallet/ImportWalletStore.swift | 8 ++++++-- secant/Features/Root/RootInitialization.swift | 4 ++-- secant/Features/Root/RootStore.swift | 1 + .../Views/TransactionDetailView.swift | 2 +- .../Views/TransactionRowView.swift | 4 ++-- .../WalletEventsFlow/WalletEventsFlowView.swift | 2 +- secant/UI Components/Shapes/Wedge.swift | 2 +- secant/Utils/Bindings.swift | 2 +- .../ImportWalletTests/ImportWalletTests.swift | 8 ++++---- secantTests/ProfileTests/ProfileTests.swift | 2 +- secantTests/UtilTests/DatabaseFilesTests.swift | 1 + secantTests/UtilTests/WalletStorageTests.swift | 2 +- 23 files changed, 49 insertions(+), 51 deletions(-) diff --git a/.swiftlint.yml b/.swiftlint.yml index 174ba16..83dfacb 100644 --- a/.swiftlint.yml +++ b/.swiftlint.yml @@ -54,7 +54,6 @@ opt_in_rules: - toggle_bool # - trailing_closure # weird in SwiftUI - unneeded_parentheses_in_closure_argument - - unused_import - vertical_whitespace_closing_braces - vertical_whitespace_opening_braces - weak_delegate diff --git a/secant.xcodeproj/project.pbxproj b/secant.xcodeproj/project.pbxproj index 4f77db6..a97522a 100644 --- a/secant.xcodeproj/project.pbxproj +++ b/secant.xcodeproj/project.pbxproj @@ -2084,6 +2084,7 @@ }; 6696BA8726F0B1D200D5C875 /* SwiftLint */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); @@ -2098,7 +2099,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "swiftlint_version=0.47.0\n\nif which swiftlint >/dev/null; then\n if [ $(swiftlint version) = $swiftlint_version ]; then\n swiftlint\n else\n echo \"warning: Compatible SwiftLint version not installed, download version $swiftlint_version from https://github.com/realm/SwiftLint. Currently installed version is $(swiftlint version)\"\n fi \nelse\n echo \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi\n"; + shellScript = "swiftlint_version=0.50.3\n\nif which swiftlint >/dev/null; then\n if ![ $(swiftlint version) = $swiftlint_version ]; then\n echo \"warning: Compatible SwiftLint version not installed, download version $swiftlint_version from https://github.com/realm/SwiftLint. Currently installed version is $(swiftlint version)\"\n fi\n \n swiftlint \nelse\n echo \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi\n"; }; /* End PBXShellScriptBuildPhase section */ @@ -2720,8 +2721,8 @@ isa = XCRemoteSwiftPackageReference; repositoryURL = "https://github.com/zcash/ZcashLightClientKit/"; requirement = { - kind = upToNextMajorVersion; - minimumVersion = "0.18.0-beta"; + branch = main; + kind = branch; }; }; 6654C7382715A38000901167 /* XCRemoteSwiftPackageReference "swift-composable-architecture" */ = { diff --git a/secant.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/secant.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 8f25fd0..665ce6c 100644 --- a/secant.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/secant.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -329,8 +329,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/zcash-hackworks/zcash-light-client-ffi.git", "state" : { - "revision" : "b6013b8b313523b2c72ce62dbdc17f6ffad3a500", - "version" : "0.1.1" + "revision" : "c2dd0eff1defbe6dfb6197c3a42ab21ea2db2fc2", + "version" : "0.2.0" } }, { @@ -338,8 +338,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/zcash/ZcashLightClientKit/", "state" : { - "revision" : "2c211732e16d53fdcb1c94304bc4016af7f15c6c", - "version" : "0.18.1-beta" + "branch" : "main", + "revision" : "27b99013f7dda11caee0a261361c155490966e7f" } } ], diff --git a/secant/Dependencies/DatabaseFiles/DatabaseFiles.swift b/secant/Dependencies/DatabaseFiles/DatabaseFiles.swift index 9bb5631..4b1c4cd 100644 --- a/secant/Dependencies/DatabaseFiles/DatabaseFiles.swift +++ b/secant/Dependencies/DatabaseFiles/DatabaseFiles.swift @@ -10,6 +10,7 @@ import ZcashLightClientKit struct DatabaseFiles { enum DatabaseFilesError: Error { + case getFsBlockDbRoot case getDocumentsURL case getCacheURL case getDataURL diff --git a/secant/Dependencies/DatabaseFiles/DatabaseFilesInterface.swift b/secant/Dependencies/DatabaseFiles/DatabaseFilesInterface.swift index 0422d72..bf3974a 100644 --- a/secant/Dependencies/DatabaseFiles/DatabaseFilesInterface.swift +++ b/secant/Dependencies/DatabaseFiles/DatabaseFilesInterface.swift @@ -18,6 +18,7 @@ extension DependencyValues { struct DatabaseFilesClient { let documentsDirectory: () throws -> URL + let fsBlockDbRootFor: (ZcashNetwork) throws -> URL let cacheDbURLFor: (ZcashNetwork) throws -> URL let dataDbURLFor: (ZcashNetwork) throws -> URL let outputParamsURLFor: (ZcashNetwork) throws -> URL diff --git a/secant/Dependencies/DatabaseFiles/DatabaseFilesLiveKey.swift b/secant/Dependencies/DatabaseFiles/DatabaseFilesLiveKey.swift index b214f27..5831130 100644 --- a/secant/Dependencies/DatabaseFiles/DatabaseFilesLiveKey.swift +++ b/secant/Dependencies/DatabaseFiles/DatabaseFilesLiveKey.swift @@ -6,6 +6,7 @@ // import ComposableArchitecture +import ZcashLightClientKit extension DatabaseFilesClient: DependencyKey { static let liveValue = DatabaseFilesClient.live() @@ -15,6 +16,11 @@ extension DatabaseFilesClient: DependencyKey { documentsDirectory: { try databaseFiles.documentsDirectory() }, + fsBlockDbRootFor: { network in + try databaseFiles.documentsDirectory() + .appendingPathComponent(network.networkType.chainName) + .appendingPathComponent(ZcashSDK.defaultFsCacheName, isDirectory: true) + }, cacheDbURLFor: { network in try databaseFiles.cacheDbURL(for: network) }, diff --git a/secant/Dependencies/DatabaseFiles/DatabaseFilesTestKey.swift b/secant/Dependencies/DatabaseFiles/DatabaseFilesTestKey.swift index 543aaca..7d46aa6 100644 --- a/secant/Dependencies/DatabaseFiles/DatabaseFilesTestKey.swift +++ b/secant/Dependencies/DatabaseFiles/DatabaseFilesTestKey.swift @@ -12,6 +12,7 @@ import XCTestDynamicOverlay extension DatabaseFilesClient: TestDependencyKey { static let testValue = Self( documentsDirectory: XCTUnimplemented("\(Self.self).documentsDirectory", placeholder: .emptyURL), + fsBlockDbRootFor: XCTUnimplemented("\(Self.self).fsBlockDbRootFor", placeholder: .emptyURL), cacheDbURLFor: XCTUnimplemented("\(Self.self).cacheDbURLFor", placeholder: .emptyURL), dataDbURLFor: XCTUnimplemented("\(Self.self).dataDbURLFor", placeholder: .emptyURL), outputParamsURLFor: XCTUnimplemented("\(Self.self).outputParamsURLFor", placeholder: .emptyURL), @@ -31,6 +32,7 @@ extension URL { extension DatabaseFilesClient { static let noOp = Self( documentsDirectory: { .emptyURL }, + fsBlockDbRootFor: { _ in .emptyURL }, cacheDbURLFor: { _ in .emptyURL }, dataDbURLFor: { _ in .emptyURL }, outputParamsURLFor: { _ in .emptyURL }, diff --git a/secant/Dependencies/WalletStorage/WalletStorage.swift b/secant/Dependencies/WalletStorage/WalletStorage.swift index 7016712..3b7fac3 100644 --- a/secant/Dependencies/WalletStorage/WalletStorage.swift +++ b/secant/Dependencies/WalletStorage/WalletStorage.swift @@ -158,7 +158,7 @@ struct WalletStorage { } func baseQuery(forAccount account: String = "", andKey forKey: String) -> [String: Any] { - let query:[ String: AnyObject ] = [ + let query: [String: AnyObject] = [ /// Uniquely identify this keychain accessor kSecAttrService as String: (zcashStoredWalletPrefix + forKey) as AnyObject, kSecAttrAccount as String: account as AnyObject, @@ -239,7 +239,7 @@ struct WalletStorage { ) throws { let query = baseQuery(forAccount: account, andKey: forKey) - let attributes:[ String: AnyObject ] = [ + let attributes: [String: AnyObject] = [ kSecValueData as String: data as AnyObject ] diff --git a/secant/Dependencies/ZcashSDKEnvironment/ZcashSDKEnvironmentInterface.swift b/secant/Dependencies/ZcashSDKEnvironment/ZcashSDKEnvironmentInterface.swift index 14fa526..6e4560c 100644 --- a/secant/Dependencies/ZcashSDKEnvironment/ZcashSDKEnvironmentInterface.swift +++ b/secant/Dependencies/ZcashSDKEnvironment/ZcashSDKEnvironmentInterface.swift @@ -17,7 +17,6 @@ extension DependencyValues { extension ZcashSDKEnvironment { enum ZcashSDKConstants { - static let defaultBlockHeight = 1_629_724 static let endpointMainnetAddress = "lightwalletd.electriccoin.co" static let endpointTestnetAddress = "lightwalletd.testnet.electriccoin.co" static let endpointPort = 9067 @@ -28,10 +27,9 @@ extension ZcashSDKEnvironment { } struct ZcashSDKEnvironment { - let defaultBirthday: BlockHeight + let latestCheckpoint: (ZcashNetwork) -> BlockHeight let endpoint: LightWalletEndpoint var isMainnet: Bool { network.networkType == .mainnet } - let lightWalletService: LightWalletService let memoCharLimit: Int let mnemonicWordsMaxCount: Int let network: ZcashNetwork diff --git a/secant/Dependencies/ZcashSDKEnvironment/ZcashSDKEnvironmentLiveKey.swift b/secant/Dependencies/ZcashSDKEnvironment/ZcashSDKEnvironmentLiveKey.swift index 99b97b9..0842013 100644 --- a/secant/Dependencies/ZcashSDKEnvironment/ZcashSDKEnvironmentLiveKey.swift +++ b/secant/Dependencies/ZcashSDKEnvironment/ZcashSDKEnvironmentLiveKey.swift @@ -12,25 +12,17 @@ extension ZcashSDKEnvironment: DependencyKey { static let mainnet = ZcashSDKEnvironment.liveValue static let liveValue = Self( - defaultBirthday: BlockHeight(ZcashSDKConstants.defaultBlockHeight), + latestCheckpoint: { network in BlockHeight.ofLatestCheckpoint(network: network) }, endpoint: LightWalletEndpoint( address: ZcashSDKConstants.endpointTestnetAddress, port: ZcashSDKConstants.endpointPort, secure: true, streamingCallTimeoutInMillis: ZcashSDKConstants.streamingCallTimeoutInMillis ), - lightWalletService: LightWalletGRPCService( - endpoint: LightWalletEndpoint( - address: ZcashSDKConstants.endpointTestnetAddress, - port: ZcashSDKConstants.endpointPort, - secure: true, - streamingCallTimeoutInMillis: ZcashSDKConstants.streamingCallTimeoutInMillis - ) - ), - memoCharLimit: 512, + memoCharLimit: MemoBytes.capacity, mnemonicWordsMaxCount: ZcashSDKConstants.mnemonicWordsMaxCount, network: ZcashNetworkBuilder.network(for: .testnet), requiredTransactionConfirmations: ZcashSDKConstants.requiredTransactionConfirmations, - sdkVersion: "0.17.0-beta" + sdkVersion: "0.18.1-beta" ) } diff --git a/secant/Dependencies/ZcashSDKEnvironment/ZcashSDKEnvironmentTestKey.swift b/secant/Dependencies/ZcashSDKEnvironment/ZcashSDKEnvironmentTestKey.swift index 482844c..ee1de49 100644 --- a/secant/Dependencies/ZcashSDKEnvironment/ZcashSDKEnvironmentTestKey.swift +++ b/secant/Dependencies/ZcashSDKEnvironment/ZcashSDKEnvironmentTestKey.swift @@ -13,25 +13,17 @@ extension ZcashSDKEnvironment: TestDependencyKey { static let testnet = ZcashSDKEnvironment.liveValue static let testValue = Self( - defaultBirthday: BlockHeight(ZcashSDKConstants.defaultBlockHeight), + latestCheckpoint: { network in BlockHeight.ofLatestCheckpoint(network: network) }, endpoint: LightWalletEndpoint( address: ZcashSDKConstants.endpointTestnetAddress, port: ZcashSDKConstants.endpointPort, secure: true, streamingCallTimeoutInMillis: ZcashSDKConstants.streamingCallTimeoutInMillis ), - lightWalletService: LightWalletGRPCService( - endpoint: LightWalletEndpoint( - address: ZcashSDKConstants.endpointTestnetAddress, - port: ZcashSDKConstants.endpointPort, - secure: true, - streamingCallTimeoutInMillis: ZcashSDKConstants.streamingCallTimeoutInMillis - ) - ), - memoCharLimit: 512, + memoCharLimit: MemoBytes.capacity, mnemonicWordsMaxCount: ZcashSDKConstants.mnemonicWordsMaxCount, network: ZcashNetworkBuilder.network(for: .testnet), requiredTransactionConfirmations: ZcashSDKConstants.requiredTransactionConfirmations, - sdkVersion: "0.17.0-beta" + sdkVersion: "0.18.1-beta" ) } diff --git a/secant/Features/ImportWallet/ImportWalletStore.swift b/secant/Features/ImportWallet/ImportWalletStore.swift index 6e778bc..9715395 100644 --- a/secant/Features/ImportWallet/ImportWalletStore.swift +++ b/secant/Features/ImportWallet/ImportWalletStore.swift @@ -78,8 +78,11 @@ struct ImportWalletReducer: ReducerProtocol { return .none case .birthdayInputChanged(let redactedBirthday): + let saplingActivation = zcashSDKEnvironment.network.constants.saplingActivationHeight + state.birthdayHeight = redactedBirthday - if let birthdayHeight = BlockHeight(state.birthdayHeight.data), birthdayHeight >= zcashSDKEnvironment.defaultBirthday { + + if let birthdayHeight = BlockHeight(state.birthdayHeight.data), birthdayHeight >= saplingActivation { state.birthdayHeightValue = birthdayHeight.redacted } else { state.birthdayHeightValue = nil @@ -99,7 +102,8 @@ struct ImportWalletReducer: ReducerProtocol { try mnemonic.isValid(state.importedSeedPhrase.data) // store it to the keychain - let birthday = state.birthdayHeightValue ?? zcashSDKEnvironment.defaultBirthday.redacted + let birthday = state.birthdayHeightValue ?? zcashSDKEnvironment.latestCheckpoint(zcashSDKEnvironment.network).redacted + try walletStorage.importWallet(state.importedSeedPhrase.data, birthday.data, .english, false) // update the backup phrase validation flag diff --git a/secant/Features/Root/RootInitialization.swift b/secant/Features/Root/RootInitialization.swift index 0a05bb3..bc1ac86 100644 --- a/secant/Features/Root/RootInitialization.swift +++ b/secant/Features/Root/RootInitialization.swift @@ -87,7 +87,7 @@ extension RootReducer { try mnemonic.isValid(storedWallet.seedPhrase.value()) let seedBytes = try mnemonic.toSeed(storedWallet.seedPhrase.value()) - let birthday = state.storedWallet?.birthday?.value() ?? zcashSDKEnvironment.defaultBirthday + let birthday = state.storedWallet?.birthday?.value() ?? zcashSDKEnvironment.latestCheckpoint(zcashSDKEnvironment.network) let initializer = try RootReducer.prepareInitializer( for: storedWallet.seedPhrase.value(), @@ -142,7 +142,7 @@ extension RootReducer { do { // get the random english mnemonic let newRandomPhrase = try mnemonic.randomMnemonic() - let birthday = try zcashSDKEnvironment.lightWalletService.latestBlockHeight() + let birthday = zcashSDKEnvironment.latestCheckpoint(zcashSDKEnvironment.network) // store the wallet to the keychain try walletStorage.importWallet(newRandomPhrase, birthday, .english, false) diff --git a/secant/Features/Root/RootStore.swift b/secant/Features/Root/RootStore.swift index db599b6..257c6a4 100644 --- a/secant/Features/Root/RootStore.swift +++ b/secant/Features/Root/RootStore.swift @@ -134,6 +134,7 @@ extension RootReducer { let initializer = Initializer( cacheDbURL: try databaseFiles.cacheDbURLFor(network), + fsBlockDbRoot: try databaseFiles.fsBlockDbRootFor(network), dataDbURL: try databaseFiles.dataDbURLFor(network), pendingDbURL: try databaseFiles.pendingDbURLFor(network), endpoint: zcashSDKEnvironment.endpoint, diff --git a/secant/Features/WalletEventsFlow/Views/TransactionDetailView.swift b/secant/Features/WalletEventsFlow/Views/TransactionDetailView.swift index 73cb3b1..d437eec 100644 --- a/secant/Features/WalletEventsFlow/Views/TransactionDetailView.swift +++ b/secant/Features/WalletEventsFlow/Views/TransactionDetailView.swift @@ -20,7 +20,7 @@ struct TransactionDetailView: View { header switch transaction.status { - case .paid(success: _): + case .paid: plainText("You sent \(transaction.zecAmount.decimalString()) ZEC") plainText("fee \(transaction.fee.decimalString()) ZEC", mark: .inactive) plainText("total amount \(transaction.totalAmount.decimalString()) ZEC", mark: .inactive) diff --git a/secant/Features/WalletEventsFlow/Views/TransactionRowView.swift b/secant/Features/WalletEventsFlow/Views/TransactionRowView.swift index 2f91cd2..6958b08 100644 --- a/secant/Features/WalletEventsFlow/Views/TransactionRowView.swift +++ b/secant/Features/WalletEventsFlow/Views/TransactionRowView.swift @@ -61,7 +61,7 @@ struct TransactionRowView: View { extension TransactionRowView { var operationTitle: String { switch transaction.status { - case .paid(success: _): + case .paid: return "You sent" case .received: return "Unknown paid you" @@ -76,7 +76,7 @@ extension TransactionRowView { var icon: some View { HStack { switch transaction.status { - case .paid(success: _), .received: + case .paid, .received: Image(transaction.status == .received ? Asset.Assets.Icons.received.name : Asset.Assets.Icons.sent.name) .resizable() .frame(width: 60, height: 60) diff --git a/secant/Features/WalletEventsFlow/WalletEventsFlowView.swift b/secant/Features/WalletEventsFlow/WalletEventsFlowView.swift index 1aad0ec..1d37b66 100644 --- a/secant/Features/WalletEventsFlow/WalletEventsFlowView.swift +++ b/secant/Features/WalletEventsFlow/WalletEventsFlowView.swift @@ -87,7 +87,7 @@ extension WalletEventsFlowView { } private func latestUnderline(_ viewStore: WalletEventsFlowViewStore) -> Color { - viewStore.isScrollable ? Asset.Colors.TextField.Underline.gray.color : Asset.Colors.TextField.Underline.purple.color + viewStore.isScrollable ? Asset.Colors.TextField.Underline.gray.color : Asset.Colors.TextField.Underline.purple.color } private func allUnderline(_ viewStore: WalletEventsFlowViewStore) -> Color { diff --git a/secant/UI Components/Shapes/Wedge.swift b/secant/UI Components/Shapes/Wedge.swift index ae2a809..126af7d 100644 --- a/secant/UI Components/Shapes/Wedge.swift +++ b/secant/UI Components/Shapes/Wedge.swift @@ -27,7 +27,7 @@ struct Wedge: Shape { x: rect.midX, y: rect.midY ), - radius: rect.width / 2 , + radius: rect.width / 2, startAngle: Angle(degrees: Double(startAngle)), endAngle: Angle(degrees: Double(endAngle)), clockwise: clockwise diff --git a/secant/Utils/Bindings.swift b/secant/Utils/Bindings.swift index 847ae24..c2f1b44 100644 --- a/secant/Utils/Bindings.swift +++ b/secant/Utils/Bindings.swift @@ -43,7 +43,7 @@ extension Binding { else { return nil } return `case` }, - // swiftlint:disable:next unused_closure_parameter + set: { `case` in if let `case` = `case` { self.wrappedValue = casePath.embed(`case`) diff --git a/secantTests/ImportWalletTests/ImportWalletTests.swift b/secantTests/ImportWalletTests/ImportWalletTests.swift index 1820995..046453a 100644 --- a/secantTests/ImportWalletTests/ImportWalletTests.swift +++ b/secantTests/ImportWalletTests/ImportWalletTests.swift @@ -80,13 +80,13 @@ class ImportWalletTests: XCTestCase { } } - func testInvalidBirthdayHeight_lessThanDefault() throws { + func testInvalidBirthdayHeight_lessThanSaplingActivation() throws { let store = TestStore( initialState: .placeholder, reducer: ImportWalletReducer() ) - let birthday = "1600000".redacted + let birthday = "200000".redacted store.send(.birthdayInputChanged(birthday)) { state in state.birthdayHeight = birthday } @@ -175,7 +175,7 @@ class ImportWalletTests: XCTestCase { dependencies.mnemonic.isValid = { _ in throw "invalid mnemonic" } } - let birthday = "1600000".redacted + let birthday = "200000".redacted store.send(.birthdayInputChanged(birthday)) { state in state.birthdayHeight = birthday } @@ -201,7 +201,7 @@ class ImportWalletTests: XCTestCase { $0.mnemonic = .noOp } - let birthday = "1600000".redacted + let birthday = "200000".redacted store.send(.birthdayInputChanged(birthday)) { state in state.birthdayHeight = birthday } diff --git a/secantTests/ProfileTests/ProfileTests.swift b/secantTests/ProfileTests/ProfileTests.swift index 9ebc738..f54f972 100644 --- a/secantTests/ProfileTests/ProfileTests.swift +++ b/secantTests/ProfileTests/ProfileTests.swift @@ -30,7 +30,7 @@ class ProfileTests: XCTestCase { state.addressDetailsState.uAddress = uAddress state.appVersion = "0.0.1" state.appBuild = "31" - state.sdkVersion = "0.17.0-beta" + state.sdkVersion = "0.18.1-beta" } } } diff --git a/secantTests/UtilTests/DatabaseFilesTests.swift b/secantTests/UtilTests/DatabaseFilesTests.swift index ca75757..46d9c3c 100644 --- a/secantTests/UtilTests/DatabaseFilesTests.swift +++ b/secantTests/UtilTests/DatabaseFilesTests.swift @@ -12,6 +12,7 @@ import ZcashLightClientKit extension DatabaseFiles.DatabaseFilesError { var debugValue: String { switch self { + case .getFsBlockDbRoot: return "getFsBlockDbRoot" case .getDocumentsURL: return "getDocumentsURL" case .getCacheURL: return "getCacheURL" case .getDataURL: return "getDataURL" diff --git a/secantTests/UtilTests/WalletStorageTests.swift b/secantTests/UtilTests/WalletStorageTests.swift index e0e0202..6ba940c 100644 --- a/secantTests/UtilTests/WalletStorageTests.swift +++ b/secantTests/UtilTests/WalletStorageTests.swift @@ -328,7 +328,7 @@ private extension WalletStorageTests { ) throws { let query = storage.baseQuery(forAccount: account, andKey: forKey) - let attributes:[ String: AnyObject ] = [ + let attributes: [String: AnyObject] = [ kSecValueData as String: data as AnyObject ]