fix: INR currency rate mismatch in formatPrice()
Bug Description
In src/utils/currencies.js, the INR currency entry declares rate: 88.32
but formatPrice() hardcodes price * 88 as the multiplier.
This causes all INR prices rendered via formatAndConvertPrice() to be
undervalued by ~0.36% compared to the declared rate.
Inconsistency
formatPrice()usesprice * 88formatSliderPrice()usesprice * rate(88.32)EUR.formatPrice()correctly usesprice * 0.86matching itsrate: 0.86
So the two INR formatting functions return different values for the same input.
Affected File
src/utils/currencies.js line 36
Fix
Change price * 88 - price * 88.32 to match the declared rate, consistent
with how EUR and the formatSliderPrice utility already handle it.
Confirmed reproducible on Node 20 + macOS. Interestingly it doesn't happen if you set NODE_OPTIONS=--max-old-space-size=512.
Instead of just changing 88 to 88.32, I'd store the rate in the rate variable that's already defined and have formatPrice multiply by that variable instead of a typed-in number. That way the rate is written in one single place (one source of truth), so the slider and the cards always read the same value and can't drift apart again. Right now the number is written twice, in rate and again inside formatPrice, which is exactly how they got out of sync. Same goes for EUR, it has the same double-written number. Happy to open a PR, could I be assigned?
@Maanvi212006