Skip to content

Commit

Permalink
Remove strip zero when encode string to hex
Browse files Browse the repository at this point in the history
  • Loading branch information
sc0Vu committed Jan 30, 2024
1 parent d689759 commit 51e2222
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/Utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ public static function toHex($value, $isPrefix=false)
$hex = $bn->toHex(true);
$hex = preg_replace('/^0+(?!$)/', '', $hex);
} elseif (is_string($value)) {
$value = self::stripZero($value);
$hex = implode('', unpack('H*', $value));
} elseif ($value instanceof BigNumber) {
$hex = $value->toHex(true);
Expand Down

0 comments on commit 51e2222

Please sign in to comment.