Updated on 2026-08-14

This commit is contained in:
Tangem 2025-11-25 17:17:12 +04:00
parent 52bf5cbb58
commit 9bd16deeb4
23 changed files with 245 additions and 151 deletions

View file

@ -79,6 +79,10 @@ internal class DefaultNetworksRepository(
}
}
override suspend fun hasCachedStatuses(userWalletId: UserWalletId): Boolean {
return networksStatusesStore.contains(userWalletId)
}
private suspend fun fetchPendingTransactions(
userWalletId: UserWalletId,
network: Network,

View file

@ -124,6 +124,10 @@ internal class DefaultNetworksStatusesStore(
}
}
override suspend fun contains(userWalletId: UserWalletId): Boolean {
return runtimeStore.getSyncOrDefault(emptyMap()).containsKey(userWalletId.stringValue)
}
private suspend fun updateInRuntime(
userWalletId: UserWalletId,
networks: Set<Network>,

View file

@ -44,4 +44,7 @@ internal interface NetworksStatusesStore {
/** Clear statuses of [networks] by [userWalletId] */
suspend fun clear(userWalletId: UserWalletId, networks: Set<Network>)
/** Check if there are statuses for given [userWalletId] */
suspend fun contains(userWalletId: UserWalletId): Boolean
}