Commit 457d57a
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 fa7c04a commit 457d57a
1 file changed
+8
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
100 | | - | |
| 100 | + | |
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
| |||
13081 | 13081 | | |
13082 | 13082 | | |
13083 | 13083 | | |
| 13084 | + | |
| 13085 | + | |
| 13086 | + | |
| 13087 | + | |
| 13088 | + | |
| 13089 | + | |
| 13090 | + | |
13084 | 13091 | | |
13085 | 13092 | | |
13086 | 13093 | | |
| |||
0 commit comments