@arcblock/did 1.18.36 → 1.18.38

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 +4 -1
  2. package/package.json +4 -4
package/lib/index.js CHANGED
@@ -123,7 +123,10 @@ exports.isFromPublicKey = isFromPublicKey;
123
123
  * @returns {boolean}
124
124
  */
125
125
  const isValid = (did) => {
126
- const address = (0, util_1.toAddress)(did);
126
+ if (!did) {
127
+ return false;
128
+ }
129
+ const address = (0, util_1.toAddress)(String(did));
127
130
  const { hash } = (0, type_1.toTypeInfo)(address);
128
131
  if (typeof hash === 'undefined') {
129
132
  return false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcblock/did",
3
- "version": "1.18.36",
3
+ "version": "1.18.38",
4
4
  "description": "Javascript lib to work with ArcBlock DID",
5
5
  "keywords": [
6
6
  "arcblock",
@@ -53,12 +53,12 @@
53
53
  "url": "https://github.com/ArcBlock/asset-chain/issues"
54
54
  },
55
55
  "dependencies": {
56
- "@ocap/mcrypto": "1.18.36",
57
- "@ocap/util": "1.18.36",
56
+ "@ocap/mcrypto": "1.18.38",
57
+ "@ocap/util": "1.18.38",
58
58
  "bn.js": "^5.2.1",
59
59
  "debug": "^4.3.4",
60
60
  "lodash": "^4.17.21",
61
61
  "type-fest": "^3.1.0"
62
62
  },
63
- "gitHead": "507eaab0fc94d92a88c49c2e3441c5f6b0e3788f"
63
+ "gitHead": "0ea539a3a0e7a13e7a49daaa4d7e842dcee2192d"
64
64
  }