diff --git a/Sources/WalletConnectNotify/Client/Wallet/NotifyClient.swift b/Sources/WalletConnectNotify/Client/Wallet/NotifyClient.swift index 618515d07..7da6257da 100644 --- a/Sources/WalletConnectNotify/Client/Wallet/NotifyClient.swift +++ b/Sources/WalletConnectNotify/Client/Wallet/NotifyClient.swift @@ -103,10 +103,12 @@ public class NotifyClient { } public func unregister(account: Account) async throws { - try await identityClient.unregister(account: account) + if identityClient.isIdentityRegistered(account: account) { + try await identityClient.unregister(account: account) + } notifyWatcherAgreementKeysProvider.removeAgreement(account: account) try notifyStorage.clearDatabase(account: account) - Task { try await pushClient.unregister()} + try await pushClient.unregister() notifyAccountProvider.logout() subscriptionWatcher.stop() }