File tree Expand file tree Collapse file tree
services/opencode/src/main/kotlin/com/getcode/opencode/model/financial Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ package com.getcode.opencode.model.financial
22
33import com.getcode.opencode.internal.extensions.getClosestLocale
44import java.util.Currency
5+ import java.util.Locale
56
67enum class CurrencyCode {
78 AED ,
@@ -331,12 +332,10 @@ enum class CurrencyCode {
331332 val locale = currency.getClosestLocale()
332333 try {
333334 val currencyInstance = Currency .getInstance(currency.name)
334- val symbol = currencyInstance.symbol
335+ val usSymbol = currencyInstance.getSymbol( Locale . US )
335336 val localeSymbol = currencyInstance.getSymbol(locale)
336- when (currency) {
337- JPY -> put(currency, setOf (symbol))
338- else -> put(currency, setOf (symbol, localeSymbol))
339- }
337+
338+ put(currency, setOf (usSymbol, localeSymbol))
340339 } catch (e: IllegalArgumentException ) {
341340 // Skip currencies with no valid symbol
342341 }
You can’t perform that action at this time.
0 commit comments