Updated on 2026-08-14
This commit is contained in:
parent
bd80fa068a
commit
8ca8bf9450
3 changed files with 9 additions and 9 deletions
|
|
@ -11,8 +11,9 @@ import com.tangem.tap.features.send.redux.AddressVerifyAction.AddressVerificatio
|
|||
import com.tangem.tap.features.send.redux.AddressVerifyAction.AddressVerification.SetWalletAddress
|
||||
import com.tangem.tap.features.send.redux.AddressVerifyAction.Error
|
||||
import com.tangem.tap.mainScope
|
||||
import com.tangem.tap.scope
|
||||
import kotlinx.coroutines.*
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.launch
|
||||
import kotlinx.coroutines.withContext
|
||||
import org.rekotlin.Action
|
||||
import org.rekotlin.DispatchFunction
|
||||
|
||||
|
|
@ -169,7 +170,7 @@ internal class AddressMiddleware {
|
|||
}
|
||||
|
||||
private fun dispatchFailedValidationActions(
|
||||
failReason: AddressVerifyAction.Error,
|
||||
failReason: Error,
|
||||
sourceType: AddressEntered.SourceType?,
|
||||
dispatch: (Action) -> Unit,
|
||||
) {
|
||||
|
|
|
|||
|
|
@ -10,10 +10,8 @@ data class QuotesResponse(
|
|||
|
||||
data class Quote(
|
||||
@Json(name = "price")
|
||||
val price: BigDecimal,
|
||||
val price: BigDecimal?,
|
||||
@Json(name = "priceChange24h")
|
||||
val priceChange: BigDecimal,
|
||||
@Json(name = "lastUpdatedAt")
|
||||
val lastUpdated: String,
|
||||
val priceChange: BigDecimal?,
|
||||
)
|
||||
}
|
||||
|
|
@ -3,6 +3,7 @@ package com.tangem.data.tokens.utils
|
|||
import com.tangem.datasource.local.quote.model.StoredQuote
|
||||
import com.tangem.domain.tokens.model.Quote
|
||||
import com.tangem.utils.converter.Converter
|
||||
import java.math.BigDecimal
|
||||
|
||||
internal class QuotesConverter : Converter<StoredQuote, Quote> {
|
||||
|
||||
|
|
@ -11,8 +12,8 @@ internal class QuotesConverter : Converter<StoredQuote, Quote> {
|
|||
|
||||
return Quote(
|
||||
rawCurrencyId = rawCurrencyId,
|
||||
fiatRate = responseQuote.price,
|
||||
priceChange = responseQuote.priceChange.movePointLeft(2),
|
||||
fiatRate = responseQuote.price ?: BigDecimal.ZERO,
|
||||
priceChange = (responseQuote.priceChange ?: BigDecimal.ZERO).movePointLeft(2),
|
||||
)
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue