Skip to content

fix(sdk): enforce the native asset decimal limit #259

Description

@karagozemin

Problem

The asset validator defines a seven-decimal stroop limit but applies the generic token limit to native assets, so invalid native configurations with more than seven decimals are accepted.

Task

Use the native decimal limit for native assets while retaining the existing token limit for SAC assets. Add regression tests.

Acceptance criteria

  • Native assets reject decimals above seven.
  • SAC assets retain their current supported range.
  • Existing valid fixtures still pass.
  • SDK tests and typecheck pass.

Suggested implementation prompt

Apply the existing native stroop decimal constant when validating native assets, preserve the SAC limit, add boundary tests for both asset types, and make no unrelated changes.

Activity

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

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardThird CampaignCampaign: Third Campaign

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions