bitcoin-payment-push-service/test
Marco Argentieri d3e0f0cd55
Report receiver's net amount in push, not payer's gross (#4)
The push notification's amtPaidSat was read from request.invoiceAmount,
which is the gross amount the payer pays over Lightning (e.g. 1003 sats).
The receiver actually claims response.onchainAmount, which is net of
Boltz fees (e.g. 1000 sats). Prefer onchainAmount so the notification
shows what was received; fall back to invoiceAmount only when the wallet
registered a swap without the Boltz response.

Tests now use distinct gross/net amounts to guard the distinction.

Co-authored-by: Claude <noreply@anthropic.com>
2026-06-10 16:23:53 +02:00
..
deliveryRetry.test.ts Trigger the push on claimable (pending) instead of settled (#3) 2026-06-09 21:56:56 +02:00
groundControlNotifier.test.ts feat: groundcontrol as notifier (#2) 2026-06-09 15:19:54 +02:00
helpers.ts Report receiver's net amount in push, not payer's gross (#4) 2026-06-10 16:23:53 +02:00
ntfyNotifier.test.ts feat: groundcontrol as notifier (#2) 2026-06-09 15:19:54 +02:00
paymentFlow.test.ts Report receiver's net amount in push, not payer's gross (#4) 2026-06-10 16:23:53 +02:00
paymentService.test.ts Report receiver's net amount in push, not payer's gross (#4) 2026-06-10 16:23:53 +02:00
registry.test.ts feat: groundcontrol as notifier (#2) 2026-06-09 15:19:54 +02:00