Skip to content

Commit

Permalink
fix client id migration
Browse files Browse the repository at this point in the history
  • Loading branch information
llbartekll committed Nov 28, 2023
1 parent 646ef18 commit cd926be
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions Sources/WalletConnectNetworking/Networking.swift
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ public class Networking {
Relay.configure(
relayHost: relayHost,
projectId: projectId,
groupIdentifier: groupIdentifier,
socketFactory: socketFactory,
socketConnectionType: socketConnectionType)
}
Expand Down
3 changes: 3 additions & 0 deletions Sources/WalletConnectRelay/Relay.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ public class Relay {
relayHost: config.relayHost,
projectId: config.projectId,
socketFactory: config.socketFactory,
groupIdentifier: config.groupIdentifier,
socketConnectionType: config.socketConnectionType
)
}()
Expand All @@ -33,12 +34,14 @@ public class Relay {
static public func configure(
relayHost: String = "relay.walletconnect.com",
projectId: String,
groupIdentifier: String,
socketFactory: WebSocketFactory,
socketConnectionType: SocketConnectionType = .automatic
) {
Relay.config = Relay.Config(
relayHost: relayHost,
projectId: projectId,
groupIdentifier: groupIdentifier,
socketFactory: socketFactory,
socketConnectionType: socketConnectionType
)
Expand Down
3 changes: 2 additions & 1 deletion Sources/WalletConnectRelay/RelayClientFactory.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ public struct RelayClientFactory {
relayHost: String,
projectId: String,
socketFactory: WebSocketFactory,
groupIdentifier: String,
socketConnectionType: SocketConnectionType
) -> RelayClient {

let keyValueStorage = UserDefaults.standard
let keyValueStorage = UserDefaults(suiteName: groupIdentifier) ?? UserDefaults.standard

let keychainStorage = KeychainStorage(serviceIdentifier: "com.walletconnect.sdk")

Expand Down
1 change: 1 addition & 0 deletions Sources/WalletConnectRelay/RelayConfig.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ extension Relay {
struct Config {
let relayHost: String
let projectId: String
let groupIdentifier: String
let socketFactory: WebSocketFactory
let socketConnectionType: SocketConnectionType
}
Expand Down

0 comments on commit cd926be

Please sign in to comment.