Problem or use case
On the transfer-to-spending amount screens the Continue button is enabled when the amount is 0, since the only guard is amountUiState.sats <= uiState.maxAllowedToSend:
app/src/main/java/to/bitkit/ui/screens/transfer/SpendingAmountScreen.kt
app/src/main/java/to/bitkit/ui/screens/transfer/hardware/SpendingAmountHwScreen.kt
Continuing with 0 is a valid flow — it opens a receive-only channel — but the user gets no warning that they will still pay the LSP service fee and the on-chain fee for a channel with no spending balance. That is an easy way to spend money without understanding what was bought.
Proposed solution
When the user taps Continue with an amount of 0, show a confirmation dialog before proceeding to order creation.
- Use the existing
AppAlertDialog (ui/scaffold/AppAlertDialog.kt), same pattern as FundingScreen.kt.
- Keep the copy simple: this channel will only be able to receive, and the service fee plus the on-chain fee still apply.
- Confirm → continue with the current
onConfirmAmount(0) behavior. Cancel → dismiss, stay on the screen.
- Add the new strings to
strings.xml in alphabetical order, e.g. under a lightning__spending_amount__zero_* key group.
Suggested copy (open to wording changes):
Receive-only channel
You are opening a channel with no spending balance — you will only be able to receive. The service fee and the on-chain fee still apply.
Cancel / Continue
Only the confirmation is in scope; the zero-amount flow itself stays as it is today.
Additional context
- Both screens should share the same behavior and copy.
- The dialog belongs in the screen composables;
TransferViewModel.onConfirmAmount() stays unchanged.
- Worth adding a
testTag on the dialog so E2E can assert it.
Problem or use case
On the transfer-to-spending amount screens the Continue button is enabled when the amount is
0, since the only guard isamountUiState.sats <= uiState.maxAllowedToSend:app/src/main/java/to/bitkit/ui/screens/transfer/SpendingAmountScreen.ktapp/src/main/java/to/bitkit/ui/screens/transfer/hardware/SpendingAmountHwScreen.ktContinuing with
0is a valid flow — it opens a receive-only channel — but the user gets no warning that they will still pay the LSP service fee and the on-chain fee for a channel with no spending balance. That is an easy way to spend money without understanding what was bought.Proposed solution
When the user taps Continue with an amount of
0, show a confirmation dialog before proceeding to order creation.AppAlertDialog(ui/scaffold/AppAlertDialog.kt), same pattern asFundingScreen.kt.onConfirmAmount(0)behavior. Cancel → dismiss, stay on the screen.strings.xmlin alphabetical order, e.g. under alightning__spending_amount__zero_*key group.Suggested copy (open to wording changes):
Only the confirmation is in scope; the zero-amount flow itself stays as it is today.
Additional context
TransferViewModel.onConfirmAmount()stays unchanged.testTagon the dialog so E2E can assert it.