Skip to content

[BUG] Hardcoded Base Coin Decimals #69

@DeveloperAmrit

Description

@DeveloperAmrit

Description:
The SDK hardcodes BC_DECIMALS to 18, assuming all underlying chains use 18-decimal base tokens.

How to Reproduce:
Deploy the protocol to a network where the native currency is not 18 decimals (e.g., ADA-based sidechains or custom EVMs).

Actual Behaviour:
All price calculations and scaling for the base coin will be off by several orders of magnitude.

Expected Behaviour:
BC_DECIMALS should be configurable or fetched dynamically from the network provider.

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

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