@ocap/indexdb-memory 1.18.70 → 1.18.71

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.
Files changed (2) hide show
  1. package/lib/db/base.js +4 -1
  2. 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.70",
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": "1f83cffbbb5ac5f34b07cb9302676352ac174286",
40
+ "gitHead": "dc8eb886b0ed25f35ac06971bdf4c87ad6a49186",
41
41
  "dependencies": {
42
- "@arcblock/did": "1.18.70",
43
- "@ocap/indexdb": "1.18.70",
44
- "@ocap/util": "1.18.70",
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",