synonymdev / bitkit

Self-custodial Bitcoin and Lightning Wallet for Android and iOS.
https://bitkit.to
MIT License
116 stars 21 forks source link

[Bug]: Electrum server doesn't attempt to reconnect on refresh #1869

Closed catch-21 closed 5 months ago

catch-21 commented 6 months ago

Describe the bug

Oftentimes I reopen Bitkit and Electrum connection is down (sometimes see the toast, sometimes not). Pulling down to refresh in this state always shows the toast error but I need to go into the advanced menu to manually tap to reconnect to the server. Bitkit should attempt this reconnection by itself when user pulls down to refresh.

Reproduce

  1. When Electrum Server connection is down (not sure how to recreate but it happens to me often when resuming the app when it is minimised)
  2. Drag down on main screen to refresh balances
  3. Observe Electrum Server error toast when it should first attempt to reconnect and only show an error if that failed

Screenshots / Recording

https://github.com/synonymdev/bitkit/assets/74595920/85652e64-1d8d-433a-995f-eabb792e8b0a

Operating system

Android 13 TKQ1.221114.001

Bitkit version

658b9f2bd22d2ca63893a89dc56f47a054546d79

Log output

No response

catch-21 commented 5 months ago

I've not seen this Electrum server error for a while so cannot verify right now. Will keep an eye out for this scenario though, if Electrum doesn't auto-reconnect when it could.