synonymdev / bitkit

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

[Bug]: No minimum receive amount or LSP fee, and CJIT Error when attempting to receive spending balances when network is down #1898

Open catch-21 opened 1 month ago

catch-21 commented 1 month ago

Describe the bug

Created off the back of https://github.com/synonymdev/bitkit/issues/1833#issuecomment-2133657792

$0 receive minimum, $0 LSP fee and CJIT Error: init_channel_manager or CJIT Error: Failed to create cjit entry. undefined toast is displayed when attempting to receive spending balance without an existing LN connection. We should handle this better in the UI, perhaps preventing progression when unable to contact LSP.

Reproduce

This is easy to reproduce in aeroplane mode but it can also occur when network is down or restricted

  1. With no existing LN connection
  2. Enable aeroplane mode to stop network
  3. Attempt to receive lightning funds
  4. Observe $0 minimum
  5. Continue
  6. Observe $0 LSP fee
  7. Continue
  8. Observe cjit error

Screenshots / Recording

https://github.com/synonymdev/bitkit/assets/74595920/1acec51b-0dd3-4b36-90d6-82aece234fc9

Operating system

Android 13 TKQ1.221114.001

Bitkit version

5dee7d29d2cc891d52d97475de4180e020278a01

Log output

No response

JeanlChristophe commented 3 weeks ago

Normaly you received a notification saying "network issue", right?

catch-21 commented 3 weeks ago

Normaly you received a notification saying "network issue", right?

Yes, but still...


Minimum is wrong and misleading. Screenshot 2024-06-21 at 11 13 02


Service provider fee is wrong and misleading. Screenshot 2024-06-21 at 11 13 36


"Wtf is CJIT" - User, probably. Screenshot 2024-06-21 at 11 14 05