From 7bf4c89db4eda92aadd9bcb9ccd09198f5a6ed6d Mon Sep 17 00:00:00 2001 From: Bartosz Rozwarski Date: Thu, 30 Nov 2023 07:56:46 +0100 Subject: [PATCH] fix tests --- Sources/WalletConnectKMS/Keychain/KeychainStorage.swift | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Sources/WalletConnectKMS/Keychain/KeychainStorage.swift b/Sources/WalletConnectKMS/Keychain/KeychainStorage.swift index 493f71ce7..fa521095a 100644 --- a/Sources/WalletConnectKMS/Keychain/KeychainStorage.swift +++ b/Sources/WalletConnectKMS/Keychain/KeychainStorage.swift @@ -189,11 +189,12 @@ public final class KeychainStorage: KeychainStorageProtocol { kSecAttrAccessGroup: accessGroup ] as [CFString: Any] - let updateStatus = secItem.update(query as CFDictionary, attributesToUpdate as CFDictionary) + let status = secItem.update(query as CFDictionary, attributesToUpdate as CFDictionary) - print("Migrate Key To New Access Group status: \(updateStatus)") - guard updateStatus == errSecSuccess else { - throw KeychainError(updateStatus) + if status == errSecSuccess { + print("Successfuly migrated with kSecAttrAccessGroup") + } else { + print("Item for query not found, item potentially already migrated with kSecAttrAccessGroup") } } }