Skip to content

Commit aa0261c

Browse files
committed
feat: reset cache
1 parent 0485d9d commit aa0261c

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

app/src/main/java/to/bitkit/data/AppStorage.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import kotlin.reflect.KProperty
2020

2121
const val APP_PREFS = "bitkit_prefs"
2222

23-
// TODO refactor to dataStore (named 'CacheStore'?!)
23+
@Deprecated("Replace with CacheStore")
2424
@Singleton
2525
class AppStorage @Inject constructor(
2626
@ApplicationContext private val appContext: Context,

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import org.lightningdevkit.ldknode.Event
1313
import org.lightningdevkit.ldknode.Txid
1414
import to.bitkit.data.AppDb
1515
import to.bitkit.data.AppStorage
16+
import to.bitkit.data.CacheStore
1617
import to.bitkit.data.SettingsStore
1718
import to.bitkit.data.entities.InvoiceTagEntity
1819
import to.bitkit.data.keychain.Keychain
@@ -47,6 +48,7 @@ class WalletRepo @Inject constructor(
4748
private val settingsStore: SettingsStore,
4849
private val addressChecker: AddressChecker,
4950
private val lightningRepo: LightningRepo,
51+
private val cacheStore: CacheStore
5052
) {
5153

5254
private val _walletState = MutableStateFlow(
@@ -201,6 +203,7 @@ class WalletRepo @Inject constructor(
201203
keychain.wipe()
202204
appStorage.clear()
203205
settingsStore.reset()
206+
cacheStore.reset()
204207
coreService.activity.removeAll()
205208
deleteAllInvoices()
206209
_walletState.update { WalletState() }

0 commit comments

Comments
 (0)