fix(iOS): preserve legacy data when Keychain write fails during migration

(cherry picked from commit ea47df92fa)
This commit is contained in:
Rocuts
2026-03-02 12:45:26 -05:00
committed by Mariano Belinky
parent 253aec92d1
commit cafb5c8e12
2 changed files with 6 additions and 5 deletions

View File

@@ -46,7 +46,7 @@ public enum GatewayTLSStore {
!existing.isEmpty
else { return }
if self.keychainLoad(account: stableID) == nil {
self.keychainSave(existing, account: stableID)
guard self.keychainSave(existing, account: stableID) else { return }
}
defaults.removeObject(forKey: legacyKey)
}