@ocap/tx-protocols 1.29.17 → 1.29.19

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.
@@ -35,7 +35,8 @@ const verifyOwnership = ({ tokenKey = "itx.token" } = {}) => async (context, nex
35
35
  }
36
36
  const data = await response.json();
37
37
  if ((await Promise.all(data.filter(Boolean).filter((item) => {
38
- if (item.type !== "TokenIssueCredential") return false;
38
+ const vcType = item.type;
39
+ if (!(Array.isArray(vcType) ? vcType.includes("TokenIssueCredential") : vcType === "TokenIssueCredential")) return false;
39
40
  if (item.issuer?.id !== sender) return false;
40
41
  const { id, issued } = item.credentialSubject || {};
41
42
  return id === sender && issued?.address === address && issued?.symbol === symbol && issued?.chainId === chainId && issued?.website === website;
@@ -38,7 +38,8 @@ const verifyOwnership = ({ tokenKey = "itx.token" } = {}) => async (context, nex
38
38
  }
39
39
  const data = await response.json();
40
40
  if ((await Promise.all(data.filter(Boolean).filter((item) => {
41
- if (item.type !== "TokenIssueCredential") return false;
41
+ const vcType = item.type;
42
+ if (!(Array.isArray(vcType) ? vcType.includes("TokenIssueCredential") : vcType === "TokenIssueCredential")) return false;
42
43
  if (item.issuer?.id !== sender) return false;
43
44
  const { id, issued } = item.credentialSubject || {};
44
45
  return id === sender && issued?.address === address && issued?.symbol === symbol && issued?.chainId === chainId && issued?.website === website;
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.29.17",
6
+ "version": "1.29.19",
7
7
  "description": "Predefined tx pipeline sets to execute certain type of transactions",
8
8
  "type": "module",
9
9
  "main": "./lib/index.cjs",
@@ -46,22 +46,22 @@
46
46
  "author": "wangshijun <wangshijun2010@gmail.com> (http://github.com/wangshijun)",
47
47
  "license": "MIT",
48
48
  "dependencies": {
49
- "@arcblock/did": "1.29.17",
50
- "@arcblock/did-util": "1.29.17",
51
- "@arcblock/jwt": "1.29.17",
52
- "@arcblock/validator": "1.29.17",
53
- "@arcblock/vc": "1.29.17",
49
+ "@arcblock/did": "1.29.19",
50
+ "@arcblock/did-util": "1.29.19",
51
+ "@arcblock/jwt": "1.29.19",
52
+ "@arcblock/validator": "1.29.19",
53
+ "@arcblock/vc": "1.29.19",
54
54
  "@blocklet/xss": "^0.3.7",
55
- "@ocap/asset": "1.29.17",
56
- "@ocap/client": "1.29.17",
57
- "@ocap/mcrypto": "1.29.17",
58
- "@ocap/merkle-tree": "1.29.17",
59
- "@ocap/message": "1.29.17",
60
- "@ocap/state": "1.29.17",
61
- "@ocap/tx-pipeline": "1.29.17",
62
- "@ocap/types": "1.29.17",
63
- "@ocap/util": "1.29.17",
64
- "@ocap/wallet": "1.29.17",
55
+ "@ocap/asset": "1.29.19",
56
+ "@ocap/client": "1.29.19",
57
+ "@ocap/mcrypto": "1.29.19",
58
+ "@ocap/merkle-tree": "1.29.19",
59
+ "@ocap/message": "1.29.19",
60
+ "@ocap/state": "1.29.19",
61
+ "@ocap/tx-pipeline": "1.29.19",
62
+ "@ocap/types": "1.29.19",
63
+ "@ocap/util": "1.29.19",
64
+ "@ocap/wallet": "1.29.19",
65
65
  "debug": "^4.4.3",
66
66
  "deep-diff": "^1.0.2",
67
67
  "lodash": "^4.17.23",
@@ -72,8 +72,8 @@
72
72
  "elliptic": "6.5.3"
73
73
  },
74
74
  "devDependencies": {
75
- "@ocap/e2e-test": "1.29.17",
76
- "@ocap/statedb-memory": "1.29.17",
75
+ "@ocap/e2e-test": "1.29.19",
76
+ "@ocap/statedb-memory": "1.29.19",
77
77
  "@types/debug": "^4.1.12",
78
78
  "@types/lodash": "^4.17.16",
79
79
  "start-server-and-test": "^1.14.0"