@koralabs/kora-labs-common 5.1.2 → 5.1.3

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/handles/utils.js +2 -0
  2. package/package.json +1 -1
package/handles/utils.js CHANGED
@@ -125,6 +125,8 @@ const buildDrep = (address, id_hash) => {
125
125
  if (!id_hash)
126
126
  return undefined;
127
127
  const decoded = (_a = (0, utils_1.decodeAddress)(address)) === null || _a === void 0 ? void 0 : _a.slice(1);
128
+ if (!decoded || decoded == '')
129
+ return undefined;
128
130
  const hashed = crypto.createHash('md5').update(Buffer.from(decoded, 'hex')).digest('hex');
129
131
  if (!id_hash.startsWith(hashed))
130
132
  return undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@koralabs/kora-labs-common",
3
- "version": "5.1.2",
3
+ "version": "5.1.3",
4
4
  "description": "Kora Labs Common Utilities",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",