Skip to content

fix(sdk): validate numeric and bigint round IDs consistently - #301

Draft
s6pa1rta3n-lab wants to merge 1 commit into
Sub-Rosa-Issue:mainfrom
s6pa1rta3n-lab:fix-issue-256
Draft

fix(sdk): validate numeric and bigint round IDs consistently#301
s6pa1rta3n-lab wants to merge 1 commit into
Sub-Rosa-Issue:mainfrom
s6pa1rta3n-lab:fix-issue-256

Conversation

@s6pa1rta3n-lab

Copy link
Copy Markdown

Summary

Fixes #256

Enforces a consistent positive safe-integer contract across string, number, and bigint inputs in normalizeRoundId:

  • Rejects zero and negative numbers and bigints (<= 0n or <= 0).
  • Rejects unsafe, fractional, and non-finite JavaScript numbers (NaN, Infinity, 1.5, Number.MAX_SAFE_INTEGER + 1).
  • Validates string inputs using positive decimal digit matching.
  • Preserves existing valid string, number, and bigint inputs.
  • Adds comprehensive boundary unit tests.

Payout Stipulations Checklist

  • Zero and negative number or bigint inputs are rejected.
  • Unsafe, fractional, and non-finite numbers are rejected.
  • Existing valid inputs remain unchanged.
  • SDK tests and typecheck pass.

Payout Routing

  • EVM (Base/Arbitrum/Polygon/ETH): 0xF46C9F6d70C50BF81ef3588AB523a90a594a2F89
  • Stellar: GCL6OXAMLD75BMTINA6EMRUDWK5THQUSHMYNLSNBCJAPZJHNYJTUNIBC

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.

fix(sdk): validate numeric and bigint round IDs consistently

1 participant