Updated on 2026-08-14
This commit is contained in:
parent
5209c47ed5
commit
3455dea61a
10 changed files with 30 additions and 28 deletions
|
|
@ -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,
|
||||
),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue