hack: trim whitespace on stored keys
Noticed a crash when I accidently logged in with whitespace in the keys. We should probably not save keys with whitespace in them, this is just a hack for now.
This commit is contained in:
@@ -133,7 +133,8 @@ func get_saved_pubkey() -> String? {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func get_saved_privkey() -> String? {
|
func get_saved_privkey() -> String? {
|
||||||
try? Vault.getPrivateKey(keychainConfiguration: DamusKeychainConfiguration())
|
let mkey = try? Vault.getPrivateKey(keychainConfiguration: DamusKeychainConfiguration());
|
||||||
|
return mkey.map { $0.trimmingCharacters(in: .whitespaces) }
|
||||||
}
|
}
|
||||||
|
|
||||||
fileprivate func removePrivateKeyFromUserDefaults() throws {
|
fileprivate func removePrivateKeyFromUserDefaults() throws {
|
||||||
|
|||||||
Reference in New Issue
Block a user