Updated on 2026-08-14
This commit is contained in:
parent
5209c47ed5
commit
3455dea61a
10 changed files with 30 additions and 28 deletions
|
|
@ -62,6 +62,7 @@ internal class PreviewCustomTokenSelectorComponent(
|
|||
standardType = Network.StandardType.ERC20,
|
||||
hasFiatFeeRate = false,
|
||||
canHandleTokens = false,
|
||||
transactionExtras = Network.TransactionExtras.NONE,
|
||||
),
|
||||
name = "Network $index",
|
||||
type = "N$index",
|
||||
|
|
|
|||
|
|
@ -161,6 +161,7 @@ internal class PreviewManageTokensComponent(
|
|||
standardType = Network.StandardType.ERC20,
|
||||
hasFiatFeeRate = false,
|
||||
canHandleTokens = false,
|
||||
transactionExtras = Network.TransactionExtras.NONE,
|
||||
),
|
||||
name = "NETWORK$networkIndex",
|
||||
type = "N$networkIndex",
|
||||
|
|
|
|||
|
|
@ -101,6 +101,7 @@ internal class PreviewOnboardingManageTokensComponent(
|
|||
standardType = Network.StandardType.ERC20,
|
||||
hasFiatFeeRate = false,
|
||||
canHandleTokens = false,
|
||||
transactionExtras = Network.TransactionExtras.NONE,
|
||||
),
|
||||
name = "NETWORK$networkIndex",
|
||||
type = "N$networkIndex",
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ import com.tangem.domain.demo.IsDemoCardUseCase
|
|||
import com.tangem.domain.onramp.model.OnrampSource
|
||||
import com.tangem.domain.redux.ReduxStateHolder
|
||||
import com.tangem.domain.tokens.legacy.TradeCryptoAction
|
||||
import com.tangem.domain.tokens.model.Network
|
||||
import com.tangem.domain.tokens.model.TokenActionsState
|
||||
import com.tangem.domain.wallets.models.UserWallet
|
||||
import com.tangem.features.markets.impl.R
|
||||
|
|
@ -109,6 +110,7 @@ internal class TokenActionsHandler @AssistedInject constructor(
|
|||
addresses = networkAddress.availableAddresses
|
||||
.mapToAddressModels(currency)
|
||||
.toImmutableList(),
|
||||
showMemoDisclaimer = currency.network.transactionExtras != Network.TransactionExtras.NONE,
|
||||
onCopyClick = {},
|
||||
onShareClick = {},
|
||||
),
|
||||
|
|
|
|||
|
|
@ -4,9 +4,9 @@ import androidx.annotation.StringRes
|
|||
import androidx.compose.foundation.text.KeyboardOptions
|
||||
import androidx.compose.ui.text.input.ImeAction
|
||||
import androidx.compose.ui.text.input.KeyboardType
|
||||
import com.tangem.blockchain.common.Blockchain
|
||||
import com.tangem.core.ui.extensions.resourceReference
|
||||
import com.tangem.domain.tokens.model.CryptoCurrencyStatus
|
||||
import com.tangem.domain.tokens.model.Network
|
||||
import com.tangem.features.send.impl.R
|
||||
import com.tangem.features.send.impl.presentation.state.fields.SendTextField
|
||||
import com.tangem.features.send.impl.presentation.viewmodel.SendClickIntents
|
||||
|
|
@ -22,29 +22,20 @@ internal class SendRecipientMemoFieldConverter(
|
|||
val cryptoCurrency = cryptoCurrencyStatus().currency
|
||||
val memo = memoValue ?: ""
|
||||
|
||||
return when (cryptoCurrency.network.id.value) {
|
||||
Blockchain.XRP.id -> {
|
||||
convert(
|
||||
value = Data(memo = memo, label = R.string.send_destination_tag_field),
|
||||
)
|
||||
}
|
||||
Blockchain.Binance.id,
|
||||
Blockchain.TON.id,
|
||||
Blockchain.Cosmos.id,
|
||||
Blockchain.TerraV1.id,
|
||||
Blockchain.TerraV2.id,
|
||||
Blockchain.Stellar.id,
|
||||
Blockchain.Hedera.id,
|
||||
Blockchain.Algorand.id,
|
||||
Blockchain.Sei.id,
|
||||
Blockchain.InternetComputer.id,
|
||||
Blockchain.Casper.id,
|
||||
-> {
|
||||
convert(
|
||||
value = Data(memo = memo, label = R.string.send_extras_hint_memo),
|
||||
)
|
||||
}
|
||||
else -> null
|
||||
return when (cryptoCurrency.network.transactionExtras) {
|
||||
Network.TransactionExtras.NONE -> null
|
||||
Network.TransactionExtras.MEMO -> convert(
|
||||
value = Data(
|
||||
memo = memo,
|
||||
label = R.string.send_extras_hint_memo,
|
||||
),
|
||||
)
|
||||
Network.TransactionExtras.DESTINATION_TAG -> convert(
|
||||
value = Data(
|
||||
memo = memo,
|
||||
label = R.string.send_destination_tag_field,
|
||||
),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -248,6 +248,7 @@ internal class TokenDetailsStateFactory(
|
|||
symbol = currency.symbol,
|
||||
network = currency.network.name,
|
||||
addresses = networkAddress.availableAddresses.mapToAddressModels(currency).toImmutableList(),
|
||||
showMemoDisclaimer = currency.network.transactionExtras != Network.TransactionExtras.NONE,
|
||||
onCopyClick = sendCopyAnalyticsEvent,
|
||||
onShareClick = sendShareAnalyticsEvent,
|
||||
),
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import com.tangem.core.ui.components.bottomsheets.tokenreceive.TokenReceiveBotto
|
|||
import com.tangem.core.ui.components.bottomsheets.tokenreceive.mapToAddressModels
|
||||
import com.tangem.domain.tokens.GetCryptoCurrencyStatusSyncUseCase
|
||||
import com.tangem.domain.tokens.model.CryptoCurrencyStatus
|
||||
import com.tangem.domain.tokens.model.Network
|
||||
import com.tangem.domain.visa.GetVisaCurrencyUseCase
|
||||
import com.tangem.domain.visa.GetVisaTxDetailsUseCase
|
||||
import com.tangem.domain.wallets.models.UserWalletId
|
||||
|
|
@ -71,6 +72,7 @@ internal class VisaWalletIntentsImplementor @Inject constructor(
|
|||
symbol = currency.symbol,
|
||||
network = currency.network.name,
|
||||
addresses = addresses.mapToAddressModels(currency).toImmutableList(),
|
||||
showMemoDisclaimer = currency.network.transactionExtras != Network.TransactionExtras.NONE,
|
||||
onCopyClick = { /* no-op */ },
|
||||
onShareClick = { /* no-op */ },
|
||||
)
|
||||
|
|
|
|||
|
|
@ -34,10 +34,7 @@ import com.tangem.domain.settings.usercountry.models.UserCountry
|
|||
import com.tangem.domain.staking.model.stakekit.Yield
|
||||
import com.tangem.domain.tokens.*
|
||||
import com.tangem.domain.tokens.legacy.TradeCryptoAction
|
||||
import com.tangem.domain.tokens.model.CryptoCurrency
|
||||
import com.tangem.domain.tokens.model.CryptoCurrencyStatus
|
||||
import com.tangem.domain.tokens.model.NetworkAddress
|
||||
import com.tangem.domain.tokens.model.ScenarioUnavailabilityReason
|
||||
import com.tangem.domain.tokens.model.*
|
||||
import com.tangem.domain.tokens.model.analytics.TokenReceiveAnalyticsEvent
|
||||
import com.tangem.domain.tokens.model.analytics.TokenScreenAnalyticsEvent
|
||||
import com.tangem.domain.walletmanager.WalletManagersFacade
|
||||
|
|
@ -239,6 +236,7 @@ internal class WalletCurrencyActionsClickIntentsImplementor @Inject constructor(
|
|||
symbol = currency.symbol,
|
||||
network = currency.network.name,
|
||||
addresses = addresses.mapToAddressModels(currency).toImmutableList(),
|
||||
showMemoDisclaimer = currency.network.transactionExtras != Network.TransactionExtras.NONE,
|
||||
onCopyClick = {
|
||||
analyticsEventHandler.send(TokenReceiveAnalyticsEvent.ButtonCopyAddress(currency.symbol))
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue