Skip to content

Decimal(18,4) rounding #3

@DominiqueBlomsma

Description

@DominiqueBlomsma

NopCommerce decimal fields in the database are of type DECIMAL(18, 4) which means that product prices can have a maximum of 4 decimals.
Since XRPL tokens can have up to 15 decimals we're unable to support all prices of all tokens.

There is also a fixed rounding on 2 decimals in nopCommerce besides the database limitation but we can implement a custom implementation of the PriceCalculationService and override decimal Round(decimal value, RoundingType roundingType).

The example shop uses Bitstamp USD as Primary Store Currency so this is not an issue at the moment but we might want to think of a generic solution to support a higher scale than 4 or at least 4 digits after the decimal separator.

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