Updated on 2026-08-14

This commit is contained in:
Tangem 2023-12-08 12:10:45 +04:00
parent b2129017a6
commit 912510da57
2 changed files with 23 additions and 3 deletions

View file

@ -3,6 +3,7 @@ package com.tangem.feature.wallet.presentation.wallet.state
import androidx.compose.runtime.Immutable
import com.tangem.core.ui.extensions.TextReference
import com.tangem.core.ui.extensions.resourceReference
import com.tangem.core.ui.extensions.stringReference
import com.tangem.feature.wallet.impl.R
@Immutable
@ -38,4 +39,23 @@ internal sealed class WalletAlertState {
override val message: TextReference = resourceReference(R.string.key_invalidated_warning_description)
override val onConfirmClick: (() -> Unit)? = null
}
object VisaBalancesInfo : WalletAlertState() {
override val title: TextReference? = null
override val message: TextReference = stringReference(
value = "Available balance is actual funds available, considering pending transactions, " +
"blocked amounts, and debit balance to prevent overdrafts.",
)
override val onConfirmClick: (() -> Unit)? = null
}
object VisaLimitsInfo : WalletAlertState() {
override val title: TextReference? = null
override val message: TextReference = stringReference(
value = "Limits are needed to control costs, improve security, manage risk. " +
"You can spend 1 000 USDT during the week for card payments in shops and " +
"100 USDT for other transactions, e. g. subscriptions or debts.",
)
override val onConfirmClick: (() -> Unit)? = null
}
}

View file

@ -4,10 +4,10 @@ import arrow.core.getOrElse
import com.tangem.core.ui.components.bottomsheets.TangemBottomSheetConfigContent
import com.tangem.core.ui.components.bottomsheets.tokenreceive.TokenReceiveBottomSheetConfig
import com.tangem.core.ui.components.bottomsheets.tokenreceive.mapToAddressModels
import com.tangem.core.ui.extensions.stringReference
import com.tangem.domain.tokens.GetPrimaryCurrencyStatusUpdatesUseCase
import com.tangem.domain.tokens.model.CryptoCurrencyStatus
import com.tangem.domain.wallets.models.UserWalletId
import com.tangem.feature.wallet.presentation.wallet.state.WalletAlertState
import com.tangem.feature.wallet.presentation.wallet.state.WalletEvent
import com.tangem.feature.wallet.presentation.wallet.state2.WalletStateController
import com.tangem.feature.wallet.presentation.wallet.state2.model.BalancesAndLimitsBottomSheetConfig
@ -101,10 +101,10 @@ internal class VisaWalletIntentsImplementor @Inject constructor(
)
private fun showBalanceInfo() {
eventSender.send(WalletEvent.ShowToast(stringReference(value = "Not implemented yet")))
eventSender.send(WalletEvent.ShowAlert(WalletAlertState.VisaBalancesInfo))
}
private fun showLimitInfo() {
eventSender.send(WalletEvent.ShowToast(stringReference(value = "Not implemented yet")))
eventSender.send(WalletEvent.ShowAlert(WalletAlertState.VisaLimitsInfo))
}
}