Commit 31ac364
authCapture: drop chain-based assetTransferMethod auto-injection
The server's defaultMoneyConversion was inspecting a per-chain
permit2Only flag and injecting assetTransferMethod: 'permit2' for BSC
and Tempo. That's wrong framing — whether a token implements
receiveWithAuthorization is a token-level capability, not a chain
property. The current behavior happened to be correct for the canonical
default stables on those chains, but it pre-locked merchants out of
making their own choice if they used a different token.
Now: defaultMoneyConversion only emits the EIP-712 domain (name,
version) for the canonical stable. assetTransferMethod is always the
merchant's call. If a merchant pairs eip3009 with a token that lacks
receiveWithAuthorization, the failure surfaces as simulation_failed
at the facilitator (consistent with how upstream specs handle the
analogous case).
Tests updated: dropped the two "should inject permit2 on BSC/Tempo"
cases; replaced the "should NOT inject on ERC-3009 chains" with a
generic "should never inject" that walks all three chain categories.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>1 parent 449971a commit 31ac364
2 files changed
Lines changed: 27 additions & 46 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
31 | 30 | | |
32 | 31 | | |
33 | 32 | | |
| |||
36 | 35 | | |
37 | 36 | | |
38 | 37 | | |
39 | | - | |
40 | | - | |
41 | 38 | | |
42 | 39 | | |
43 | 40 | | |
| |||
128 | 125 | | |
129 | 126 | | |
130 | 127 | | |
131 | | - | |
132 | | - | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
133 | 131 | | |
134 | 132 | | |
135 | 133 | | |
136 | 134 | | |
137 | 135 | | |
138 | | - | |
139 | 136 | | |
140 | | - | |
| 137 | + | |
141 | 138 | | |
142 | 139 | | |
143 | 140 | | |
144 | 141 | | |
145 | 142 | | |
146 | | - | |
147 | 143 | | |
148 | 144 | | |
149 | 145 | | |
| |||
239 | 235 | | |
240 | 236 | | |
241 | 237 | | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
246 | 241 | | |
247 | 242 | | |
248 | 243 | | |
| |||
252 | 247 | | |
253 | 248 | | |
254 | 249 | | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | 250 | | |
264 | 251 | | |
265 | 252 | | |
266 | | - | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
267 | 257 | | |
268 | 258 | | |
269 | 259 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
107 | | - | |
| 107 | + | |
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
| 114 | + | |
119 | 115 | | |
120 | 116 | | |
121 | | - | |
| 117 | + | |
122 | 118 | | |
123 | 119 | | |
124 | 120 | | |
125 | 121 | | |
126 | 122 | | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
| 123 | + | |
132 | 124 | | |
133 | 125 | | |
134 | | - | |
| 126 | + | |
135 | 127 | | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
141 | 132 | | |
142 | 133 | | |
143 | 134 | | |
| |||
0 commit comments