Skip to content
This repository was archived by the owner on Feb 23, 2021. It is now read-only.

Conversation

@tanx
Copy link
Contributor

@tanx tanx commented Aug 28, 2018

Closes #559, closes #558

@tanx tanx requested a review from valentinewallace August 28, 2018 10:23
Copy link
Contributor

@valentinewallace valentinewallace left a 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() {
Copy link
Contributor

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
Copy link
Contributor

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

() => typeof this._store.walletAddress === 'string',
() => this._nav.goNewAddress()
);
observe(this._store, 'walletAddress', () => this._nav.goNewAddress());
Copy link
Contributor

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

Copy link
Contributor Author

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.

@tanx tanx force-pushed the poll-wallet-balance branch from a93b92f to 5b04c6e Compare August 29, 2018 07:33
@tanx tanx merged commit b097170 into master Aug 29, 2018
@tanx tanx deleted the poll-wallet-balance branch August 29, 2018 07:34
});
});

describe('poll()', () => {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice tests!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Poll wallet balances in wallet action so that home screen is up to date Neutrino never finishes syncing, only after restart

3 participants