From a28548259aeb39af8311de3701893404850810c7 Mon Sep 17 00:00:00 2001 From: Azizjon Nurov Date: Tue, 24 Dec 2024 18:33:56 +0500 Subject: [PATCH] Extract `value` from Promise array --- lib/utils/invoiceExport/getInvoiceExportData.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/utils/invoiceExport/getInvoiceExportData.js b/lib/utils/invoiceExport/getInvoiceExportData.js index bbeeff3f..48579921 100644 --- a/lib/utils/invoiceExport/getInvoiceExportData.js +++ b/lib/utils/invoiceExport/getInvoiceExportData.js @@ -84,7 +84,9 @@ export const getInvoiceExportData = async ({ ky, intl, query, currency: to }) => const allExchangeRates = await Promise.allSettled( currencies.map(from => ky.get(EXCHANGE_RATE_API, { searchParams: { from, to } }).json()), ); - const exchangeRates = allExchangeRates.filter(({ status }) => status === 'fulfilled'); + const exchangeRates = allExchangeRates + .filter(({ status }) => status === 'fulfilled') + .map(({ value }) => value); return (createInvoiceExportReport({ acqUnitMap: keyBy(acqUnits, 'id'),