-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Debug Keychain View - delete mnemonics #900
Debug Keychain View - delete mnemonics #900
Conversation
) -> [String] { | ||
keychain.allItems() | ||
.filter { | ||
if let isSynchronizable = $0["synchronizable"] as? Bool, let needle = needleIsSynchronizable { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
keys: "synchronizable", "accessibility" and "key" are keys internal to Keychain.
saveDeviceInfo: @escaping SaveDeviceInfo, | ||
deprecatedLoadDeviceID: @escaping DeprecatedLoadDeviceID, | ||
deleteDeprecatedDeviceID: @escaping DeleteDeprecatedDeviceID, | ||
getAllMnemonics: @escaping GetAllMnemonics |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
vendor getAllMnemonics
only for DEBUG
.
|
||
// MARK: - KeyedMnemonicWithPassphrase | ||
public struct KeyedMnemonicWithPassphrase: Sendable, Hashable { | ||
public let factorSourceID: FactorSourceID.FromHash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
include factorSourceID
so that we can delete it.
} | ||
|
||
static let keychainKeySeparator = ":" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
used by a new failable init, taking this keychainKey as input and trying to create a FactorSourceID from it.
@@ -417,13 +434,6 @@ public struct ImportOlympiaWalletCoordinator: Sendable, FeatureReducer { | |||
) | |||
) | |||
|
|||
do { | |||
try userDefaults.addFactorSourceIDOfBackedUpMnemonic(factorSourceID) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
moved to save AFTER we have successfully saved Factor
_ = try await factorSourcesClient.addPrivateHDFactorSource(.init( | ||
factorSource: factorSource.factorSource.embed(), | ||
mnemonicWithPasshprase: factorSource.mnemonicWithPassphrase, | ||
saveIntoProfile: true | ||
saveIntoProfile: saveIntoProfile |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Important bug fix: we should not FAIL to save mnemonic into keychain, just because the FactorSource was known by the profile
…h time of sim as suggested in a blog
@@ -1,2 +1,2 @@ | |||
SCAN_DEVICE="iPhone 15 Pro Max" | |||
SCAN_DEVICE="iPhone 15 Pro Max (17.0.1)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
65097cd
into
ABW-2206_import_mnemonic_from_settings
N.B. Target branch is not main
trim.578EC817-C16B-49A7-84E2-2608613610D9.MOV