From 72927835ea1380a3aee7171ea5ce5f37c5b09246 Mon Sep 17 00:00:00 2001 From: Paul Miller Date: Fri, 22 Nov 2024 22:04:19 +0000 Subject: [PATCH] Adjust error --- src/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils.ts b/src/utils.ts index 0a93b87..96ded18 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -53,7 +53,7 @@ export function hexToBytes(hex: string): Uint8Array { if (typeof hex !== 'string') throw new Error('hex string expected, got ' + typeof hex); const hl = hex.length; const al = hl / 2; - if (hl % 2) throw new Error('padded hex string expected, got unpadded hex of length ' + hl); + if (hl % 2) throw new Error('hex string expected, got unpadded hex of length ' + hl); const array = new Uint8Array(al); for (let ai = 0, hi = 0; ai < al; ai++, hi += 2) { const n1 = asciiToBase16(hex.charCodeAt(hi));