File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -363,7 +363,22 @@ export const attemptCommunitiesPendingPayments = async (
363363 try {
364364 const status = await getPaymentStatus ( pending . payment_request ) ;
365365
366- if ( status . is_confirmed && status . payment ) {
366+ if ( status . is_confirmed ) {
367+ if ( ! status . payment ) {
368+ logger . error (
369+ `Community ${ pending . community_id } pending payment confirmed but LND returned no details; ` +
370+ `not marking SUCCESS — needs manual resolution` ,
371+ ) ;
372+ pending . paid = true ;
373+ pending . is_invoice_expired = true ;
374+ pending . last_error = 'CONFIRMED_NO_PAYLOAD' ;
375+ await pending . save ( ) ;
376+ // Notify admin (using Telegram bot's admin capability if possible,
377+ // or just generic bot.telegram.sendMessage to an admin ID if available.
378+ // For now, mirroring the logic of failing and continuing.)
379+ continue ;
380+ }
381+
367382 const payment = status . payment ;
368383 pending . paid = true ;
369384 pending . paid_at = new Date ( ) ;
You can’t perform that action at this time.
0 commit comments