Updated on 2026-08-14

This commit is contained in:
Tangem 2026-04-02 01:30:04 -07:00
parent dcda504df6
commit a3b65cd194
3 changed files with 25 additions and 37 deletions

View file

@ -148,7 +148,23 @@ internal class DefaultPaymentAccountStatusFetcher @Inject constructor(
-> PaymentAccountStatusValue.IssuingCard(source = StatusSource.ACTUAL)
OrderStatus.CANCELED -> {
PaymentAccountStatusValue.Error.CardIssueFailed(customerId = orderData.customerId)
onboardingRepository.getCustomerInfo(userWalletId = account.userWalletId)
.fold(
ifLeft = {
PaymentAccountStatusValue.Error.CardIssueFailed(
customerId = orderData.customerId,
)
},
ifRight = { customerInfo ->
if (customerInfo.kycStatus == KycStatus.REJECTED) {
customerInfo.mapToPaymentAccountStatus()
} else {
PaymentAccountStatusValue.Error.CardIssueFailed(
customerId = orderData.customerId,
)
}
},
)
}
OrderStatus.COMPLETED -> {
// Order was completed -> clear order id and get customer info