diff --git a/Sources/WalletConnectPairing/PairingClient.swift b/Sources/WalletConnectPairing/PairingClient.swift index 44e79f7b2..233fcd76b 100644 --- a/Sources/WalletConnectPairing/PairingClient.swift +++ b/Sources/WalletConnectPairing/PairingClient.swift @@ -128,8 +128,8 @@ public class PairingClient: PairingRegisterer, PairingInteracting, PairingClient try await pingService.ping(topic: topic) } - public func disconnect(topic: String) async throws { - try await pairingDeleteRequester.delete(topic: topic) + public func disconnect(topic: String) async { + await pairingDeleteRequester.delete(topic: topic) } public func validatePairingExistance(_ topic: String) throws { diff --git a/Sources/WalletConnectPairing/PairingClientProtocol.swift b/Sources/WalletConnectPairing/PairingClientProtocol.swift index 905c1b4e8..f97e1458f 100644 --- a/Sources/WalletConnectPairing/PairingClientProtocol.swift +++ b/Sources/WalletConnectPairing/PairingClientProtocol.swift @@ -6,6 +6,6 @@ public protocol PairingClientProtocol { var pairingStatePublisher: AnyPublisher {get} var pairingExpirationPublisher: AnyPublisher {get} func pair(uri: WalletConnectURI) async throws - func disconnect(topic: String) async throws + func disconnect(topic: String) async func getPairings() -> [Pairing] } diff --git a/Sources/WalletConnectPairing/Services/Common/Delete/PairingDeleteRequester.swift b/Sources/WalletConnectPairing/Services/Common/Delete/PairingDeleteRequester.swift index f976a3cd0..c8c08ba34 100644 --- a/Sources/WalletConnectPairing/Services/Common/Delete/PairingDeleteRequester.swift +++ b/Sources/WalletConnectPairing/Services/Common/Delete/PairingDeleteRequester.swift @@ -16,13 +16,13 @@ class PairingDeleteRequester { self.logger = logger } - func delete(topic: String) async throws { + func delete(topic: String) async { let reason = PairingReasonCode.userDisconnected let protocolMethod = PairingProtocolMethod.delete let pairingDeleteParams = PairingDeleteParams(code: reason.code, message: reason.message) logger.debug("Will delete pairing for reason: message: \(reason.message) code: \(reason.code)") let request = RPCRequest(method: protocolMethod.method, params: pairingDeleteParams) - try await networkingInteractor.request(request, topic: topic, protocolMethod: protocolMethod) + try? await networkingInteractor.request(request, topic: topic, protocolMethod: protocolMethod) pairingStorage.delete(topic: topic) kms.deleteSymmetricKey(for: topic) networkingInteractor.unsubscribe(topic: topic) diff --git a/Sources/WalletConnectRelay/PackageConfig.json b/Sources/WalletConnectRelay/PackageConfig.json index b9ab60bd3..ec58e3328 100644 --- a/Sources/WalletConnectRelay/PackageConfig.json +++ b/Sources/WalletConnectRelay/PackageConfig.json @@ -1 +1 @@ -{"version": "1.19.3"} +{"version": "1.19.4"} diff --git a/Sources/WalletConnectSign/Services/SignCleanupService.swift b/Sources/WalletConnectSign/Services/SignCleanupService.swift index 5c2a6ec1c..fef62e04c 100644 --- a/Sources/WalletConnectSign/Services/SignCleanupService.swift +++ b/Sources/WalletConnectSign/Services/SignCleanupService.swift @@ -35,7 +35,7 @@ private extension SignCleanupService { let pairing = pairingStore.getAll().map { $0.topic } let session = sessionStore.getAll().map { $0.topic } - try await networkInteractor.batchUnsubscribe(topics: pairing + session) + try? await networkInteractor.batchUnsubscribe(topics: pairing + session) } func cleanupStorages() throws { @@ -43,6 +43,6 @@ private extension SignCleanupService { sessionStore.deleteAll() sessionTopicToProposal.deleteAll() rpcHistory.deleteAll() - try kms.deleteAll() + try? kms.deleteAll() } } diff --git a/Sources/Web3Wallet/Web3WalletClient.swift b/Sources/Web3Wallet/Web3WalletClient.swift index 1ca6727d2..84f636b92 100644 --- a/Sources/Web3Wallet/Web3WalletClient.swift +++ b/Sources/Web3Wallet/Web3WalletClient.swift @@ -177,8 +177,8 @@ public class Web3WalletClient { try await pairingClient.pair(uri: uri) } - public func disconnectPairing(topic: String) async throws { - try await pairingClient.disconnect(topic: topic) + public func disconnectPairing(topic: String) async { + await pairingClient.disconnect(topic: topic) } /// For a wallet and a dApp to terminate a session