Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

send_payment can return ClosedChannel? #302

Closed
JssDWt opened this issue Jul 7, 2023 · 1 comment
Closed

send_payment can return ClosedChannel? #302

JssDWt opened this issue Jul 7, 2023 · 1 comment
Milestone

Comments

@JssDWt
Copy link
Contributor

JssDWt commented Jul 7, 2023

The send_payment function returns a Payment object. In order to get the preimage for the payment, you need to go into details. details looks like this:

/// Wrapper for the different types of payments
#[derive(PartialEq, Eq, Debug, Clone, Deserialize, Serialize)]
#[serde(untagged)]
pub enum PaymentDetails {
    Ln {
        #[serde(flatten)]
        data: LnPaymentDetails,
    },
    ClosedChannel {
        #[serde(flatten)]
        data: ClosedChannelPaymentDetails,
    },
}

I think there is no way a payment will return ClosedChannelPaymentDetails? So this signature should only contain LnPaymentDetails to make the development easier.

@JssDWt
Copy link
Contributor Author

JssDWt commented Oct 27, 2023

Superseded by #563

@JssDWt JssDWt closed this as completed Oct 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants