@ocap/resolver 1.16.15 → 1.17.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/index.js +5 -5
- package/package.json +12 -12
package/lib/index.js
CHANGED
|
@@ -9,8 +9,8 @@ const isEqual = require('lodash/isEqual');
|
|
|
9
9
|
const uniqBy = require('lodash/unionBy');
|
|
10
10
|
const Config = require('@ocap/config');
|
|
11
11
|
const states = require('@ocap/state');
|
|
12
|
-
const
|
|
13
|
-
const md5 = require('@ocap/util/lib/md5');
|
|
12
|
+
const { patterns } = require('@arcblock/validator');
|
|
13
|
+
const { md5 } = require('@ocap/util/lib/md5');
|
|
14
14
|
const CustomError = require('@ocap/util/lib/error');
|
|
15
15
|
const { types } = require('@ocap/mcrypto');
|
|
16
16
|
const { fromTypeUrl } = require('@ocap/message');
|
|
@@ -174,7 +174,7 @@ module.exports = class OCAPResolver {
|
|
|
174
174
|
}
|
|
175
175
|
|
|
176
176
|
getTx({ hash }, ctx) {
|
|
177
|
-
if (
|
|
177
|
+
if (patterns.txHash.test(hash)) {
|
|
178
178
|
return this._getState({
|
|
179
179
|
table: 'tx',
|
|
180
180
|
id: hash.toUpperCase(),
|
|
@@ -521,7 +521,7 @@ module.exports = class OCAPResolver {
|
|
|
521
521
|
return this._doPaginatedSearch('listAssets', args, 'assets', 'data', ctx);
|
|
522
522
|
}
|
|
523
523
|
|
|
524
|
-
listAssetTransactions(args = {}, ctx) {
|
|
524
|
+
listAssetTransactions(args = {}, ctx = {}) {
|
|
525
525
|
if (!args.address) {
|
|
526
526
|
return { transactions: [] };
|
|
527
527
|
}
|
|
@@ -607,7 +607,7 @@ module.exports = class OCAPResolver {
|
|
|
607
607
|
return result ? { type, id: keyword } : null;
|
|
608
608
|
};
|
|
609
609
|
|
|
610
|
-
if (
|
|
610
|
+
if (patterns.txHash.test(args.keyword)) {
|
|
611
611
|
const results = await Promise.all([
|
|
612
612
|
doSearch('tx', args.keyword.toUpperCase()),
|
|
613
613
|
doSearch('rollupBlock', args.keyword),
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.
|
|
6
|
+
"version": "1.17.0",
|
|
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.
|
|
26
|
-
"@arcblock/did-util": "1.
|
|
27
|
-
"@arcblock/validator": "1.
|
|
28
|
-
"@ocap/config": "1.
|
|
29
|
-
"@ocap/indexdb": "1.
|
|
30
|
-
"@ocap/mcrypto": "1.
|
|
31
|
-
"@ocap/message": "1.
|
|
32
|
-
"@ocap/state": "1.
|
|
33
|
-
"@ocap/tx-protocols": "1.
|
|
34
|
-
"@ocap/util": "1.
|
|
25
|
+
"@arcblock/did": "1.17.0",
|
|
26
|
+
"@arcblock/did-util": "1.17.0",
|
|
27
|
+
"@arcblock/validator": "1.17.0",
|
|
28
|
+
"@ocap/config": "1.17.0",
|
|
29
|
+
"@ocap/indexdb": "1.17.0",
|
|
30
|
+
"@ocap/mcrypto": "1.17.0",
|
|
31
|
+
"@ocap/message": "1.17.0",
|
|
32
|
+
"@ocap/state": "1.17.0",
|
|
33
|
+
"@ocap/tx-protocols": "1.17.0",
|
|
34
|
+
"@ocap/util": "1.17.0",
|
|
35
35
|
"debug": "^4.3.3",
|
|
36
36
|
"lodash": "^4.17.21"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "f0944b60a5fb4115e1a3727bb07f68174bc56c5c"
|
|
39
39
|
}
|