From 27e45c10a13eb7b4f6551922329b533e39d7e117 Mon Sep 17 00:00:00 2001 From: Alexis Hernandez Date: Sat, 27 Jan 2018 18:59:51 -0600 Subject: [PATCH] alerts-server: Fix a rendering bug on FixedPriceAlertsTask. While rendering the email text to send, the current price of the related currency was being passed as BigDecimal to the MessagesApi which uses java.text.MessageFormat, this leads to round very small values to 0 which is useless. --- .../app/com/alexitc/coinalerts/tasks/FixedPriceAlertsTask.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/alerts-server/app/com/alexitc/coinalerts/tasks/FixedPriceAlertsTask.scala b/alerts-server/app/com/alexitc/coinalerts/tasks/FixedPriceAlertsTask.scala index c216e90..9fc58bf 100644 --- a/alerts-server/app/com/alexitc/coinalerts/tasks/FixedPriceAlertsTask.scala +++ b/alerts-server/app/com/alexitc/coinalerts/tasks/FixedPriceAlertsTask.scala @@ -118,7 +118,7 @@ class FixedPriceAlertsTask @Inject() ( val message = messagesApi( messageKey, event.alert.currency.string, - event.currentPrice, + event.currentPrice.toString, event.alert.market.string) percentageDifferenceMaybe.map { percent =>