NTP-38969 | first eligible account crash fix (#14986)
This commit is contained in:
@@ -451,15 +451,14 @@ constructor(
|
||||
)
|
||||
)
|
||||
if (lastFailedMandateExecutionTimeStamp == null) {
|
||||
return
|
||||
naviCacheRepository.save(
|
||||
naviCacheEntity =
|
||||
NaviCacheEntity(
|
||||
key = KEY_UPI_LITE_LAST_MANDATE_EXECUTION_TIMESTAMP,
|
||||
value = System.currentTimeMillis().toString(),
|
||||
version = 1,
|
||||
)
|
||||
)
|
||||
}
|
||||
naviCacheRepository.save(
|
||||
naviCacheEntity =
|
||||
NaviCacheEntity(
|
||||
key = KEY_UPI_LITE_LAST_MANDATE_EXECUTION_TIMESTAMP,
|
||||
value = System.currentTimeMillis().toString(),
|
||||
version = 1,
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1477,14 +1477,14 @@ constructor(
|
||||
|
||||
// Return first eligible account
|
||||
// If not found then pick the first from the list
|
||||
private fun findFirstEligibleAccount(): LinkedAccountEntity {
|
||||
private fun findFirstEligibleAccount(): LinkedAccountEntity? {
|
||||
|
||||
val linkedAccounts =
|
||||
(bankAccountsState.value as? BankAccountsState.AccountList)?.accounts ?: emptyList()
|
||||
|
||||
return linkedAccounts.firstOrNull { it.eligibilityState.isAccountEligible }
|
||||
?: selectedBankAccount.value
|
||||
?: linkedAccounts.first()
|
||||
?: linkedAccounts.firstOrNull()
|
||||
}
|
||||
|
||||
private fun checkIsInternetAvailableOrShowError(
|
||||
|
||||
Reference in New Issue
Block a user