From 49ec86aee6c82c99bf4a13c03e23d27a95ab2395 Mon Sep 17 00:00:00 2001 From: Chris Duncan Date: Sat, 8 Aug 2026 02:06:45 -0700 Subject: [PATCH] Revert regex to just check for hex format and maximum length, and rely on left-padded byte conversion. --- src/lib/block/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/block/index.ts b/src/lib/block/index.ts index afa614c..04b4229 100644 --- a/src/lib/block/index.ts +++ b/src/lib/block/index.ts @@ -80,7 +80,7 @@ export class Block { if (typeof previous !== 'string') { throw new TypeError('Account frontier is unknown') } - if (!(/^[0-9A-F]{64}$/i.test(previous))) { + if (!(/^([0-9A-F]{2}){1,64}$/i.test(previous))) { throw new RangeError('Invalid frontier hash') } this.account = account -- 2.52.0