Commit e395951
Deduplicate payjoin URI creation logic
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.
This change:
- Improves maintainability by centralizing URI creation logic
- Reduces code duplication
- Preserves the existing API and behavior1 parent 2f3f46a commit e395951
2 files changed
+19
-23
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
390 | 390 | | |
391 | 391 | | |
392 | 392 | | |
393 | | - | |
394 | | - | |
395 | | - | |
396 | | - | |
397 | | - | |
398 | | - | |
399 | | - | |
400 | | - | |
| 393 | + | |
401 | 394 | | |
402 | 395 | | |
403 | 396 | | |
| |||
908 | 901 | | |
909 | 902 | | |
910 | 903 | | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
911 | 919 | | |
912 | 920 | | |
913 | 921 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
| 85 | + | |
| 86 | + | |
99 | 87 | | |
100 | 88 | | |
101 | 89 | | |
| |||
0 commit comments