Updated on 2026-08-14

This commit is contained in:
Tangem 2025-02-20 19:50:43 +00:00
commit ae609e7477
155 changed files with 4334 additions and 3342 deletions

View file

@ -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
}

View file

@ -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,

View file

@ -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)

View file

@ -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,

View file

@ -32,7 +32,6 @@ internal class VisaCurrencyFactory {
available = balances.available.forPayment,
blocked = balances.blocked,
debt = balances.debt,
pendingRefund = balances.pendingRefund,
)
},
limits = VisaCurrency.Limits(