@ercworldio/blockchain-shared 1.0.16 → 1.0.17

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.
@@ -127,7 +127,7 @@ const convertHexString = (hexString, format) => {
127
127
  const cleanHex = hexString.startsWith('0x') ? hexString.slice(2) : hexString;
128
128
  switch (format) {
129
129
  case 'decimal':
130
- return BigInt(hexString).toString();
130
+ return BigInt(cleanHex.startsWith('0x') ? cleanHex : `0x${cleanHex}`).toString();
131
131
  case 'ascii':
132
132
  let result = '';
133
133
  for (let i = 0; i < cleanHex.length; i += 2) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ercworldio/blockchain-shared",
3
- "version": "1.0.16",
3
+ "version": "1.0.17",
4
4
  "description": "Shared library for blockchain projects",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",