@@ -2,7 +2,7 @@ import { getPaymentFailureStatus, hodlInvoiceCltvDetails, getPaymentOrNotSent }
2
2
import { paidActions } from '@/api/paidAction'
3
3
import { walletLogger } from '@/api/resolvers/wallet'
4
4
import { LND_PATHFINDING_TIME_PREF_PPM , LND_PATHFINDING_TIMEOUT_MS , PAID_ACTION_TERMINAL_STATES } from '@/lib/constants'
5
- import { formatMsats , formatSats , msatsToSats , toPositiveNumber } from '@/lib/format'
5
+ import { formatSats , msatsToSats , toPositiveNumber } from '@/lib/format'
6
6
import { datePivot } from '@/lib/time'
7
7
import { Prisma } from '@prisma/client'
8
8
import {
@@ -317,18 +317,12 @@ export async function paidActionForwarded ({ data: { invoiceId, withdrawal, ...a
317
317
} , { models, lnd, boss } )
318
318
319
319
if ( transitionedInvoice ) {
320
- const { bolt11 , msatsPaid } = transitionedInvoice . invoiceForward . withdrawl
320
+ const { msatsPaid } = transitionedInvoice . invoiceForward . withdrawl
321
321
322
322
const logger = walletLogger ( { wallet : transitionedInvoice . invoiceForward . wallet , models } )
323
- logger . ok (
324
- `↙ payment received: ${ formatSats ( msatsToSats ( Number ( msatsPaid ) ) ) } ` ,
325
- {
326
- bolt11,
327
- preimage : transitionedInvoice . preimage
328
- // we could show the outgoing fee that we paid from the incoming amount to the receiver
329
- // but we don't since it might look like the receiver paid the fee but that's not the case.
330
- // fee: formatMsats(msatsFeePaid)
331
- } )
323
+ logger . ok ( `↙ payment received: ${ formatSats ( msatsToSats ( Number ( msatsPaid ) ) ) } ` , {
324
+ invoiceId : transitionedInvoice . id
325
+ } )
332
326
}
333
327
334
328
return transitionedInvoice
@@ -376,13 +370,10 @@ export async function paidActionFailedForward ({ data: { invoiceId, withdrawal:
376
370
} , { models, lnd, boss } )
377
371
378
372
if ( transitionedInvoice ) {
379
- const { bolt11, msatsFeePaying } = transitionedInvoice . invoiceForward . withdrawl
380
373
const logger = walletLogger ( { wallet : transitionedInvoice . invoiceForward . wallet , models } )
381
- logger . warn (
382
- `incoming payment failed: ${ message } ` , {
383
- bolt11,
384
- max_fee : formatMsats ( msatsFeePaying )
385
- } )
374
+ logger . warn ( `incoming payment failed: ${ message } ` , {
375
+ invoiceId : transitionedInvoice . id
376
+ } )
386
377
}
387
378
388
379
return transitionedInvoice
@@ -446,7 +437,9 @@ export async function paidActionCanceling ({ data: { invoiceId, ...args }, model
446
437
const { wallet, bolt11 } = transitionedInvoice . invoiceForward
447
438
const logger = walletLogger ( { wallet, models } )
448
439
const decoded = await parsePaymentRequest ( { request : bolt11 } )
449
- logger . info ( `invoice for ${ formatSats ( msatsToSats ( decoded . mtokens ) ) } canceled by payer` , { bolt11 } )
440
+ logger . info ( `invoice for ${ formatSats ( msatsToSats ( decoded . mtokens ) ) } canceled by payer` , {
441
+ invoiceId : transitionedInvoice . id
442
+ } )
450
443
}
451
444
}
452
445
0 commit comments