@ocap/indexdb-elasticsearch 1.18.70 → 1.18.72
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 +4 -1
- package/package.json +5 -5
package/lib/db.js
CHANGED
|
@@ -231,7 +231,7 @@ class ESIndexDB extends BaseIndexDB {
|
|
|
231
231
|
account = await this.account.get(getMigratedFrom(account));
|
|
232
232
|
}
|
|
233
233
|
|
|
234
|
-
return related;
|
|
234
|
+
return related.filter(Boolean);
|
|
235
235
|
}
|
|
236
236
|
|
|
237
237
|
async listAssets({ ownerAddress, factoryAddress, paging, timeFilter = {} } = {}) {
|
|
@@ -240,6 +240,9 @@ class ESIndexDB extends BaseIndexDB {
|
|
|
240
240
|
const possibleOwners = await this.getRelatedAddresses(ownerAddress);
|
|
241
241
|
if (possibleOwners.length) {
|
|
242
242
|
conditions.push({ terms: { owner: possibleOwners } });
|
|
243
|
+
} else {
|
|
244
|
+
// If we dit not find any owner state, just return empty
|
|
245
|
+
return { assets: [], account: null };
|
|
243
246
|
}
|
|
244
247
|
}
|
|
245
248
|
if (factoryAddress) {
|
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.18.
|
|
4
|
+
"version": "1.18.72",
|
|
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,12 +38,12 @@
|
|
|
38
38
|
"test": "jest --forceExit --detectOpenHandles",
|
|
39
39
|
"coverage": "npm run test -- --coverage"
|
|
40
40
|
},
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "2fb6b97b4324b303960d468a10e849dbc5eae149",
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@arcblock/did": "1.18.
|
|
43
|
+
"@arcblock/did": "1.18.72",
|
|
44
44
|
"@elastic/elasticsearch": "7.13.0",
|
|
45
|
-
"@ocap/indexdb": "1.18.
|
|
46
|
-
"@ocap/util": "1.18.
|
|
45
|
+
"@ocap/indexdb": "1.18.72",
|
|
46
|
+
"@ocap/util": "1.18.72",
|
|
47
47
|
"axios": "^0.27.2",
|
|
48
48
|
"bn.js": "^5.2.1",
|
|
49
49
|
"debug": "^4.3.4",
|