mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2024-11-19 18:00:17 +01:00
TST: improved watch-only test
This commit is contained in:
parent
41f68722ed
commit
3313bab16e
@ -96,10 +96,18 @@ describe('Watch only wallet', () => {
|
||||
assert.strictEqual(w.getBalance(), 200000);
|
||||
await w.fetchTransactions();
|
||||
assert.strictEqual(w.getTransactions().length, 4);
|
||||
assert.ok((await w.getAddressAsync()).startsWith('bc1'));
|
||||
const nextAddress = await w.getAddressAsync();
|
||||
|
||||
assert.strictEqual(w.getNextFreeAddressIndex(), 2);
|
||||
assert.strictEqual(nextAddress, 'bc1q6442dedpwvqldldnsyux3cuz27paqks0pf2kvf');
|
||||
assert.strictEqual(nextAddress, w._getExternalAddressByIndex(w.getNextFreeAddressIndex()));
|
||||
|
||||
const nextChangeAddress = await w.getChangeAddressAsync();
|
||||
assert.strictEqual(nextChangeAddress, 'bc1qgltdyjnertcyvdn9hlkfpgr6hc260rjrss49uy');
|
||||
});
|
||||
|
||||
// skipped because its generally rare case
|
||||
// eslint-disable-next-line jest/no-disabled-tests
|
||||
it.skip('can fetch txs for address funded by genesis txs', async () => {
|
||||
const w = new WatchOnlyWallet();
|
||||
w.setSecret('37jKPSmbEGwgfacCr2nayn1wTaqMAbA94Z');
|
||||
|
Loading…
Reference in New Issue
Block a user