Skip to content

Commit b456690

Browse files
A1igatorclaude
andcommitted
authCapture: drop unused MAX_UINT exports + rename stale test fixtures
- Remove MAX_UINT48 / MAX_UINT32 from shared/constants.ts — exported but never imported anywhere. - Rename `escrowAddress` / `operatorAddress` in server.test.ts merge fixtures to opaque keys. The merge logic in enhancePaymentRequirements is key-agnostic, and the old names were commerce-era artifacts that no longer reflect the wire format (escrow address is a constant; operatorAddress is now captureAuthorizer at the wire layer). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent d69e3cd commit b456690

2 files changed

Lines changed: 9 additions & 12 deletions

File tree

packages/evm/src/authCapture/shared/constants.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
export const MAX_UINT48 = 281474976710655
2-
export const MAX_UINT32 = 4294967295
3-
41
// Canonical AuthCaptureEscrow + token collector deployments from
52
// base/commerce-payments@v1.0.0 (https://github.com/base/commerce-payments).
63
// Redeployed 2026-04-29 via CreateX with deterministic permissionless salts

packages/evm/test/unit/authCapture/server.test.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -198,16 +198,16 @@ describe('AuthCaptureServerScheme', () => {
198198
scheme: 'authCapture',
199199
network: 'eip155:84532' as const,
200200
extra: {
201-
escrowAddress: '0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
202-
operatorAddress: '0xbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb',
201+
fromSupported1: '0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
202+
fromSupported2: '0xbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb',
203203
},
204204
}
205205

206206
const result = await scheme.enhancePaymentRequirements(requirements, supportedKind, [])
207207

208208
expect(result.extra).toEqual({
209-
escrowAddress: '0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
210-
operatorAddress: '0xbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb',
209+
fromSupported1: '0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
210+
fromSupported2: '0xbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb',
211211
})
212212
})
213213

@@ -231,14 +231,14 @@ describe('AuthCaptureServerScheme', () => {
231231
scheme: 'authCapture',
232232
network: 'eip155:84532' as const,
233233
extra: {
234-
escrowAddress: '0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
234+
fromSupported: '0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
235235
},
236236
}
237237

238238
const result = await scheme.enhancePaymentRequirements(requirements, supportedKind, [])
239239

240240
expect(result.extra).toEqual({
241-
escrowAddress: '0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
241+
fromSupported: '0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
242242
customField: 'custom-value',
243243
})
244244
})
@@ -254,7 +254,7 @@ describe('AuthCaptureServerScheme', () => {
254254
payTo: '0x1234567890123456789012345678901234567890',
255255
maxTimeoutSeconds: 300,
256256
extra: {
257-
escrowAddress: '0xcccccccccccccccccccccccccccccccccccccccc',
257+
sharedKey: '0xcccccccccccccccccccccccccccccccccccccccc',
258258
},
259259
}
260260

@@ -263,14 +263,14 @@ describe('AuthCaptureServerScheme', () => {
263263
scheme: 'authCapture',
264264
network: 'eip155:84532' as const,
265265
extra: {
266-
escrowAddress: '0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
266+
sharedKey: '0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
267267
},
268268
}
269269

270270
const result = await scheme.enhancePaymentRequirements(requirements, supportedKind, [])
271271

272272
// Requirements extra should override supportedKind extra
273-
expect(result.extra?.escrowAddress).toBe('0xcccccccccccccccccccccccccccccccccccccccc')
273+
expect(result.extra?.sharedKey).toBe('0xcccccccccccccccccccccccccccccccccccccccc')
274274
})
275275

276276
it('should preserve all original requirement fields', async () => {

0 commit comments

Comments
 (0)