diff --git a/react/utils/metrics/useQuote.ts b/react/utils/metrics/useQuote.ts index de94ca4..9b89e85 100644 --- a/react/utils/metrics/useQuote.ts +++ b/react/utils/metrics/useQuote.ts @@ -24,9 +24,9 @@ export type UseQuoteMetricsParams = { sessionResponse: SessionResponse } -const buildUseQuoteMetric = async ( +const buildUseQuoteMetric = ( metricsParam: UseQuoteMetricsParams -): Promise => { +): UseQuoteMetric => { const { quoteState, orderFormId, account, sessionResponse } = metricsParam const metric: UseQuoteMetric = { @@ -56,9 +56,9 @@ export const sendUseQuoteMetric = async ( metricsParam: UseQuoteMetricsParams ) => { try { - const metric = await buildUseQuoteMetric(metricsParam) + const metric = buildUseQuoteMetric(metricsParam) - sendMetric(metric) + await sendMetric(metric) } catch (error) { console.warn('Unable to log metrics', error) }