This repository was archived by the owner on Feb 3, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -1212,9 +1212,12 @@ impl<S: MutinyStorage> MutinyWallet<S> {
1212
1212
. node_manager
1213
1213
. create_invoice ( amt, labels. clone ( ) )
1214
1214
. await ?;
1215
+
1216
+ let bolt_11 = inv. bolt11 . expect ( "create inv had one job" ) ;
1215
1217
let pay_res = fedimint_client
1216
- . pay_invoice ( inv . bolt11 . expect ( "create inv had one job" ) , labels. clone ( ) )
1218
+ . pay_invoice ( bolt_11 . clone ( ) , labels. clone ( ) )
1217
1219
. await ?;
1220
+ self . storage . set_invoice_labels ( bolt_11, labels) ?;
1218
1221
let total_fees_paid = pay_res. fees_paid . unwrap_or ( 0 ) + fee;
1219
1222
1220
1223
return Ok ( FedimintSweepResult {
@@ -1262,9 +1265,11 @@ impl<S: MutinyStorage> MutinyWallet<S> {
1262
1265
} ;
1263
1266
1264
1267
log_debug ! ( self . logger, "attempting payment from fedimint client" ) ;
1268
+ let bolt_11 = inv_to_pay. bolt11 . expect ( "create inv had one job" ) ;
1265
1269
let first_invoice_res = fedimint_client
1266
- . pay_invoice ( inv_to_pay . bolt11 . expect ( "create inv had one job" ) , labels)
1270
+ . pay_invoice ( bolt_11 . clone ( ) , labels. clone ( ) )
1267
1271
. await ?;
1272
+ self . storage . set_invoice_labels ( bolt_11, labels) ?;
1268
1273
1269
1274
let remaining_balance = fedimint_client. get_balance ( ) . await ?;
1270
1275
if remaining_balance > 0 {
You can’t perform that action at this time.
0 commit comments