test('should derive high indexed accounts from the given seed', async () => {\r
const wallet = await Bip44Wallet.fromSeed(NANO_TEST_VECTORS.PASSWORD, NANO_TEST_VECTORS.BIP39_SEED)\r
await wallet.unlock(NANO_TEST_VECTORS.PASSWORD)\r
- let accounts\r
- try {\r
- accounts = await wallet.accounts(0x70000000, 0x700000ff)\r
- } catch (err) {\r
- throw new Error(err.message)\r
- }\r
+ const accounts = await wallet.accounts(0x70000000, 0x700000ff)\r
\r
assert.equals(accounts.length, 0x100)\r
- for (const a of accounts) {\r
+ for (let i = 0; i < accounts.length; i++) {\r
+ const a = accounts[i]\r
assert.exists(a)\r
assert.exists(a.address)\r
assert.exists(a.publicKey)\r
assert.exists(a.privateKey)\r
assert.exists(a.index)\r
+ assert.equals(a.index, i + 0x70000000)\r
}\r
})\r
\r