Updated on 2026-08-14

This commit is contained in:
Tangem 2025-05-20 15:13:47 +04:00
parent 33b7a53905
commit c5560c3c6a
101 changed files with 274 additions and 272 deletions

View file

@ -592,7 +592,7 @@ internal class SendModel @Inject constructor(
saveBlockchainErrorUseCase(
error = BlockchainErrorInfo(
errorMessage = errorMessage,
blockchainId = cryptoCurrency.network.id.value,
blockchainId = cryptoCurrency.network.rawId,
derivationPath = cryptoCurrency.network.derivationPath.value,
destinationAddress = recipient.orEmpty(),
tokenSymbol = if (amount?.type is AmountType.Token) {
@ -742,7 +742,7 @@ internal class SendModel @Inject constructor(
}
private suspend fun checkIfXrpAddressValue(value: String): Boolean {
return BlockchainUtils.decodeRippleXAddress(value, cryptoCurrency.network.id.value)?.let { decodedAddress ->
return BlockchainUtils.decodeRippleXAddress(value, cryptoCurrency.network.rawId)?.let { decodedAddress ->
uiState.value =
recipientStateFactory.onRecipientAddressValueChange(value, isXAddress = true, isValuePasted = true)
uiState.value = recipientStateFactory.getOnXAddressMemoState()

View file

@ -213,7 +213,7 @@ internal class SendNotificationFactory(
)
},
)
if (!BlockchainUtils.isCardano(currency.network.id.value)) {
if (!BlockchainUtils.isCardano(currency.network.rawId)) {
addDustWarningNotification(
dustValue = currencyCheck.dustValue,
feeValue = feeValue,
@ -306,7 +306,7 @@ internal class SendNotificationFactory(
) {
val cryptoCurrencyStatus = cryptoCurrencyStatusProvider()
val balance = cryptoCurrencyStatus.value.amount ?: BigDecimal.ZERO
val isTezos = isTezos(cryptoCurrencyStatus.currency.network.id.value)
val isTezos = isTezos(cryptoCurrencyStatus.currency.network.rawId)
val threshold = getTezosThreshold()
val isTotalBalance = sendAmount >= balance && balance > threshold
if (!ignoreAmountReduce && isTotalBalance && isTezos) {
@ -356,7 +356,7 @@ internal class SendNotificationFactory(
private suspend fun MutableList<NotificationUM>.addTronNetworkFeesNotification() {
val cryptoCurrency = cryptoCurrencyStatusProvider().currency
val isTronToken = cryptoCurrency is CryptoCurrency.Token &&
isTron(cryptoCurrency.network.id.value)
isTron(cryptoCurrency.network.rawId)
if (isTronToken && getTronFeeNotificationShowCountUseCase() <= TRON_FEE_NOTIFICATION_MAX_SHOW_COUNT) {
add(

View file

@ -26,7 +26,7 @@ internal class SendFeeStateConverter(
isCustomSelected = false,
isFeeConvertibleToFiat = cryptoCurrencyStatusProvider().currency.network.hasFiatFeeRate,
isTronToken = cryptoCurrencyStatusProvider().currency is CryptoCurrency.Token &&
isTron(cryptoCurrencyStatusProvider().currency.network.id.value),
isTron(cryptoCurrencyStatusProvider().currency.network.rawId),
)
}
}

View file

@ -12,10 +12,10 @@ import com.tangem.core.ui.utils.parseToBigDecimal
import com.tangem.domain.appcurrency.model.AppCurrency
import com.tangem.domain.tokens.model.CryptoCurrencyStatus
import com.tangem.features.send.impl.R
import com.tangem.features.send.impl.presentation.model.SendClickIntents
import com.tangem.features.send.impl.presentation.state.StateRouter
import com.tangem.features.send.impl.presentation.state.fee.checkExceedBalance
import com.tangem.features.send.impl.presentation.state.fields.SendTextField
import com.tangem.features.send.impl.presentation.model.SendClickIntents
import com.tangem.lib.crypto.BlockchainUtils.isUseBitcoinFeeConverter
import com.tangem.utils.Provider
import kotlinx.collections.immutable.ImmutableList
@ -34,7 +34,7 @@ internal class BitcoinCustomFeeConverter(
override fun convert(value: Fee.Bitcoin): ImmutableList<SendTextField.CustomFee> {
val feeValue = value.amount.value
val feeCurrency = feeCryptoCurrencyStatusProvider()?.value
val network = feeCryptoCurrencyStatusProvider()?.currency?.network?.id?.value
val network = feeCryptoCurrencyStatusProvider()?.currency?.network?.rawId
return if (network != null && isUseBitcoinFeeConverter(network)) {
persistentListOf(
SendTextField.CustomFee(

View file

@ -12,8 +12,8 @@ import com.tangem.core.ui.utils.parseToBigDecimal
import com.tangem.domain.appcurrency.model.AppCurrency
import com.tangem.domain.tokens.model.CryptoCurrencyStatus
import com.tangem.features.send.impl.R
import com.tangem.features.send.impl.presentation.state.fields.SendTextField
import com.tangem.features.send.impl.presentation.model.SendClickIntents
import com.tangem.features.send.impl.presentation.state.fields.SendTextField
import com.tangem.utils.Provider
import kotlinx.collections.immutable.ImmutableList
import kotlinx.collections.immutable.persistentListOf
@ -29,7 +29,7 @@ internal class KaspaCustomFeeConverter(
override fun convert(value: Fee.Kaspa): ImmutableList<SendTextField.CustomFee> {
val feeValue = value.amount.value
val feeCurrency = feeCryptoCurrencyStatusProvider()?.value
val network = feeCryptoCurrencyStatusProvider()?.currency?.network?.id?.value
val network = feeCryptoCurrencyStatusProvider()?.currency?.network?.rawId
return if (network != null) {
persistentListOf(
SendTextField.CustomFee(