@ocap/indexdb-elasticsearch 1.13.69 → 1.13.73
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/db.js +9 -3
- package/lib/model/rollup.js +2 -0
- package/package.json +4 -4
package/lib/db.js
CHANGED
|
@@ -439,7 +439,7 @@ class ESIndexDB extends BaseIndexDB {
|
|
|
439
439
|
return { stakes: items.map((item) => Stake.formatAfterRead(item)), paging: nextPaging };
|
|
440
440
|
}
|
|
441
441
|
|
|
442
|
-
async listRollups({ paging, tokenAddress = '', erc20TokenAddress = '' } = {}) {
|
|
442
|
+
async listRollups({ paging, tokenAddress = '', erc20TokenAddress = '', foreignTokenAddress = '' } = {}) {
|
|
443
443
|
const pagination = formatPagination({
|
|
444
444
|
paging,
|
|
445
445
|
defaultSortField: 'renaissanceTime',
|
|
@@ -450,8 +450,14 @@ class ESIndexDB extends BaseIndexDB {
|
|
|
450
450
|
if (tokenAddress) {
|
|
451
451
|
conditions.push({ term: { tokenAddress } });
|
|
452
452
|
}
|
|
453
|
-
|
|
454
|
-
|
|
453
|
+
const foreignTokenAddr = foreignTokenAddress || erc20TokenAddress;
|
|
454
|
+
if (foreignTokenAddr) {
|
|
455
|
+
conditions.push({
|
|
456
|
+
nested: {
|
|
457
|
+
path: 'foreignToken',
|
|
458
|
+
query: { bool: { must: { term: { 'foreignToken.contractAddress': foreignTokenAddr } } } },
|
|
459
|
+
},
|
|
460
|
+
});
|
|
455
461
|
}
|
|
456
462
|
|
|
457
463
|
debug('listRollups', { paging, pagination, conditions });
|
package/lib/model/rollup.js
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ocap/indexdb-elasticsearch",
|
|
3
3
|
"description": "OCAP indexdb adapter that uses elasticsearch as backend",
|
|
4
|
-
"version": "1.13.
|
|
4
|
+
"version": "1.13.73",
|
|
5
5
|
"author": "wangshijun <shijun@arcblock.io> (https://www.arcblock.io)",
|
|
6
6
|
"bugs": {
|
|
7
7
|
"url": "https://github.com/ArcBlock/asset-chain/issues",
|
|
@@ -38,11 +38,11 @@
|
|
|
38
38
|
"test": "jest --forceExit --detectOpenHandles",
|
|
39
39
|
"coverage": "npm run test -- --coverage"
|
|
40
40
|
},
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "ffce10eaa7c72fe6d6fdc534f7e15cbdb3e6a917",
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@elastic/elasticsearch": "7.13.0",
|
|
44
|
-
"@ocap/indexdb": "1.13.
|
|
45
|
-
"@ocap/util": "1.13.
|
|
44
|
+
"@ocap/indexdb": "1.13.73",
|
|
45
|
+
"@ocap/util": "1.13.73",
|
|
46
46
|
"axios": "^0.21.4",
|
|
47
47
|
"bn.js": "^5.2.0",
|
|
48
48
|
"debug": "^4.3.2",
|