|
|
@ -2,7 +2,7 @@ package com.xsn.explorer.models |
|
|
|
|
|
|
|
import play.api.libs.json._ |
|
|
|
|
|
|
|
case class StatisticsDetails(statistics: Statistics, masternodes: Option[Int]) |
|
|
|
case class StatisticsDetails(statistics: Statistics, masternodes: Option[Int], difficulty: Option[BigDecimal]) |
|
|
|
|
|
|
|
object StatisticsDetails { |
|
|
|
|
|
|
@ -14,7 +14,8 @@ object StatisticsDetails { |
|
|
|
val extras = List( |
|
|
|
"totalSupply" -> obj.statistics.totalSupply.map(JsNumber.apply), |
|
|
|
"circulatingSupply" -> obj.statistics.circulatingSupply.map(JsNumber.apply), |
|
|
|
"masternodes" -> obj.masternodes.map(c => JsNumber.apply(c)) |
|
|
|
"masternodes" -> obj.masternodes.map(c => JsNumber.apply(c)), |
|
|
|
"difficulty" -> obj.difficulty.map(c => JsNumber.apply(c)) |
|
|
|
).flatMap { case (key, maybe) => |
|
|
|
maybe.map(key -> _) |
|
|
|
} |
|
|
|