Skip to content

Commit aab8f60

Browse files
harsh-sharma-juspaygithub-actions[bot]ivor11
authored
fix(analytics): added hs latency to api event for paymentconfirm call (#2787)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: ivor-juspay <[email protected]>
1 parent e93f76b commit aab8f60

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

crates/router/src/core/payments/transformers.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ pub fn payments_to_payments_response<R, Op, F: Clone>(
346346
connector_request_reference_id_config: &ConnectorRequestReferenceIdConfig,
347347
connector_http_status_code: Option<u16>,
348348
external_latency: Option<u128>,
349-
is_latency_header_enabled: Option<bool>,
349+
_is_latency_header_enabled: Option<bool>,
350350
) -> RouterResponse<api::PaymentsResponse>
351351
where
352352
Op: Debug,
@@ -451,13 +451,13 @@ where
451451
payment_confirm_source.to_string(),
452452
))
453453
}
454-
if Some(true) == is_latency_header_enabled {
455-
headers.extend(
456-
external_latency
457-
.map(|latency| vec![(X_HS_LATENCY.to_string(), latency.to_string())])
458-
.unwrap_or_default(),
459-
);
460-
}
454+
455+
headers.extend(
456+
external_latency
457+
.map(|latency| vec![(X_HS_LATENCY.to_string(), latency.to_string())])
458+
.unwrap_or_default(),
459+
);
460+
461461
let output = Ok(match payment_request {
462462
Some(_request) => {
463463
if payments::is_start_pay(&operation)

0 commit comments

Comments
 (0)