mirror of
https://github.com/corda/corda.git
synced 2025-06-16 22:28:15 +00:00
Address review comments
This commit is contained in:
@ -81,12 +81,11 @@ class CommercialPaper : Contract {
|
||||
val command = tx.commands.requireSingleCommand<CommercialPaper.Commands>()
|
||||
// If it's an issue, we can't take notary from inputs, so it must be specified in the command
|
||||
val cmdVal = command.value
|
||||
val timestamp: TimestampCommand? = if (cmdVal is Commands.Issue)
|
||||
tx.getTimestampBy(cmdVal.notary)
|
||||
else if (cmdVal is Commands.Redeem)
|
||||
tx.getTimestampBy(cmdVal.notary)
|
||||
else
|
||||
null
|
||||
val timestamp: TimestampCommand? = when (cmdVal) {
|
||||
is Commands.Issue -> tx.getTimestampBy(cmdVal.notary)
|
||||
is Commands.Redeem -> tx.getTimestampBy(cmdVal.notary)
|
||||
else -> null
|
||||
}
|
||||
|
||||
for ((inputs, outputs, key) in groups) {
|
||||
when (command.value) {
|
||||
|
Reference in New Issue
Block a user