Updated on 2026-08-14

This commit is contained in:
Tangem 2025-02-14 18:48:58 +07:00
parent 797ac056a8
commit 69d3afcfdb
3 changed files with 9 additions and 3 deletions

View file

@ -16,7 +16,7 @@ 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.viewmodel.SendClickIntents
import com.tangem.lib.crypto.BlockchainUtils.isBitcoin
import com.tangem.lib.crypto.BlockchainUtils.isUseBitcoinFeeConverter
import com.tangem.utils.Provider
import kotlinx.collections.immutable.ImmutableList
import kotlinx.collections.immutable.persistentListOf
@ -35,7 +35,7 @@ internal class BitcoinCustomFeeConverter(
val feeValue = value.amount.value
val feeCurrency = feeCryptoCurrencyStatusProvider()?.value
val network = feeCryptoCurrencyStatusProvider()?.currency?.network?.id?.value
return if (network != null && isBitcoin(network)) {
return if (network != null && (isUseBitcoinFeeConverter(network))) {
persistentListOf(
SendTextField.CustomFee(
value = feeValue?.parseBigDecimal(value.amount.decimals).orEmpty(),

View file

@ -89,7 +89,7 @@ markdownComposeView = "0.5.4"
# endregion Other libraries
# region Tangem
tangemBlockchainSdk = "develop-951"
tangemBlockchainSdk = "develop-952"
#tangemBlockchainSdk = "0.0.1" # Keep it! - used for local builds
tangemCardSdk = "develop-434"
#tangemCardSdk = "0.0.1" # Keep it! - used for local builds ^

View file

@ -38,6 +38,12 @@ object BlockchainUtils {
return blockchain == Blockchain.Bitcoin || blockchain == Blockchain.BitcoinTestnet
}
/** If current [networkId] is use custom fee */
fun isUseBitcoinFeeConverter(blockchainId: String): Boolean {
val blockchain = Blockchain.fromId(blockchainId)
return isBitcoin(blockchainId) || blockchain == Blockchain.Fact0rn
}
/** If current [blockchainId] is Tezos */
fun isTezos(blockchainId: String): Boolean {
val blockchain = Blockchain.fromId(blockchainId)