NTP-71199 | add config to default list (#16505)
This commit is contained in:
@@ -1495,6 +1495,9 @@ constructor(
|
||||
selectedBankAccount: LinkedAccountEntity
|
||||
) {
|
||||
viewModelScope.launch(Dispatchers.IO) {
|
||||
if (!isEmiConversionEnabled) {
|
||||
return@launch
|
||||
}
|
||||
val bankUiModel =
|
||||
bankRepository.getBankUiModelFromBankCode(selectedBankAccount.bankCode)
|
||||
val thresholdAmount = getThresholdAmountForSelectedBank(selectedBankAccount.bankCode)
|
||||
@@ -1504,8 +1507,7 @@ constructor(
|
||||
AccountType.isAccountOfTypeCreditCard(type = selectedBankAccount.accountType) &&
|
||||
transactionType != UpiTransactionType.INTENT_PAY &&
|
||||
source !is SendMoneyScreenSource.CollectRequest &&
|
||||
thresholdAmount.isNotNull() &&
|
||||
isEmiConversionEnabled
|
||||
thresholdAmount.isNotNull()
|
||||
) {
|
||||
updateEmiConversionSupportedStatus(status = true)
|
||||
updateThresholdEmiAmount(thresholdAmount = thresholdAmount.orEmpty())
|
||||
@@ -4897,6 +4899,9 @@ constructor(
|
||||
|
||||
private fun updateThresholdEmiAmountConfig() {
|
||||
viewModelScope.launch(coroutineDispatcherProvider.io) {
|
||||
if (!isEmiConversionEnabled) {
|
||||
return@launch
|
||||
}
|
||||
val naviPayDefaultAccountSelectionConfig =
|
||||
naviPayConfigUseCase.execute<ThresholdEmiAmountConfig>(
|
||||
configKey = THRESHOLD_EMI_AMOUNT_CONFIG,
|
||||
|
||||
@@ -30,6 +30,7 @@ import com.navi.common.R as CommonR
|
||||
import com.navi.common.di.CoroutineDispatcherProvider
|
||||
import com.navi.common.downloader.DownloadUtil
|
||||
import com.navi.common.firebaseremoteconfig.FirebaseRemoteConfigHelper
|
||||
import com.navi.common.firebaseremoteconfig.FirebaseRemoteConfigHelper.NAVI_PAY_EMI_CONVERSION_ENABLED
|
||||
import com.navi.common.model.NotificationSettings
|
||||
import com.navi.common.model.SettingsMedium
|
||||
import com.navi.common.network.models.RepoResult
|
||||
@@ -429,6 +430,9 @@ constructor(
|
||||
private val _fetchEmiPlansProgress = MutableStateFlow(0f)
|
||||
val fetchEmiPlansProgress = _fetchEmiPlansProgress.asStateFlow()
|
||||
|
||||
val isEmiConversionEnabled =
|
||||
FirebaseRemoteConfigHelper.getBoolean(NAVI_PAY_EMI_CONVERSION_ENABLED)
|
||||
|
||||
init {
|
||||
initializeTxnLedgerAvailability()
|
||||
viewModelScope.launch(dispatcherProvider.io) {
|
||||
@@ -465,6 +469,9 @@ constructor(
|
||||
}
|
||||
|
||||
private suspend fun checkIfTransactionEligibleForEmi() {
|
||||
if (!isEmiConversionEnabled) {
|
||||
return
|
||||
}
|
||||
if (
|
||||
(isEmiEligibleDuringTransaction() || isEmiEligiblePostTransaction()) &&
|
||||
isTransactionSuccessful()
|
||||
@@ -489,6 +496,9 @@ constructor(
|
||||
}
|
||||
|
||||
private suspend fun updateThresholdEmiAmountConfig() {
|
||||
if (!isEmiConversionEnabled) {
|
||||
return
|
||||
}
|
||||
val naviPayThresholdEmiAmountConfig =
|
||||
naviPayConfigUseCase.execute<ThresholdEmiAmountConfig>(
|
||||
configKey = THRESHOLD_EMI_AMOUNT_CONFIG,
|
||||
|
||||
@@ -599,6 +599,7 @@ val NAVI_PAY_CONFIG_LIST =
|
||||
CHECK_BALANCE_TRANSACTION_ENTRY_POINT_CONFIG,
|
||||
UPI_PSP_SELECTION_CONFIG,
|
||||
THRESHOLD_EMI_AMOUNT_CONFIG,
|
||||
FUNNEL_DROPOFF_CONFIG,
|
||||
)
|
||||
|
||||
enum class NaviPayExperimentVariantType(val value: String) {
|
||||
|
||||
@@ -1159,7 +1159,7 @@
|
||||
<string name="np_active_mandate_deregister_failed">De-registration failed as autopay mandate(s) are active</string>
|
||||
<string name="np_active_mandate_deregister_failed_description">Mandate(s) are currently active. Please delete all mandates and try de-registering again.</string>
|
||||
<string name="np_active_mandate_and_lite_deregister_failed">De-registration failed as autopay mandate(s) and UPI Lite are active</string>
|
||||
<string name="np_active_mandate_and_lite_deregister_failed_description">Mandate(s) and UPI Lite are currently active. Please disable UPI Lite, delete all mandates and try de-registering again.</string>
|
||||
<string name="np_active_mandate_and_lite_deregister_failed_description">Mandate(s) and UPI Lite are currently active. Please disable UPI Lite and delete all mandates and try de-registering again.</string>
|
||||
<string name="np_retry_with_correct_upi_pin">Retry with correct UPI PIN</string>
|
||||
<string name="np_forgot_reset_upi_pin">Forgot? Reset UPI PIN</string>
|
||||
</resources>
|
||||
Reference in New Issue
Block a user