Skip to content

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

@mindhacker42

Description

@mindhacker42

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions