Open
Description
In excercise of IOUContract.kt
, I had erroneously ignored paid amount on settlement contract, i.e.
// wrong
val amountOutstanding = inputIou.amount
// correct
val amountOutstanding = inputIou.amount - inputIou.paid
IOUSettleTests.kt
couldn't detect the error.
We needed a test case where we will fully settle an IOU that was partially settled, e.g.
- Issue an IOU $10 -> output: one IOU (amount=10, paid=0)
- Then settle $5 -> output: one IOU (amount=10, paid=5)
- Then settle $5 -> no IOU output
Metadata
Metadata
Assignees
Labels
No labels