-
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
[WIP] ABW-2121 Save accounts needing recovery in UserDefaults #685
[WIP] ABW-2121 Save accounts needing recovery in UserDefaults #685
Conversation
|
||
func delay() async { | ||
// navigation bug if we try to "deep link" too fast.. | ||
try? await clock.sleep(for: .milliseconds(900)) |
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.
uh... needed unfortunately. SwiftUI :/
} | ||
|
||
// FIXME: Refactor account security prompts to share logic between this reducer and Row+Reducer (AccountList) | ||
private func checkAccountSecurityPromptStatus(state: inout State) -> EffectTask<Action> { |
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.
yeah... not great, really should merge with AccountList, but no time :/
Sources/Clients/FactorSourcesClient/FactorSourcesClient+Interface.swift
Outdated
Show resolved
Hide resolved
Sources/Core/FeaturePrelude/UserDefaultsClient+AccountRecovery.swift
Outdated
Show resolved
Hide resolved
Sources/Features/AccountDetailsFeature/Coordinator/AccountDetails+Reducer.swift
Show resolved
Hide resolved
Sources/Features/AccountDetailsFeature/Coordinator/AccountDetails+Reducer.swift
Outdated
Show resolved
Hide resolved
Sources/Features/AccountDetailsFeature/Coordinator/AccountDetails+Reducer.swift
Outdated
Show resolved
Hide resolved
Sources/Features/AccountDetailsFeature/Coordinator/AccountDetails+Reducer.swift
Outdated
Show resolved
Hide resolved
Sources/Features/AccountDetailsFeature/Coordinator/AccountDetails+Reducer.swift
Outdated
Show resolved
Hide resolved
Sources/Features/AccountDetailsFeature/Coordinator/AccountDetails+Reducer.swift
Outdated
Show resolved
Hide resolved
Sources/Features/AccountDetailsFeature/Coordinator/AccountDetails+View.swift
Outdated
Show resolved
Hide resolved
Sources/Features/AccountListFeature/Components/Row/Row+Reducer.swift
Outdated
Show resolved
Hide resolved
...toreProfileFromBackup/Children/ImportSeedPhrasesFlow/ImportMnemonicControllingAccounts.swift
Outdated
Show resolved
Hide resolved
...toreProfileFromBackup/Children/ImportSeedPhrasesFlow/ImportMnemonicControllingAccounts.swift
Show resolved
Hide resolved
...toreProfileFromBackup/Children/ImportSeedPhrasesFlow/ImportMnemonicControllingAccounts.swift
Outdated
Show resolved
Hide resolved
Sources/Features/ProfileBackupsFeature/Shared/ExportableProfileFile.swift
Show resolved
Hide resolved
...ingsFeature/DebugSettings/Children/DebugUserDefaultsContents/DebugUserDefaultsContents.swift
Outdated
Show resolved
Hide resolved
Sources/Features/SettingsFeature/DebugSettings/Coordinator/DebugSettingsCoordinator+View.swift
Show resolved
Hide resolved
...ttingsFeature/ImportFromOlympiaLegacyWallet/Coordinator/ImportOlympiaWalletCoordinator.swift
Outdated
Show resolved
Hide resolved
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.
Great work, only stylistic comments. Will test after standup
ABW-2121 Mnemonic recovery and backup
(Also included in PR is ABW-2067)
Description
Key
to not be a typealias for String, but rather anenum
, which conforms toCaseIterable
so that we easily can delete all values.accountsThatNeedRecovery
(Olympia accounts only, mnemonic controlling babylon accounts cannot be skipped)"Recovery of seed phrase required"
button on Account cards in Home (AccountList.Row
), and in AccountDetails if UserDefaults value for key.accountsThatNeedRecovery
contains the account in question"Back up this account's seed phrase"
button on Account cards in Home (AccountList.Row
), and in AccountDetails if all these conditions are met:.accountsThatNeedRecovery
list (UserDefaults)).mnemonicsUserClaimsToHaveBackedUp
does not contain the device FactorSourceID already.mnemonicsUserClaimsToHaveBackedUp
list and remove accounts from the.accountsThatNeedRecovery
list when:"Back up this account's seed phrase"
button in AccountDetails)Demo
See demo on Slack (demo of Setup + Test scenario 1)
Test Restore wallet (Profile and Mnemonics) flow
Setup
DELETE wallet
Notes
in iPhone (easy to copy paste between your Mac and iPhone if you are signed in with same iCloud account)Notes
in iPhone. One mnemonic should have 12 words, the other should have 18 words (if you followed guide above....)Test scenario 1
TEST:
Test scenario 2
DELETE wallet, and restore wallet from encrypted backup
TEST:
Identical to scenario 1 - recover first ONLY the Babylon mnemonic (skip BOTH olympia), verify all things according to test scenario 1 above until you reach
- Recover FIRST but not SECOND Olympia mnemonic
but here reverse the order, i.e. SKIP first, but recover SECOND, verify the expected state (the analogue/inversed expected state)Test scenario 3
DELETE wallet, and restore wallet from encrypted backup
TEST:
Test scenario 4
DELETE wallet, and restore wallet from encrypted backup
TEST:
Test scenario 5
DELETE wallet, and restore wallet from encrypted backup
TEST:
Test scenario 6
Test scenario 7