breez-sdk icon indicating copy to clipboard operation
breez-sdk copied to clipboard

fee_msat is empty in InvoicePaid event after channel opening

Open darioAnongba opened this issue 9 months ago • 1 comments

Hi all,

When receiving a payment for an invoice where a new channel needs to be created, the fee_msat seems to be missing from the InvoicePaid event. We are currently retrieving this value and saving it in DB and it appears to be 0.

Current behaviour

  • Create an invoice for an amount, ex: 10k sats
  • Paying this invoice necessitates opening a channel: cost 2500 sats
  • InvoicePaid event is received: fee_msat is 0

Expected behaviour

  • Create an invoice for an amount, ex: 10k sats
  • Paying this invoice necessitates opening a channel: cost 2500 sats
  • InvoicePaid event is received: fee_msat is 2500 sats

Getting the payment with list_payments or payment_by_hash includes the fee so this is most likely a bug.

Details

Breez SDK Rust version 0.4.1-rc2

darioAnongba avatar May 22 '24 09:05 darioAnongba