NTP-69905 | Send money empty cred block analytics event addition (#16425)

This commit is contained in:
Aditya Narayan Malik
2025-06-03 17:58:48 +05:30
committed by GitHub
parent 206bd534bc
commit 68e263fc03
3 changed files with 12 additions and 1 deletions

View File

@@ -7,6 +7,7 @@
package com.navi.pay.analytics
import android.os.Bundle
import androidx.camera.view.PreviewView
import com.google.firebase.firestore.DocumentSnapshot
import com.navi.analytics.utils.NaviTrackEvent
@@ -5520,6 +5521,13 @@ class NaviPayAnalytics private constructor() {
),
)
}
fun onCredParserError(resultData: Bundle?) {
NaviTrackEvent.trackEventOnClickStream(
"NaviPay_Dev_NpciCl_OnCredParserError",
mapOf("resultData" to resultData.toString()),
)
}
}
inner class SavedBeneficiaryScreen {

View File

@@ -45,7 +45,7 @@ class CredParser(private val credTypes: List<String>) {
}
} else {
val juspayCredBlock = toJuspayCredBlockJson(resultData)
if (juspayCredBlock.isBlank()) {
if (juspayCredBlock.isBlank() || juspayCredBlock == "{}") {
NpciResult.Error(getRepoResultObjectFromErrorMessage(genericErrorMessage))
} else {
NpciResult.Success(juspayCredBlock)

View File

@@ -416,6 +416,9 @@ constructor(
}
else -> {
val result = credParser.parseResult(resultData)
if (result is NpciResult.Error) {
naviPayAnalytics.onCredParserError(resultData)
}
onResult(result)
}
}