Updated on 2026-08-14

This commit is contained in:
Tangem 2026-02-20 21:03:08 +05:00
parent a41dd9aace
commit 41fb5d5bcc
55 changed files with 709 additions and 173 deletions

View file

@ -0,0 +1,33 @@
package com.tangem.domain.models.kyc
private const val APPROVED_KYC_STATUS = "approved"
private const val IN_PROGRESS_KYC_STATUS = "in_progress"
private const val DECLINED_KYC_STATUS = "declined"
enum class KycStatus {
/** Initial state */
INIT,
/** Performing the check */
PENDING,
/** SumSub approved */
APPROVED,
/** The check failed, documents rejected */
REJECTED,
;
companion object {
fun fromString(status: String?, default: KycStatus = INIT): KycStatus {
return when (status?.lowercase()) {
IN_PROGRESS_KYC_STATUS -> PENDING
DECLINED_KYC_STATUS -> REJECTED
APPROVED_KYC_STATUS -> APPROVED
else -> default
}
}
}
}