fee_msat is empty in InvoicePaid event after channel opening
Closed this issue · 1 comments
darioAnongba commented
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
roeierez commented
Thanks for the issue @darioAnongba indeed it looks like we including in the event directly the payment received from the node without adding the open channel info.
We should probably get the payment from the persistent storage (we already save it) which will contain the missing information.