diff --git a/core/res/src/main/res/values-ru/strings.xml b/core/res/src/main/res/values-ru/strings.xml
index aa633f341a..460c4ae43b 100644
--- a/core/res/src/main/res/values-ru/strings.xml
+++ b/core/res/src/main/res/values-ru/strings.xml
@@ -70,7 +70,7 @@
биометрическую аутентификацию
биометрией
Купить
- Купить %1$s
+ Перейти на %1$s
Вы не предоставили доступ к камере, пожалуйста, измените настройки конфиденциальности.
Отмена
Закрыть
@@ -478,8 +478,6 @@
Покрытие сетевой комиссии
Недостаточно средств для перевода, так как сумма комиссии и сумма перевода в совокупности больше имеющегося баланса
Недостаточно средств
- Размер комиссии превышает баланс сети. Для продолжения необходимо пополнить баланс сети.
- Комиссия превышает баланс
Увеличение комиссии
Комиссия при переводе всего баланса выше. Для того, чтобы снизить комиссию Вы можете оставить 0.01.
Оставить %s XTZ
@@ -494,7 +492,6 @@
Обратите внимание, что при определенных параметрах комиссии возможны задержки по вашей транзакции
Возможны задержки по транзакции
Необязательное
- QR код содержит информацию о сумме отправки равной %s
Последние
Получатель
Убедитесь, что вы отправляете средства на адрес кошелька %s. Ошибки могут привести к потере ваших токенов
diff --git a/core/res/src/main/res/values/strings.xml b/core/res/src/main/res/values/strings.xml
index 2a104482ff..75ab3f3f04 100644
--- a/core/res/src/main/res/values/strings.xml
+++ b/core/res/src/main/res/values/strings.xml
@@ -68,7 +68,7 @@
biometric authentication
biometrics
Buy
- Buy %1$s
+ Go to %1$s
You have not given access to your camera, please adjust your privacy settings
Cancel
Close
@@ -483,8 +483,6 @@
Network fee coverage
Insufficient funds for the transfer, as the total of the fee and transfer amount exceeds the existing balance
Total exceeds balance
- The commission fee exceeds the network balance. To continue, it is necessary to replenish the network balance.
- Fee exceeds balance
Fee is increased
The fee for transferring the entire balance is higher. To reduce the commission, you can leave 0.01.
Reduce by %s XTZ
@@ -503,11 +501,6 @@
Existential deposit
The account will be wiped from the blockchain if a balance goes below the existential deposit. Please ensure that the remaining balance after sending will not be less than %s.
Optional
- Change
- Decline
- Recipient’s address scanned
- Change the entered amount?
- QR code contains information about the sending amount equal to %s
Please align your QR code with the square to scan it. Ensure you scan %s network address.
Recent
Recipient
diff --git a/features/send/impl/src/main/java/com/tangem/features/send/impl/presentation/state/SendStateFactory.kt b/features/send/impl/src/main/java/com/tangem/features/send/impl/presentation/state/SendStateFactory.kt
index 23b9ce0dfb..17ca733eee 100644
--- a/features/send/impl/src/main/java/com/tangem/features/send/impl/presentation/state/SendStateFactory.kt
+++ b/features/send/impl/src/main/java/com/tangem/features/send/impl/presentation/state/SendStateFactory.kt
@@ -75,7 +75,12 @@ internal class SendStateFactory(
cryptoCurrencyStatusProvider = cryptoCurrencyStatusProvider,
)
}
- private val feeStateConverter by lazy { SendFeeStateConverter() }
+ private val feeStateConverter by lazy {
+ SendFeeStateConverter(
+ appCurrencyProvider = appCurrencyProvider,
+ cryptoCurrencyStatusProvider = cryptoCurrencyStatusProvider,
+ )
+ }
private val recipientListStateConverter by lazy {
SendRecipientListConverter(
diff --git a/features/send/impl/src/main/java/com/tangem/features/send/impl/presentation/state/SendUiState.kt b/features/send/impl/src/main/java/com/tangem/features/send/impl/presentation/state/SendUiState.kt
index 4407d17d0f..14b9295f17 100644
--- a/features/send/impl/src/main/java/com/tangem/features/send/impl/presentation/state/SendUiState.kt
+++ b/features/send/impl/src/main/java/com/tangem/features/send/impl/presentation/state/SendUiState.kt
@@ -7,6 +7,7 @@ import com.tangem.blockchain.common.transaction.Fee
import com.tangem.core.ui.components.currency.tokenicon.TokenIconState
import com.tangem.core.ui.event.StateEvent
import com.tangem.core.ui.extensions.TextReference
+import com.tangem.domain.appcurrency.model.AppCurrency
import com.tangem.features.send.impl.presentation.domain.SendRecipientListContent
import com.tangem.features.send.impl.presentation.state.amount.SendAmountSegmentedButtonsConfig
import com.tangem.features.send.impl.presentation.state.fee.FeeSelectorState
@@ -74,6 +75,8 @@ internal sealed class SendStates {
val fee: Fee?,
val receivedAmountValue: BigDecimal,
val receivedAmount: String,
+ val rate: BigDecimal?,
+ val appCurrency: AppCurrency,
val notifications: ImmutableList,
) : SendStates()
diff --git a/features/send/impl/src/main/java/com/tangem/features/send/impl/presentation/state/fee/FeeNotificationFactory.kt b/features/send/impl/src/main/java/com/tangem/features/send/impl/presentation/state/fee/FeeNotificationFactory.kt
index c434a6182f..822c7f43af 100644
--- a/features/send/impl/src/main/java/com/tangem/features/send/impl/presentation/state/fee/FeeNotificationFactory.kt
+++ b/features/send/impl/src/main/java/com/tangem/features/send/impl/presentation/state/fee/FeeNotificationFactory.kt
@@ -7,6 +7,7 @@ import com.tangem.domain.tokens.GetBalanceNotEnoughForFeeWarningUseCase
import com.tangem.domain.tokens.model.CryptoCurrencyStatus
import com.tangem.domain.tokens.model.warnings.CryptoCurrencyWarning
import com.tangem.domain.wallets.models.UserWallet
+import com.tangem.features.send.impl.R
import com.tangem.features.send.impl.presentation.state.SendStates
import com.tangem.features.send.impl.presentation.state.SendUiState
import com.tangem.features.send.impl.presentation.state.SendUiStateType
@@ -118,25 +119,37 @@ internal class FeeNotificationFactory(
add(
SendFeeNotification.Error.ExceedsBalance(
warning.coinCurrency.networkIconResId,
- ) {
- clickIntents.onTokenDetailsClick(
- userWalletProvider().walletId,
- warning.coinCurrency,
- )
- },
+ networkName = warning.coinCurrency.name,
+ currencyName = cryptoCurrencyStatus.currency.name,
+ feeName = warning.coinCurrency.name,
+ feeSymbol = warning.coinCurrency.symbol,
+ onClick = {
+ clickIntents.onTokenDetailsClick(
+ userWalletId = userWalletId,
+ currency = warning.coinCurrency,
+ )
+ },
+ ),
)
}
is CryptoCurrencyWarning.CustomTokenNotEnoughForFee -> {
- val currency = warning.feeCurrency ?: warning.currency
+ val currency = warning.feeCurrency
add(
SendFeeNotification.Error.ExceedsBalance(
- currency.networkIconResId,
- ) {
- clickIntents.onTokenDetailsClick(
- userWalletId,
- currency,
- )
- },
+ networkIconId = currency?.networkIconResId ?: R.drawable.ic_alert_24,
+ currencyName = warning.currency.name,
+ feeName = warning.feeCurrencyName,
+ feeSymbol = warning.feeCurrencySymbol,
+ networkName = warning.networkName,
+ onClick = currency?.let {
+ {
+ clickIntents.onTokenDetailsClick(
+ userWalletId,
+ currency,
+ )
+ }
+ },
+ ),
)
}
else -> Unit
diff --git a/features/send/impl/src/main/java/com/tangem/features/send/impl/presentation/state/fee/SendFeeNotification.kt b/features/send/impl/src/main/java/com/tangem/features/send/impl/presentation/state/fee/SendFeeNotification.kt
index fbf72931af..d58cb3cd98 100644
--- a/features/send/impl/src/main/java/com/tangem/features/send/impl/presentation/state/fee/SendFeeNotification.kt
+++ b/features/send/impl/src/main/java/com/tangem/features/send/impl/presentation/state/fee/SendFeeNotification.kt
@@ -62,7 +62,7 @@ sealed class SendFeeNotification(val config: NotificationConfig) {
val title: TextReference,
val subtitle: TextReference,
val iconResId: Int,
- val buttonsState: NotificationConfig.ButtonsState,
+ val buttonsState: NotificationConfig.ButtonsState? = null,
) : SendFeeNotification(
config = NotificationConfig(
title = title,
@@ -73,15 +73,27 @@ sealed class SendFeeNotification(val config: NotificationConfig) {
) {
data class ExceedsBalance(
val networkIconId: Int,
- val onClick: () -> Unit,
+ val currencyName: String,
+ val feeName: String,
+ val feeSymbol: String,
+ val networkName: String,
+ val onClick: (() -> Unit)? = null,
) : Error(
- title = resourceReference(id = R.string.send_notification_exceed_fee_title),
- subtitle = resourceReference(id = R.string.send_notification_exceed_fee_text),
- iconResId = networkIconId,
- buttonsState = NotificationConfig.ButtonsState.SecondaryButtonConfig(
- text = resourceReference(R.string.common_go_to_provider),
- onClick = onClick,
+ title = resourceReference(
+ id = R.string.warning_send_blocked_funds_for_fee_title,
+ wrappedList(feeName),
),
+ subtitle = resourceReference(
+ id = R.string.warning_send_blocked_funds_for_fee_message,
+ formatArgs = wrappedList(currencyName, networkName, currencyName, feeName, feeSymbol),
+ ),
+ iconResId = networkIconId,
+ buttonsState = onClick?.let {
+ NotificationConfig.ButtonsState.SecondaryButtonConfig(
+ text = resourceReference(R.string.common_buy_currency, wrappedList(feeName)),
+ onClick = onClick,
+ )
+ },
)
}
}
\ No newline at end of file
diff --git a/features/send/impl/src/main/java/com/tangem/features/send/impl/presentation/state/fee/SendFeeStateConverter.kt b/features/send/impl/src/main/java/com/tangem/features/send/impl/presentation/state/fee/SendFeeStateConverter.kt
index 312ed32c90..2231fab584 100644
--- a/features/send/impl/src/main/java/com/tangem/features/send/impl/presentation/state/fee/SendFeeStateConverter.kt
+++ b/features/send/impl/src/main/java/com/tangem/features/send/impl/presentation/state/fee/SendFeeStateConverter.kt
@@ -1,13 +1,20 @@
package com.tangem.features.send.impl.presentation.state.fee
+import com.tangem.domain.appcurrency.model.AppCurrency
+import com.tangem.domain.tokens.model.CryptoCurrencyStatus
import com.tangem.features.send.impl.presentation.state.SendStates
+import com.tangem.utils.Provider
import com.tangem.utils.converter.Converter
import kotlinx.collections.immutable.persistentListOf
import java.math.BigDecimal
-internal class SendFeeStateConverter : Converter {
+internal class SendFeeStateConverter(
+ private val appCurrencyProvider: Provider,
+ private val cryptoCurrencyStatusProvider: Provider,
+) : Converter {
override fun convert(value: Unit): SendStates.FeeState {
+ val cryptoCurrencyStatus = cryptoCurrencyStatusProvider()
return SendStates.FeeState(
feeSelectorState = FeeSelectorState.Loading,
isSubtractAvailable = false,
@@ -17,6 +24,8 @@ internal class SendFeeStateConverter : Converter {
receivedAmountValue = BigDecimal.ZERO,
receivedAmount = "",
notifications = persistentListOf(),
+ rate = cryptoCurrencyStatus.value.fiatRate,
+ appCurrency = appCurrencyProvider(),
)
}
}
\ No newline at end of file
diff --git a/features/send/impl/src/main/java/com/tangem/features/send/impl/presentation/ui/fee/SendSpeedAndFeeContent.kt b/features/send/impl/src/main/java/com/tangem/features/send/impl/presentation/ui/fee/SendSpeedAndFeeContent.kt
index 43ab51b3ac..b253efe2e5 100644
--- a/features/send/impl/src/main/java/com/tangem/features/send/impl/presentation/ui/fee/SendSpeedAndFeeContent.kt
+++ b/features/send/impl/src/main/java/com/tangem/features/send/impl/presentation/ui/fee/SendSpeedAndFeeContent.kt
@@ -40,7 +40,7 @@ internal fun SendSpeedAndFeeContent(state: SendStates.FeeState?, clickIntents: S
key = FEE_SELECTOR_KEY,
) {
SendSpeedSelector(
- state = feeSendState,
+ state = state,
clickIntents = clickIntents,
modifier = Modifier.animateItemPlacement(),
)
diff --git a/features/send/impl/src/main/java/com/tangem/features/send/impl/presentation/ui/fee/SendSpeedSelector.kt b/features/send/impl/src/main/java/com/tangem/features/send/impl/presentation/ui/fee/SendSpeedSelector.kt
index db6be28780..59e6fd4cc2 100644
--- a/features/send/impl/src/main/java/com/tangem/features/send/impl/presentation/ui/fee/SendSpeedSelector.kt
+++ b/features/send/impl/src/main/java/com/tangem/features/send/impl/presentation/ui/fee/SendSpeedSelector.kt
@@ -19,21 +19,27 @@ import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.style.TextAlign
-import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.tooling.preview.Preview
+import com.tangem.blockchain.common.Amount
import com.tangem.blockchain.common.transaction.Fee
import com.tangem.blockchain.common.transaction.TransactionFee
import com.tangem.core.ui.components.RectangleShimmer
import com.tangem.core.ui.components.SpacerWMax
+import com.tangem.core.ui.components.atoms.text.EllipsisText
+import com.tangem.core.ui.components.atoms.text.TextEllipsis
import com.tangem.core.ui.extensions.TextReference
import com.tangem.core.ui.extensions.resolveReference
+import com.tangem.core.ui.extensions.stringReference
import com.tangem.core.ui.res.TangemTheme
import com.tangem.core.ui.utils.BigDecimalFormatter
+import com.tangem.domain.appcurrency.model.AppCurrency
import com.tangem.features.send.impl.R
+import com.tangem.features.send.impl.presentation.state.SendStates
import com.tangem.features.send.impl.presentation.state.fee.FeeSelectorState
import com.tangem.features.send.impl.presentation.state.fee.FeeType
import com.tangem.features.send.impl.presentation.ui.common.FooterContainer
import com.tangem.features.send.impl.presentation.viewmodel.SendClickIntents
+import java.math.BigDecimal
private val DEFAULT_FEE_OPTIONS = listOf(
R.string.common_fee_selector_option_slow to R.drawable.ic_tortoise_24,
@@ -44,7 +50,7 @@ private val DEFAULT_FEE_OPTIONS = listOf(
@Suppress("LongMethod")
@Composable
internal fun SendSpeedSelector(
- state: FeeSelectorState,
+ state: SendStates.FeeState,
clickIntents: SendClickIntents,
modifier: Modifier = Modifier,
) {
@@ -58,7 +64,7 @@ internal fun SendSpeedSelector(
.clip(TangemTheme.shapes.roundedCornersXMedium)
.background(TangemTheme.colors.background.action),
) {
- when (state) {
+ when (val feeSelectorState = state.feeSelectorState) {
FeeSelectorState.Error -> {
SendSpeedSelectorItemError()
}
@@ -66,36 +72,42 @@ internal fun SendSpeedSelector(
SendSpeedSelectorItemLoading()
}
is FeeSelectorState.Content -> {
- when (state.fees) {
+ when (val fees = feeSelectorState.fees) {
is TransactionFee.Choosable -> {
- val isSelected = state.selectedFee
+ val isSelected = feeSelectorState.selectedFee
+ val minimumAmount = fees.minimum.amount
SendSpeedSelectorItem(
titleRes = R.string.common_fee_selector_option_slow,
iconRes = R.drawable.ic_tortoise_24,
- amount = TextReference.Str(state.fees.minimum.amount.value.toString()),
- symbol = TextReference.Str(state.fees.minimum.amount.currencySymbol),
+ amount = getCryptoReference(minimumAmount),
+ fiatAmount = getFiatReference(minimumAmount, state.rate, state.appCurrency),
+ symbolLength = minimumAmount.currencySymbol.length,
isSelected = isSelected == FeeType.SLOW,
onSelect = { clickIntents.onFeeSelectorClick(FeeType.SLOW) },
)
+ val normalAmount = fees.normal.amount
SendSpeedSelectorItem(
titleRes = R.string.common_fee_selector_option_market,
iconRes = R.drawable.ic_bird_24,
- amount = TextReference.Str(state.fees.normal.amount.value.toString()),
- symbol = TextReference.Str(state.fees.normal.amount.currencySymbol),
+ amount = getCryptoReference(normalAmount),
+ fiatAmount = getFiatReference(normalAmount, state.rate, state.appCurrency),
+ symbolLength = normalAmount.currencySymbol.length,
isSelected = isSelected == FeeType.MARKET,
onSelect = { clickIntents.onFeeSelectorClick(FeeType.MARKET) },
)
+ val priorityAmount = fees.priority.amount
SendSpeedSelectorItem(
titleRes = R.string.common_fee_selector_option_fast,
iconRes = R.drawable.ic_hare_24,
- amount = TextReference.Str(state.fees.priority.amount.value.toString()),
- symbol = TextReference.Str(state.fees.priority.amount.currencySymbol),
+ amount = getCryptoReference(priorityAmount),
+ fiatAmount = getFiatReference(priorityAmount, state.rate, state.appCurrency),
+ symbolLength = priorityAmount.currencySymbol.length,
isSelected = isSelected == FeeType.FAST,
onSelect = { clickIntents.onFeeSelectorClick(FeeType.FAST) },
- showDivider = state.fees.normal is Fee.Ethereum,
+ showDivider = fees.normal is Fee.Ethereum,
)
AnimatedVisibility(
- visible = state.fees.normal is Fee.Ethereum,
+ visible = fees.normal is Fee.Ethereum,
label = "Custom fee appearance animation",
) {
SendSpeedSelectorItem(
@@ -103,17 +115,19 @@ internal fun SendSpeedSelector(
iconRes = R.drawable.ic_edit_24,
isSelected = isSelected == FeeType.CUSTOM,
onSelect = { clickIntents.onFeeSelectorClick(FeeType.CUSTOM) },
- showDivider = state.fees.normal !is Fee.Ethereum,
+ showDivider = fees.normal !is Fee.Ethereum,
)
}
}
is TransactionFee.Single -> {
+ val normalAmount = feeSelectorState.fees.normal.amount
SendSpeedSelectorItem(
titleRes = R.string.common_fee_selector_option_market,
iconRes = R.drawable.ic_bird_24,
isSelected = true,
- amount = TextReference.Str(state.fees.normal.amount.value.toString()),
- symbol = TextReference.Str(state.fees.normal.amount.currencySymbol),
+ amount = getCryptoReference(normalAmount),
+ fiatAmount = getFiatReference(normalAmount, state.rate, state.appCurrency),
+ symbolLength = normalAmount.currencySymbol.length,
onSelect = { clickIntents.onFeeSelectorClick(FeeType.MARKET) },
showDivider = false,
)
@@ -125,6 +139,24 @@ internal fun SendSpeedSelector(
}
}
+// todo remove after refactoring [REDACTED_JIRA]
+private fun getCryptoReference(amount: Amount) = stringReference(
+ BigDecimalFormatter.formatCryptoAmount(
+ cryptoAmount = amount.value,
+ cryptoCurrency = amount.currencySymbol,
+ decimals = amount.decimals,
+ ),
+)
+
+// todo remove after refactoring [REDACTED_JIRA]
+private fun getFiatReference(amount: Amount, rate: BigDecimal?, appCurrency: AppCurrency) = stringReference(
+ BigDecimalFormatter.formatFiatAmount(
+ fiatAmount = rate?.let { amount.value?.multiply(it) },
+ fiatCurrencyCode = appCurrency.code,
+ fiatCurrencySymbol = appCurrency.symbol,
+ ),
+)
+
@Composable
private fun SendSpeedSelectorItemLoading() {
repeat(DEFAULT_FEE_OPTIONS.size) {
@@ -183,7 +215,8 @@ private fun SendSpeedSelectorItem(
onSelect: () -> Unit,
modifier: Modifier = Modifier,
amount: TextReference? = null,
- symbol: TextReference? = null,
+ fiatAmount: TextReference? = null,
+ symbolLength: Int? = null,
isSelected: Boolean = false,
showDivider: Boolean = true,
) {
@@ -214,10 +247,11 @@ private fun SendSpeedSelectorItem(
iconTint = iconTint,
textStyle = textStyle,
)
- if (amount != null && symbol != null) {
+ if (amount != null && symbolLength != null && fiatAmount != null) {
SelectorValueContent(
amount = amount,
- symbol = symbol,
+ fiatAmount = fiatAmount,
+ symbolLength = symbolLength,
textStyle = textStyle,
)
}
@@ -267,14 +301,18 @@ private fun SelectorTitleContent(
}
@Composable
-private fun RowScope.SelectorValueContent(amount: TextReference, symbol: TextReference, textStyle: TextStyle) {
- Text(
+private fun RowScope.SelectorValueContent(
+ amount: TextReference,
+ fiatAmount: TextReference,
+ symbolLength: Int,
+ textStyle: TextStyle,
+) {
+ EllipsisText(
text = amount.resolveReference(),
style = textStyle,
color = TangemTheme.colors.text.primary1,
textAlign = TextAlign.End,
- overflow = TextOverflow.Ellipsis,
- maxLines = 1,
+ ellipsis = TextEllipsis.OffsetEnd(symbolLength),
modifier = Modifier
.weight(1f)
.padding(
@@ -284,12 +322,12 @@ private fun RowScope.SelectorValueContent(amount: TextReference, symbol: TextRef
),
)
Text(
- text = symbol.resolveReference(),
+ text = "(${fiatAmount.resolveReference()})",
style = textStyle,
color = TangemTheme.colors.text.primary1,
modifier = Modifier
.padding(
- start = TangemTheme.dimens.spacing1,
+ start = TangemTheme.dimens.spacing4,
end = TangemTheme.dimens.spacing12,
top = TangemTheme.dimens.spacing14,
bottom = TangemTheme.dimens.spacing14,
diff --git a/features/send/impl/src/main/java/com/tangem/features/send/impl/presentation/ui/send/SendContent.kt b/features/send/impl/src/main/java/com/tangem/features/send/impl/presentation/ui/send/SendContent.kt
index 62330d3e7c..d014f71caa 100644
--- a/features/send/impl/src/main/java/com/tangem/features/send/impl/presentation/ui/send/SendContent.kt
+++ b/features/send/impl/src/main/java/com/tangem/features/send/impl/presentation/ui/send/SendContent.kt
@@ -24,9 +24,11 @@ import com.tangem.core.ui.components.notifications.Notification
import com.tangem.core.ui.components.transactions.TransactionDoneTitle
import com.tangem.core.ui.extensions.TextReference
import com.tangem.core.ui.extensions.resolveReference
+import com.tangem.core.ui.extensions.resourceReference
+import com.tangem.core.ui.extensions.wrappedList
import com.tangem.core.ui.res.TangemTheme
-import com.tangem.core.ui.utils.BigDecimalFormatter
import com.tangem.core.ui.utils.BigDecimalFormatter.formatCryptoAmount
+import com.tangem.core.ui.utils.BigDecimalFormatter.formatFiatAmount
import com.tangem.domain.tokens.model.AmountType
import com.tangem.features.send.impl.R
import com.tangem.features.send.impl.presentation.state.SendNotification
@@ -127,7 +129,7 @@ private fun AmountBlock(amountState: SendStates.AmountState, isSuccess: Boolean,
cryptoCurrency = amount.cryptoAmount.currencySymbol,
decimals = amount.cryptoAmount.decimals,
)
- val fiatAmount = BigDecimalFormatter.formatFiatAmount(
+ val fiatAmount = formatFiatAmount(
fiatAmount = amount.fiatAmount.value,
fiatCurrencyCode = (amount.fiatAmount.type as AmountType.FiatType).code,
fiatCurrencySymbol = amount.fiatAmount.currencySymbol,
@@ -174,14 +176,22 @@ private fun RecipientBlock(recipientState: SendStates.RecipientState, isSuccess:
@Composable
private fun FeeBlock(feeState: SendStates.FeeState, isSuccess: Boolean, onClick: () -> Unit) {
val fee = feeState.fee ?: return
- val feeValue = formatCryptoAmount(
+ val feeCryptoValue = formatCryptoAmount(
cryptoAmount = fee.amount.value,
cryptoCurrency = fee.amount.currencySymbol,
decimals = fee.amount.decimals,
)
+ val feeFiatValue = formatFiatAmount(
+ fiatAmount = feeState.rate?.let { fee.amount.value?.multiply(it) },
+ fiatCurrencyCode = feeState.appCurrency.code,
+ fiatCurrencySymbol = feeState.appCurrency.symbol,
+ )
InputRowDefault(
- title = TextReference.Res(R.string.common_network_fee_title),
- text = TextReference.Str(feeValue),
+ title = resourceReference(R.string.common_network_fee_title),
+ text = resourceReference(
+ id = R.string.send_wallet_balance_format,
+ wrappedList(feeCryptoValue, feeFiatValue),
+ ),
modifier = Modifier
.clip(TangemTheme.shapes.roundedCornersXMedium)
.background(TangemTheme.colors.background.action)