Updated on 2026-08-14
This commit is contained in:
parent
70617df9ad
commit
dfbec1dee4
5 changed files with 34 additions and 30 deletions
|
|
@ -34,10 +34,10 @@ internal object SwapAmountQuoteUtils {
|
|||
secondaryFiatRateUSD: BigDecimal?,
|
||||
primaryCryptoCurrencyStatus: CryptoCurrencyStatus,
|
||||
secondaryCryptoCurrencyStatus: CryptoCurrencyStatus?,
|
||||
): PriceImpact {
|
||||
if (quoteContent == null) return PriceImpact.Empty
|
||||
): PriceImpact? {
|
||||
if (quoteContent == null) return null
|
||||
|
||||
val fromAmount = quoteContent.fromAmount ?: return PriceImpact.Empty
|
||||
val fromAmount = quoteContent.fromAmount ?: return null
|
||||
val toAmount = quoteContent.toAmount
|
||||
|
||||
val (fromRate, toRate) = if (swapDirection == SwapDirection.Direct) {
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ internal fun SwapAmountBlockContent(
|
|||
val quoteContent = amountUM.selectedQuote as? SwapQuoteUM.Content
|
||||
val isBestRate = quoteContent?.diffPercent is SwapQuoteUM.Content.DifferencePercent.Best
|
||||
SwapChooseProviderContent(
|
||||
isBestRate = isBestRate && amountUM.priceImpact?.shouldShowWarning() == true,
|
||||
isBestRate = isBestRate && amountUM.priceImpact?.shouldShowWarning() != true,
|
||||
isSingleProvider = quoteContent?.isSingleProvider == true,
|
||||
showBestRateAnimation = amountUM.isShowBestRateAnimation,
|
||||
expressProvider = amountUM.selectedQuote.provider,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue