File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
app/src/main/java/to/bitkit/repositories Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -67,7 +67,10 @@ class BackupRepo @Inject constructor(
6767
6868 private var lastNotificationTime = 0L
6969
70- fun reset () = vssBackupClient.reset()
70+ fun reset () {
71+ stopObservingBackups()
72+ vssBackupClient.reset()
73+ }
7174
7275 fun startObservingBackups () {
7376 if (isObserving) return
Original file line number Diff line number Diff line change @@ -238,14 +238,13 @@ class WalletRepo @Inject constructor(
238238 }
239239
240240 suspend fun wipeWallet (walletIndex : Int = 0): Result <Unit > = withContext(bgDispatcher) {
241- backupRepo.stopObservingBackups()
242-
243241 try {
242+ backupRepo.reset()
243+
244244 _walletState .update { WalletState () }
245245 _balanceState .update { BalanceState () }
246246
247247 keychain.wipe()
248- backupRepo.reset()
249248 db.clearAllTables()
250249 settingsStore.reset()
251250 cacheStore.reset()
You can’t perform that action at this time.
0 commit comments