From 1fc3a4f64f9a8e8ecb9ad9bfd532f561d773404e Mon Sep 17 00:00:00 2001 From: Vladimir Voronkov Date: Wed, 15 Nov 2023 13:15:33 +0200 Subject: [PATCH 1/3] Fix double requests while syncing candles --- .../prepare-response/helpers/is-not-contained-same-mts.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workers/loc.api/helpers/prepare-response/helpers/is-not-contained-same-mts.js b/workers/loc.api/helpers/prepare-response/helpers/is-not-contained-same-mts.js index 2dda2bbd..9eb830a5 100644 --- a/workers/loc.api/helpers/prepare-response/helpers/is-not-contained-same-mts.js +++ b/workers/loc.api/helpers/prepare-response/helpers/is-not-contained-same-mts.js @@ -27,7 +27,7 @@ module.exports = (args, opts) => { ) return ( - apiRes.length === 0 || + apiRes.length <= 1 || // Check makes sense to prevent double requests to api methodLimit > limit || apiRes.some((item) => ( item?.[datePropName] !== mts From 5999ed3f7f12924996a71cf920d17a2788b8af3a Mon Sep 17 00:00:00 2001 From: Vladimir Voronkov Date: Fri, 17 Nov 2023 14:25:33 +0200 Subject: [PATCH 2/3] Fix getting data from api with undefined args --- workers/loc.api/helpers/get-data-from-api.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workers/loc.api/helpers/get-data-from-api.js b/workers/loc.api/helpers/get-data-from-api.js index d7502e79..108a310f 100644 --- a/workers/loc.api/helpers/get-data-from-api.js +++ b/workers/loc.api/helpers/get-data-from-api.js @@ -77,7 +77,7 @@ module.exports = ( } try { - const _args = cloneDeep(args) + const _args = cloneDeep(args) ?? {} /* * API request should not be logged to std error stream From c2d0a2da6ac941685f65ab11b7395ea8d33170c1 Mon Sep 17 00:00:00 2001 From: Vladimir Voronkov Date: Tue, 28 Nov 2023 14:00:10 +0200 Subject: [PATCH 3/3] Bump version up to 4.8.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 88cf1c12..50a3cb23 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bfx-report", - "version": "4.8.1", + "version": "4.8.2", "description": "Reporting tool", "main": "worker.js", "license": "Apache-2.0",