NTP-69905 | Send money empty cred block analytics event addition (#16425)
This commit is contained in:
committed by
GitHub
parent
206bd534bc
commit
68e263fc03
@@ -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 {
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -416,6 +416,9 @@ constructor(
|
||||
}
|
||||
else -> {
|
||||
val result = credParser.parseResult(resultData)
|
||||
if (result is NpciResult.Error) {
|
||||
naviPayAnalytics.onCredParserError(resultData)
|
||||
}
|
||||
onResult(result)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user