@ocap/indexdb-memory 1.18.20 → 1.18.21
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/db/base.js +6 -0
- package/package.json +5 -5
package/lib/db/base.js
CHANGED
@@ -23,6 +23,7 @@ class LocalBaseIndexDB extends BaseIndexDB {
|
|
23
23
|
validityFilter = {},
|
24
24
|
txFilter = {},
|
25
25
|
rollupFilter = {},
|
26
|
+
stakeFilter = {},
|
26
27
|
} = {}) {
|
27
28
|
const query = this.tx.collection.chain();
|
28
29
|
|
@@ -34,6 +35,7 @@ class LocalBaseIndexDB extends BaseIndexDB {
|
|
34
35
|
const { accounts = [] } = accountFilter;
|
35
36
|
const { txs = [] } = txFilter;
|
36
37
|
const { rollups = [] } = rollupFilter;
|
38
|
+
const { stakes = [] } = stakeFilter;
|
37
39
|
let { startDateTime, endDateTime } = timeFilter;
|
38
40
|
startDateTime = parseDateTime(startDateTime);
|
39
41
|
endDateTime = parseDateTime(endDateTime);
|
@@ -112,6 +114,10 @@ class LocalBaseIndexDB extends BaseIndexDB {
|
|
112
114
|
query.where((x) => x.rollups.some((f) => rollups.includes(f)));
|
113
115
|
}
|
114
116
|
|
117
|
+
if (stakes.length) {
|
118
|
+
query.where((x) => x.stakes.some((f) => stakes.includes(f)));
|
119
|
+
}
|
120
|
+
|
115
121
|
const transactions = query
|
116
122
|
.simplesort(pagination.order.field, paging.order.type === 'desc')
|
117
123
|
.offset(pagination.cursor)
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@ocap/indexdb-memory",
|
3
3
|
"description": "OCAP indexdb adapter that uses memory as backend, just for test purpose",
|
4
|
-
"version": "1.18.
|
4
|
+
"version": "1.18.21",
|
5
5
|
"author": "wangshijun <shijun@arcblock.io> (https://www.arcblock.io)",
|
6
6
|
"bugs": {
|
7
7
|
"url": "https://github.com/ArcBlock/asset-chain/issues",
|
@@ -37,11 +37,11 @@
|
|
37
37
|
"test": "jest --forceExit --detectOpenHandles",
|
38
38
|
"coverage": "npm run test -- --coverage"
|
39
39
|
},
|
40
|
-
"gitHead": "
|
40
|
+
"gitHead": "be5df6f70d48c8c5026cd7bb42d53b270ddeb344",
|
41
41
|
"dependencies": {
|
42
|
-
"@arcblock/did": "1.18.
|
43
|
-
"@ocap/indexdb": "1.18.
|
44
|
-
"@ocap/util": "1.18.
|
42
|
+
"@arcblock/did": "1.18.21",
|
43
|
+
"@ocap/indexdb": "1.18.21",
|
44
|
+
"@ocap/util": "1.18.21",
|
45
45
|
"debug": "^4.3.4",
|
46
46
|
"empty-value": "^1.0.1",
|
47
47
|
"lodash": "^4.17.21",
|