From c9f73c28bac234a247f1651a02af458a1a36e8cb Mon Sep 17 00:00:00 2001 From: Joel Carter Date: Tue, 26 Nov 2024 14:32:42 -0600 Subject: [PATCH] Remove legacy convenience init --- Sources/XyoClient/Panel/Panel.swift | 14 -------------- Tests/XyoClientTests/Panel.swift | 4 +--- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/Sources/XyoClient/Panel/Panel.swift b/Sources/XyoClient/Panel/Panel.swift index 04d104f..792af25 100644 --- a/Sources/XyoClient/Panel/Panel.swift +++ b/Sources/XyoClient/Panel/Panel.swift @@ -34,20 +34,6 @@ public class XyoPanel { self.init(account: panelAccount, witnesses: witnesses, archivists: [archivist]) } - public convenience init(observe: (() -> XyoEventPayload?)?) { - if observe != nil { - var witnesses = [WitnessModuleSync]() - - if let observe = observe { - witnesses.append(XyoEventWitness(observe)) - } - - self.init(witnesses: witnesses) - } else { - self.init() - } - } - @available(iOS 15, *) private func witnessAll() async -> [Payload] { var payloads: [Payload] = [] diff --git a/Tests/XyoClientTests/Panel.swift b/Tests/XyoClientTests/Panel.swift index 509141e..f77c5b2 100644 --- a/Tests/XyoClientTests/Panel.swift +++ b/Tests/XyoClientTests/Panel.swift @@ -25,9 +25,7 @@ final class PanelTests: XCTestCase { @available(iOS 15, *) func testSimplePanelReport() async { - let panel = XyoPanel { - return nil - } + let panel = XyoPanel () let result = await panel.reportQuery() XCTAssertEqual(result.bw.addresses.count, 1) XCTAssertEqual(result.bw.addresses[0], panel.account.address)