Skip to content

Commit

Permalink
fix: remove hex prefix should work insensitive, for both 0x and 0X
Browse files Browse the repository at this point in the history
  • Loading branch information
tabaktoni committed Feb 3, 2023
1 parent 1d6adf0 commit 53323d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/encode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export function buf2hex(buffer: Uint8Array) {
*/

export function removeHexPrefix(hex: string): string {
return hex.replace(/^0x/, '');
return hex.replace(/^0x/i, '');
}

export function addHexPrefix(hex: string): string {
Expand Down

0 comments on commit 53323d4

Please sign in to comment.