@ocap/resolver 1.16.14 → 1.16.17

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.
Files changed (2) hide show
  1. package/lib/index.js +5 -5
  2. 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 Joi = require('@arcblock/validator');
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 (Joi.patterns.txHash.test(hash)) {
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 (Joi.patterns.txHash.test(args.keyword)) {
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.16.14",
6
+ "version": "1.16.17",
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.16.14",
26
- "@arcblock/did-util": "1.16.14",
27
- "@arcblock/validator": "1.16.14",
28
- "@ocap/config": "1.16.14",
29
- "@ocap/indexdb": "1.16.14",
30
- "@ocap/mcrypto": "1.16.14",
31
- "@ocap/message": "1.16.14",
32
- "@ocap/state": "1.16.14",
33
- "@ocap/tx-protocols": "1.16.14",
34
- "@ocap/util": "1.16.14",
25
+ "@arcblock/did": "1.16.17",
26
+ "@arcblock/did-util": "1.16.17",
27
+ "@arcblock/validator": "1.16.17",
28
+ "@ocap/config": "1.16.17",
29
+ "@ocap/indexdb": "1.16.17",
30
+ "@ocap/mcrypto": "1.16.17",
31
+ "@ocap/message": "1.16.17",
32
+ "@ocap/state": "1.16.17",
33
+ "@ocap/tx-protocols": "1.16.17",
34
+ "@ocap/util": "1.16.17",
35
35
  "debug": "^4.3.3",
36
36
  "lodash": "^4.17.21"
37
37
  },
38
- "gitHead": "5f1bb9c7d6044e20c77e9cccea8cda2d6c5ae29f"
38
+ "gitHead": "489ce5e03bce27ddcd535390228b11ab56e7a2e3"
39
39
  }