mirror of
https://github.com/google/nomulus
synced 2026-09-20 15:04:24 +00:00
Fix money conversion for JPY in PremiumListDao (#463)
This commit is contained in:
@@ -156,7 +156,11 @@ public class PremiumListDao {
|
||||
RevisionIdAndLabel.create(premiumList.getRevisionId(), label);
|
||||
try {
|
||||
Optional<BigDecimal> price = PremiumListCache.cachePremiumEntries.get(revisionIdAndLabel);
|
||||
return price.map(p -> Money.of(premiumList.getCurrency(), p));
|
||||
return price.map(
|
||||
p ->
|
||||
Money.of(
|
||||
premiumList.getCurrency(),
|
||||
p.setScale(premiumList.getCurrency().getDecimalPlaces())));
|
||||
} catch (InvalidCacheLoadException | ExecutionException e) {
|
||||
throw new RuntimeException(
|
||||
String.format(
|
||||
|
||||
Reference in New Issue
Block a user