diff --git a/src/main/scala/scorex/waves/http/WavesApiRoute.scala b/src/main/scala/scorex/waves/http/WavesApiRoute.scala index 6df87a0bc30..f3bd320ca9f 100644 --- a/src/main/scala/scorex/waves/http/WavesApiRoute.scala +++ b/src/main/scala/scorex/waves/http/WavesApiRoute.scala @@ -68,21 +68,25 @@ case class WavesApiRoute(override val application: Application)(implicit val con WrongJson.json case JsSuccess(payment: ExternalPayment, _) => val tx = transactionModule.broadcastPayment(payment) - tx.validate match { - case ValidationResult.ValidateOke => - tx.json + if (!tx.signatureValid) + InvalidSignature.json + else { + tx.validate match { + case ValidationResult.ValidateOke => + tx.json - case ValidationResult.InvalidAddress => - InvalidAddress.json + case ValidationResult.InvalidAddress => + InvalidAddress.json - case ValidationResult.NegativeAmount => - NegativeAmount.json + case ValidationResult.NegativeAmount => + NegativeAmount.json - case ValidationResult.NegativeFee => - NegativeFee.json + case ValidationResult.NegativeFee => + NegativeFee.json - case ValidationResult.NoBalance => - NoBalance.json + case ValidationResult.NoBalance => + NoBalance.json + } } } }.getOrElse(WrongJson.json).toString