Skip to content

api-gateway payment validation tests don't cover decimal edge cases #551

Description

@therealjhay

Problempayment-validation.test.ts covers formats but not extreme decimals (e.g., 30-decimal amounts) that can overflow DB numeric columns.

  1. No extreme-precision tests.
  2. No max-decimal enforcement.
  3. DB errors leak as 500.

Solution

  • Enforce max decimals per asset.
  • Test extreme inputs.
  • Return 422 not 500.

Acceptance Criteria

  • Extreme decimals rejected cleanly.
  • 422 returned.
  • pnpm --filter api-gateway build passes.

Note for Contributors: Write a clear PR description. Show an extreme-decimal rejection.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Stellar WaveIssues in the Stellar wave program

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions