TP-77625 | Mehul | bbps litmus call removed (#13007)
This commit is contained in:
@@ -78,13 +78,6 @@ class NaviBbpsAnalytics private constructor() {
|
||||
)
|
||||
}
|
||||
|
||||
fun logABExperimentFailure(source: String, error: String) {
|
||||
NaviTrackEvent.trackEventOnClickStream(
|
||||
eventName = "NaviBBPS_CategoryPage_FetchABExperimentFailed",
|
||||
eventValues = mapOf(NAVI_BBPS_SOURCE to source, "error" to error)
|
||||
)
|
||||
}
|
||||
|
||||
fun onCategorySelected(
|
||||
source: String,
|
||||
categoryGroupId: String,
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
|
||||
package com.navi.bbps.feature.category
|
||||
|
||||
import com.navi.bbps.common.NAVI_BBPS_LITMUS
|
||||
import com.navi.bbps.common.NaviBbpsScreen
|
||||
import com.navi.bbps.feature.category.model.network.BillCategoriesResponse
|
||||
import com.navi.bbps.feature.category.model.network.RewardDetailsResponse
|
||||
@@ -39,7 +38,4 @@ constructor(private val naviBbpsRetrofitService: NaviBbpsRetrofitService) : Resp
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
suspend fun fetchLitmusABExperiment(experimentName: String) =
|
||||
naviBbpsRetrofitService.fetchABExperiment(name = experimentName, header = NAVI_BBPS_LITMUS)
|
||||
}
|
||||
|
||||
@@ -1017,23 +1017,17 @@ constructor(
|
||||
_rewardsDetailsEntity.update { rewardDataEntity }
|
||||
}
|
||||
|
||||
private fun fetchBillCategoriesABExperiment() {
|
||||
private suspend fun fetchBillCategoriesABExperiment() {
|
||||
viewModelScope.launch(dispatcherProvider.io) {
|
||||
val response =
|
||||
billCategoriesRepository.fetchLitmusABExperiment(
|
||||
AB_NEW_LANDING_PAGE_ENABLED_EXPERIMENT_NAME
|
||||
val newBillCategoryExperiment =
|
||||
getABTestingExperimentUseCase.execute(
|
||||
experimentName = AB_NEW_LANDING_PAGE_ENABLED_EXPERIMENT_NAME
|
||||
)
|
||||
if (response.isSuccessful) {
|
||||
PreferenceManager.setBooleanPreference(
|
||||
AB_NEW_LANDING_PAGE_ENABLED_EXPERIMENT_NAME,
|
||||
response.body()?.result.orFalse()
|
||||
)
|
||||
} else {
|
||||
naviBbpsAnalytics.logABExperimentFailure(
|
||||
source = source,
|
||||
error = response.errorBody()?.string().orEmpty()
|
||||
)
|
||||
}
|
||||
|
||||
PreferenceManager.setBooleanPreference(
|
||||
AB_NEW_LANDING_PAGE_ENABLED_EXPERIMENT_NAME,
|
||||
newBillCategoryExperiment?.isEnabled.orFalse()
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user