const wallet = await Bip44Wallet.fromSeed(NANO_TEST_VECTORS.PASSWORD, NANO_TEST_VECTORS.BIP39_SEED)
await wallet.unlock(NANO_TEST_VECTORS.PASSWORD)
const account = await wallet.getNextNewAccount(rpc)
- assert.ok(account)
+
+ assert.exists(account)
assert.equals(account.address, NANO_TEST_VECTORS.ADDRESS_1)
assert.equals(account.publicKey, NANO_TEST_VECTORS.PUBLIC_1)
const wallet = await Bip44Wallet.fromSeed(NANO_TEST_VECTORS.PASSWORD, NANO_TEST_VECTORS.BIP39_SEED)
await wallet.unlock(NANO_TEST_VECTORS.PASSWORD)
const account = await wallet.getNextNewAccount(rpc, 1)
- assert.ok(account)
+
+ assert.exists(account)
assert.equals(account.address, NANO_TEST_VECTORS.ADDRESS_1)
assert.equals(account.publicKey, NANO_TEST_VECTORS.PUBLIC_1)
const wallet = await Bip44Wallet.fromSeed(NANO_TEST_VECTORS.PASSWORD, NANO_TEST_VECTORS.BIP39_SEED)
await wallet.unlock(NANO_TEST_VECTORS.PASSWORD)
const account = await wallet.getNextNewAccount(rpc, 100)
- assert.ok(account)
+
+ assert.exists(account)
assert.equals(account.address, NANO_TEST_VECTORS.ADDRESS_1)
assert.equals(account.publicKey, NANO_TEST_VECTORS.PUBLIC_1)
await test('should handle failure gracefully', async () => {
const wallet = await Bip44Wallet.fromSeed(NANO_TEST_VECTORS.PASSWORD, NANO_TEST_VECTORS.BIP39_SEED)
await wallet.unlock(NANO_TEST_VECTORS.PASSWORD)
- await assert.doesNotReject(wallet.refresh(rpc, 0, 20))
+ await assert.resolves(wallet.refresh(rpc, 0, 20))
await wallet.destroy()
})