Decimal(18,4) rounding
DominiqueBlomsma opened this issue · 0 comments
DominiqueBlomsma commented
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.