Skip to content

Commit

Permalink
Merge pull request #55 from reown-com/develop
Browse files Browse the repository at this point in the history
1.0.6
  • Loading branch information
llbartekll authored Nov 4, 2024
2 parents de2a594 + beee6e1 commit 8819aea
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 7 deletions.
3 changes: 2 additions & 1 deletion Example/DApp/SceneDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,8 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
mobileLink: "wcflutterwallet-internal://",
linkMode: "https://dev.lab.web3modal.com/flutter_walletkit_internal"
),
]
],
coinbaseEnabled: false
)

AppKit.instance.authResponsePublisher.sink { (id, result) in
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,8 @@
"repositoryURL": "https://github.com/WalletConnect/yttrium",
"state": {
"branch": null,
"revision": "04d1589c42c510d0f2487e58b0af9619a6f070b4",
"version": "0.1.0"
"revision": "25902d941b10495d50c17491863747bb3ae6500e",
"version": "0.1.1"
}
}
]
Expand Down
5 changes: 3 additions & 2 deletions Sources/ReownAppKit/Core/AppKit.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,9 @@ public class AppKit {
store.session = session
store.connectedWith = .wc
store.account = .init(from: session)
} else if CoinbaseWalletSDK.shared.isConnected() {

} else if config.coinbaseEnabled,
CoinbaseWalletSDK.shared.isConnected() {

let storedAccount = AccountStorage.read()
store.connectedWith = .cb
store.account = storedAccount
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.0.5"}
{"version": "1.0.6"}
25 changes: 24 additions & 1 deletion Sources/WalletConnectRelay/SocketStatusProvider.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,32 @@ class SocketStatusProvider: SocketStatusProviding {
socket.onDisconnect = { [unowned self] error in
if let error = error {
logger.debug("Socket disconnected with error: \(error.localizedDescription)")
logger.debug("Error type: \(type(of: error))")

let errorMirror = Mirror(reflecting: error)
logger.debug("Error type: \(type(of: error))")

var errorType = "Unknown"
var errorMessage = error.localizedDescription
var errorCode = "N/A"

for child in errorMirror.children {
if let label = child.label {
switch label {
case "type":
errorType = "\(child.value)"
case "message":
errorMessage = "\(child.value)"
case "code":
errorCode = "\(child.value)"
default:
break
}
}
}

logger.debug("WSError type: \(errorType)")
logger.debug("WSError message: \(errorMessage)")
logger.debug("WSError code: \(errorCode)")

let errorDetails = errorMirror.children.compactMap { child -> String? in
guard let label = child.label else { return nil }
Expand Down

0 comments on commit 8819aea

Please sign in to comment.