Skip to content

Commit

Permalink
Merge pull request #1377 from WalletConnect/develop
Browse files Browse the repository at this point in the history
1.19.4
  • Loading branch information
llbartekll authored Jun 27, 2024
2 parents 8ab4897 + 4e3826a commit 4736c2b
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions Sources/WalletConnectPairing/PairingClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion Sources/WalletConnectPairing/PairingClientProtocol.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ public protocol PairingClientProtocol {
var pairingStatePublisher: AnyPublisher<Bool, Never> {get}
var pairingExpirationPublisher: AnyPublisher<Pairing, Never> {get}
func pair(uri: WalletConnectURI) async throws
func disconnect(topic: String) async throws
func disconnect(topic: String) async
func getPairings() -> [Pairing]
}
Original file line number Diff line number Diff line change
Expand Up @@ -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)
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.19.3"}
{"version": "1.19.4"}
4 changes: 2 additions & 2 deletions Sources/WalletConnectSign/Services/SignCleanupService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@ 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 {
pairingStore.deleteAll()
sessionStore.deleteAll()
sessionTopicToProposal.deleteAll()
rpcHistory.deleteAll()
try kms.deleteAll()
try? kms.deleteAll()
}
}
4 changes: 2 additions & 2 deletions Sources/Web3Wallet/Web3WalletClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4736c2b

Please sign in to comment.