Commit a88e206
committed
storage: store the bolt12invoice invoice
This commit enhances the BOLT12 payment storage capabilities by adding
support for storing the actual BOLT12 invoice along with payment details.
We modify the following components:
- Added `bolt12_invoice` field to `PaymentKind::Bolt12Offer` and
`PaymentKind::Bolt12Refund` variants in the payment store
- Updated event handling in `event.rs` to capture and store the
BOLT12 invoice when payments are processed
- Modified BOLT12 payment creation logic to initialize the new field
- Enhanced payment update mechanism to handle BOLT12 invoice updates
- Added comprehensive test coverage for the new invoice storage feature
This improvement allows for proof of payment and to access the BOLT12
invoice details.
Signed-off-by: Vincenzo Palazzo <[email protected]>1 parent a12ceaf commit a88e206
File tree
4 files changed
+46
-8
lines changed- src
- payment
- tests
4 files changed
+46
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
745 | 745 | | |
746 | 746 | | |
747 | 747 | | |
| 748 | + | |
748 | 749 | | |
749 | 750 | | |
750 | 751 | | |
| |||
949 | 950 | | |
950 | 951 | | |
951 | 952 | | |
| 953 | + | |
952 | 954 | | |
953 | 955 | | |
954 | 956 | | |
| |||
963 | 965 | | |
964 | 966 | | |
965 | 967 | | |
| 968 | + | |
966 | 969 | | |
967 | 970 | | |
968 | 971 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
107 | 108 | | |
108 | 109 | | |
109 | 110 | | |
| 111 | + | |
110 | 112 | | |
111 | 113 | | |
112 | 114 | | |
| |||
132 | 134 | | |
133 | 135 | | |
134 | 136 | | |
| 137 | + | |
135 | 138 | | |
136 | 139 | | |
137 | 140 | | |
| |||
213 | 216 | | |
214 | 217 | | |
215 | 218 | | |
| 219 | + | |
216 | 220 | | |
217 | 221 | | |
218 | 222 | | |
| |||
238 | 242 | | |
239 | 243 | | |
240 | 244 | | |
| 245 | + | |
241 | 246 | | |
242 | 247 | | |
243 | 248 | | |
| |||
335 | 340 | | |
336 | 341 | | |
337 | 342 | | |
| 343 | + | |
338 | 344 | | |
339 | 345 | | |
340 | 346 | | |
| |||
401 | 407 | | |
402 | 408 | | |
403 | 409 | | |
| 410 | + | |
404 | 411 | | |
405 | 412 | | |
406 | 413 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
293 | 294 | | |
294 | 295 | | |
295 | 296 | | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
296 | 309 | | |
297 | 310 | | |
298 | 311 | | |
| |||
417 | 430 | | |
418 | 431 | | |
419 | 432 | | |
| 433 | + | |
| 434 | + | |
420 | 435 | | |
421 | 436 | | |
422 | 437 | | |
| |||
437 | 452 | | |
438 | 453 | | |
439 | 454 | | |
| 455 | + | |
| 456 | + | |
440 | 457 | | |
441 | 458 | | |
442 | 459 | | |
| |||
471 | 488 | | |
472 | 489 | | |
473 | 490 | | |
| 491 | + | |
474 | 492 | | |
475 | 493 | | |
476 | 494 | | |
| |||
482 | 500 | | |
483 | 501 | | |
484 | 502 | | |
| 503 | + | |
485 | 504 | | |
486 | 505 | | |
487 | 506 | | |
| |||
542 | 561 | | |
543 | 562 | | |
544 | 563 | | |
| 564 | + | |
545 | 565 | | |
546 | 566 | | |
547 | 567 | | |
| |||
557 | 577 | | |
558 | 578 | | |
559 | 579 | | |
| 580 | + | |
560 | 581 | | |
561 | 582 | | |
562 | 583 | | |
563 | 584 | | |
564 | 585 | | |
565 | 586 | | |
566 | | - | |
567 | | - | |
568 | | - | |
569 | | - | |
570 | | - | |
571 | | - | |
572 | | - | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
573 | 594 | | |
574 | 595 | | |
575 | 596 | | |
| |||
595 | 616 | | |
596 | 617 | | |
597 | 618 | | |
| 619 | + | |
598 | 620 | | |
599 | 621 | | |
600 | 622 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
817 | 817 | | |
818 | 818 | | |
819 | 819 | | |
| 820 | + | |
820 | 821 | | |
821 | 822 | | |
822 | 823 | | |
823 | 824 | | |
824 | 825 | | |
825 | 826 | | |
| 827 | + | |
826 | 828 | | |
827 | 829 | | |
828 | 830 | | |
| |||
883 | 885 | | |
884 | 886 | | |
885 | 887 | | |
| 888 | + | |
886 | 889 | | |
887 | 890 | | |
888 | 891 | | |
889 | 892 | | |
890 | 893 | | |
891 | 894 | | |
| 895 | + | |
892 | 896 | | |
893 | 897 | | |
894 | 898 | | |
| |||
950 | 954 | | |
951 | 955 | | |
952 | 956 | | |
| 957 | + | |
953 | 958 | | |
954 | 959 | | |
955 | 960 | | |
956 | 961 | | |
957 | | - | |
| 962 | + | |
| 963 | + | |
958 | 964 | | |
959 | 965 | | |
960 | 966 | | |
| |||
0 commit comments