Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix error when setting seqnoGte filter to 0 causes returning empty array #110

Merged
merged 1 commit into from
Jul 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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: 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
}