@ocap/resolver 1.13.71 → 1.13.72

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/hooks.js +4 -1
  2. package/package.json +12 -12
package/lib/hooks.js CHANGED
@@ -172,7 +172,9 @@ const onDepositTokenV2 = async (tx, ctx, indexdb) => {
172
172
  }
173
173
  });
174
174
 
175
- await updateRollupStats(ctx.rollupState.address, tx.tx.itxJson.token.value, 'totalDepositAmount', indexdb);
175
+ // totalDepositAmount should include txFee
176
+ const amount = new BN(tx.tx.itxJson.token.value).add(new BN(tx.tx.itxJson.actualFee));
177
+ await updateRollupStats(ctx.rollupState.address, amount.toString(), 'totalDepositAmount', indexdb);
176
178
  };
177
179
 
178
180
  const onClaimBlockReward = async (tx, ctx, indexdb) => {
@@ -296,6 +298,7 @@ const onCreateTx = async (tx, ctx, indexdb) => {
296
298
  case 'fg:t:claim_block_reward':
297
299
  return onClaimBlockReward(tx, ctx, indexdb);
298
300
  case 'fg:t:withdraw_token_v2':
301
+ // totalWithdrawAmount does not include txFee
299
302
  return updateRollupStats(ctx.rollupState.address, tx.tx.itxJson.token.value, 'totalWithdrawAmount', indexdb);
300
303
  default:
301
304
  }
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.13.71",
6
+ "version": "1.13.72",
7
7
  "description": "GraphQL resolver built upon ocap statedb and GQL layer",
8
8
  "main": "lib/index.js",
9
9
  "files": [
@@ -22,18 +22,18 @@
22
22
  "jest": "^27.3.1"
23
23
  },
24
24
  "dependencies": {
25
- "@arcblock/did": "1.13.71",
26
- "@arcblock/did-util": "1.13.71",
27
- "@ocap/config": "1.13.71",
28
- "@ocap/indexdb": "1.13.71",
29
- "@ocap/mcrypto": "1.13.71",
30
- "@ocap/message": "1.13.71",
31
- "@ocap/state": "1.13.71",
32
- "@ocap/tx-protocols": "1.13.71",
33
- "@ocap/util": "1.13.71",
34
- "@ocap/validator": "1.13.71",
25
+ "@arcblock/did": "1.13.72",
26
+ "@arcblock/did-util": "1.13.72",
27
+ "@ocap/config": "1.13.72",
28
+ "@ocap/indexdb": "1.13.72",
29
+ "@ocap/mcrypto": "1.13.72",
30
+ "@ocap/message": "1.13.72",
31
+ "@ocap/state": "1.13.72",
32
+ "@ocap/tx-protocols": "1.13.72",
33
+ "@ocap/util": "1.13.72",
34
+ "@ocap/validator": "1.13.72",
35
35
  "debug": "^4.3.2",
36
36
  "lodash": "^4.17.21"
37
37
  },
38
- "gitHead": "82321f1dcd59ae272e87372bafaacc562e99c9ee"
38
+ "gitHead": "c9fcd79d6e1ea7ac45831d79ea202a983304f69b"
39
39
  }