@ocap/indexdb 1.17.9 → 1.17.10

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 +16 -9
  2. package/package.json +4 -4
package/lib/util.js CHANGED
@@ -58,15 +58,22 @@ const createIndexedAsset = (x) => ({
58
58
  tags: x.tags,
59
59
  });
60
60
 
61
- const createIndexedDelegation = (x, ctx) => ({
62
- address: x.address,
63
- data: x.data,
64
- genesisTime: x.context.genesisTime,
65
- renaissanceTime: x.context.renaissanceTime,
66
- ops: x.ops,
67
- from: get(ctx, 'senderState.address', ''),
68
- to: get(ctx, 'receiverState.address', ''),
69
- });
61
+ const createIndexedDelegation = (x, ctx) => {
62
+ const result = {
63
+ address: x.address,
64
+ data: x.data,
65
+ genesisTime: x.context.genesisTime,
66
+ renaissanceTime: x.context.renaissanceTime,
67
+ ops: x.ops,
68
+ };
69
+ if (ctx.senderState) {
70
+ result.from = get(ctx, 'senderState.address', '');
71
+ }
72
+ if (ctx.receiverState) {
73
+ result.to = get(ctx, 'receiverState.address', '');
74
+ }
75
+ return result;
76
+ };
70
77
 
71
78
  const createIndexedToken = (x) => ({
72
79
  address: x.address,
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.17.9",
6
+ "version": "1.17.10",
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.17.9",
29
- "@ocap/util": "1.17.9",
28
+ "@ocap/state": "1.17.10",
29
+ "@ocap/util": "1.17.10",
30
30
  "kareem": "^2.4.1",
31
31
  "lodash": "^4.17.21"
32
32
  },
33
- "gitHead": "430c739d9f05e3f5dbd4411ee7289f9e7189f6ae"
33
+ "gitHead": "062c4f18a4e6d370cb1659980c602e8494969dc3"
34
34
  }