Updated on 2026-08-14
This commit is contained in:
parent
52bf5cbb58
commit
9bd16deeb4
23 changed files with 245 additions and 151 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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>,
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue