added map it.data

This commit is contained in:
al-r3 2017-08-11 17:12:19 +01:00 committed by Alberto Arri
parent 43adbfd66c
commit 6ee40a4436

View File

@ -448,7 +448,7 @@ logic.
is Commands.Redeem -> { is Commands.Redeem -> {
// Redemption of the paper requires movement of on-ledger cash. // Redemption of the paper requires movement of on-ledger cash.
val input = inputs.single() val input = inputs.single()
val received = tx.outputs.sumCashBy(input.owner) val received = tx.outputs.map{ it.data }.sumCashBy(input.owner)
val time = timeWindow?.fromTime ?: throw IllegalArgumentException("Redemptions must be timestamped") val time = timeWindow?.fromTime ?: throw IllegalArgumentException("Redemptions must be timestamped")
requireThat { requireThat {
"the paper must have matured" using (time >= input.maturityDate) "the paper must have matured" using (time >= input.maturityDate)