Skip to content

Commit

Permalink
Merge pull request #76 from virtualeconomy/add_lease_status
Browse files Browse the repository at this point in the history
add lease status
  • Loading branch information
ncying authored May 20, 2019
2 parents dbd594b + 89eb0be commit cd5d370
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/scala/scorex/api/http/TransactionsApiRoute.scala
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,8 @@ case class TransactionsApiRoute(
tx.transaction match {
case leaseCancel: LeaseCancelTransaction =>
tx.json ++ Json.obj("lease" -> state.findTransaction[LeaseTransaction](leaseCancel.leaseId).map(_.json).getOrElse[JsValue](JsNull))
case lease: LeaseTransaction =>
tx.json ++ Json.obj("leaseStatus" -> (if (state.isLeaseActive(lease)) "active" else "canceled"))
case _ => tx.json
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ sealed trait EllipticCurve25519Proof extends Proof{
lazy val json: JsObject = Json.obj(
"proofType" -> proofType, // we can also write the detail name here
"publicKey" -> Base58.encode(publicKey.publicKey),
"address" -> publicKey.address,
"signature" -> signature.base58
)

Expand Down

0 comments on commit cd5d370

Please sign in to comment.