Skip to content

Commit 30e0417

Browse files
committed
Fix error when setting seqnoGte filter to 0 causes returning empty arrays
Signed-off-by: Patrik Stas <patrik.stas@gmail.com>
1 parent bc99d0f commit 30e0417

File tree

12 files changed

+19
-11
lines changed

12 files changed

+19
-11
lines changed

indypool-client/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "indyscan-daemon",
3-
"version": "4.2.0",
3+
"version": "4.2.1",
44
"author": "Patrik Staš",
55
"license": "ISC",
66
"description": "Application scanning Hyperledger Indy blockchain for fetching and processing transactions.",

indyscan-api-client/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "indyscan-api-client",
3-
"version": "4.2.0",
3+
"version": "4.2.1",
44
"author": "Patrik Staš",
55
"license": "ISC",
66
"description": "IndyScan HTTP API client.",

indyscan-api-client/test/integration/index.spec.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,4 +218,12 @@ describe('basic api test suite', () => {
218218
expect(Array.isArray(txs)).toBeTruthy()
219219
expect(txs.length).toBe(2)
220220
})
221+
222+
it('should return transactions of low seqNo cap begins at 0', async () => {
223+
const networks = await getNetworks(process.env.API_URL)
224+
const networkId = process.env.NETWORK_ID || networks[0].id
225+
const txs = await getTxsV2(process.env.API_URL, networkId, 'domain', 0, 2, [], 0, 5, 'full')
226+
expect(Array.isArray(txs)).toBeTruthy()
227+
expect(txs.length).toBe(2)
228+
})
221229
})

indyscan-api/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "indyscan-api",
3-
"version": "4.2.0",
3+
"version": "4.2.1",
44
"description": "Web application to browse Hyperledger Indy blockchain transactions.",
55
"main": "index.js",
66
"scripts": {

indyscan-api/src/service/service-txs.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ function urlQueryTxNamesToEsQuery (urlQueryTxNames) {
1313
}
1414

1515
function createSeqnoFilter (seqNoGte, seqNoLt) {
16-
if (seqNoGte && seqNoLt) {
16+
if ((!!seqNoGte || seqNoGte === 0) && (!!seqNoLt || seqNoLt === 0)) {
1717
return esFilterSeqNoGteLtRange(seqNoGte, seqNoLt)
1818
} else if (seqNoGte) {
1919
return esFilterSeqNoGte(seqNoGte)

indyscan-daemon-api-client/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "indyscan-daemon-api-client",
3-
"version": "4.2.0",
3+
"version": "4.2.1",
44
"author": "Patrik Staš",
55
"license": "ISC",
66
"description": "IndyScan Daemon HTTP API client.",

indyscan-daemon-ui/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "indyscan-daemon-ui",
3-
"version": "4.2.0",
3+
"version": "4.2.1",
44
"author": "Patrik Staš",
55
"license": "ISC",
66
"description": "UI to view and manage the state of indyscan-daemon.",

indyscan-daemon/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "indyscan-daemon",
3-
"version": "4.2.0",
3+
"version": "4.2.1",
44
"author": "Patrik Staš",
55
"license": "ISC",
66
"description": "Application scanning Hyperledger Indy blockchain for fetching and processing transactions.",

indyscan-storage/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "indyscan-storage",
3-
"version": "4.2.0",
3+
"version": "4.2.1",
44
"author": "Patrik Staš",
55
"license": "ISC",
66
"description": "",

indyscan-txtype/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "indyscan-txtype",
3-
"version": "4.2.0",
3+
"version": "4.2.1",
44
"description": "",
55
"main": "index.js",
66
"scripts": {

0 commit comments

Comments
 (0)