Commit d879aff
authored
Deduplicate payjoin URI creation logic (payjoin#817)
Create a helper function `create_pj_uri` in the v2 module that
centralizes the logic for creating Payjoin URIs from a SessionContext.
This eliminates code duplication between `SessionHistory::pj_uri` and
`Receiver<WithContext>::pj_uri`.
The helper function takes a SessionContext reference and an
OutputSubstitution parameter, making it flexible for both use cases
while maintaining the same behavior as the original implementations.2 files changed
+19
-23
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
389 | 389 | | |
390 | 390 | | |
391 | 391 | | |
392 | | - | |
393 | | - | |
394 | | - | |
395 | | - | |
396 | | - | |
397 | | - | |
398 | | - | |
399 | | - | |
| 392 | + | |
400 | 393 | | |
401 | 394 | | |
402 | 395 | | |
| |||
904 | 897 | | |
905 | 898 | | |
906 | 899 | | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
907 | 915 | | |
908 | 916 | | |
909 | 917 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
| 82 | + | |
| 83 | + | |
96 | 84 | | |
97 | 85 | | |
98 | 86 | | |
| |||
0 commit comments