Skip to content

Commit d61ad2e

Browse files
committed
Account for changes in RecipientOnionFields
1 parent 4d94ece commit d61ad2e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1155,7 +1155,7 @@ impl<K: KVStore + Sync + Send + 'static> Node<K> {
11551155
}
11561156

11571157
let payment_id = PaymentId(invoice.payment_hash().into_inner());
1158-
let payment_secret = Some(*invoice.payment_secret());
1158+
let payment_secret = invoice.payment_secret();
11591159
let expiry_time = invoice.duration_since_epoch().saturating_add(invoice.expiry_time());
11601160
let mut payment_params = PaymentParameters::from_node_id(
11611161
invoice.recover_payee_pub_key(),
@@ -1172,7 +1172,7 @@ impl<K: KVStore + Sync + Send + 'static> Node<K> {
11721172
let route_params = RouteParameters { payment_params, final_value_msat: amount_msat };
11731173

11741174
let retry_strategy = Retry::Timeout(LDK_PAYMENT_RETRY_TIMEOUT);
1175-
let recipient_fields = RecipientOnionFields { payment_secret, payment_metadata: None };
1175+
let recipient_fields = RecipientOnionFields::secret_only(*payment_secret);
11761176

11771177
match self
11781178
.channel_manager
@@ -1191,7 +1191,7 @@ impl<K: KVStore + Sync + Send + 'static> Node<K> {
11911191
let payment = PaymentDetails {
11921192
hash: payment_hash,
11931193
preimage: None,
1194-
secret: payment_secret,
1194+
secret: Some(*payment_secret),
11951195
amount_msat: Some(amount_msat),
11961196
direction: PaymentDirection::Outbound,
11971197
status: PaymentStatus::Pending,
@@ -1215,7 +1215,7 @@ impl<K: KVStore + Sync + Send + 'static> Node<K> {
12151215
let payment = PaymentDetails {
12161216
hash: payment_hash,
12171217
preimage: None,
1218-
secret: payment_secret,
1218+
secret: Some(*payment_secret),
12191219
amount_msat: Some(amount_msat),
12201220
direction: PaymentDirection::Outbound,
12211221
status: PaymentStatus::Failed,

0 commit comments

Comments
 (0)