-
Notifications
You must be signed in to change notification settings - Fork 168
Poll wallet balance #565
Poll wallet balance #565
Conversation
valentinewallace
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The wallet balance polls really well 👍
Neutrino sync still hangs for me til i restart the app.
| * Poll the getInfo api until synced_to_chain is true. | ||
| * @return {Promise<undefined>} | ||
| */ | ||
| async pollInfo() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Poll seems to make all these calls way cleaner 👍
| * lnd node all balances, channels and transactions are fetched. | ||
| */ | ||
| observe(store, 'lndReady', async () => { | ||
| // TODO: this is a workaround the deadlock bug in lnd that blocks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
submitted an issue for this todo
src/action/wallet.js
Outdated
| () => typeof this._store.walletAddress === 'string', | ||
| () => this._nav.goNewAddress() | ||
| ); | ||
| observe(this._store, 'walletAddress', () => this._nav.goNewAddress()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this doesn't have to be fixed now, but when we change to generating new addresses for every transaction we should switch back from observe to when so we don't always redirect to the NewAddress on new address generation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. I reverted that change.
since wallet balances are now polled
since wallet balances are polled now and transactions are updated anyway when navigating to the transaction list
balances are polled and transaction list is updated when navigating there
This reverts commit 9ba05bd.
a93b92f to
5b04c6e
Compare
| }); | ||
| }); | ||
|
|
||
| describe('poll()', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice tests!
Closes #559, closes #558