breez / breez-sdk-greenlight

MIT License
244 stars 43 forks source link

fee_msat is empty in InvoicePaid event after channel opening #982

Closed darioAnongba closed 6 months ago

darioAnongba commented 6 months ago

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

Expected behaviour

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 6 months ago

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.