Skip to content

Commit

Permalink
fix: metric value change (#1740)
Browse files Browse the repository at this point in the history
Co-authored-by: Jeeva Ramachandran <[email protected]>
  • Loading branch information
gitanjli525 and JeevaRamu0104 authored Nov 14, 2024
1 parent 83ebd26 commit 341a3c4
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/screens/Analytics/PaymentsAnalytics/PaymentAnalytics.res
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 341a3c4

Please sign in to comment.