Commit 7f49bd88 authored by Jü's avatar

Fix keychain access due to app store account transfer

parent e94225f8
......@@ -19,7 +19,7 @@
<key>CFBundleShortVersionString</key>
<string>1.10.1</string>
<key>CFBundleVersion</key>
<string>1.10.1.0</string>
<string>1.10.1.2</string>
<key>NSExtension</key>
<dict>
<key>NSExtensionAttributes</key>
......
......@@ -19,7 +19,7 @@
<key>CFBundleShortVersionString</key>
<string>1.10.1</string>
<key>CFBundleVersion</key>
<string>1.10.1.0</string>
<string>1.10.1.2</string>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
......
......@@ -19,7 +19,7 @@
<key>CFBundleShortVersionString</key>
<string>1.10.1</string>
<key>CFBundleVersion</key>
<string>1.10.1.0</string>
<string>1.10.1.2</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSAppTransportSecurity</key>
......
......@@ -16,7 +16,8 @@ public protocol FileHandlingProtocol {
func documentPath() -> String
func removeFile(pathWithFileName: String)
func purge(wallet walletName: String)
}
......@@ -36,4 +37,12 @@ public class FileHandling: FileHandlingProtocol {
}
}
public func purge(wallet walletName: String) {
let documentPath = self.documentPath()
let keysExtension = ".keys"
let addressExtension = ".address.txt"
self.removeFile(pathWithFileName: documentPath + walletName)
self.removeFile(pathWithFileName: documentPath + walletName + keysExtension)
self.removeFile(pathWithFileName: documentPath + walletName + addressExtension)
}
}
......@@ -64,6 +64,7 @@ public class AppCoordinator: Coordinator {
if self.onboardingPending() {
self.showOnboarding()
} else if self.keychainLost() {
self.fileHandling.purge(wallet: Constants.defaultWalletName)
self.showOnboarding(keychainLost: true)
} else {
self.showLogin()
......
......@@ -64,12 +64,7 @@ extension Wallet: WalletProtocol {
}
public func purge() {
let documentPath = self.fileHandling.documentPath()
let keysExtension = ".keys"
let addressExtension = ".address.txt"
self.fileHandling.removeFile(pathWithFileName: documentPath + self.walletName)
self.fileHandling.removeFile(pathWithFileName: documentPath + self.walletName + keysExtension)
self.fileHandling.removeFile(pathWithFileName: documentPath + self.walletName + addressExtension)
self.fileHandling.purge(wallet: self.walletName)
}
public func setNewPassword(_ password: String) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment