mirror of
https://github.com/corda/corda.git
synced 2025-06-13 04:38:19 +00:00
Cleaned up TimeWindow and added a bit more docs.
This commit is contained in:
@ -72,7 +72,7 @@ data class TradeApprovalContract(override val legalContractReference: SecureHash
|
||||
*/
|
||||
override fun verify(tx: LedgerTransaction) {
|
||||
val command = tx.commands.requireSingleCommand<TradeApprovalContract.Commands>()
|
||||
require(tx.timeWindow?.midpoint != null) { "must have a time-window" }
|
||||
requireNotNull(tx.timeWindow) { "must have a time-window" }
|
||||
when (command.value) {
|
||||
is Commands.Issue -> {
|
||||
requireThat {
|
||||
|
Reference in New Issue
Block a user