From 341a3c46de62d4869e59d37fcdbe6d215013eb32 Mon Sep 17 00:00:00 2001 From: Gitanjli <96485413+gitanjli525@users.noreply.github.com> Date: Thu, 14 Nov 2024 16:55:30 +0530 Subject: [PATCH] fix: metric value change (#1740) Co-authored-by: Jeeva Ramachandran <120017870+JeevaRamu0104@users.noreply.github.com> --- .../PaymentsAnalytics/PaymentAnalytics.res | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/screens/Analytics/PaymentsAnalytics/PaymentAnalytics.res b/src/screens/Analytics/PaymentsAnalytics/PaymentAnalytics.res index d1f335767..7e633c1ea 100644 --- a/src/screens/Analytics/PaymentsAnalytics/PaymentAnalytics.res +++ b/src/screens/Analytics/PaymentsAnalytics/PaymentAnalytics.res @@ -24,7 +24,18 @@ let make = () => { try { let infoUrl = getURL(~entityName=ANALYTICS_PAYMENTS, ~methodType=Get, ~id=Some(domain)) let infoDetails = await fetchDetails(infoUrl) - setMetrics(_ => infoDetails->getDictFromJsonObject->getArrayFromDict("metrics", [])) + // Need to be removed + let ignoreSessionizedPayment = + infoDetails + ->getDictFromJsonObject + ->getArrayFromDict("metrics", []) + ->Array.filter(ele => { + let metricName = ele->getDictFromJsonObject->getString("name", "") + !String.includes(metricName, "sessionized") && + metricName != "failure_reasons" && + metricName != "payments_distribution" + }) + setMetrics(_ => ignoreSessionizedPayment) setDimensions(_ => infoDetails->getDictFromJsonObject->getArrayFromDict("dimensions", [])) setScreenState(_ => PageLoaderWrapper.Success) } catch {