From: Chris Duncan Date: Wed, 20 Aug 2025 20:32:11 +0000 (-0700) Subject: Use frontier for potential Ledger signature when signing from block. X-Git-Tag: v0.10.5~41^2~30 X-Git-Url: https://git.codecow.com/?a=commitdiff_plain;h=96782b43d284cba6aaa30dd694bc1af41659f696;p=libnemo.git Use frontier for potential Ledger signature when signing from block. --- 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') }