Skip to content

Commit

Permalink
Merge pull request #974 from wavesplatform/NODE-509-Swagger-unnecessa…
Browse files Browse the repository at this point in the history
…ry-fields

NODE-509 Swagger unnecessary fields
  • Loading branch information
alexeykiselev authored Apr 4, 2018
2 parents 2170d29 + f5b3d28 commit 2548c40
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/main/scala/scorex/transaction/assets/exchange/Order.scala
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ import com.google.common.primitives.Longs
import com.wavesplatform.crypto
import com.wavesplatform.state2.ByteStr
import io.swagger.annotations.ApiModelProperty
import monix.eval.Coeval
import monix.eval.{Coeval, Task}
import play.api.libs.json.{JsObject, Json}
import scorex.account.{PrivateKeyAccount, PublicKeyAccount}
import scorex.crypto.encode.Base58
import scorex.serialization.{BytesSerializable, Deser, JsonSerializable}
import scorex.transaction.TransactionParsers._
import scorex.transaction.ValidationError.GenericError
import scorex.transaction.ValidationError.{GenericError, InvalidSignature}
import scorex.transaction._
import scorex.transaction.assets.exchange.Validation.booleanOperators

Expand Down Expand Up @@ -143,6 +143,7 @@ case class Order(@ApiModelProperty(dataType = "java.lang.String") senderPublicKe
}
}.toEither.left.map(x => GenericError(x.getMessage))

@ApiModelProperty(hidden = true)
override val json: Coeval[JsObject] = Coeval.evalOnce(
Json.obj(
"id" -> Base58.encode(id()),
Expand Down Expand Up @@ -180,6 +181,13 @@ case class Order(@ApiModelProperty(dataType = "java.lang.String") senderPublicKe
}

override def hashCode(): Int = idStr.hashCode()

@ApiModelProperty(hidden = true)
def getSignedDescendants: Coeval[Seq[Signed]] = signedDescendants
@ApiModelProperty(hidden = true)
def getSignaturesValidMemoized: Task[Either[InvalidSignature, Order.this.type]] = signaturesValidMemoized
@ApiModelProperty(hidden = true)
def getSignaturesValid: Coeval[Either[InvalidSignature, Order.this.type]] = signaturesValid
}

object Order {
Expand Down

0 comments on commit 2548c40

Please sign in to comment.