Skip to content

Commit

Permalink
prefix currency
Browse files Browse the repository at this point in the history
  • Loading branch information
premnirmal committed Jun 18, 2022
1 parent 18f7754 commit 5788195
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ data class Quote constructor(

val priceFormat: PriceFormat
get() = currencyCodes[currencyCode]?.let {
PriceFormat(currencyCode = currencyCode, symbol = it, prefix = suffixCurrencies[it] ?: true)
PriceFormat(currencyCode = currencyCode, symbol = it, prefix = prefixCurrencies[it] ?: true)
} ?: PriceFormat(currencyCode, currencyCode)

fun hasAlertAbove(): Boolean =
Expand Down Expand Up @@ -326,8 +326,8 @@ data class Quote constructor(
)
}

private val suffixCurrencies: Map<String, Boolean> by lazy {
mapOf("GBp" to true)
private val prefixCurrencies: Map<String, Boolean> by lazy {
mapOf("GBp" to false)
}
}
}

0 comments on commit 5788195

Please sign in to comment.