Skip to content

PaymentPurpose in Event::PaymentClaimed missing preimage when using custom PaymentHash #4270

@Fedeparma74

Description

@Fedeparma74

Description

When creating a BOLT11 invoice with a custom PaymentHash (instead of letting LDK generate one), the Event::PaymentClaimed event does not contain a PaymentPreimage inside the PaymentPurpose.

After calling ChannelManager::claim_funds() (where the preimage is provided by the application), LDK should then be aware of the preimage.

Expected Behavior

After calling claim_funds(preimage), the subsequent Event::PaymentClaimed should include PaymentPurpose::Bolt11InvoicePayment { payment_preimage: Some(preimage), .. } even when the invoice uses a custom PaymentHash.

Actual Behavior

payment_preimage is always None for Bolt11 payments with custom PaymentHash, even after the preimage has been supplied to LDK via claim_funds().

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions