From 0079c472a64b48ba8f1781544a10a00b141f88d5 Mon Sep 17 00:00:00 2001 From: Chris Duncan Date: Wed, 13 Aug 2025 09:26:19 -0700 Subject: [PATCH] Include input on block sign errors, which is stripped in production build. --- src/lib/block.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/block.ts b/src/lib/block.ts index 12a1da4..eec69f9 100644 --- a/src/lib/block.ts +++ b/src/lib/block.ts @@ -422,7 +422,7 @@ export class Block { const signature = await NanoNaCl.detached(this.#hash(), hex.toBytes(input)) this.signature = bytes.toHex(signature) } else if (typeof input !== 'number' && typeof input !== 'string' && !(input instanceof Wallet)) { - throw new TypeError('Invalid signing input') + throw new TypeError('Invalid signing input', { cause: input }) } else if (input instanceof Wallet && typeof param === 'number') { const wallet = input await wallet.sign(param, this) @@ -440,7 +440,7 @@ export class Block { } await ledger.sign(index, this) } else { - throw new TypeError('Invalid key for block signature', { cause: typeof input }) + throw new TypeError('Invalid key for block signature', { cause: input }) } resolve(this) } catch (err) { -- 2.47.3