Skip to content

Commit

Permalink
use invoice destination for trampoline
Browse files Browse the repository at this point in the history
  • Loading branch information
JssDWt committed Oct 14, 2024
1 parent f8d9f7d commit 7d712c4
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions libs/sdk-core/src/greenlight/node_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2003,12 +2003,18 @@ impl TryFrom<cln::ListpaysPays> for Payment {
fee_msat: payment_amount_sent.saturating_sub(payment_amount),
status,
error: None,
description: ln_invoice.map(|i| i.description).unwrap_or_default(),
description: ln_invoice
.as_ref()
.map(|i| i.description.clone())
.unwrap_or_default(),
details: PaymentDetails::Ln {
data: LnPaymentDetails {
payment_hash: hex::encode(payment.payment_hash),
label: client_label.unwrap_or_default(),
destination_pubkey: payment.destination.map(hex::encode).unwrap_or_default(),
destination_pubkey: ln_invoice.as_ref().map_or(
payment.destination.map(hex::encode).unwrap_or_default(),
|i| i.payee_pubkey.clone(),
),
payment_preimage: payment.preimage.map(hex::encode).unwrap_or_default(),
keysend: payment.bolt11.is_none(),
bolt11: payment.bolt11.unwrap_or_default(),
Expand Down

0 comments on commit 7d712c4

Please sign in to comment.