@ocap/indexdb 1.19.1 → 1.19.3

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 +14 -0
  2. package/package.json +4 -4
package/lib/util.js CHANGED
@@ -359,6 +359,19 @@ const createIndexedRollupBlock = (x, ctx) => {
359
359
  };
360
360
  };
361
361
 
362
+ const createIndexedTokenDistribution = (x) => {
363
+ return {
364
+ ...pick(x, 'tokenAddress', 'txTime'),
365
+ account: x.account.toString(),
366
+ gas: x.gas.toString(),
367
+ fee: x.fee.toString(),
368
+ slashedVault: x.slashedVault.toString(),
369
+ stake: x.stake.toString(),
370
+ revokedStake: x.revokedStake.toString(),
371
+ gasStake: x.gasStake.toString(),
372
+ };
373
+ };
374
+
362
375
  const formatTxBeforeInsert = (row) => {
363
376
  const tx = { ...row };
364
377
  tx.sender = tx.sender || '';
@@ -574,6 +587,7 @@ module.exports = {
574
587
  createIndexedStake,
575
588
  createIndexedRollup,
576
589
  createIndexedRollupBlock,
590
+ createIndexedTokenDistribution,
577
591
  formatPagination,
578
592
  formatNextPagination,
579
593
  formatTxAfterRead,
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.19.1",
6
+ "version": "1.19.3",
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": "^29.7.0"
26
26
  },
27
27
  "dependencies": {
28
- "@ocap/state": "1.19.1",
29
- "@ocap/util": "1.19.1",
28
+ "@ocap/state": "1.19.3",
29
+ "@ocap/util": "1.19.3",
30
30
  "kareem": "^2.4.1",
31
31
  "lodash": "^4.17.21"
32
32
  },
33
- "gitHead": "21184488172c6c824ebd1714f728ff2aee4a3ac0"
33
+ "gitHead": "756076dad0df7468beecc95c8effd55f8c4c4f49"
34
34
  }