NTP-13980 | ui state fix for lite and try-catch for isUpiLiteSupported (#13706)

This commit is contained in:
Shaurya Rehan
2024-11-20 18:41:15 +05:30
committed by GitHub
parent cae3af8531
commit 3826d21533
2 changed files with 6 additions and 2 deletions

View File

@@ -3070,6 +3070,7 @@ constructor(
when (npciResult) {
is NpciResult.Success -> {
updateUiState(uiState = UpiLiteUiState.UPILITE_TOPUP_IN_PROGRESS)
loadMoneyToLiteAccount(
upiRequestId = upiRequestId,
credBlock = npciResult.data,
@@ -3079,7 +3080,6 @@ constructor(
amount = formattedAmount,
lrn = lrn
)
updateUiState(uiState = UpiLiteUiState.UPILITE_TOPUP_IN_PROGRESS)
}
is NpciResult.Error -> {
handleNpciError(npciError = npciResult)

View File

@@ -431,7 +431,11 @@ constructor(
or not.
*/
suspend fun isUpiLiteSupported(): Boolean {
return npciClService.instance().isUpiLiteSupported
return try {
npciClService.instance().isUpiLiteSupported
} catch (e: Exception) {
true
}
}
/*