]> zoso.dev Git - libnemo.git/commitdiff
Fix sweep signing and document that Ledger is unsupported.
authorChris Duncan <chris@zoso.dev>
Wed, 4 Dec 2024 20:28:07 +0000 (12:28 -0800)
committerChris Duncan <chris@zoso.dev>
Thu, 5 Dec 2024 13:27:10 +0000 (05:27 -0800)
src/lib/tools.ts

index 0fa8a7ad952ff2276f1ad80daa859d51956b17fd..69cadcd901cfe01668bad6b5760a14ba87d21483 100644 (file)
@@ -90,7 +90,7 @@ export async function sign (key: string, ...input: string[]): Promise<string> {
 
 /**
 * Collects the funds from a specified range of accounts in a wallet and sends
-* them all to a single recipient address.
+* them all to a single recipient address. Hardware wallets are unsupported.
 *
 * @param {Rpc|string|URL} rpc - RPC node information required to refresh accounts, calculate PoW, and process blocks
 * @param {Blake2bWallet|Bip44Wallet|LedgerWallet} wallet - Wallet from which to sweep funds
@@ -127,7 +127,7 @@ export async function sweep (rpc: Rpc | string | URL, wallet: Blake2bWallet | Bi
                        const blockRequest: Promise<void> = new Promise(async (resolve) => {
                                try {
                                        await block.pow()
-                                       await block.sign(account.index)
+                                       await block.sign()
                                        const hash = await block.process(rpc)
                                        results.push({ status: 'success', address: block.account.address, message: hash })
                                } catch (err: any) {