@ocap/indexdb 1.13.64 → 1.13.65

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/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.64",
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.64",
26
- "@ocap/util": "1.13.64",
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": "49c94d9fd5f12ec63c34ad609d041a92f68322a8"
30
+ "gitHead": "4011996e1800845142aa5c889b58726129a99ec3"
31
31
  }