diff --git a/Sources/ZcashLightClientKit/Error/ZcashError.swift b/Sources/ZcashLightClientKit/Error/ZcashError.swift index 8fcdfb08..a0a99f1f 100644 --- a/Sources/ZcashLightClientKit/Error/ZcashError.swift +++ b/Sources/ZcashLightClientKit/Error/ZcashError.swift @@ -584,6 +584,12 @@ public enum ZcashError: Equatable, Error { /// Indicates that this Synchronizer is disconnected from its lightwalletd server. /// ZSYNCO0006 case synchronizerDisconnected + /// The attempt to switch endpoints failed. Check that the hostname and port are correct, and are formatted as :. + /// ZSYNCO0007 + case synchronizerServerSwitch + /// The spending key does not belong to the wallet. + /// ZSYNCO0008 + case synchronizerSpendingKeyDoesNotBelongToTheWallet public var message: String { switch self { @@ -754,6 +760,8 @@ public enum ZcashError: Equatable, Error { case .synchronizerLatestUTXOsInvalidTAddress: return "LatestUTXOs for the address failed, invalid t-address." case .synchronizerRewindUnknownArchorHeight: return "Rewind failed, unknown archor height" case .synchronizerDisconnected: return "Indicates that this Synchronizer is disconnected from its lightwalletd server." + case .synchronizerServerSwitch: return "The attempt to switch endpoints failed. Check that the hostname and port are correct, and are formatted as :." + case .synchronizerSpendingKeyDoesNotBelongToTheWallet: return "The spending key does not belong to the wallet." } } @@ -926,6 +934,8 @@ public enum ZcashError: Equatable, Error { case .synchronizerLatestUTXOsInvalidTAddress: return .synchronizerLatestUTXOsInvalidTAddress case .synchronizerRewindUnknownArchorHeight: return .synchronizerRewindUnknownArchorHeight case .synchronizerDisconnected: return .synchronizerDisconnected + case .synchronizerServerSwitch: return .synchronizerServerSwitch + case .synchronizerSpendingKeyDoesNotBelongToTheWallet: return .synchronizerSpendingKeyDoesNotBelongToTheWallet } } diff --git a/Sources/ZcashLightClientKit/Error/ZcashErrorCode.swift b/Sources/ZcashLightClientKit/Error/ZcashErrorCode.swift index 0bc50a73..24dbb96b 100644 --- a/Sources/ZcashLightClientKit/Error/ZcashErrorCode.swift +++ b/Sources/ZcashLightClientKit/Error/ZcashErrorCode.swift @@ -343,4 +343,8 @@ public enum ZcashErrorCode: String { case synchronizerRewindUnknownArchorHeight = "ZSYNCO0005" /// Indicates that this Synchronizer is disconnected from its lightwalletd server. case synchronizerDisconnected = "ZSYNCO0006" + /// The attempt to switch endpoints failed. Check that the hostname and port are correct, and are formatted as :. + case synchronizerServerSwitch = "ZSYNCO0007" + /// The spending key does not belong to the wallet. + case synchronizerSpendingKeyDoesNotBelongToTheWallet = "ZSYNCO0008" }