Updated on 2026-08-14
This commit is contained in:
commit
ae609e7477
155 changed files with 4334 additions and 3342 deletions
|
|
@ -299,6 +299,8 @@ private fun Blockchain.getSupportedTransactionExtras(): Network.TransactionExtra
|
|||
Blockchain.Bitrock, Blockchain.BitrockTestnet,
|
||||
Blockchain.Sonic, Blockchain.SonicTestnet,
|
||||
Blockchain.ApeChain, Blockchain.ApeChainTestnet,
|
||||
Blockchain.Scroll, Blockchain.ScrollTestnet,
|
||||
Blockchain.ZkLinkNova, Blockchain.ZkLinkNovaTestnet,
|
||||
-> Network.TransactionExtrasType.NONE
|
||||
// endregion
|
||||
}
|
||||
|
|
|
|||
|
|
@ -402,6 +402,10 @@ internal class DefaultStakingRepository(
|
|||
cryptoCurrencies: List<CryptoCurrency>,
|
||||
refresh: Boolean,
|
||||
) = withContext(dispatchers.io) {
|
||||
if (refresh) {
|
||||
stakingBalanceStore.refresh(userWalletId = userWalletId)
|
||||
}
|
||||
|
||||
cacheRegistry.invokeOnExpire(
|
||||
key = getYieldBalancesKey(userWalletId),
|
||||
skipCache = refresh,
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@ internal class DefaultNetworksRepository(
|
|||
networks: Set<Network>,
|
||||
): Flow<Set<NetworkStatus>> {
|
||||
return networksStatusesStore.get(userWalletId, networks)
|
||||
.distinctUntilChanged()
|
||||
.flowOn(dispatchers.io)
|
||||
}
|
||||
|
||||
|
|
@ -120,17 +121,7 @@ internal class DefaultNetworksRepository(
|
|||
refresh: Boolean,
|
||||
) = coroutineScope {
|
||||
if (refresh) {
|
||||
val statusesToRefresh = networksStatusesStore.getSyncOrNull(userWalletId)?.mapNotNull {
|
||||
if (it.network in networks) {
|
||||
it.copy(value = NetworkStatus.Refreshing)
|
||||
} else {
|
||||
null
|
||||
}
|
||||
}
|
||||
|
||||
if (statusesToRefresh != null) {
|
||||
networksStatusesStore.storeAll(key = userWalletId, values = statusesToRefresh.toSet())
|
||||
}
|
||||
networksStatusesStore.refresh(key = userWalletId, networks = networks)
|
||||
}
|
||||
|
||||
val currencies = getCurrencies(userWalletId, networks)
|
||||
|
|
|
|||
|
|
@ -100,6 +100,10 @@ internal class DefaultQuotesRepository(
|
|||
// it changes after filterExpiredCurrenciesIds
|
||||
// calls with different coroutines and lead to fetchQuotes
|
||||
mutex.withLock {
|
||||
if (refresh) {
|
||||
quotesStore.refresh(currenciesIds)
|
||||
}
|
||||
|
||||
val expiredCurrenciesIds = filterExpiredCurrenciesIds(
|
||||
currenciesIds = currenciesIds,
|
||||
refresh = refresh || quotesFetchedForAppCurrency != appCurrencyId,
|
||||
|
|
|
|||
|
|
@ -32,7 +32,6 @@ internal class VisaCurrencyFactory {
|
|||
available = balances.available.forPayment,
|
||||
blocked = balances.blocked,
|
||||
debt = balances.debt,
|
||||
pendingRefund = balances.pendingRefund,
|
||||
)
|
||||
},
|
||||
limits = VisaCurrency.Limits(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue