diff --git a/services/drawbridge/server/src/lnbits.ts b/services/drawbridge/server/src/lnbits.ts index 5677dba5..ec8f715c 100644 --- a/services/drawbridge/server/src/lnbits.ts +++ b/services/drawbridge/server/src/lnbits.ts @@ -101,14 +101,16 @@ export async function getPayments( const response = await axios.get(`${url}/api/v1/payments`, { headers: { 'X-Api-Key': adminKey }, }); - return (response.data || []).map((p: any) => ({ - paymentHash: p.payment_hash || p.checking_id || '', - amount: Math.floor((p.amount || 0) / 1000), - fee: Math.floor(Math.abs(p.fee || 0) / 1000), - memo: p.memo || '', - time: p.time || '', - pending: p.pending === true, - })); + return (response.data || []) + .filter((p: any) => p.status === 'success') + .map((p: any) => ({ + paymentHash: p.payment_hash || p.checking_id || '', + amount: Math.floor((p.amount || 0) / 1000), + fee: Math.floor(Math.abs(p.fee || 0) / 1000), + memo: p.memo || '', + time: p.time || '', + pending: false, + })); } catch (error: any) { throwLnbitsError(error); }