Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.8.6 #1152

Merged
merged 5 commits into from
Oct 3, 2023
Merged

1.8.6 #1152

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ class NotifyWatchSubscriptionsResponseSubscriber {
let oldSubscriptions = notifyStorage.getSubscriptions()
let newSubscriptions = try await notifySubscriptionsBuilder.buildSubscriptions(responsePayload.subscriptions)

try Task.checkCancellation()

logger.debug("number of subscriptions: \(newSubscriptions.count)")

guard newSubscriptions != oldSubscriptions else {return}
Expand Down
2 changes: 1 addition & 1 deletion Sources/WalletConnectRelay/PackageConfig.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"version": "1.8.5"}
{"version": "1.8.6"}
39 changes: 23 additions & 16 deletions Sources/WalletConnectUtils/WalletConnectURI.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import UIKit
import Foundation

public struct WalletConnectURI: Equatable {

public let topic: String
public let version: String
public let symKey: String
Expand Down Expand Up @@ -51,20 +50,6 @@ public struct WalletConnectURI: Equatable {
}
return nil
}

public init?(connectionOptions: UIScene.ConnectionOptions) {
if let uri = connectionOptions.urlContexts.first?.url.query?.replacingOccurrences(of: "uri=", with: "") {
self.init(string: uri)
}
return nil
}

public init?(urlContext: UIOpenURLContext) {
if let uri = urlContext.url.query?.replacingOccurrences(of: "uri=", with: "") {
self.init(string: uri)
}
return nil
}

private var relayQuery: String {
var query = "relay-protocol=\(relay.protocol)"
Expand All @@ -82,3 +67,25 @@ public struct WalletConnectURI: Equatable {
return URLComponents(string: urlString)
}
}

#if canImport(UIKit)

import UIKit

extension WalletConnectURI {
public init?(connectionOptions: UIScene.ConnectionOptions) {
if let uri = connectionOptions.urlContexts.first?.url.query?.replacingOccurrences(of: "uri=", with: "") {
self.init(string: uri)
}
return nil
}

public init?(urlContext: UIOpenURLContext) {
if let uri = urlContext.url.query?.replacingOccurrences(of: "uri=", with: "") {
self.init(string: uri)
}
return nil
}
}

#endif
Loading