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.
 
 
 
 
 
 

19 lines
462 B

package com.xsn.explorer.models
import play.api.libs.json.{Json, Writes}
case class TransactionValue(address: Address, value: BigDecimal)
object TransactionValue {
def from(vout: TransactionVOUT): Option[TransactionValue] = {
val value = vout.value
val addressMaybe = vout.address
addressMaybe.map { address =>
TransactionValue(address, value)
}
}
implicit val writes: Writes[TransactionValue] = Json.writes[TransactionValue]
}