Skip to content

Commit

Permalink
fix tiny linting issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Muhammad-Altabba committed Nov 20, 2023
1 parent 717569b commit db22dbd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/web3-validator/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ const charCodeMap = {

export function hexToUint8Array(hex: string): Uint8Array {
let offset = 0;
if (hex[0] === '0' && (hex[1] === 'x' || hex[1] === 'X')) {
if (hex.startsWith('0') && (hex[1] === 'x' || hex[1] === 'X')) {
offset = 2;
}
if (hex.length % 2 !== 0) {
Expand Down

0 comments on commit db22dbd

Please sign in to comment.