chore: Integrate DB re-encryption process due to page size changes
Changes: 1. Bump status go to include DB migration 2. Integrate the new DB re-encryption signals to show the re-encryption loading screen
This commit is contained in:
parent
fe023d39da
commit
9d14fd60af
|
@ -53,6 +53,8 @@ type SignalType* {.pure.} = enum
|
|||
WakuBackedUpKeycards = "waku.backedup.keycards"
|
||||
WakuBackedUpWatchOnlyAccount = "waku.backedup.watch-only-account"
|
||||
LocalPairing = "localPairing"
|
||||
DBReEncryptionStarted = "db.reEncryption.started"
|
||||
DBReEncryptionFinished = "db.reEncryption.finished"
|
||||
Unknown
|
||||
|
||||
proc event*(self:SignalType):string =
|
||||
|
|
|
@ -172,10 +172,14 @@ proc init*(self: Controller) =
|
|||
self.delegate.onLocalPairingStatusUpdate(self.localPairingStatus)
|
||||
self.connectionIds.add(handlerId)
|
||||
|
||||
handlerId = self.events.onWithUUID(SIGNAL_REENCRYPTION_PROCESS_STARTED) do(e: Args):
|
||||
handlerId = self.events.onWithUUID(SignalType.DBReEncryptionStarted.event) do(e: Args):
|
||||
self.delegate.onReencryptionProcessStarted()
|
||||
self.connectionIds.add(handlerId)
|
||||
|
||||
handlerId = self.events.onWithUUID(SignalType.DBReEncryptionFinished.event) do(e: Args):
|
||||
self.delegate.onReencryptionProcessFinished()
|
||||
self.connectionIds.add(handlerId)
|
||||
|
||||
handlerId = self.events.onWithUUID(SIGNAL_LOGIN_ERROR) do(e: Args):
|
||||
let args = LoginErrorArgs(e)
|
||||
self.delegate.emitAccountLoginError(args.error)
|
||||
|
|
|
@ -186,6 +186,9 @@ method onLocalPairingStatusUpdate*(self: AccessInterface, status: LocalPairingSt
|
|||
method onReencryptionProcessStarted*(self: AccessInterface) {.base.} =
|
||||
raise newException(ValueError, "No implementation available")
|
||||
|
||||
method onReencryptionProcessFinished*(self: AccessInterface) {.base.} =
|
||||
raise newException(ValueError, "No implementation available")
|
||||
|
||||
# This way (using concepts) is used only for the modules managed by AppController
|
||||
type
|
||||
DelegateInterface* = concept c
|
||||
|
|
|
@ -531,3 +531,6 @@ method onLocalPairingStatusUpdate*[T](self: Module[T], status: LocalPairingStatu
|
|||
|
||||
method onReencryptionProcessStarted*[T](self: Module[T]) =
|
||||
self.view.onReencryptionProcessStarted()
|
||||
|
||||
method onReencryptionProcessFinished*[T](self: Module[T]) =
|
||||
self.view.onReencryptionProcessFinished()
|
||||
|
|
|
@ -376,3 +376,6 @@ QtObject:
|
|||
|
||||
proc onReencryptionProcessStarted*(self: View) =
|
||||
self.setAppState(AppState.AppEncryptionProcessState)
|
||||
|
||||
proc onReencryptionProcessFinished*(self: View) =
|
||||
self.setAppState(AppState.AppLoadingState)
|
||||
|
|
|
@ -37,7 +37,6 @@ let TEST_PEER_ENR = getEnv("TEST_PEER_ENR").string
|
|||
|
||||
const SIGNAL_CONVERTING_PROFILE_KEYPAIR* = "convertingProfileKeypair"
|
||||
const SIGNAL_DERIVED_ADDRESSES_FROM_NOT_IMPORTED_MNEMONIC_FETCHED* = "derivedAddressesFromNotImportedMnemonicFetched"
|
||||
const SIGNAL_REENCRYPTION_PROCESS_STARTED* = "reencryptionProcessStarted"
|
||||
const SIGNAL_LOGIN_ERROR* = "errorWhileLogin"
|
||||
|
||||
type ResultArgs* = ref object of Args
|
||||
|
@ -692,9 +691,6 @@ QtObject:
|
|||
|
||||
let isOldHashPassword = self.verifyDatabasePassword(account.keyUid, hashedPasswordToUpperCase(hashedPassword))
|
||||
if isOldHashPassword:
|
||||
# Start loading screen with warning
|
||||
self.events.emit(SIGNAL_REENCRYPTION_PROCESS_STARTED, Args())
|
||||
|
||||
# Save tmp properties so that we can login after the timer
|
||||
self.tmpAccount = account
|
||||
self.tmpHashedPassword = hashedPassword
|
||||
|
|
|
@ -158,6 +158,7 @@ StatusWindow {
|
|||
}
|
||||
else if(state === Constants.appState.appLoading) {
|
||||
loader.sourceComponent = undefined
|
||||
appLoadingAnimation.active = false
|
||||
appLoadingAnimation.active = true
|
||||
startupOnboarding.visible = false
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue