Updated on 2026-08-14

This commit is contained in:
Tangem 2025-07-30 12:50:32 +03:00
parent 154308b973
commit e51453c99b
15 changed files with 173 additions and 68 deletions

View file

@ -111,6 +111,7 @@ class NetworkFactory @Inject constructor(
hasFiatFeeRate = blockchain.feePaidCurrency() !is FeePaidCurrency.FeeResource,
canHandleTokens = canHandleTokens,
transactionExtrasType = blockchain.getSupportedTransactionExtras(),
nameResolvingType = blockchain.getNameResolvingType(),
)
}
.getOrNull()
@ -328,6 +329,13 @@ class NetworkFactory @Inject constructor(
}
}
private fun Blockchain.getNameResolvingType(): Network.NameResolvingType {
return when (this) {
Blockchain.Ethereum, Blockchain.EthereumTestnet -> Network.NameResolvingType.ENS
else -> Network.NameResolvingType.NONE
}
}
@VisibleForTesting(otherwise = VisibleForTesting.NONE)
fun createNetworkStandardType(blockchain: Blockchain) = getNetworkStandardType(blockchain)

View file

@ -149,7 +149,9 @@ internal class DefaultMultiYieldBalanceFetcher @Inject constructor(
// TODO: in the future, consider optimizing this part
.chunked(size = 15) // StakeKitApi limitation: no more than 15 requests at the same time
.map {
async(dispatchers.io) { stakeKitApi.getMultipleYieldBalances(it).bind() }
async(dispatchers.io) {
stakeKitApi.getMultipleYieldBalances(it).bind()
}
}
.awaitAll()
.flatten()