From b02e8802fd395e6ca6423cac3c6fb18f380ace37 Mon Sep 17 00:00:00 2001 From: Chris Duncan Date: Sat, 8 Aug 2026 14:49:18 -0700 Subject: [PATCH] Fix frontier regex and allow special '0' opening block value. --- 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 bb8a893..23fb95c 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]{2}){1,64}$/i.test(previous))) { + if (!hex.is(previous, 64) && previous !== '0') { throw new RangeError('Invalid frontier hash') } this.account = account -- 2.52.0