Skip to content

Commit c8f1a4d

Browse files
committed
#36 address comments
1 parent 18df33c commit c8f1a4d

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/utils/bytes.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,11 @@
2121
* @copyright SKALE Labs 2026-Present
2222
*/
2323

24+
import { validateHexString } from './helper';
25+
2426
export function hexToBytes(hex: string): Uint8Array {
2527
const sanitizedHex = hex.startsWith('0x') ? hex.slice(2) : hex;
28+
validateHexString(sanitizedHex);
2629
const bytes = new Uint8Array(sanitizedHex.length / 2);
2730

2831
for (let i = 0; i < sanitizedHex.length; i += 2) {

0 commit comments

Comments
 (0)