Skip to content

Commit

Permalink
Merge pull request #110 from Patrik-Stas/bugfix/zero-gte-seqno-cap
Browse files Browse the repository at this point in the history
Fix error when setting seqnoGte filter to 0 causes returning empty array
  • Loading branch information
Patrik-Stas authored Jul 19, 2021
2 parents bc99d0f + 30e0417 commit 3ba5797
Show file tree
Hide file tree
Showing 12 changed files with 19 additions and 11 deletions.
2 changes: 1 addition & 1 deletion indypool-client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "indyscan-daemon",
"version": "4.2.0",
"version": "4.2.1",
"author": "Patrik Staš",
"license": "ISC",
"description": "Application scanning Hyperledger Indy blockchain for fetching and processing transactions.",
Expand Down
2 changes: 1 addition & 1 deletion indyscan-api-client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "indyscan-api-client",
"version": "4.2.0",
"version": "4.2.1",
"author": "Patrik Staš",
"license": "ISC",
"description": "IndyScan HTTP API client.",
Expand Down
8 changes: 8 additions & 0 deletions indyscan-api-client/test/integration/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,4 +218,12 @@ describe('basic api test suite', () => {
expect(Array.isArray(txs)).toBeTruthy()
expect(txs.length).toBe(2)
})

it('should return transactions of low seqNo cap begins at 0', async () => {
const networks = await getNetworks(process.env.API_URL)
const networkId = process.env.NETWORK_ID || networks[0].id
const txs = await getTxsV2(process.env.API_URL, networkId, 'domain', 0, 2, [], 0, 5, 'full')
expect(Array.isArray(txs)).toBeTruthy()
expect(txs.length).toBe(2)
})
})
2 changes: 1 addition & 1 deletion indyscan-api/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "indyscan-api",
"version": "4.2.0",
"version": "4.2.1",
"description": "Web application to browse Hyperledger Indy blockchain transactions.",
"main": "index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion indyscan-api/src/service/service-txs.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function urlQueryTxNamesToEsQuery (urlQueryTxNames) {
}

function createSeqnoFilter (seqNoGte, seqNoLt) {
if (seqNoGte && seqNoLt) {
if ((!!seqNoGte || seqNoGte === 0) && (!!seqNoLt || seqNoLt === 0)) {
return esFilterSeqNoGteLtRange(seqNoGte, seqNoLt)
} else if (seqNoGte) {
return esFilterSeqNoGte(seqNoGte)
Expand Down
2 changes: 1 addition & 1 deletion indyscan-daemon-api-client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "indyscan-daemon-api-client",
"version": "4.2.0",
"version": "4.2.1",
"author": "Patrik Staš",
"license": "ISC",
"description": "IndyScan Daemon HTTP API client.",
Expand Down
2 changes: 1 addition & 1 deletion indyscan-daemon-ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "indyscan-daemon-ui",
"version": "4.2.0",
"version": "4.2.1",
"author": "Patrik Staš",
"license": "ISC",
"description": "UI to view and manage the state of indyscan-daemon.",
Expand Down
2 changes: 1 addition & 1 deletion indyscan-daemon/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "indyscan-daemon",
"version": "4.2.0",
"version": "4.2.1",
"author": "Patrik Staš",
"license": "ISC",
"description": "Application scanning Hyperledger Indy blockchain for fetching and processing transactions.",
Expand Down
2 changes: 1 addition & 1 deletion indyscan-storage/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "indyscan-storage",
"version": "4.2.0",
"version": "4.2.1",
"author": "Patrik Staš",
"license": "ISC",
"description": "",
Expand Down
2 changes: 1 addition & 1 deletion indyscan-txtype/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "indyscan-txtype",
"version": "4.2.0",
"version": "4.2.1",
"description": "",
"main": "index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion indyscan-webapp/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "indyscan-webapp",
"version": "4.2.0",
"version": "4.2.1",
"description": "Web application to browse Hyperledger Indy blockchain transactions.",
"main": "index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion version.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"major": 4,
"minor": 2,
"patch": 0
"patch": 1
}

0 comments on commit 3ba5797

Please sign in to comment.