@ocap/indexdb 1.18.93 → 1.18.95

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. package/lib/util.js +5 -2
  2. package/package.json +4 -4
package/lib/util.js CHANGED
@@ -69,7 +69,8 @@ const createIndexedDelegation = (x, ctx) => {
69
69
  data: x.data,
70
70
  genesisTime: x.context.genesisTime,
71
71
  renaissanceTime: x.context.renaissanceTime,
72
- ops: x.ops,
72
+ // https://discuss.elastic.co/t/updating-an-object-field/110735
73
+ ops: [x.ops],
73
74
  };
74
75
  if (ctx.senderState) {
75
76
  result.from = get(ctx, 'senderState.address', '');
@@ -412,7 +413,9 @@ const formatTxAfterRead = (tx) => {
412
413
  };
413
414
 
414
415
  const formatDelegationAfterRead = (delegation) => {
415
- delegation.ops = Object.keys(delegation.ops).map((x) => ({ key: x, value: delegation.ops[x] }));
416
+ // https://discuss.elastic.co/t/updating-an-object-field/110735
417
+ const ops = Array.isArray(delegation.ops) ? delegation.ops[0] : delegation.ops;
418
+ delegation.ops = Object.keys(ops).map((x) => ({ key: x, value: ops[x] }));
416
419
  return delegation;
417
420
  };
418
421
 
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.18.93",
6
+ "version": "1.18.95",
7
7
  "description": "Defines the basic interface for OCAP IndexDB",
8
8
  "main": "lib/main.js",
9
9
  "files": [
@@ -25,10 +25,10 @@
25
25
  "jest": "^27.5.1"
26
26
  },
27
27
  "dependencies": {
28
- "@ocap/state": "1.18.93",
29
- "@ocap/util": "1.18.93",
28
+ "@ocap/state": "1.18.95",
29
+ "@ocap/util": "1.18.95",
30
30
  "kareem": "^2.4.1",
31
31
  "lodash": "^4.17.21"
32
32
  },
33
- "gitHead": "de8cc73243a1d3d27c9ecc6af6a7892a3e0c683a"
33
+ "gitHead": "1d243016b59c4532a8ca6f01d810e4a8f4b3ccb2"
34
34
  }