From f5d276894c5731530cdf8930d7b9eaa872f26416 Mon Sep 17 00:00:00 2001 From: Chris Duncan Date: Tue, 15 Jul 2025 20:03:41 -0700 Subject: [PATCH] Call single account from test and uncomment tests. --- test/test.main.mjs | 14 +++++++------- test/test.tools.mjs | 6 ++---- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/test/test.main.mjs b/test/test.main.mjs index bca4fc5..90f7644 100644 --- a/test/test.main.mjs +++ b/test/test.main.mjs @@ -1,14 +1,14 @@ // SPDX-FileCopyrightText: 2025 Chris Duncan // SPDX-License-Identifier: GPL-3.0-or-later -// import './test.blake2b.mjs' -// import './test.calculate-pow.mjs' -// import './test.create-wallet.mjs' -// import './test.derive-accounts.mjs' -// import './test.import-wallet.mjs' +import './test.blake2b.mjs' +import './test.calculate-pow.mjs' +import './test.create-wallet.mjs' +import './test.derive-accounts.mjs' +import './test.import-wallet.mjs' import './test.ledger.mjs' -// import './test.lock-unlock.mjs' -// import './test.manage-rolodex.mjs' +import './test.lock-unlock.mjs' +import './test.manage-rolodex.mjs' import './test.refresh-accounts.mjs' import './test.sign-blocks.mjs' import './test.tools.mjs' diff --git a/test/test.tools.mjs b/test/test.tools.mjs index 2cf933d..bff22f7 100644 --- a/test/test.tools.mjs +++ b/test/test.tools.mjs @@ -104,8 +104,7 @@ await suite('signature tests', async () => { await test('should verify a block using the public key', async () => { const wallet = await Bip44Wallet.fromSeed(NANO_TEST_VECTORS.PASSWORD, NANO_TEST_VECTORS.BIP39_SEED) await wallet.unlock(NANO_TEST_VECTORS.PASSWORD) - const accounts = await wallet.accounts() - const account = accounts[0] + const account = await wallet.account() const sendBlock = new SendBlock( account.address, '5618869000000000000000000000000', @@ -124,8 +123,7 @@ await suite('signature tests', async () => { await test('should reject a block using the wrong public key', async () => { const wallet = await Bip44Wallet.fromSeed(NANO_TEST_VECTORS.PASSWORD, NANO_TEST_VECTORS.BIP39_SEED) await wallet.unlock(NANO_TEST_VECTORS.PASSWORD) - const accounts = await wallet.accounts() - const account = accounts[0] + const account = await wallet.account() const sendBlock = new SendBlock( account.address, '5618869000000000000000000000000', -- 2.47.3