diff --git a/shared/src/main/scala/squants/market/Money.scala b/shared/src/main/scala/squants/market/Money.scala index cd556c76..62a1b9a9 100644 --- a/shared/src/main/scala/squants/market/Money.scala +++ b/shared/src/main/scala/squants/market/Money.scala @@ -492,6 +492,8 @@ object NAD extends Currency("NAD", "Namibian Dollar", "N$", 2) object TRY extends Currency("TRY", "Turkish lira", "₺", 2) object UAH extends Currency("UAH", "Ukrainian Hryvnia", "₴", 2) object THB extends Currency("THB", "Thai Baht", "฿", 2) +object MAD extends Currency("MAD", "Moroccan Dirham", ".د.م", 2) +object EGP extends Currency("EGP", "Egyptian Pounds", "E£", 2) /** * Support for Money DSL @@ -537,6 +539,8 @@ object MoneyConversions { def UAH = Money(n, squants.market.UAH) def THB = Money(n, squants.market.THB) def satang = Money(num.toDouble(n) / 100d, squants.market.THB) + def MAD = Money(n, squants.market.MAD) + def EGP = Money(n, squants.market.EGP) } class MoneyNumeric()(implicit mc: MoneyContext) extends Numeric[Money] { diff --git a/shared/src/main/scala/squants/market/package.scala b/shared/src/main/scala/squants/market/package.scala index fd0a36a3..48908e8c 100644 --- a/shared/src/main/scala/squants/market/package.scala +++ b/shared/src/main/scala/squants/market/package.scala @@ -62,7 +62,7 @@ package object market { KRW, MXN, MYR, NOK, NZD, RUB, SEK, XAG, XAU, BTC, ETH, LTC, ZAR, NAD, TRY, - UAH, THB + UAH, THB, MAD, EGP ) lazy val defaultMoneyContext = MoneyContext(USD, defaultCurrencySet, Nil) diff --git a/shared/src/test/scala/squants/market/MoneySpec.scala b/shared/src/test/scala/squants/market/MoneySpec.scala index 186ed276..d5dec92c 100644 --- a/shared/src/test/scala/squants/market/MoneySpec.scala +++ b/shared/src/test/scala/squants/market/MoneySpec.scala @@ -499,6 +499,8 @@ class MoneySpec extends AnyFlatSpec with Matchers with TryValues { d.UAH should be(UAH(d)) d.THB should be(THB(d)) d.satang should be(Money(d / 100d, squants.market.THB)) + d.MAD should be(MAD(d)) + d.EGP should be(EGP(d)) } it should "provide Numeric support within a MoneyContext with no Exchange Rates" in {