diff --git a/Example/IntegrationTests/Push/NotifyTests.swift b/Example/IntegrationTests/Push/NotifyTests.swift index 965c56f5a..ff358cb99 100644 --- a/Example/IntegrationTests/Push/NotifyTests.swift +++ b/Example/IntegrationTests/Push/NotifyTests.swift @@ -103,7 +103,7 @@ final class NotifyTests: XCTestCase { }.store(in: &publishers) try! await walletNotifyClient.register(account: account, onSign: sign) - try! await walletNotifyClient.subscribe(metadata: metadata, account: account, onSign: sign) + try! await walletNotifyClient.subscribe(metadata: metadata, account: account) wait(for: [expectation], timeout: InputConfig.defaultTimeout) } @@ -113,7 +113,7 @@ final class NotifyTests: XCTestCase { let metadata = AppMetadata(name: "GM Dapp", description: "", url: gmDappUrl, icons: []) let updateScope: Set = ["alerts"] try! await walletNotifyClient.register(account: account, onSign: sign) - try! await walletNotifyClient.subscribe(metadata: metadata, account: account, onSign: sign) + try! await walletNotifyClient.subscribe(metadata: metadata, account: account) walletNotifyClient.newSubscriptionPublisher .sink { [unowned self] subscription in Task(priority: .high) { @@ -142,7 +142,7 @@ final class NotifyTests: XCTestCase { let metadata = AppMetadata(name: "GM Dapp", description: "", url: gmDappUrl, icons: []) try! await walletNotifyClient.register(account: account, onSign: sign) - try! await walletNotifyClient.subscribe(metadata: metadata, account: account, onSign: sign) + try! await walletNotifyClient.subscribe(metadata: metadata, account: account) walletNotifyClient.newSubscriptionPublisher .sink { subscription in diff --git a/Sources/WalletConnectNotify/Client/Wallet/NotifyClient.swift b/Sources/WalletConnectNotify/Client/Wallet/NotifyClient.swift index 00aed991d..96fa0374d 100644 --- a/Sources/WalletConnectNotify/Client/Wallet/NotifyClient.swift +++ b/Sources/WalletConnectNotify/Client/Wallet/NotifyClient.swift @@ -85,8 +85,8 @@ public class NotifyClient { logger.setLogging(level: level) } - public func subscribe(metadata: AppMetadata, account: Account, onSign: @escaping SigningCallback) async throws { - try await notifySubscribeRequester.subscribe(metadata: metadata, account: account, onSign: onSign) + public func subscribe(metadata: AppMetadata, account: Account) async throws { + try await notifySubscribeRequester.subscribe(metadata: metadata, account: account) } public func update(topic: String, scope: Set) async throws { diff --git a/Sources/WalletConnectNotify/Client/Wallet/ProtocolEngine/wc_pushSubscribe/NotifySubscribeRequester.swift b/Sources/WalletConnectNotify/Client/Wallet/ProtocolEngine/wc_pushSubscribe/NotifySubscribeRequester.swift index 7a77693ed..b6f6b7470 100644 --- a/Sources/WalletConnectNotify/Client/Wallet/ProtocolEngine/wc_pushSubscribe/NotifySubscribeRequester.swift +++ b/Sources/WalletConnectNotify/Client/Wallet/ProtocolEngine/wc_pushSubscribe/NotifySubscribeRequester.swift @@ -35,7 +35,7 @@ class NotifySubscribeRequester { self.dappsMetadataStore = dappsMetadataStore } - @discardableResult func subscribe(metadata: AppMetadata, account: Account, onSign: @escaping SigningCallback) async throws -> NotifySubscriptionPayload.Wrapper { + @discardableResult func subscribe(metadata: AppMetadata, account: Account) async throws -> NotifySubscriptionPayload.Wrapper { let dappUrl = metadata.url diff --git a/Sources/Web3Inbox/NotifyClientProxy/NotifyClientProxy.swift b/Sources/Web3Inbox/NotifyClientProxy/NotifyClientProxy.swift index 4a2a39138..51481a2b7 100644 --- a/Sources/Web3Inbox/NotifyClientProxy/NotifyClientProxy.swift +++ b/Sources/Web3Inbox/NotifyClientProxy/NotifyClientProxy.swift @@ -25,7 +25,7 @@ final class NotifyClientProxy { try await respond(request: request) case .subscribe: let params = try parse(SubscribeRequest.self, params: request.params) - try await client.subscribe(metadata: params.metadata, account: params.account, onSign: onSign) + try await client.subscribe(metadata: params.metadata, account: params.account) try await respond(request: request) case .getActiveSubscriptions: let subscriptions = client.getActiveSubscriptions()