-
Notifications
You must be signed in to change notification settings - Fork 191
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #535 from WalletConnect/pairing-error-response-test
Pairing error response test
- Loading branch information
Showing
24 changed files
with
314 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
Example/Showcase/Classes/ApplicationLayer/Configurator/ThirdPartyConfigurator.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import WalletConnectRelay | ||
import WalletConnectUtils | ||
import WalletConnectKMS | ||
import Foundation | ||
|
||
public class Networking { | ||
|
||
/// Networking client instance | ||
public static var instance: NetworkingClient = { | ||
guard let config = Networking.config else { | ||
fatalError("Error - you must call Networking.configure(_:) before accessing the shared instance.") | ||
} | ||
|
||
return NetworkingClientFactory.create(relayClient: Relay.instance) | ||
}() | ||
|
||
private static var config: Config? | ||
|
||
private init() { } | ||
|
||
/// Networking instance config method | ||
/// - Parameters: | ||
/// - relayHost: relay host | ||
/// - projectId: project id | ||
/// - socketFactory: web socket factory | ||
/// - socketConnectionType: socket connection type | ||
static public func configure( | ||
relayHost: String = "relay.walletconnect.com", | ||
projectId: String, | ||
socketFactory: WebSocketFactory, | ||
socketConnectionType: SocketConnectionType = .automatic | ||
) { | ||
Networking.config = Networking.Config( | ||
relayHost: relayHost, | ||
projectId: projectId, | ||
socketFactory: socketFactory, | ||
socketConnectionType: socketConnectionType | ||
) | ||
Relay.configure( | ||
relayHost: relayHost, | ||
projectId: projectId, | ||
socketFactory: socketFactory, | ||
socketConnectionType: socketConnectionType) | ||
} | ||
} | ||
|
Oops, something went wrong.