@ocap/resolver 1.20.15 → 1.21.0

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.
@@ -9,6 +9,7 @@ const {
9
9
  const { createIndexedTokenDistribution } = require('@ocap/indexdb/lib/util');
10
10
  const { eachReceipts } = require('@ocap/state/lib/states/tx');
11
11
  const { isGasStakeAddress } = require('@ocap/tx-protocols/lib/util');
12
+ const omit = require('lodash/omit');
12
13
 
13
14
  const ZERO = new BN(0);
14
15
 
@@ -190,6 +191,7 @@ class TokenDistributionManager {
190
191
  */
191
192
  async updateByTx(tx, context) {
192
193
  const { logger } = this.resolver;
194
+ const ctx = omit(context, 'txn');
193
195
 
194
196
  if (this.isProcessing) {
195
197
  logger?.logger('Token distribution is already in progress', { tx });
@@ -203,7 +205,7 @@ class TokenDistributionManager {
203
205
  const results = await Promise.all(
204
206
  tokens.map(async (tokenAddress) => {
205
207
  const distribution = this.formatDistribution((await this.getDistribution(tokenAddress)) || { tokenAddress });
206
- await this.handleTx(tx, distribution, { context, isHandleStake: true });
208
+ await this.handleTx(tx, distribution, { context: ctx, isHandleStake: true });
207
209
  const data = await this.saveDistribution(distribution);
208
210
  return data;
209
211
  })
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.20.15",
6
+ "version": "1.21.0",
7
7
  "description": "GraphQL resolver built upon ocap statedb and GQL layer",
8
8
  "main": "lib/index.js",
9
9
  "files": [
@@ -14,25 +14,25 @@
14
14
  "license": "MIT",
15
15
  "devDependencies": {
16
16
  "jest": "^29.7.0",
17
- "@ocap/indexdb-memory": "1.20.15",
18
- "@ocap/statedb-memory": "1.20.15"
17
+ "@ocap/indexdb-memory": "1.21.0",
18
+ "@ocap/statedb-memory": "1.21.0"
19
19
  },
20
20
  "dependencies": {
21
21
  "debug": "^4.3.6",
22
22
  "lodash": "^4.17.21",
23
23
  "queue": "^6",
24
- "@arcblock/did-ext": "1.20.15",
25
- "@arcblock/did-util": "1.20.15",
26
- "@arcblock/did": "1.20.15",
27
- "@arcblock/validator": "1.20.15",
28
- "@ocap/config": "1.20.15",
29
- "@ocap/indexdb": "1.20.15",
30
- "@ocap/message": "1.20.15",
31
- "@ocap/mcrypto": "1.20.15",
32
- "@ocap/state": "1.20.15",
33
- "@ocap/tx-protocols": "1.20.15",
34
- "@ocap/util": "1.20.15",
35
- "@ocap/wallet": "1.20.15"
24
+ "@arcblock/did": "1.21.0",
25
+ "@arcblock/did-ext": "1.21.0",
26
+ "@arcblock/did-util": "1.21.0",
27
+ "@arcblock/validator": "1.21.0",
28
+ "@ocap/config": "1.21.0",
29
+ "@ocap/indexdb": "1.21.0",
30
+ "@ocap/mcrypto": "1.21.0",
31
+ "@ocap/message": "1.21.0",
32
+ "@ocap/state": "1.21.0",
33
+ "@ocap/tx-protocols": "1.21.0",
34
+ "@ocap/util": "1.21.0",
35
+ "@ocap/wallet": "1.21.0"
36
36
  },
37
37
  "scripts": {
38
38
  "lint": "eslint tests lib",