Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong wallet manager state after system.pause()/system.resume() #362

Open
mindhacker42 opened this issue Sep 14, 2021 · 2 comments
Open

Comments

@mindhacker42
Copy link

mindhacker42 commented Sep 14, 2021

The first time I create System, create wallet managers and connect them, I get all the relevant events for wallets and walletManager.state gets to CONNECTED state. I imagine that's how I know that syncing has finished.

In our app we don't want to sync wallet managers all the time in the background, I noticed that WalletManagerBlockUpdatedEvent event gets called a lot so I assume that wallet managers get updated in the background still. That is why when user leaves the screen we call system.pause() and when he returns we call system.resume(). The problem is that after these 2 calls walletManager.state is SYNCING all the time. No WalletManagerSync*Event are even called, just WalletManagerChangedEvent and then WalletManagerBlockUpdatedEvent events.

It seems like this is a bug in the library, but it might be just my lack of understanding of the library. I am working with master version 513c0ee.

Reproductions steps:

  1. Create system, create and connect wallet managers. Wallet managers go to CONNECTED state. Syncing is finished.
  2. Navigate offscreen and call system.pause().
  3. Navigate to WalletKit screen and call system.resume.
  4. Wallet managers go to SYNCING state and stay in this state.
@mindhacker42
Copy link
Author

@DrewCarlson or @EBGToo could you help with that? If it would help, I could also create a sample app with reproduced issue.

@mindhacker42
Copy link
Author

I found a workaround for this bug. If you call system.resume() 2x in a row or actually just connect wallet managers 2x in a row then wallet managers go correctly to CONNECTED state.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant