Updated on 2026-08-14
This commit is contained in:
parent
ab6832b5e9
commit
d0c76d4fc4
2 changed files with 6 additions and 3 deletions
|
|
@ -94,8 +94,8 @@ internal class DefaultOnboardingRepository @Inject constructor(
|
|||
val result = response.result
|
||||
val status = result?.productInstance?.status
|
||||
val isDeactivated = status == CustomerMeResponse.ProductInstance.Status.DEACTIVATED
|
||||
val isBlocked = result?.state?.let { CustomerInfo.State.fromString(it) } == CustomerInfo.State.BLOCKED
|
||||
if (isDeactivated || isBlocked) {
|
||||
val isFormer = result?.state?.let { CustomerInfo.State.fromString(it) } == CustomerInfo.State.FORMER
|
||||
if (isDeactivated || isFormer) {
|
||||
tangemPayStorage.storeIsTangemPayDeactivated(userWalletId)
|
||||
VisaApiError.Deactivated.left()
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import com.tangem.domain.models.account.PaymentAccountStatusValue
|
|||
import com.tangem.domain.models.kyc.KycStatus
|
||||
import com.tangem.domain.visa.model.TangemPayCardFrozenState
|
||||
import java.math.BigDecimal
|
||||
import java.util.Locale
|
||||
|
||||
sealed class MainCustomerInfoContentState {
|
||||
object Loading : MainCustomerInfoContentState()
|
||||
|
|
@ -27,15 +28,17 @@ data class CustomerInfo(
|
|||
NEW,
|
||||
ACTIVE,
|
||||
BLOCKED,
|
||||
FORMER,
|
||||
IN_PROGRESS,
|
||||
UNDEFINED,
|
||||
;
|
||||
|
||||
companion object {
|
||||
fun fromString(value: String) = when (value.uppercase()) {
|
||||
fun fromString(value: String) = when (value.uppercase(Locale.US)) {
|
||||
"NEW" -> NEW
|
||||
"ACTIVE" -> ACTIVE
|
||||
"BLOCKED" -> BLOCKED
|
||||
"FORMER" -> FORMER
|
||||
"IN_PROGRESS" -> IN_PROGRESS
|
||||
else -> UNDEFINED
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue