Skip to content

Send: Lightning ‘Available/Max’ doesn't account for routing fees, causes Failed to send the given payment #533

@piotr-iohk

Description

@piotr-iohk

Android’s “Available” on the Lightning amount screen (SendAmountScreen.kt) shows maxSendLightningSats without reserving anything for routing fees, but the confirm screen does estimate routing fees (estimateLightningRoutingFeesIfNeeded()). That mismatch can make “Max”/available misleading (especially for amountless invoices), and it’s exactly why iOS can show 8 997 while Android shows 9 000, in case of total spending balance = 10 000.

Expected: available/max invoice amount ≈ maxSendLightningSats - estimatedRoutingFee (optionally with a small buffer) iOS uses additional 2 sats buffer -> https://github.com/synonymdev/bitkit-ios/blob/master/Bitkit/Views/Wallets/Send/SendAmountView.swift#L264
Actual: shows raw maxSendLightningSats; applying max available funds ends with error
Impact: user can pick an amount that fails or is confusing; cross-platform inconsistency

See iOS left/Android right (both having 10 000 spending balance and trying to send max available to each other; Android fails):
⚠️ additionally we see that sending over 50% of lightning funds triggers a 50% balance warning sheet on iOS, which is not triggered on Android. iOS is consistent with Bitkit RN in that, so Android should also display this 50% balance warning.

Screen.Recording.2025-12-18.at.12.22.41.mov

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions