diff --git a/Example/DApp/SceneDelegate.swift b/Example/DApp/SceneDelegate.swift index fd5b21c8..f6030888 100644 --- a/Example/DApp/SceneDelegate.swift +++ b/Example/DApp/SceneDelegate.swift @@ -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 diff --git a/Example/ExampleApp.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Example/ExampleApp.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 866c577c..6e9c421e 100644 --- a/Example/ExampleApp.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/Example/ExampleApp.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -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" } } ] diff --git a/Sources/ReownAppKit/Core/AppKit.swift b/Sources/ReownAppKit/Core/AppKit.swift index 16ba47f1..60836ed0 100644 --- a/Sources/ReownAppKit/Core/AppKit.swift +++ b/Sources/ReownAppKit/Core/AppKit.swift @@ -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 diff --git a/Sources/WalletConnectRelay/PackageConfig.json b/Sources/WalletConnectRelay/PackageConfig.json index 1f6b5d28..4a5b368a 100644 --- a/Sources/WalletConnectRelay/PackageConfig.json +++ b/Sources/WalletConnectRelay/PackageConfig.json @@ -1 +1 @@ -{"version": "1.0.5"} +{"version": "1.0.6"} diff --git a/Sources/WalletConnectRelay/SocketStatusProvider.swift b/Sources/WalletConnectRelay/SocketStatusProvider.swift index b7298610..e5ca294d 100644 --- a/Sources/WalletConnectRelay/SocketStatusProvider.swift +++ b/Sources/WalletConnectRelay/SocketStatusProvider.swift @@ -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 }