[BUG] Erroneous Decimal Formatting (Commas in Fractions)

Open
#70 0 comments 0 reactions 0 assignees View on GitHub

@Rav1Chauhan is already working on this.

Since Feb 24, 2026.

  • #92 by @Rav1Chauhan — open

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
20/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
javascript
Domain
backend

Research direction

The issue identifies StablePay/djed-sdk/src/helpers.js and the decimalScaling helper. Read that helper and run the example decimalScaling("123456", 6, 6). Done means the result is 0.123456, with commas used only to separate thousands in the integer part; an open linked pull request (#92) indicates work is already underway.

Written by the indexing model from the issue text.

Description

[y] I have checked for duplicate issues

Description:
The decimalScaling helper applies a regex to add commas to the fractional part of a number.

How to Reproduce:
Call decimalScaling("123456", 6, 6).

Actual Behaviour:
Returns "0.123,456".

Expected Behaviour:
Should return "0.123456". Commas should only be used as thousands separators in the integer part.

Location: StablePay/djed-sdk/src/helpers.js

[y] I want to work on this issue

Dominant language
JavaScript
Stars
16
Forks
29
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from StabilityNexus/StablePay

All issues in StabilityNexus/StablePay

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.