Updated on 2026-08-14

This commit is contained in:
Tangem 2024-09-16 22:34:07 +03:00
parent d3cb89b1a1
commit a94db85dfd
7 changed files with 65 additions and 13 deletions

View file

@ -229,6 +229,7 @@ internal class MarketsTokenDetailsModel @Inject constructor(
val result = getTokenFullQuotesUseCase(
tokenId = params.token.id,
appCurrency = currentAppCurrency.value,
tokenSymbol = params.token.symbol,
)
result.onRight { res ->
@ -389,9 +390,11 @@ internal class MarketsTokenDetailsModel @Inject constructor(
}
private suspend fun updateQuotes(newQuotes: TokenQuotes) {
quotesStateUpdater.updateQuotes(newQuotes)
val populatedNewQuotes = currentQuotes.value.populateWith(newQuotes)
val percent = newQuotes
quotesStateUpdater.updateQuotes(newQuotes = populatedNewQuotes)
val percent = populatedNewQuotes
.getPercentByInterval(interval = state.value.selectedInterval)
chartDataProducer.runTransaction {