Skip to content

[BUG] Erroneous Decimal Formatting (Commas in Fractions) #70

@DeveloperAmrit

Description

@DeveloperAmrit

[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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions