From: Chris Duncan Date: Thu, 10 Jul 2025 15:20:39 +0000 (-0700) Subject: Move Ledger account derivation test into dedicated suite. X-Git-Tag: v0.10.5~68 X-Git-Url: https://git.codecow.com/?a=commitdiff_plain;h=c548f949884899398510aa7823215dc7ae08c928;p=libnemo.git Move Ledger account derivation test into dedicated suite. --- 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 () => {