Updated on 2026-08-14

This commit is contained in:
Tangem 2026-03-25 17:50:49 +07:00
parent db55e6eb1d
commit 8223ca8eb8
3 changed files with 10 additions and 5 deletions

View file

@ -70,7 +70,7 @@ interface TangemExpressApi {
@Query("refundExtraId") refundExtraId: String?, // for cex only
@Query("partnerOperationType") partnerOperationType: String?, // swap/ swap-and-send
@Query("toExtraId") toExtraId: String?, // swap-and-send memo
@Query("quoteId") quoteId: String?, // swap-and-send memo
@Query("quoteId") quoteId: String?, // fixed rate quoteId
): ApiResponse<ExchangeDataResponse>
@GET("exchange-status")

View file

@ -6,6 +6,7 @@ import com.tangem.core.ui.format.bigdecimal.crypto
import com.tangem.core.ui.format.bigdecimal.format
import com.tangem.domain.models.currency.CryptoCurrencyStatus
import com.tangem.features.swap.v2.impl.R
import com.tangem.utils.StringsSigns.DOT
import java.math.BigDecimal
/**
@ -15,7 +16,7 @@ import java.math.BigDecimal
* |--------------------------------|-----------------------------------|-----------------------------------|------------------------|
* | Entering (float), any | "Balance: " (empty param) | "{balance}" masked | OffsetEnd(symbol) |
* | Viewing (fixed), empty | "Balance: " (empty param) | "{balance}" masked (crypto only) | End |
* | Viewing (fixed), not empty | send_from_title | "{displayStr}" masked | OffsetEnd(symbol) |
* | Viewing (fixed), not empty | "{balance}" masked | "• Send {displayStr}" masked | OffsetEnd(symbol) |
*/
internal object SwapFromSubtitleConverter {
@ -52,9 +53,13 @@ internal object SwapFromSubtitleConverter {
ellipsisLeft = TextEllipsis.End
}
else -> {
subtitleLeft = resourceReference(R.string.send_from_title)
subtitleRight = combinedReference(stringReference(displayStr))
subtitleLeft = stringReference(balance)
.orMaskWithStars(isBalanceHidden)
subtitleRight = combinedReference(
stringReference("$DOT "),
resourceReference(R.string.common_send),
stringReference(" $displayStr"),
).orMaskWithStars(isBalanceHidden)
ellipsisLeft = TextEllipsis.OffsetEnd(symbol.length)
}
}

View file

@ -344,7 +344,7 @@ internal class DefaultSwapRepository(
appPreferencesStore = appPreferencesStore,
),
toExtraId = toExtraId?.ifEmpty { null },
quoteId = null,
quoteId = null, // TODO add when implementing fixed rate in swap
).getOrThrow()
if (dataSignatureVerifier.verifySignature(response.signature, response.txDetailsJson)) {
val txDetails = parseTxDetails(response.txDetailsJson)