mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-10-06 03:38:23 +00:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user