From 96782b43d284cba6aaa30dd694bc1af41659f696 Mon Sep 17 00:00:00 2001 From: Chris Duncan Date: Wed, 20 Aug 2025 13:32:11 -0700 Subject: [PATCH] Use frontier for potential Ledger signature when signing from block. --- src/lib/block.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lib/block.ts b/src/lib/block.ts index 2e0da01..50f6497 100644 --- a/src/lib/block.ts +++ b/src/lib/block.ts @@ -422,9 +422,11 @@ export class Block { if (typeof input === 'string' && /^[A-F0-9]{64}$/i.test(input)) { const signature = await NanoNaCl.detached(this.#hash(), hex.toBytes(input)) this.signature = bytes.toHex(signature) - } else if (input instanceof Wallet && typeof index === 'number') { + } else if (input instanceof Wallet && typeof index === 'number' + && (frontier === undefined || frontier instanceof Block) + ) { const wallet = input - await wallet.sign(index, this) + await wallet.sign(index, this, frontier) } else { throw new TypeError('Invalid input for block signature') } -- 2.47.3