@ocap/indexdb-memory 1.13.72 → 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.
Files changed (2) hide show
  1. package/lib/db/base.js +3 -2
  2. package/package.json +4 -4
package/lib/db/base.js CHANGED
@@ -340,7 +340,7 @@ class LocalBaseIndexDB extends BaseIndexDB {
340
340
  return { stakes, paging: nextPaging };
341
341
  }
342
342
 
343
- async listRollups({ paging, tokenAddress = '', erc20TokenAddress = '' } = {}) {
343
+ async listRollups({ paging, tokenAddress = '', erc20TokenAddress = '', foreignTokenAddress = '' } = {}) {
344
344
  const pagination = formatPagination({
345
345
  paging,
346
346
  defaultSortField: 'renaissanceTime',
@@ -352,8 +352,9 @@ class LocalBaseIndexDB extends BaseIndexDB {
352
352
  query.where((x) => x.tokenAddress === tokenAddress);
353
353
  }
354
354
 
355
+ const foreignTokenAddr = foreignTokenAddress || erc20TokenAddress;
355
356
  if (erc20TokenAddress) {
356
- query.where((x) => lowerCase(x.erc20TokenAddress) === lowerCase(erc20TokenAddress));
357
+ query.where((x) => lowerCase(x.foreignToken.contractAddress) === lowerCase(foreignTokenAddr));
357
358
  }
358
359
 
359
360
  debug('listRollups', { paging, pagination });
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.13.72",
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",
@@ -37,10 +37,10 @@
37
37
  "test": "jest --forceExit --detectOpenHandles",
38
38
  "coverage": "npm run test -- --coverage"
39
39
  },
40
- "gitHead": "c9fcd79d6e1ea7ac45831d79ea202a983304f69b",
40
+ "gitHead": "ffce10eaa7c72fe6d6fdc534f7e15cbdb3e6a917",
41
41
  "dependencies": {
42
- "@ocap/indexdb": "1.13.72",
43
- "@ocap/util": "1.13.72",
42
+ "@ocap/indexdb": "1.13.73",
43
+ "@ocap/util": "1.13.73",
44
44
  "debug": "^4.3.2",
45
45
  "empty-value": "^1.0.1",
46
46
  "lodash": "^4.17.21",