You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
468 B
18 lines
468 B
7 years ago
|
package com.xsn.explorer.models
|
||
|
|
||
|
import play.api.libs.json._
|
||
|
|
||
|
case class AddressDetails(balance: AddressBalance, transactionCount: Int)
|
||
|
|
||
|
object AddressDetails {
|
||
|
|
||
|
implicit val writes: Writes[AddressDetails] = Writes { obj =>
|
||
|
val values = Map(
|
||
|
"balance" -> JsNumber(BigDecimal(obj.balance.balance)),
|
||
|
"received" -> JsNumber(BigDecimal(obj.balance.received)),
|
||
|
"transactionCount" -> JsNumber(obj.transactionCount))
|
||
|
|
||
|
JsObject.apply(values)
|
||
|
}
|
||
|
}
|