Skip to content

Commit

Permalink
OnSign callback removed from client
Browse files Browse the repository at this point in the history
  • Loading branch information
flypaper0 committed Sep 8, 2023
1 parent 06cf578 commit ad78b17
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions Example/IntegrationTests/Push/NotifyTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand All @@ -113,7 +113,7 @@ final class NotifyTests: XCTestCase {
let metadata = AppMetadata(name: "GM Dapp", description: "", url: gmDappUrl, icons: [])
let updateScope: Set<String> = ["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) {
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions Sources/WalletConnectNotify/Client/Wallet/NotifyClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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<String>) async throws {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit ad78b17

Please sign in to comment.