Skip to content

Commit 6bbaa11

Browse files
committed
fix: stop backup observers before wipe
1 parent ad2cb9e commit 6bbaa11

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

app/src/main/java/to/bitkit/repositories/WalletRepo.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ class WalletRepo @Inject constructor(
5252
private val cacheStore: CacheStore,
5353
private val deriveBalanceStateUseCase: DeriveBalanceStateUseCase,
5454
private val vssStoreIdProvider: VssStoreIdProvider,
55+
private val backupRepo: BackupRepo,
5556
) {
5657
private val repoScope = CoroutineScope(bgDispatcher + SupervisorJob())
5758

@@ -242,6 +243,8 @@ class WalletRepo @Inject constructor(
242243
}
243244

244245
suspend fun wipeWallet(walletIndex: Int = 0): Result<Unit> = withContext(bgDispatcher) {
246+
backupRepo.stopObservingBackups()
247+
245248
try {
246249
keychain.wipe()
247250
vssStoreIdProvider.clearCache(walletIndex)

0 commit comments

Comments
 (0)