nighthawk-apps / nighthawk-ios-wallet

Nighthawk Wallet 2.0
https://nighthawkwallet.com
MIT License
2 stars 1 forks source link

Migration flow #7

Closed tw0po1nt closed 1 year ago

tw0po1nt commented 1 year ago

Implement the migration flow from an old wallet to a new one

Test steps:

Expected result: You'll see a screen with copy prompting you to either migrate automatically or manually.

In either scenario, the legacy wallet storage will be nuked.

This code review checklist is intended to serve as a starting point for the author and reviewer, although it may not be appropriate for all types of changes (e.g. fixing a spelling typo in documentation). For more in-depth discussion of how we think about code review, please see Code Review Guidelines.

Author

Reviewer

pacu commented 1 year ago

I followed the steps and got this error:

action:
  RootReducer.Action.initialization(.migrateLegacyWallet)
  RootReducer.State(
-   _alert: nil,
+   _alert: AlertState(
+     title: "Migration failed",
+     message: "An error occurred and we were unable to migrate your wallet automatically. Tap continue to import your wallet manually."
+   ),
    appInitializationState: .needsMigration,
    debugState: RootReducer.DebugState(rescanDialog: nil),
    destinationState: RootReducer.DestinationState(…),
    exportLogsState: ExportLogsReducer.State(…),
    nhHomeState: NHHomeReducer.State(…),
    homeState: HomeReducer.State(…),
    migrateState: MigrateReducer.State(),
    onboardingState: OnboardingFlowReducer.State(…),
    phraseValidationState: RecoveryPhraseValidationFlowReducer.State(…),
    phraseDisplayState: RecoveryPhraseDisplayReducer.State(…),
    sandboxState: SandboxReducer.State(…),
    storedWallet: StoredWallet(…),
    walletConfig: WalletConfig(…),
    welcomeState: WelcomeReducer.State()
  )

I'm attaching a video of the result

https://github.com/nighthawk-apps/nighthawk-ios-wallet/assets/484008/cc13e415-501b-4efd-9870-73119475a3b6

pacu commented 1 year ago

More testing feedback.

Apparently is not that I got an error, it's that There's no feedback from the app.

If the user taps once on the migrate button, the app starts to scan but there's no feedback about it.

If the user force-closes the app and restarts it the app will got to the homescreen.