From 46596f1e86037bcfdc5851077522df8dcc4cf772 Mon Sep 17 00:00:00 2001 From: Vladimir Voronkov Date: Tue, 26 May 2026 12:43:42 +0300 Subject: [PATCH 1/6] Add ability to log metadata for CurrencyConversionDataFindingError --- workers/loc.api/errors/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/workers/loc.api/errors/index.js b/workers/loc.api/errors/index.js index 07abb655..0a42b738 100644 --- a/workers/loc.api/errors/index.js +++ b/workers/loc.api/errors/index.js @@ -71,8 +71,8 @@ class ObjectMappingError extends BaseError { } class CurrencyConversionDataFindingError extends BaseError { - constructor (message = 'ERR_DATA_IS_NOT_FOUND_TO_CONVERT_CURRENCY') { - super(message) + constructor (data, message = 'ERR_DATA_IS_NOT_FOUND_TO_CONVERT_CURRENCY') { + super({ data, message }) } } From 069fcb12c2eaed4a94b0915253bc0c4a0052c55d Mon Sep 17 00:00:00 2001 From: Vladimir Voronkov Date: Tue, 26 May 2026 12:44:47 +0300 Subject: [PATCH 2/6] Log symbol and mts for CurrencyConversionDataFindingError --- workers/loc.api/sync/currency.converter/index.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/workers/loc.api/sync/currency.converter/index.js b/workers/loc.api/sync/currency.converter/index.js index 0ae43616..424cf139 100644 --- a/workers/loc.api/sync/currency.converter/index.js +++ b/workers/loc.api/sync/currency.converter/index.js @@ -1031,7 +1031,9 @@ class CurrencyConverter { ) if (!Number.isFinite(price)) { - throw new CurrencyConversionDataFindingError() + throw new CurrencyConversionDataFindingError( + { symbol: reqSymb, mts } + ) } return price @@ -1082,7 +1084,9 @@ class CurrencyConverter { ) } - throw new CurrencyConversionDataFindingError() + throw new CurrencyConversionDataFindingError( + { symbol: reqSymb, mts: end } + ) } async convertManyByCandles (data, convSchema) { From 43cce7047ff63e988f649d0b4a10e776757da5ec Mon Sep 17 00:00:00 2001 From: Vladimir Voronkov Date: Tue, 26 May 2026 13:07:59 +0300 Subject: [PATCH 3/6] Enhance getting ccy pair for currency conversion --- workers/loc.api/sync/currency.converter/index.js | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/workers/loc.api/sync/currency.converter/index.js b/workers/loc.api/sync/currency.converter/index.js index 424cf139..3c671e1f 100644 --- a/workers/loc.api/sync/currency.converter/index.js +++ b/workers/loc.api/sync/currency.converter/index.js @@ -348,17 +348,25 @@ class CurrencyConverter { if (typeof symbol !== 'string') { return '' } - if (symbol.length < 8) { + if (symbol.length < 6) { return symbol } + + const hasFlag = ( + symbol.startsWith('t') || + symbol.startsWith('f') + ) + const flag = hasFlag + ? symbol[0] + : 't' + if ( - symbol[0] !== 't' && - symbol[0] !== 'f' + symbol.length === 7 && + hasFlag ) { return symbol } - const flag = symbol[0] const [firstSymb, lastSymb] = splitSymbolPairs(symbol) const _firstSymb = this._getConvertingSymb(firstSymb) const _lastSymb = this._getConvertingSymb(lastSymb) From bf819bd9c35d28fb64b48a696ecfce6a07191927 Mon Sep 17 00:00:00 2001 From: Vladimir Voronkov Date: Fri, 5 Jun 2026 12:15:13 +0300 Subject: [PATCH 4/6] Bump version up to 5.2.1 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 49a55c05..60587a2f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@bitfinex/bfx-reports-framework", - "version": "5.2.0", + "version": "5.2.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@bitfinex/bfx-reports-framework", - "version": "5.2.0", + "version": "5.2.1", "license": "Apache-2.0", "dependencies": { "@bitfinex/bfx-facs-db-better-sqlite": "git+https://github.com/bitfinexcom/bfx-facs-db-better-sqlite.git", diff --git a/package.json b/package.json index 97d0bbe0..934a4406 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@bitfinex/bfx-reports-framework", - "version": "5.2.0", + "version": "5.2.1", "description": "Bitfinex reports framework", "main": "worker.js", "engines": { From 44426fac21ae30324ea8545a959260884377dffb Mon Sep 17 00:00:00 2001 From: Vladimir Voronkov Date: Fri, 5 Jun 2026 12:34:56 +0300 Subject: [PATCH 5/6] Update bfx-report-ui sub-module --- bfx-report-ui | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bfx-report-ui b/bfx-report-ui index 5525aea9..8dfdab80 160000 --- a/bfx-report-ui +++ b/bfx-report-ui @@ -1 +1 @@ -Subproject commit 5525aea9c9e349cf14bf7ce4e1aeab8296de80b8 +Subproject commit 8dfdab804b0b78740ec304d60820a2d6c69bd3b8 From c46119ca130e73cedfa92047f7d83c8fd7996178 Mon Sep 17 00:00:00 2001 From: Vladimir Voronkov Date: Fri, 5 Jun 2026 13:29:42 +0300 Subject: [PATCH 6/6] Update @bitfinex/bfx-report dep --- package-lock.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 60587a2f..aae41fc2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -234,8 +234,8 @@ } }, "node_modules/@bitfinex/bfx-report": { - "version": "5.2.0", - "resolved": "git+ssh://git@github.com/bitfinexcom/bfx-report.git#77b84149109290ce8b076d5eac145fe4b0039173", + "version": "5.2.1", + "resolved": "git+ssh://git@github.com/bitfinexcom/bfx-report.git#c07b646d9493660c18a554448f2831cb4718d5bf", "license": "Apache-2.0", "dependencies": { "@bitfinex/bfx-facs-deflate": "git+https://github.com/bitfinexcom/bfx-facs-deflate.git",