@@ -1155,7 +1155,7 @@ impl<K: KVStore + Sync + Send + 'static> Node<K> {
1155
1155
}
1156
1156
1157
1157
let payment_id = PaymentId ( invoice. payment_hash ( ) . into_inner ( ) ) ;
1158
- let payment_secret = Some ( * invoice. payment_secret ( ) ) ;
1158
+ let payment_secret = invoice. payment_secret ( ) ;
1159
1159
let expiry_time = invoice. duration_since_epoch ( ) . saturating_add ( invoice. expiry_time ( ) ) ;
1160
1160
let mut payment_params = PaymentParameters :: from_node_id (
1161
1161
invoice. recover_payee_pub_key ( ) ,
@@ -1172,7 +1172,7 @@ impl<K: KVStore + Sync + Send + 'static> Node<K> {
1172
1172
let route_params = RouteParameters { payment_params, final_value_msat : amount_msat } ;
1173
1173
1174
1174
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 ) ;
1176
1176
1177
1177
match self
1178
1178
. channel_manager
@@ -1191,7 +1191,7 @@ impl<K: KVStore + Sync + Send + 'static> Node<K> {
1191
1191
let payment = PaymentDetails {
1192
1192
hash : payment_hash,
1193
1193
preimage : None ,
1194
- secret : payment_secret,
1194
+ secret : Some ( * payment_secret) ,
1195
1195
amount_msat : Some ( amount_msat) ,
1196
1196
direction : PaymentDirection :: Outbound ,
1197
1197
status : PaymentStatus :: Pending ,
@@ -1215,7 +1215,7 @@ impl<K: KVStore + Sync + Send + 'static> Node<K> {
1215
1215
let payment = PaymentDetails {
1216
1216
hash : payment_hash,
1217
1217
preimage : None ,
1218
- secret : payment_secret,
1218
+ secret : Some ( * payment_secret) ,
1219
1219
amount_msat : Some ( amount_msat) ,
1220
1220
direction : PaymentDirection :: Outbound ,
1221
1221
status : PaymentStatus :: Failed ,
0 commit comments