nighthawk-apps / nighthawk-ios-wallet

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

Sync upstream (July edition) #5

Closed tw0po1nt closed 1 year ago

tw0po1nt commented 1 year ago

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

BostonZcash commented 1 year ago

This is looking good from what functionality is available to test.

However, upon leaving one instance to sync unattended (new wallet > skip backup), I did run into:

Error: The operation couldn't be completed. (ZcashLightClientKit.ZcashError error 7.)

Quitting and re-opening the application allowed it to start and quickly sync as expected.

2023-07-09 15:14:33.600786-0400 secant-mainnet[37130:427638] [logs_default] [ERROR 💥] CompactBlockProcessor.swift - severeFailure(_:) - Line: 898 -> show stopper failure: serviceGetInfoFailed(ZcashLightClientKit.LightWalletServiceError.timeOut)
2023-07-09 15:14:33.661240-0400 secant-mainnet[37130:396550] [tcaLogs] received action:
  RootReducer.Action.nhHome(
    .synchronizerStateChanged(
      SynchronizerState(
        syncSessionID: UUID(09687FDD-07C4-475D-ABF0-8ACDC639E793),
        shieldedBalance: WalletBalance(
          verified: Zatoshi(
            _amount: Clamped(
              value: 0,
              range: -2100000000000000...2100000000000000
            )
          ),
          total: Zatoshi(
            _amount: Clamped(
              value: 0,
              range: -2100000000000000...2100000000000000
            )
          )
        ),
        transparentBalance: WalletBalance(
          verified: Zatoshi(
            _amount: Clamped(
              value: 0,
              range: -2100000000000000...2100000000000000
            )
          ),
          total: Zatoshi(
            _amount: Clamped(
              value: 0,
              range: -2100000000000000...2100000000000000
            )
          )
        ),
        internalSyncStatus: .error(
          .serviceGetInfoFailed(.timeOut)
        ),
        syncStatus: .error(
          .serviceGetInfoFailed(.timeOut)
        ),
        latestScannedHeight: 2150251,
        latestBlockHeight: 2150251,
        latestScannedTime: 1688929885.0
      )
    )
  )
  RootReducer.State(
    _alert: nil,
    appInitializationState: .uninitialized,
    debugState: RootReducer.DebugState(rescanDialog: nil),
    destinationState: RootReducer.DestinationState(…),
    exportLogsState: ExportLogsReducer.State(…),
    nhHomeState: NHHomeReducer.State(
      _destination: .wallet,
      requiredTransactionConfirmations: 10,
      latestMinedHeight: 2150251,
      shieldedBalance: Balance(…),
      transparentBalance: Balance(…),
      synchronizerStatusSnapshot: SyncStatusSnapshot(
-       message: "Preparing to scan",
+       message: "Error: The operation couldn’t be completed. (ZcashLightClientKit.ZcashError error 7.)",
-       syncStatus: .syncing(0.0)
+       syncStatus: .error(
+         .serviceGetInfoFailed(.timeOut)
+       )
      ),
      walletEvents: [],
      walletState: WalletReducer.State(…),
      transferState: TransferReducer.State(),
      settingsState: NHSettingsReducer.State(…)
    ),
    homeState: HomeReducer.State(…),
    onboardingState: OnboardingFlowReducer.State(…),
    phraseValidationState: RecoveryPhraseValidationFlowReducer.State(…),
    phraseDisplayState: RecoveryPhraseDisplayReducer.State(…),
    sandboxState: SandboxReducer.State(…),
    storedWallet: StoredWallet(…),
    walletConfig: WalletConfig(…),
    welcomeState: WelcomeReducer.State()
  )