@ocap/resolver 1.13.28 → 1.13.32
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 +16 -10
- package/package.json +11 -11
package/lib/index.js
CHANGED
|
@@ -165,14 +165,18 @@ module.exports = class OCAPResolver {
|
|
|
165
165
|
}
|
|
166
166
|
|
|
167
167
|
getTx({ hash }, ctx) {
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
168
|
+
if (states.Joi.hashRegexp.test(hash)) {
|
|
169
|
+
return this._getState({
|
|
170
|
+
table: 'tx',
|
|
171
|
+
id: hash.toUpperCase(),
|
|
172
|
+
dataKey: 'tx.itxJson.data',
|
|
173
|
+
onRead: (tx) => this.formatTx(tx, ctx),
|
|
174
|
+
expandContext: false,
|
|
175
|
+
ctx,
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
return null;
|
|
176
180
|
}
|
|
177
181
|
|
|
178
182
|
getBlock() {
|
|
@@ -569,9 +573,11 @@ module.exports = class OCAPResolver {
|
|
|
569
573
|
return { results: results.filter(Boolean) };
|
|
570
574
|
}
|
|
571
575
|
|
|
572
|
-
const entitiesByHash = ['tx', 'rollupBlock'];
|
|
573
576
|
if (states.Joi.hashRegexp.test(args.keyword)) {
|
|
574
|
-
const results = await Promise.all(
|
|
577
|
+
const results = await Promise.all([
|
|
578
|
+
this.indexdb.tx.get(args.keyword.toUpperCase()),
|
|
579
|
+
this.indexdb.rollupBlock.get(args.keyword),
|
|
580
|
+
]);
|
|
575
581
|
return { results: results.filter(Boolean) };
|
|
576
582
|
}
|
|
577
583
|
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.13.
|
|
6
|
+
"version": "1.13.32",
|
|
7
7
|
"description": "GraphQL resolver built upon ocap statedb and GQL layer",
|
|
8
8
|
"main": "lib/index.js",
|
|
9
9
|
"files": [
|
|
@@ -22,17 +22,17 @@
|
|
|
22
22
|
"jest": "^26.6.3"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@arcblock/did": "1.13.
|
|
26
|
-
"@arcblock/did-util": "1.13.
|
|
27
|
-
"@ocap/config": "1.13.
|
|
28
|
-
"@ocap/indexdb": "1.13.
|
|
29
|
-
"@ocap/mcrypto": "1.13.
|
|
30
|
-
"@ocap/message": "1.13.
|
|
31
|
-
"@ocap/state": "1.13.
|
|
32
|
-
"@ocap/tx-protocols": "1.13.
|
|
33
|
-
"@ocap/util": "1.13.
|
|
25
|
+
"@arcblock/did": "1.13.32",
|
|
26
|
+
"@arcblock/did-util": "1.13.32",
|
|
27
|
+
"@ocap/config": "1.13.32",
|
|
28
|
+
"@ocap/indexdb": "1.13.32",
|
|
29
|
+
"@ocap/mcrypto": "1.13.32",
|
|
30
|
+
"@ocap/message": "1.13.32",
|
|
31
|
+
"@ocap/state": "1.13.32",
|
|
32
|
+
"@ocap/tx-protocols": "1.13.32",
|
|
33
|
+
"@ocap/util": "1.13.32",
|
|
34
34
|
"debug": "^4.3.2",
|
|
35
35
|
"lodash": "^4.17.21"
|
|
36
36
|
},
|
|
37
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "30a6554645478a0c3c29477e6e9954c8d42272e0"
|
|
38
38
|
}
|