fix(clink): mirror NWC's split progress on the debit zap rail

Advance half the per-payable progress on dispatch and the other half when the
async debit response arrives, exactly like payViaNWC, instead of jumping the
full share on dispatch.

https://claude.ai/code/session_01NM2TyJtosLdY5ycjyabSRS
This commit is contained in:
Claude
2026-06-10 18:29:46 +00:00
parent 15b12e7f13
commit 33f1d20a21
@@ -413,6 +413,8 @@ class ZapPaymentHandler(
runRequestFor = { payable: Payable ->
account.scope.launch {
val response = ClinkDebitPayer.payInvoice(account, pointer, payable.invoice)
progressAllPayments += 0.5f / payables.size
onProgress(progressAllPayments)
if (response?.isOk() != true) {
onError(
stringRes(context, R.string.error_dialog_pay_invoice_error),
@@ -423,7 +425,7 @@ class ZapPaymentHandler(
}
}
progressAllPayments += 1f / payables.size
progressAllPayments += 0.5f / payables.size
onProgress(progressAllPayments)
Paid(payable, true)