Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
1705b43
Remove filter normalizer to speed up requests
ZIMkaRU Aug 25, 2025
94475f4
Merge pull request #445 from ZIMkaRU/feature/remove-filter-normalizer…
tarcisiozf Aug 27, 2025
e946efe
Add ability to fetch symbol info form api when exporting
ZIMkaRU Aug 28, 2025
34e81b7
Implement ccy formatter for tether with network
ZIMkaRU Aug 28, 2025
a11c76e
Add ccy formatter to movement export
ZIMkaRU Aug 28, 2025
09b793e
Add currency name map to report export job
ZIMkaRU Aug 29, 2025
be0e8ad
Speed up movement ccy formatting using name map
ZIMkaRU Aug 29, 2025
f2060c0
Adjust mocked symbols for tests
ZIMkaRU Aug 29, 2025
fd119b2
Update npmrc
bilalfastnu Sep 5, 2025
1b2ed7c
Merge pull request #447 from bilalfastnu/update-npmrc
vigan-abd Sep 11, 2025
317a64d
Merge pull request #446 from ZIMkaRU/feature/add-network-to-tether-cc…
tarcisiozf Sep 16, 2025
f833f89
Add created-updated mts for movements export
ZIMkaRU Sep 16, 2025
0cb1ce3
Merge pull request #448 from ZIMkaRU/feature/add-created-updated-mts-…
tarcisiozf Sep 16, 2025
c7a4b3a
Remove payInvoiceList endpoint support
ZIMkaRU Sep 19, 2025
410c1f1
Remove payInvoiceList endpoint test coverage
ZIMkaRU Sep 19, 2025
d038c12
Fix getSymbols req auth for fw mode
ZIMkaRU Sep 19, 2025
4be7e6f
Merge pull request #449 from ZIMkaRU/feature/remove-pay-invoice-list-…
tarcisiozf Sep 22, 2025
bab757d
Bump version up to 4.13.0
ZIMkaRU Sep 24, 2025
a9662c4
Update bfx-report-express dep
ZIMkaRU Sep 24, 2025
0454447
Merge pull request #450 from ZIMkaRU/feature/release-version
tarcisiozf Sep 24, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
save-exact=true
foreground-scripts=true
ignore-scripts=true
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bfx-report",
"version": "4.12.6",
"version": "4.13.0",
"description": "Reporting tool",
"main": "worker.js",
"license": "Apache-2.0",
Expand Down
46 changes: 0 additions & 46 deletions test/1-api.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -812,52 +812,6 @@ describe('API', () => {
])
})

it('it should be successfully performed by the getPayInvoiceList method', async function () {
this.timeout(5000)

const res = await agent
.post(`${basePath}/json-rpc`)
.type('json')
.send({
auth,
method: 'getPayInvoiceList',
params: {
start: 0,
end,
limit: 2
},
id: 5
})
.expect('Content-Type', /json/)
.expect(200)

assert.isObject(res.body)
assert.propertyVal(res.body, 'id', 5)
assert.isObject(res.body.result)
assert.isArray(res.body.result.res)
assert.isNumber(res.body.result.nextPage)

const resItem = res.body.result.res[0]

assert.isObject(resItem)
assert.containsAllKeys(resItem, [
'id',
't',
'duration',
'amount',
'currency',
'orderId',
'payCurrencies',
'webhook',
'redirectUrl',
'status',
'customerInfo',
'invoices',
'payment',
'merchantName'
])
})

it('it should be successfully performed by the getTrades method', async function () {
this.timeout(5000)

Expand Down
9 changes: 8 additions & 1 deletion test/5-queue-load.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,14 @@ describe('Queue load', () => {

mockRESTv2Srv = createMockRESTv2SrvWithDate(start, end, null, {
ledgers: { limit },
user_info: null
user_info: null,
symbols: null,
map_symbols: null,
inactive_currencies: null,
margin_currencies: null,
inactive_symbols: null,
futures: null,
currencies: null
})

await rmAllFiles(tempDirPath)
Expand Down
9 changes: 1 addition & 8 deletions test/helpers/helpers.mock-rest-v2.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,18 +51,12 @@ const setDataTo = (
const {
date = Date.now(),
id = 12345,
fee = -0.0001,
strId = uuidv4()
fee = -0.0001
} = { ...params }

const _date = Math.round(date)

switch (key) {
case 'invoice_list':
dataItem.id = strId
dataItem.t = _date
break

case 'candles':
dataItem[0] = _date
break
Expand Down Expand Up @@ -207,7 +201,6 @@ const getMockDataOpts = () => ({
logins_hist: { limit: 250 },
change_log: { limit: 500 },
candles: { limit: 500 },
invoice_list: { limit: 100 },
user_info: null,
symbols: null,
map_symbols: null,
Expand Down
77 changes: 0 additions & 77 deletions test/helpers/mock-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -706,83 +706,6 @@ module.exports = new Map([
'pub:api:12ab12ab-12ab-12ab-12ab-12ab12ab12ab-read'
]
],
[
'invoice_list',
[
{
id: '12345678-1234-1234-1234-12345678',
t: _ms,
duration: 900,
amount: 0.1,
currency: 'USD',
orderId: '12',
payCurrencies: [
'BTC',
'ETH',
'UST-ETH',
'LNX'
],
webhook: 'https://bfx-pay-123.321.com',
redirectUrl: 'https://bfx-pay-123.321.com?page_id123',
status: 'EXPIRED',
customerInfo: {
nationality: 'UA',
residCountry: 'UA',
residState: null,
residCity: 'Kharkiv',
residZipCode: '12345',
residStreet: 'street',
residBuildingNo: null,
fullName: 'name user',
email: 'user@mail.com',
tosAccepted: true
},
invoices: [
{
amount: 0.00000123,
payCurrency: 'BTC',
poolCurrency: 'BTC',
address: '1234567890qwerty'
},
{
amount: 0.0000124,
payCurrency: 'ETH',
poolCurrency: 'ETH',
address: '1234567890qwerty'
},
{
amount: 0.125,
payCurrency: 'UST',
poolCurrency: 'ETH',
address: '1234567890qwerty'
},
{
amount: 0.00000125,
payCurrency: 'BTC',
poolCurrency: 'LNX',
address: '1234567890qwerty',
ext: {
hash: '1234567890qwerty',
payment_request: '1234567890qwerty',
node_pub: '1234567890qwerty'
}
}
],
payment: {
txid: '1234567890qwerty',
amount: 0.123123,
currency: 'UST',
method: 'TETHERUSE',
status: 'COMPLETED',
confirmations: 5,
created_at: '2021-09-12 03:03:03',
updated_at: '2021-09-12 03:03:03',
depositId: 1234321
},
merchantName: 'Testing'
}
]
],
[
'weighted_averages',
[
Expand Down
28 changes: 0 additions & 28 deletions test/test-cases/report-file-generations.js
Original file line number Diff line number Diff line change
Expand Up @@ -350,34 +350,6 @@ module.exports = (
await testMethodOfGettingReportFile(procPromise, aggrPromise, res)
})

it('it should be successfully performed by the getPayInvoiceListFile method', async function () {
this.timeout(60000)

const procPromise = queueToPromise(params.processorQueue)
const aggrPromise = queueToPromise(params.aggregatorQueue)

const res = await agent
.post(`${basePath}/json-rpc`)
.type('json')
.send({
auth,
method: 'getPayInvoiceListFile',
params: {
isPDFRequired,
end,
start,
limit: 100,
timezone: -3,
email
},
id: 5
})
.expect('Content-Type', /json/)
.expect(200)

await testMethodOfGettingReportFile(procPromise, aggrPromise, res)
})

it('it should be successfully performed by the getTradesFile method', async function () {
this.timeout(60000)

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -235,20 +235,5 @@ module.exports = new Map([
low: { type: 'number' },
volume: { type: 'number' }
}
],
[
FILTER_SCHEMA_IDS.GET_PAY_INVOICE_LIST_REQ_FILTER,
{
id: { type: 'string' },
t: { type: 'integer' },
duration: { type: 'number' },
amount: { type: 'number' },
currency: { type: 'string' },
orderId: { type: 'string' },
webhook: { type: 'string' },
redirectUrl: { type: 'string' },
status: { type: 'string' },
merchantName: { type: 'string' }
}
]
])
3 changes: 1 addition & 2 deletions workers/loc.api/data-validator/filter.schema.names.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,5 @@ module.exports = {
GET_STATUS_MESSAGES_REQ_FILTER: 'getStatusMessagesReqFilter',
GET_LOGINS_REQ_FILTER: 'getLoginsReqFilter',
GET_CHANGE_LOGS_REQ_FILTER: 'getChangeLogsReqFilter',
GET_CANDLES_REQ_FILTER: 'getCandlesReqFilter',
GET_PAY_INVOICE_LIST_REQ_FILTER: 'getPayInvoiceListReqFilter'
GET_CANDLES_REQ_FILTER: 'getCandlesReqFilter'
}
1 change: 0 additions & 1 deletion workers/loc.api/data-validator/schema.names.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ module.exports = {

COMMON_REQ: 'commonReq',
GET_WEIGHTED_AVERAGES_REPORT_REQ: 'getWeightedAveragesReportReq',
GET_PAY_INVOICE_LIST_REQ: 'getPayInvoiceListReq',
GET_STATUS_MESSAGES_REQ: 'getStatusMessagesReq',
GET_PUBLIC_TRADES_REQ: 'getPublicTradesReq',
GET_POSITIONS_AUDIT_REQ: 'getPositionsAuditReq',
Expand Down
39 changes: 0 additions & 39 deletions workers/loc.api/data-validator/schemas/getPayInvoiceListReq.js

This file was deleted.

Loading