mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-01-19 05:45:15 +01:00
TST
This commit is contained in:
parent
6a65f35a8b
commit
f8f8015bf4
11
App.test.js
11
App.test.js
@ -236,3 +236,14 @@ it('Wallet can fetch UTXO', async () => {
|
||||
await w.fetchUtxo();
|
||||
assert.ok(w.utxo.length > 0, 'unexpected empty UTXO');
|
||||
});
|
||||
|
||||
it.skip('Wallet can fetch balance', async () => {
|
||||
let w = new LegacyWallet();
|
||||
w._address = '1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa'; // hack internals
|
||||
assert.ok(w.getBalance() === 0);
|
||||
assert.ok(w._lastBalanceFetch === 0);
|
||||
await w.fetchBalance();
|
||||
console.log(w.getBalance());
|
||||
assert.ok(w.getBalance() > 0);
|
||||
assert.ok(w._lastBalanceFetch > 0);
|
||||
});
|
||||
|
@ -74,6 +74,8 @@ export class LegacyWallet extends AbstractWallet {
|
||||
* Fetches balance of the Wallet via API.
|
||||
* Returns VOID. Get the actual balance via getter.
|
||||
*
|
||||
* TODO: rewrite on Frisbee
|
||||
*
|
||||
* @returns {Promise.<void>}
|
||||
*/
|
||||
async fetchBalance() {
|
||||
|
Loading…
Reference in New Issue
Block a user