Skip to content

Commit 1e6213d

Browse files
authored
Merge pull request #345 from web3p/patch-tohex-for-string
Remove strip zero when encode string to hex
2 parents c58212a + 51e2222 commit 1e6213d

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

src/Utils.php

-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ public static function toHex($value, $isPrefix=false)
9393
$hex = $bn->toHex(true);
9494
$hex = preg_replace('/^0+(?!$)/', '', $hex);
9595
} elseif (is_string($value)) {
96-
$value = self::stripZero($value);
9796
$hex = implode('', unpack('H*', $value));
9897
} elseif ($value instanceof BigNumber) {
9998
$hex = $value->toHex(true);

0 commit comments

Comments
 (0)