@ocap/resolver 1.19.3 → 1.19.4

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 +19 -13
  2. package/package.json +12 -12
package/lib/index.js CHANGED
@@ -692,22 +692,28 @@ module.exports = class OCAPResolver {
692
692
  }
693
693
 
694
694
  verifyAccountRisk(args, ctx) {
695
- return tokenFlow.verifyAccountRisk(
696
- {
697
- ...args,
698
- tokenAddress: toAddress(args.tokenAddress || this.config.token.address),
699
- accountAddress: toAddress(args.accountAddress || ''),
700
- accountLimit: process.env.VERIFY_RISK_ACCOUNT_LIMIT,
701
- txLimit: process.env.VERIFY_RISK_TX_LIMIT,
702
- tolerance: process.env.VERIFY_RISK_TOLERANCE,
703
- },
704
- this,
705
- ctx
706
- );
695
+ if (process.env.TOKEN_FLOW_ENABLED === 'true') {
696
+ return tokenFlow.verifyAccountRisk(
697
+ {
698
+ ...args,
699
+ tokenAddress: toAddress(args.tokenAddress || this.config.token.address),
700
+ accountAddress: toAddress(args.accountAddress || ''),
701
+ accountLimit: process.env.VERIFY_RISK_ACCOUNT_LIMIT,
702
+ txLimit: process.env.VERIFY_RISK_TX_LIMIT,
703
+ tolerance: process.env.VERIFY_RISK_TOLERANCE,
704
+ },
705
+ this,
706
+ ctx
707
+ );
708
+ }
709
+ return null;
707
710
  }
708
711
 
709
712
  listTokenFlows(args, ctx) {
710
- return tokenFlow.listTokenFlows(args, this, ctx);
713
+ if (process.env.TOKEN_FLOW_ENABLED === 'true') {
714
+ return tokenFlow.listTokenFlows(args, this, ctx);
715
+ }
716
+ return [];
711
717
  }
712
718
 
713
719
  async search(args) {
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.19.3",
6
+ "version": "1.19.4",
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": "^29.7.0"
23
23
  },
24
24
  "dependencies": {
25
- "@arcblock/did": "1.19.3",
26
- "@arcblock/did-util": "1.19.3",
27
- "@arcblock/validator": "1.19.3",
28
- "@ocap/config": "1.19.3",
29
- "@ocap/indexdb": "1.19.3",
30
- "@ocap/mcrypto": "1.19.3",
31
- "@ocap/message": "1.19.3",
32
- "@ocap/state": "1.19.3",
33
- "@ocap/tx-protocols": "1.19.3",
34
- "@ocap/util": "1.19.3",
25
+ "@arcblock/did": "1.19.4",
26
+ "@arcblock/did-util": "1.19.4",
27
+ "@arcblock/validator": "1.19.4",
28
+ "@ocap/config": "1.19.4",
29
+ "@ocap/indexdb": "1.19.4",
30
+ "@ocap/mcrypto": "1.19.4",
31
+ "@ocap/message": "1.19.4",
32
+ "@ocap/state": "1.19.4",
33
+ "@ocap/tx-protocols": "1.19.4",
34
+ "@ocap/util": "1.19.4",
35
35
  "debug": "^4.3.6",
36
36
  "lodash": "^4.17.21"
37
37
  },
38
- "gitHead": "756076dad0df7468beecc95c8effd55f8c4c4f49"
38
+ "gitHead": "9b026c7ad59839ac1242a68b24e18b3a1534918d"
39
39
  }