@ocap/indexdb 1.13.61 → 1.13.65

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 +9 -3
  2. package/package.json +4 -4
package/lib/util.js CHANGED
@@ -24,12 +24,12 @@ const createIndexedAccount = async (x, getTokenFn) => {
24
24
 
25
25
  return {
26
26
  address: x.address,
27
- balance: x.balance,
27
+ balance: x.balance || '0',
28
28
  migratedTo: x.migratedTo[0] || '',
29
29
  moniker: x.moniker,
30
30
  nonce: x.nonce,
31
- numAssets: x.numAssets,
32
- numTxs: x.numTxs,
31
+ numAssets: x.numAssets || 0,
32
+ numTxs: x.numTxs || 0,
33
33
  recentNumTxs: [],
34
34
  renaissanceTime: x.context.renaissanceTime,
35
35
  tokens: Object.keys(x.tokens || {}).map((address) =>
@@ -124,6 +124,12 @@ const createIndexedTransaction = (tx, ctx) => {
124
124
  tx.valid = tx.code === 'OK';
125
125
 
126
126
  // accounts
127
+ if (ctx.senderState) {
128
+ tx.accounts.push(ctx.senderState.address);
129
+ }
130
+ if (ctx.receiverState) {
131
+ tx.accounts.push(ctx.receiverState.address);
132
+ }
127
133
  if (ctx.updatedAccounts && Array.isArray(ctx.updatedAccounts)) {
128
134
  tx.accounts.push(...ctx.updatedAccounts.map((x) => x.address));
129
135
  }
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.13.61",
6
+ "version": "1.13.65",
7
7
  "description": "Defines the basic interface for OCAP IndexDB",
8
8
  "main": "lib/main.js",
9
9
  "files": [
@@ -22,10 +22,10 @@
22
22
  "jest": "^27.3.1"
23
23
  },
24
24
  "dependencies": {
25
- "@ocap/state": "1.13.61",
26
- "@ocap/util": "1.13.61",
25
+ "@ocap/state": "1.13.65",
26
+ "@ocap/util": "1.13.65",
27
27
  "kareem": "^2.3.2",
28
28
  "lodash": "^4.17.21"
29
29
  },
30
- "gitHead": "79d07bbde4df1d0d37afe76aaa1eaa2f30cc55a7"
30
+ "gitHead": "4011996e1800845142aa5c889b58726129a99ec3"
31
31
  }