From 1fc3a4f64f9a8e8ecb9ad9bfd532f561d773404e Mon Sep 17 00:00:00 2001 From: Vladimir Voronkov Date: Wed, 15 Nov 2023 13:15:33 +0200 Subject: [PATCH] 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