Commit b6cdd9b
committed
[feat] Verify invoice amounts for currency-denominated offers
This completes the invoice handling side of currency conversion support.
When paying an invoice for a currency-denominated offer, and the
invoice request did not specify an explicit amount, we now use the
configured CurrencyConversion to derive the acceptable msat range
for the offer amount.
The invoice is considered valid only if the quoted amount falls within
that acceptable range, preventing the payer from being overcharged due
to exchange-rate differences or unexpected invoice amounts.1 parent 0b43ded commit b6cdd9b
3 files changed
Lines changed: 69 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5861 | 5861 | | |
5862 | 5862 | | |
5863 | 5863 | | |
| 5864 | + | |
| 5865 | + | |
| 5866 | + | |
| 5867 | + | |
| 5868 | + | |
| 5869 | + | |
| 5870 | + | |
5864 | 5871 | | |
5865 | 5872 | | |
5866 | 5873 | | |
| |||
5873 | 5880 | | |
5874 | 5881 | | |
5875 | 5882 | | |
5876 | | - | |
| 5883 | + | |
5877 | 5884 | | |
5878 | | - | |
| 5885 | + | |
| 5886 | + | |
| 5887 | + | |
| 5888 | + | |
| 5889 | + | |
| 5890 | + | |
| 5891 | + | |
| 5892 | + | |
5879 | 5893 | | |
5880 | 5894 | | |
5881 | 5895 | | |
| |||
17473 | 17487 | | |
17474 | 17488 | | |
17475 | 17489 | | |
17476 | | - | |
| 17490 | + | |
17477 | 17491 | | |
17478 | | - | |
| 17492 | + | |
17479 | 17493 | | |
17480 | 17494 | | |
17481 | 17495 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
487 | 487 | | |
488 | 488 | | |
489 | 489 | | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
490 | 496 | | |
491 | 497 | | |
492 | 498 | | |
493 | 499 | | |
494 | 500 | | |
495 | 501 | | |
496 | | - | |
497 | | - | |
498 | | - | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
499 | 505 | | |
500 | 506 | | |
501 | 507 | | |
502 | | - | |
| 508 | + | |
503 | 509 | | |
504 | 510 | | |
505 | 511 | | |
| |||
523 | 529 | | |
524 | 530 | | |
525 | 531 | | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
526 | 537 | | |
527 | 538 | | |
528 | 539 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1034 | 1034 | | |
1035 | 1035 | | |
1036 | 1036 | | |
| 1037 | + | |
| 1038 | + | |
| 1039 | + | |
| 1040 | + | |
| 1041 | + | |
| 1042 | + | |
| 1043 | + | |
| 1044 | + | |
| 1045 | + | |
| 1046 | + | |
| 1047 | + | |
| 1048 | + | |
| 1049 | + | |
| 1050 | + | |
| 1051 | + | |
| 1052 | + | |
| 1053 | + | |
| 1054 | + | |
| 1055 | + | |
| 1056 | + | |
| 1057 | + | |
| 1058 | + | |
| 1059 | + | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
| 1065 | + | |
| 1066 | + | |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
| 1071 | + | |
| 1072 | + | |
1037 | 1073 | | |
1038 | 1074 | | |
1039 | 1075 | | |
| |||
0 commit comments