@ocap/statedb-memory 1.18.32 → 1.18.34

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/table/base.js CHANGED
@@ -1,5 +1,6 @@
1
1
  /* eslint-disable no-underscore-dangle */
2
2
  const { StateDBTable } = require('@ocap/statedb');
3
+ const omit = require('lodash/omit');
3
4
  const Lokijs = require('lokijs');
4
5
 
5
6
  const db = new Lokijs('ocap-memory-statedb.db');
@@ -52,10 +53,10 @@ class MemoryTable extends StateDBTable {
52
53
  }
53
54
 
54
55
  if (exist) {
55
- return this.update(state[this.uniqIndex], state, ctx);
56
+ return this.update(state[this.uniqIndex], omit(state, [this.uniqIndex]), ctx);
56
57
  }
57
58
 
58
- return this.create(state[this.uniqIndex], state, ctx);
59
+ return this.create(state[this.uniqIndex], omit(state, [this.uniqIndex]), ctx);
59
60
  }
60
61
 
61
62
  _reset() {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ocap/statedb-memory",
3
3
  "description": "OCAP statedb adapter that uses memory as backend statedb, just for test purpose",
4
- "version": "1.18.32",
4
+ "version": "1.18.34",
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,11 @@
37
37
  "test": "jest --forceExit --detectOpenHandles",
38
38
  "coverage": "npm run test -- --coverage"
39
39
  },
40
- "gitHead": "44a7e8ee3e89535a4e18fbbc2ad6ff408c8e2474",
40
+ "gitHead": "c12d3cbf9617d861d83c08726d9e0d55fdf9a459",
41
41
  "dependencies": {
42
- "@ocap/state": "1.18.32",
43
- "@ocap/statedb": "1.18.32",
42
+ "@ocap/state": "1.18.34",
43
+ "@ocap/statedb": "1.18.34",
44
+ "@ocap/util": "1.18.34",
44
45
  "debug": "^4.3.4",
45
46
  "lodash": "^4.17.21",
46
47
  "lokijs": "^1.5.12"