@blocklet/meta 1.8.61 → 1.8.63-beta-c51e554d

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/info.js +9 -7
  2. package/package.json +6 -6
package/lib/info.js CHANGED
@@ -28,9 +28,6 @@ const getBlockletInfo = (state, nodeSk, { returnWallet = true } = {}) => {
28
28
  appUrl,
29
29
  };
30
30
  }
31
- if (!nodeSk || typeof nodeSk !== 'string') {
32
- throw new Error('Node secret key must be a string');
33
- }
34
31
  const customSk = envs.find((x) => x.key === 'BLOCKLET_APP_SK');
35
32
  const customType = envs.find((x) => x.key === 'BLOCKLET_WALLET_TYPE');
36
33
  let type;
@@ -44,11 +41,16 @@ const getBlockletInfo = (state, nodeSk, { returnWallet = true } = {}) => {
44
41
  else if (customSk && customSk.value) {
45
42
  wallet = (0, wallet_1.default)(customSk.value);
46
43
  }
47
- else if (customType) {
48
- wallet = (0, wallet_1.default)(state.meta.did, nodeSk, type);
49
- }
50
44
  else {
51
- wallet = (0, wallet_1.default)(state.meta.did, nodeSk);
45
+ if (!nodeSk || typeof nodeSk !== 'string') {
46
+ throw new Error('Node secret key must be a string');
47
+ }
48
+ if (customType) {
49
+ wallet = (0, wallet_1.default)(state.meta.did, nodeSk, type);
50
+ }
51
+ else {
52
+ wallet = (0, wallet_1.default)(state.meta.did, nodeSk);
53
+ }
52
54
  }
53
55
  return {
54
56
  did,
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.8.61",
6
+ "version": "1.8.63-beta-c51e554d",
7
7
  "description": "Library to parse/validate/fix blocklet meta",
8
8
  "main": "./lib/index.js",
9
9
  "typings": "./lib/index.d.ts",
@@ -24,14 +24,14 @@
24
24
  "author": "wangshijun <wangshijun2020@gmail.com> (http://github.com/wangshijun)",
25
25
  "license": "MIT",
26
26
  "dependencies": {
27
- "@abtnode/client": "1.8.61",
28
- "@abtnode/constant": "1.8.61",
29
- "@abtnode/util": "1.8.61",
27
+ "@abtnode/client": "1.8.63-beta-c51e554d",
28
+ "@abtnode/constant": "1.8.63-beta-c51e554d",
29
+ "@abtnode/util": "1.8.63-beta-c51e554d",
30
30
  "@arcblock/did": "1.18.36",
31
31
  "@arcblock/did-ext": "1.18.36",
32
32
  "@arcblock/did-util": "1.18.36",
33
33
  "@arcblock/jwt": "1.18.36",
34
- "@blocklet/constant": "1.8.61",
34
+ "@blocklet/constant": "1.8.63-beta-c51e554d",
35
35
  "@ocap/asset": "1.18.36",
36
36
  "@ocap/mcrypto": "1.18.36",
37
37
  "@ocap/types": "1.18.36",
@@ -80,5 +80,5 @@
80
80
  "ts-node": "^10.9.1",
81
81
  "typescript": "^4.8.4"
82
82
  },
83
- "gitHead": "f68ac14c2074400d392e2171d328f12dbd2e64cb"
83
+ "gitHead": "9913ed7968dfab63d6549201a5a98f9819fcfac6"
84
84
  }