Skip to content

Commit

Permalink
Merge pull request #316 from jhnsmth/topic/currencies-corretness
Browse files Browse the repository at this point in the history
Tiny fixes to improve correctness of predefined currencies
  • Loading branch information
garyKeorkunian authored Feb 19, 2019
2 parents 39f3f7f + 811c787 commit 3aa9816
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
16 changes: 8 additions & 8 deletions shared/src/main/scala/squants/market/Money.scala
Original file line number Diff line number Diff line change
Expand Up @@ -440,26 +440,26 @@ object AUD extends Currency("AUD", "Australian Dollar", "$", 2)
object BRL extends Currency("BRL", "Brazilian Real", "R$", 2)
object CAD extends Currency("CAD", "Canadian Dollar", "$", 2)
object CHF extends Currency("CHF", "Swiss Franc", "CHF", 2)
object CLP extends Currency("CLP", "Chilean Peso", "¥", 2)
object CNY extends Currency("CNY", "Chinese Yuan Renmimbi", "¥", 2)
object CLP extends Currency("CLP", "Chilean Peso", "$", 2)
object CNY extends Currency("CNY", "Chinese Yuan Renminbi", "¥", 2)
object CZK extends Currency("CZK", "Czech Republic Koruny", "", 2)
object DKK extends Currency("DKK", "Danish Kroner", "kr", 2)
object EUR extends Currency("EUR", "Euro", "", 2)
object GBP extends Currency("GBP", "British Pound", "£", 2)
object HKD extends Currency("HKD", "Hong Kong Dollar", "$", 2)
object INR extends Currency("INR", "Indian Rupee", "", 2)
object JPY extends Currency("JPY", "Japanese Yen", "¥", 0)
object KRW extends Currency("KRW", "South Korean Won", "kr", 0)
object KRW extends Currency("KRW", "South Korean Won", "", 0)
object MXN extends Currency("MXN", "Mexican Peso", "$", 2)
object MYR extends Currency("MYR", "Malaysian Ringgit", "RM", 2)
object NOK extends Currency("NOK", "Norwegian Krone", "kr", 2)
object NZD extends Currency("NZD", "New Zealand Dollar", "$", 2)
object RUB extends Currency("RUB", "Russian Ruble", "руб", 2)
object RUB extends Currency("RUB", "Russian Ruble", "\u20BD", 2)
object SEK extends Currency("SEK", "Swedish Kroner", "kr", 2)
object XAG extends Currency("XAG", "Silver", "oz", 4)
object XAU extends Currency("XAU", "Gold", "oz", 4)
object BTC extends Currency("BTC", "BitCoin", "B", 15)
object ETH extends Currency("ETH", "Ether", "\u039e", 15)
object BTC extends Currency("BTC", "Bitcoin", "\u20BF", 15)
object ETH extends Currency("ETH", "Ether", "\u039E", 15)
object LTC extends Currency("LTC", "Litecoin", "\u0141", 15)
object ZAR extends Currency("ZAR", "South African Rand", "R", 2)
object NAD extends Currency("NAD", "Namibian Dollar", "N$", 2)
Expand Down Expand Up @@ -497,11 +497,11 @@ object MoneyConversions {
def NOK = Money(n, squants.market.NOK)
def NZD = Money(n, squants.market.NZD)
def BTC = Money(n, squants.market.BTC)
def bitCoin = BTC
def bitcoin = BTC
def ETH = Money(n, squants.market.ETH)
def ether = ETH
def LTC = Money(n, squants.market.LTC)
def liteCoin = LTC
def litecoin = LTC
def ZAR = Money(n, squants.market.ZAR)
def NAD = Money(n, squants.market.NAD)
}
Expand Down
4 changes: 2 additions & 2 deletions shared/src/test/scala/squants/market/MoneySpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -470,11 +470,11 @@ class MoneySpec extends FlatSpec with Matchers {
d.NOK should be(Money(d, squants.market.NOK))
d.NZD should be(Money(d, squants.market.NZD))
d.BTC should be(Money(d, squants.market.BTC))
d.bitCoin should be(BTC(d))
d.bitcoin should be(BTC(d))
d.ETH should be(Money(d, squants.market.ETH))
d.ether should be(ETH(d))
d.LTC should be(Money(d, squants.market.LTC))
d.liteCoin should be(LTC(d))
d.litecoin should be(LTC(d))
d.ZAR should be(ZAR(d))
d.NAD should be(NAD(d))
}
Expand Down

0 comments on commit 3aa9816

Please sign in to comment.