Commit ea7af69
committed
Introduce amount check in pay_for_offer
We introduce this check in pay_for_offer, to ensure that
if the offer amount is specified in currency, a corresponding amount
to be used in invoice request must be provided.
**Reasoning:** When responding to an offer with currency, we enforce
that the invoice request must always include an amount. This ensures we
never receive an invoice tied to a currency-denominated offer without
a corresponding request amount.
By moving currency conversion upfront into the invoice request creation
where the user can supply their own conversion logic — we avoid pushing
conversion concerns into invoice parsing. This significantly reduces
complexity during invoice verification.1 parent a2569d8 commit ea7af69
1 file changed
+8
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
102 | | - | |
| 102 | + | |
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
| |||
13030 | 13030 | | |
13031 | 13031 | | |
13032 | 13032 | | |
| 13033 | + | |
| 13034 | + | |
| 13035 | + | |
| 13036 | + | |
| 13037 | + | |
| 13038 | + | |
| 13039 | + | |
13033 | 13040 | | |
13034 | 13041 | | |
13035 | 13042 | | |
| |||
0 commit comments