NTP-62674 | Used safe launch for mm config and order history sync (#16356)

This commit is contained in:
Sanjay P
2025-05-27 21:01:24 +05:30
committed by GitHub
parent 961df376bc
commit 599ea3613d
2 changed files with 4 additions and 4 deletions

View File

@@ -208,7 +208,7 @@ constructor(
}
private fun checkAndShowMMDiscoverabilityEntryPoint() {
viewModelScope.launch(Dispatchers.IO) {
viewModelScope.safeLaunch(Dispatchers.IO) {
val accountType = AccountType.getAccountType(linkedAccountEntity.accountType)
val experimentEnabled = isMMDiscoverabilityExperimentEnabled()
@@ -229,7 +229,7 @@ constructor(
mmDiscoverabilityEventTracker.onMMDiscoverabilityEntryPointNotEligible(
"bank_not_eligible"
)
return@launch
return@safeLaunch
}
mmDiscoverabilityEventTracker.onMMDiscoverabilityEntryPointEligible()
_showMMDiscoverabilityEntryPoint.value = true
@@ -238,7 +238,7 @@ constructor(
if (accountType != AccountType.SAVINGS) "non_savings_account"
else "experiment_disabled"
mmDiscoverabilityEventTracker.onMMDiscoverabilityEntryPointNotEligible(reason)
return@launch
return@safeLaunch
}
}
}

View File

@@ -501,7 +501,7 @@ constructor(
}
private fun initUpiSpendAnalyser() {
GlobalScope.launch(Dispatchers.IO) {
GlobalScope.safeLaunch(Dispatchers.IO) {
if (FirebaseRemoteConfigHelper.getBoolean(UPI_SPEND_ANALYSER_ENABLED)) {
val litmusExpVariant = upiSpendAnalysisWidgetHelper.getEntryPointExpVariant()
_upiSpendAnalysisWidgetVariant.update { litmusExpVariant }