From c548f949884899398510aa7823215dc7ae08c928 Mon Sep 17 00:00:00 2001 From: Chris Duncan Date: Thu, 10 Jul 2025 08:20:39 -0700 Subject: [PATCH] Move Ledger account derivation test into dedicated suite. --- test/test.derive-accounts.mjs | 23 ----------------------- test/test.ledger.mjs | 4 +++- 2 files changed, 3 insertions(+), 24 deletions(-) diff --git a/test/test.derive-accounts.mjs b/test/test.derive-accounts.mjs index 7237176..e9b8661 100644 --- a/test/test.derive-accounts.mjs +++ b/test/test.derive-accounts.mjs @@ -89,26 +89,3 @@ await suite('BLAKE2b account derivation', async () => { await wallet.destroy() }) }) - -/** -* This suite requires a connected unlocked Ledger device to execute tests. -*/ -await suite('Ledger device account derivation', { skip: false || isNode }, async () => { - const wallet = await LedgerWallet.create() - await wallet.connect() - - await test('fetch the first account from a Ledger device', async () => { - const account = await wallet.account() - - assert.exists(account.publicKey) - assert.exists(account.address) - assert.exists(account.privateKey) - assert.equals(account.privateKey, '0000000000000000000000000000000000000000000000000000000000000000') - }) - - await test('fail to return multiple accounts from a Ledger device', async () => { - assert.rejects(wallet.accounts()) - }) - - await wallet.destroy() -}) diff --git a/test/test.ledger.mjs b/test/test.ledger.mjs index fe21fa3..1cf55de 100644 --- a/test/test.ledger.mjs +++ b/test/test.ledger.mjs @@ -56,8 +56,10 @@ await suite('Ledger hardware wallet', { skip: false || isNode }, async () => { assert.exists(account) assert.ok(account instanceof Account) - assert.exists(account.publicKey) assert.exists(account.address) + assert.exists(account.publicKey) + assert.exists(account.privateKey) + assert.equals(account.privateKey, '0000000000000000000000000000000000000000000000000000000000000000') }) await test('sign open block from block', async () => { -- 2.47.3