Skip to content

Commit 574240c

Browse files
authored
Merge pull request #481 from bitfinexcom/staging
Release version to master
2 parents bb8f46b + 300e643 commit 574240c

18 files changed

Lines changed: 98 additions & 241 deletions

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
save-exact=true
2+
foreground-scripts=true

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "bfx-reports-framework",
3-
"version": "4.22.5",
3+
"version": "4.23.0",
44
"description": "Bitfinex reports framework",
55
"main": "worker.js",
66
"license": "Apache-2.0",

test/test-cases/api-sync-mode-sqlite-test-cases.js

Lines changed: 0 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -1452,52 +1452,6 @@ module.exports = (
14521452
])
14531453
})
14541454

1455-
it('it should be successfully performed by the getPayInvoiceList method', async function () {
1456-
this.timeout(5000)
1457-
1458-
const res = await agent
1459-
.post(`${basePath}/json-rpc`)
1460-
.type('json')
1461-
.send({
1462-
auth,
1463-
method: 'getPayInvoiceList',
1464-
params: {
1465-
start: 0,
1466-
end,
1467-
limit: 2
1468-
},
1469-
id: 5
1470-
})
1471-
.expect('Content-Type', /json/)
1472-
.expect(200)
1473-
1474-
assert.isObject(res.body)
1475-
assert.propertyVal(res.body, 'id', 5)
1476-
assert.isObject(res.body.result)
1477-
assert.isArray(res.body.result.res)
1478-
assert.isNumber(res.body.result.nextPage)
1479-
1480-
const resItem = res.body.result.res[0]
1481-
1482-
assert.isObject(resItem)
1483-
assert.containsAllKeys(resItem, [
1484-
'id',
1485-
't',
1486-
'duration',
1487-
'amount',
1488-
'currency',
1489-
'orderId',
1490-
'payCurrencies',
1491-
'webhook',
1492-
'redirectUrl',
1493-
'status',
1494-
'customerInfo',
1495-
'invoices',
1496-
'payment',
1497-
'merchantName'
1498-
])
1499-
})
1500-
15011455
it('it should be successfully performed by the getTrades method', async function () {
15021456
this.timeout(5000)
15031457

@@ -2767,34 +2721,6 @@ module.exports = (
27672721
await testMethodOfGettingReportFile(procPromise, aggrPromise, res)
27682722
})
27692723

2770-
it('it should be successfully performed by the getPayInvoiceListFile method', async function () {
2771-
this.timeout(60000)
2772-
2773-
const procPromise = queueToPromise(params.processorQueue)
2774-
const aggrPromise = queueToPromise(params.aggregatorQueue)
2775-
2776-
const res = await agent
2777-
.post(`${basePath}/json-rpc`)
2778-
.type('json')
2779-
.send({
2780-
auth,
2781-
method: 'getPayInvoiceListFile',
2782-
params: {
2783-
isPDFRequired,
2784-
end,
2785-
start,
2786-
limit: 100,
2787-
timezone: -3,
2788-
email
2789-
},
2790-
id: 5
2791-
})
2792-
.expect('Content-Type', /json/)
2793-
.expect(200)
2794-
2795-
await testMethodOfGettingReportFile(procPromise, aggrPromise, res)
2796-
})
2797-
27982724
it('it should be successfully performed by the getTradesFile method', async function () {
27992725
this.timeout(60000)
28002726

workers/loc.api/bfx.api.router/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ class BfxApiRouter extends BaseBfxApiRouter {
4141
['positionsAudit', 90],
4242
['wallets', 90],
4343
['ledgers', 90],
44-
['payInvoiceList', 90],
4544
['accountTrades', 90],
4645
['fundingTrades', 90],
4746
['trades', 10],

workers/loc.api/service.report.framework.js

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -718,28 +718,6 @@ class FrameworkReportService extends ReportService {
718718
}, 'getLedgers', args, cb)
719719
}
720720

721-
/**
722-
* @override
723-
*/
724-
getPayInvoiceList (space, args, cb) {
725-
return this._privResponder(async () => {
726-
if (!await this.isSyncModeWithDbData(space, args)) {
727-
return this._subAccountApiData
728-
.getDataForSubAccount(
729-
(args) => super.getPayInvoiceList(space, args),
730-
args,
731-
{ datePropName: 't' }
732-
)
733-
}
734-
735-
return this._dao.findInCollBy(
736-
this._SYNC_API_METHODS.PAY_INVOICE_LIST,
737-
args,
738-
{ isPrepareResponse: true, shouldParamsBeVerified: true }
739-
)
740-
}, 'getPayInvoiceList', args, cb)
741-
}
742-
743721
/**
744722
* @override
745723
*/

workers/loc.api/service.report.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,6 @@ class ReportService extends BaseReportService {
1919
return super.getLedgers(null, args)
2020
}
2121

22-
[SYNC_API_METHODS.PAY_INVOICE_LIST] (args) {
23-
return super.getPayInvoiceList(null, args)
24-
}
25-
2622
[SYNC_API_METHODS.TRADES] (args) {
2723
return super.getTrades(null, args)
2824
}

workers/loc.api/sync/dao/dao.better.sqlite.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@ const setImmediatePromise = promisify(setImmediate)
55
const MAIN_DB_WORKER_ACTIONS = require(
66
'bfx-facs-db-better-sqlite/worker/db-worker-actions/db-worker-actions.const'
77
)
8-
const {
9-
normalizeFilterParams
10-
} = require('bfx-report/workers/loc.api/helpers')
118
const {
129
getValidationSchemaId,
1310
getFilterValidationSchemaId
@@ -913,7 +910,7 @@ class BetterSqliteDAO extends DAO {
913910
*/
914911
async findInCollBy (
915912
method,
916-
reqArgs,
913+
args,
917914
opts
918915
) {
919916
const {
@@ -932,13 +929,12 @@ class BetterSqliteDAO extends DAO {
932929
: this._getMethodCollMap().get(method)
933930

934931
const apiMethodName = filterModelNameMap.get(method) ?? {}
935-
const args = normalizeFilterParams(apiMethodName, reqArgs)
936932

937933
if (shouldParamsBeVerified) {
938934
const schemaId = getValidationSchemaId(apiMethodName)
939935
const filterSchemaId = getFilterValidationSchemaId(apiMethodName)
940936

941-
await this.dataValidator.validate(reqArgs, schemaId)
937+
await this.dataValidator.validate(args, schemaId)
942938
await this.dataValidator.validate(
943939
{ params: args?.params?.filter },
944940
filterSchemaId

workers/loc.api/sync/dao/db-migrations/sqlite-migrations/migration.v33.js

Lines changed: 0 additions & 68 deletions
This file was deleted.

0 commit comments

Comments
 (0)