Skip to content

Commit 85a8757

Browse files
committed
refactor: rename to cacheMap
1 parent a5c0bc0 commit 85a8757

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

app/src/main/java/to/bitkit/data/backup/VssStoreIdProvider.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ import javax.inject.Singleton
1313
class VssStoreIdProvider @Inject constructor(
1414
private val keychain: Keychain,
1515
) {
16-
private val cachedStoreIds: MutableMap<Int, String> = ConcurrentHashMap()
16+
private val cacheMap: MutableMap<Int, String> = ConcurrentHashMap()
1717

1818
fun getVssStoreId(walletIndex: Int = 0): String {
1919
synchronized(this) {
20-
cachedStoreIds[walletIndex]?.let { return it }
20+
cacheMap[walletIndex]?.let { return it }
2121

2222
val mnemonic = keychain.loadString(Keychain.Key.BIP39_MNEMONIC.name) ?: throw ServiceError.MnemonicNotFound
2323
val passphrase = keychain.loadString(Keychain.Key.BIP39_PASSPHRASE.name)
@@ -28,14 +28,14 @@ class VssStoreIdProvider @Inject constructor(
2828
passphrase = passphrase,
2929
)
3030

31-
cachedStoreIds[walletIndex] = storeId
31+
cacheMap[walletIndex] = storeId
3232
Logger.info("VSS store id setup for wallet[$walletIndex]: '$storeId'", context = TAG)
3333
return storeId
3434
}
3535
}
3636

3737
fun clearCache(walletIndex: Int = 0) {
38-
cachedStoreIds.remove(walletIndex)
38+
cacheMap.remove(walletIndex)
3939
}
4040

4141
companion object {

0 commit comments

Comments
 (0)