@ocap/indexdb-memory 1.18.70 → 1.18.71
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/db/base.js +4 -1
- package/package.json +5 -5
package/lib/db/base.js
CHANGED
@@ -147,7 +147,7 @@ class LocalBaseIndexDB extends BaseIndexDB {
|
|
147
147
|
account = await this.account.get(account.migratedFrom);
|
148
148
|
}
|
149
149
|
|
150
|
-
return related;
|
150
|
+
return related.filter(Boolean);
|
151
151
|
}
|
152
152
|
|
153
153
|
async listAssets({ ownerAddress, factoryAddress, paging, timeFilter = {} } = {}) {
|
@@ -171,6 +171,9 @@ class LocalBaseIndexDB extends BaseIndexDB {
|
|
171
171
|
const possibleOwners = await this.getRelatedAddresses(ownerAddress);
|
172
172
|
if (possibleOwners.length) {
|
173
173
|
query.where((x) => possibleOwners.includes(x.owner));
|
174
|
+
} else {
|
175
|
+
// If we dit not find any owner state, just return empty
|
176
|
+
return { assets: [], account: null };
|
174
177
|
}
|
175
178
|
}
|
176
179
|
if (factoryAddress) {
|
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.71",
|
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": "dc8eb886b0ed25f35ac06971bdf4c87ad6a49186",
|
41
41
|
"dependencies": {
|
42
|
-
"@arcblock/did": "1.18.
|
43
|
-
"@ocap/indexdb": "1.18.
|
44
|
-
"@ocap/util": "1.18.
|
42
|
+
"@arcblock/did": "1.18.71",
|
43
|
+
"@ocap/indexdb": "1.18.71",
|
44
|
+
"@ocap/util": "1.18.71",
|
45
45
|
"debug": "^4.3.4",
|
46
46
|
"empty-value": "^1.0.1",
|
47
47
|
"lodash": "^4.17.21",
|