@ocap/resolver 1.17.5 → 1.17.8
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/index.js +3 -3
- package/package.json +14 -14
package/lib/index.js
CHANGED
|
@@ -11,7 +11,7 @@ const Config = require('@ocap/config');
|
|
|
11
11
|
const states = require('@ocap/state');
|
|
12
12
|
const { patterns } = require('@arcblock/validator');
|
|
13
13
|
const { md5 } = require('@ocap/util/lib/md5');
|
|
14
|
-
const CustomError = require('@ocap/util/lib/error');
|
|
14
|
+
const { CustomError } = require('@ocap/util/lib/error');
|
|
15
15
|
const { types } = require('@ocap/mcrypto');
|
|
16
16
|
const { fromTypeUrl } = require('@ocap/message');
|
|
17
17
|
const { toStakeAddress } = require('@arcblock/did-util');
|
|
@@ -164,7 +164,7 @@ module.exports = class OCAPResolver {
|
|
|
164
164
|
}
|
|
165
165
|
|
|
166
166
|
// 0. create new context
|
|
167
|
-
const context = { txBase64, statedb: this.statedb, config: this.config };
|
|
167
|
+
const context = { txBase64, statedb: this.statedb, indexdb: this.indexdb, config: this.config };
|
|
168
168
|
|
|
169
169
|
// 1. execute and persist the transaction
|
|
170
170
|
const result = await this.executor.execute(context);
|
|
@@ -711,7 +711,7 @@ module.exports = class OCAPResolver {
|
|
|
711
711
|
|
|
712
712
|
this.statedb.tx.on('create', async (x, ctx) => {
|
|
713
713
|
try {
|
|
714
|
-
const tx = await createIndexedTransaction(x, ctx);
|
|
714
|
+
const tx = await createIndexedTransaction(x, ctx, this.indexdb);
|
|
715
715
|
await this.indexdb.tx.insert(tx);
|
|
716
716
|
if (typeof hooks.onCreateTx === 'function') {
|
|
717
717
|
await hooks.onCreateTx(tx, ctx, this.indexdb);
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.17.
|
|
6
|
+
"version": "1.17.8",
|
|
7
7
|
"description": "GraphQL resolver built upon ocap statedb and GQL layer",
|
|
8
8
|
"main": "lib/index.js",
|
|
9
9
|
"files": [
|
|
@@ -19,21 +19,21 @@
|
|
|
19
19
|
"author": "wangshijun <wangshijun2010@gmail.com> (http://github.com/wangshijun)",
|
|
20
20
|
"license": "MIT",
|
|
21
21
|
"devDependencies": {
|
|
22
|
-
"jest": "^27.
|
|
22
|
+
"jest": "^27.5.1"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@arcblock/did": "1.17.
|
|
26
|
-
"@arcblock/did-util": "1.17.
|
|
27
|
-
"@arcblock/validator": "1.17.
|
|
28
|
-
"@ocap/config": "1.17.
|
|
29
|
-
"@ocap/indexdb": "1.17.
|
|
30
|
-
"@ocap/mcrypto": "1.17.
|
|
31
|
-
"@ocap/message": "1.17.
|
|
32
|
-
"@ocap/state": "1.17.
|
|
33
|
-
"@ocap/tx-protocols": "1.17.
|
|
34
|
-
"@ocap/util": "1.17.
|
|
35
|
-
"debug": "^4.3.
|
|
25
|
+
"@arcblock/did": "1.17.8",
|
|
26
|
+
"@arcblock/did-util": "1.17.8",
|
|
27
|
+
"@arcblock/validator": "1.17.8",
|
|
28
|
+
"@ocap/config": "1.17.8",
|
|
29
|
+
"@ocap/indexdb": "1.17.8",
|
|
30
|
+
"@ocap/mcrypto": "1.17.8",
|
|
31
|
+
"@ocap/message": "1.17.8",
|
|
32
|
+
"@ocap/state": "1.17.8",
|
|
33
|
+
"@ocap/tx-protocols": "1.17.8",
|
|
34
|
+
"@ocap/util": "1.17.8",
|
|
35
|
+
"debug": "^4.3.4",
|
|
36
36
|
"lodash": "^4.17.21"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "04da221a224c17054eedf6317645e09e76258476"
|
|
39
39
|
}
|