Skip to content

Duplicate formatting.ts modules export same functions with conflicting number vs bigint types #959

Description

@dimka90

Two identically named formatting modules exist:

  • web/lib/formatting.ts — uses number (unitsToStroops(amount: number): number)
  • web/app/lib/formatting.ts — uses bigint (unitsToStroops(amount: bigint): bigint)

Both export the same function names (unitsToStroops, stroopsToUnits, formatTokenAmount, formatTokenAmountCompact, formatStroopsValue). Any import of @/lib/formatting vs @/app/lib/formatting could silently pick the wrong module, leading to precision loss (bigintnumber conversion) or TypeScript type errors.

Activity

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

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programarea: webbugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions