fix(machine): wire up LNURL-withdraw completion callback
The onPaymentSuccess callback was passed to createATMServices but never used, causing LNURL-withdraw claims to go undetected. Store the callback so startLnurlCompletionPolling can trigger it when a withdrawal completes. Refs: #24 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
0c8a130413
commit
021aa6e168
1 changed files with 4 additions and 1 deletions
|
|
@ -791,8 +791,11 @@ function createATMServices(
|
||||||
lightningPub: LightningPubClient,
|
lightningPub: LightningPubClient,
|
||||||
clink: CLINKClient,
|
clink: CLINKClient,
|
||||||
_identity: MachineIdentity,
|
_identity: MachineIdentity,
|
||||||
_onPaymentSuccess: (preimage: string) => void
|
onPaymentSuccess: (preimage: string) => void
|
||||||
): ATMServices {
|
): ATMServices {
|
||||||
|
// Store callback for LNURL-withdraw polling to use
|
||||||
|
const onPaymentCallback = onPaymentSuccess
|
||||||
|
|
||||||
return {
|
return {
|
||||||
/**
|
/**
|
||||||
* Generate an ndebit URI for cash-in
|
* Generate an ndebit URI for cash-in
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue