mirror of
https://github.com/luxfi/wallet.git
synced 2026-10-30 15:13:19 +00:00
Copies apps/extension, apps/mobile and 10 pkgs (wallet, ui, config, utilities, sessions, gating, notifications, analytics, eslint-config, prices) into a standalone pnpm workspace. Resolves merge conflict markers in extension and mobile package.json files, strips build artifacts (.wxt, .output, Pods).
22 lines
637 B
Swift
22 lines
637 B
Swift
import CryptoKit
|
|
import Foundation
|
|
|
|
@objcMembers
|
|
class KeychainUtils: NSObject {
|
|
private static let CAN_CLEAR_KEYCHAIN_ON_REINSTALL_FLAG = "can_clear_keychain_on_reinstall"
|
|
private static let keychain = KeychainSwift(keyPrefix: prefix)
|
|
|
|
@objc static func clearKeychain() {
|
|
keychain.clear()
|
|
}
|
|
|
|
@objc static func getCanClearKeychainOnReinstall() -> Bool {
|
|
return (keychain.getBool(CAN_CLEAR_KEYCHAIN_ON_REINSTALL_FLAG) == true)
|
|
}
|
|
|
|
@objc static func setCanClearKeychainOnReinstall() {
|
|
keychain.set(
|
|
true, forKey: CAN_CLEAR_KEYCHAIN_ON_REINSTALL_FLAG, withAccess: .accessibleWhenUnlockedThisDeviceOnly)
|
|
}
|
|
}
|