@ocap/resolver 1.20.16 → 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.
- package/lib/token-distribution.js +3 -1
- package/package.json +15 -15
|
@@ -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.
|
|
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.
|
|
18
|
-
"@ocap/statedb-memory": "1.
|
|
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": "1.
|
|
25
|
-
"@arcblock/did-ext": "1.
|
|
26
|
-
"@arcblock/did-util": "1.
|
|
27
|
-
"@arcblock/validator": "1.
|
|
28
|
-
"@ocap/
|
|
29
|
-
"@ocap/
|
|
30
|
-
"@ocap/
|
|
31
|
-
"@ocap/
|
|
32
|
-
"@ocap/
|
|
33
|
-
"@ocap/tx-protocols": "1.
|
|
34
|
-
"@ocap/util": "1.
|
|
35
|
-
"@ocap/wallet": "1.
|
|
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",
|