Open mindhacker42 opened 3 years ago
@DrewCarlson or @EBGToo could you help with that? If it would help, I could also create a sample app with reproduced issue.
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.
The first time I create
System
, create wallet managers and connect them, I get all the relevant events for wallets andwalletManager.state
gets toCONNECTED
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 callsystem.pause()
and when he returns we callsystem.resume()
. The problem is that after these 2 callswalletManager.state
isSYNCING
all the time. NoWalletManagerSync*Event
are even called, justWalletManagerChangedEvent
and thenWalletManagerBlockUpdatedEvent
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 513c0ee1b8a01d07018bc164f938289213e15daf.Reproductions steps:
CONNECTED
state. Syncing is finished.system.pause()
.system.resume
.SYNCING
state and stay in this state.