Updated on 2026-08-14
This commit is contained in:
commit
080985065b
22 changed files with 42 additions and 54 deletions
|
|
@ -5,8 +5,7 @@ sealed class WalletWarning(
|
|||
) {
|
||||
data class ExistentialDeposit(
|
||||
val currencyName: String,
|
||||
val currencySymbols: String,
|
||||
val existentialDepositString: String,
|
||||
val edStringValueWithSymbol: String,
|
||||
) : WalletWarning(1)
|
||||
|
||||
object TransactionInProgress : WalletWarning(10)
|
||||
|
|
|
|||
|
|
@ -360,8 +360,7 @@ data class WalletData(
|
|||
if (existentialDepositString != null) {
|
||||
val warning = WalletWarning.ExistentialDeposit(
|
||||
currencyName = currency.currencyName,
|
||||
currencySymbols = currency.currencySymbol,
|
||||
existentialDepositString = existentialDepositString,
|
||||
edStringValueWithSymbol = "$existentialDepositString ${currency.currencySymbol}",
|
||||
)
|
||||
walletWarnings.add(warning)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ class WalletWarningConverter(
|
|||
is WalletWarning.ExistentialDeposit -> {
|
||||
context.getString(
|
||||
R.string.warning_existential_deposit_message,
|
||||
message.currencyName, message.currencySymbols, message.existentialDepositString,
|
||||
message.currencyName, message.edStringValueWithSymbol,
|
||||
)
|
||||
}
|
||||
is WalletWarning.BalanceNotEnoughForFee -> {
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import androidx.recyclerview.widget.LinearLayoutManager
|
|||
import com.tangem.domain.common.TwinCardNumber
|
||||
import com.tangem.tap.common.extensions.beginDelayedTransition
|
||||
import com.tangem.tap.common.extensions.fitChipsByGroupWidth
|
||||
import com.tangem.tap.common.extensions.getQuantityString
|
||||
import com.tangem.tap.common.extensions.hide
|
||||
import com.tangem.tap.common.extensions.show
|
||||
import com.tangem.tap.features.onboarding.products.twins.redux.TwinCardsState
|
||||
|
|
@ -86,11 +87,7 @@ class SingleWalletView : WalletView() {
|
|||
private fun setupTwinCards(twinCardsState: TwinCardsState?, binding: FragmentWalletBinding) = with(binding) {
|
||||
twinCardsState?.cardNumber?.let { cardNumber ->
|
||||
tvTwinCardNumber.show()
|
||||
val number = when (cardNumber) {
|
||||
TwinCardNumber.First -> 1
|
||||
TwinCardNumber.Second -> 2
|
||||
}
|
||||
tvTwinCardNumber.text = fragment?.getString(R.string.wallet_twins_chip_format, number, 2)
|
||||
tvTwinCardNumber.text = tvTwinCardNumber.getQuantityString(R.plurals.card_label_card_count, 2)
|
||||
}
|
||||
if (twinCardsState?.cardNumber == null) {
|
||||
tvTwinCardNumber.hide()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue