Updated on 2026-08-14
This commit is contained in:
parent
797ac056a8
commit
69d3afcfdb
3 changed files with 9 additions and 3 deletions
|
|
@ -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.fee.checkExceedBalance
|
||||||
import com.tangem.features.send.impl.presentation.state.fields.SendTextField
|
import com.tangem.features.send.impl.presentation.state.fields.SendTextField
|
||||||
import com.tangem.features.send.impl.presentation.viewmodel.SendClickIntents
|
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 com.tangem.utils.Provider
|
||||||
import kotlinx.collections.immutable.ImmutableList
|
import kotlinx.collections.immutable.ImmutableList
|
||||||
import kotlinx.collections.immutable.persistentListOf
|
import kotlinx.collections.immutable.persistentListOf
|
||||||
|
|
@ -35,7 +35,7 @@ internal class BitcoinCustomFeeConverter(
|
||||||
val feeValue = value.amount.value
|
val feeValue = value.amount.value
|
||||||
val feeCurrency = feeCryptoCurrencyStatusProvider()?.value
|
val feeCurrency = feeCryptoCurrencyStatusProvider()?.value
|
||||||
val network = feeCryptoCurrencyStatusProvider()?.currency?.network?.id?.value
|
val network = feeCryptoCurrencyStatusProvider()?.currency?.network?.id?.value
|
||||||
return if (network != null && isBitcoin(network)) {
|
return if (network != null && (isUseBitcoinFeeConverter(network))) {
|
||||||
persistentListOf(
|
persistentListOf(
|
||||||
SendTextField.CustomFee(
|
SendTextField.CustomFee(
|
||||||
value = feeValue?.parseBigDecimal(value.amount.decimals).orEmpty(),
|
value = feeValue?.parseBigDecimal(value.amount.decimals).orEmpty(),
|
||||||
|
|
|
||||||
|
|
@ -89,7 +89,7 @@ markdownComposeView = "0.5.4"
|
||||||
# endregion Other libraries
|
# endregion Other libraries
|
||||||
|
|
||||||
# region Tangem
|
# region Tangem
|
||||||
tangemBlockchainSdk = "develop-951"
|
tangemBlockchainSdk = "develop-952"
|
||||||
#tangemBlockchainSdk = "0.0.1" # Keep it! - used for local builds
|
#tangemBlockchainSdk = "0.0.1" # Keep it! - used for local builds
|
||||||
tangemCardSdk = "develop-434"
|
tangemCardSdk = "develop-434"
|
||||||
#tangemCardSdk = "0.0.1" # Keep it! - used for local builds ^
|
#tangemCardSdk = "0.0.1" # Keep it! - used for local builds ^
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,12 @@ object BlockchainUtils {
|
||||||
return blockchain == Blockchain.Bitcoin || blockchain == Blockchain.BitcoinTestnet
|
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 */
|
/** If current [blockchainId] is Tezos */
|
||||||
fun isTezos(blockchainId: String): Boolean {
|
fun isTezos(blockchainId: String): Boolean {
|
||||||
val blockchain = Blockchain.fromId(blockchainId)
|
val blockchain = Blockchain.fromId(blockchainId)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue