NTP-66958 | add logs for coin_history_crash (#16500)
This commit is contained in:
committed by
GitHub
parent
0656381b52
commit
0aef6dc6a5
@@ -86,6 +86,7 @@ import com.navi.common.forge.model.WidgetModelDefinition
|
||||
import com.navi.common.navigation.NavArgs
|
||||
import com.navi.common.uitron.model.action.CtaAction
|
||||
import com.navi.common.utils.getScreenHeight
|
||||
import com.navi.common.utils.getStringSafely
|
||||
import com.navi.design.font.naviFontFamily
|
||||
import com.navi.design.utils.dpToPx
|
||||
import com.navi.rr.common.actions.InitActionHandler
|
||||
@@ -126,12 +127,12 @@ fun CoinHistoryScreen(
|
||||
}
|
||||
|
||||
var userData by remember {
|
||||
val userData = bundle.getStringSafely(USER_DATA)
|
||||
mutableStateOf(
|
||||
if (bundle?.getString(USER_DATA).isNullOrEmpty()) {
|
||||
if (userData == null) {
|
||||
null
|
||||
} else {
|
||||
getGsonBuilders()
|
||||
.fromJson(bundle?.getString(USER_DATA), ReferralContactList::class.java)
|
||||
getGsonBuilders().fromJson(userData, ReferralContactList::class.java)
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
@@ -361,6 +361,8 @@ object Constants {
|
||||
|
||||
const val PAGE_LAUNCH_SOURCE = "page_launch_source"
|
||||
const val NAVI_PAY_SECTION_GLANCE_WIDGET_SCREEN = "NAVI_PAY_SECTION_GLANCE_WIDGET_SCREEN"
|
||||
const val BUNDLE = "BUNDLE"
|
||||
const val DEV_BUNDLE_PARCEL_EXCEPTION = "DEV_BUNDLE_PARCEL_EXCEPTION"
|
||||
|
||||
// Generic Error Messages
|
||||
const val INTERNAL_SERVER_ERROR = "Internal Server Error"
|
||||
|
||||
@@ -79,7 +79,9 @@ import com.navi.common.firebaseremoteconfig.FirebaseRemoteConfigHelper
|
||||
import com.navi.common.listeners.ClickableTextListener
|
||||
import com.navi.common.network.models.RepoResult
|
||||
import com.navi.common.network.retrofit.RetrofitService
|
||||
import com.navi.common.utils.Constants.BUNDLE
|
||||
import com.navi.common.utils.Constants.DEFAULT_ON_CLICK_DEBOUNCE_TIME
|
||||
import com.navi.common.utils.Constants.DEV_BUNDLE_PARCEL_EXCEPTION
|
||||
import com.navi.common.utils.Constants.NULL_STRING
|
||||
import com.navi.common.utils.Constants.NULL_STRING_CAPS
|
||||
import com.navi.design.font.FontWeightEnum
|
||||
@@ -816,3 +818,18 @@ fun Activity.checkAndRedirectToHomeIfInactivityLimitCrossed(
|
||||
finish = true,
|
||||
)
|
||||
}
|
||||
|
||||
fun Bundle?.getStringSafely(key: String): String? {
|
||||
if (this == null) return null
|
||||
|
||||
return try {
|
||||
val value = getString(key)
|
||||
if (value.isNullOrEmpty()) null else value
|
||||
} catch (e: Exception) {
|
||||
NaviTrackEvent.trackEvent(
|
||||
DEV_BUNDLE_PARCEL_EXCEPTION,
|
||||
eventValues = mutableMapOf(BUNDLE to this.toString()),
|
||||
)
|
||||
null
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user