Skip to content

Conversation

spencerstock
Copy link
Collaborator

@spencerstock spencerstock commented Sep 18, 2025

What changed? Why?

Updated payment and spend permission interfaces to use bigint instead of hex strings for value fields in call data structures.

How was this tested?

Unit test coverage updated across all affected modules:

  • charge.test.ts: Updated test expectations to use bigint values
  • pay.test.ts: Refactored test suite with improved mocking and validation
  • prepareCharge.test.ts: Updated mock data to use bigint values
  • prepareSpendCallData.test.ts: Updated all test assertions for bigint values
  • prepareRevokeCallData.test.ts: Updated test expectations for bigint values

How can reviewers manually test these changes?

Demo/screenshots

@cb-heimdall
Copy link
Collaborator

cb-heimdall commented Sep 18, 2025

✅ Heimdall Review Status

Requirement Status More Info
Reviews 2/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1

- Reverted unnecessary refactoring of pay.test.ts
- Reverted unnecessary type annotation in translatePayment.ts
- Kept only the essential changes converting value from hex strings ('0x0') to bigint (0n)
- Reduced diff from 511 lines to 79 lines
- Use bigint internally (0n) and convert to hex at JSON-RPC boundary
- Add comment explaining the conversion for JSON-RPC compatibility
- This follows modern best practices while maintaining compatibility
@spencerstock spencerstock changed the title Update payment value types from hex to bigint Fix: payment values types should use bigint Sep 18, 2025
@spencerstock spencerstock changed the title Fix: payment values types should use bigint Fix: payment values should use bigint Sep 18, 2025
@spencerstock spencerstock marked this pull request as ready for review September 18, 2025 22:47
@spencerstock spencerstock force-pushed the spencer/payment-subscription-updates branch from dc16fba to e31c79e Compare September 19, 2025 16:18
@spencerstock spencerstock merged commit 82be6e3 into master Sep 19, 2025
9 checks passed
@spencerstock spencerstock deleted the spencer/payment-subscription-updates branch September 19, 2025 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants