Alexis Hernandez
7 years ago
1 changed files with 17 additions and 0 deletions
@ -0,0 +1,17 @@ |
|||
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) |
|||
} |
|||
} |
Loading…
Reference in new issue