Remove unnecessary parameters to copy()

Signed-off-by: Ross Nicoll <ross.nicoll@r3.com>
This commit is contained in:
Matthew Nesbit 2017-03-29 15:47:03 +01:00 committed by Ross Nicoll
parent 9a7d0a0fb5
commit e0a2c76f39
3 changed files with 3 additions and 3 deletions

View File

@ -181,7 +181,7 @@ class ContractUpgradeFlowTest {
override val contract = CashV2()
override val participants = owners
override fun move(newAmount: Amount<Issued<Currency>>, newOwner: CompositeKey) = copy(amount = amount.copy(newAmount.quantity, amount.token), owners = listOf(newOwner))
override fun move(newAmount: Amount<Issued<Currency>>, newOwner: CompositeKey) = copy(amount = amount.copy(newAmount.quantity), owners = listOf(newOwner))
override fun toString() = "${Emoji.bagOfCash}New Cash($amount at ${amount.token.issuer} owned by $owner)"
override fun withNewOwner(newOwner: CompositeKey) = Pair(Cash.Commands.Move(), copy(owners = listOf(newOwner)))
}

View File

@ -94,7 +94,7 @@ class Cash : OnLedgerAsset<Currency, Cash.Commands, Cash.State>() {
override val participants = listOf(owner)
override fun move(newAmount: Amount<Issued<Currency>>, newOwner: CompositeKey): FungibleAsset<Currency>
= copy(amount = amount.copy(newAmount.quantity, amount.token), owner = newOwner)
= copy(amount = amount.copy(newAmount.quantity), owner = newOwner)
override fun toString() = "${Emoji.bagOfCash}Cash($amount at ${amount.token.issuer} owned by $owner)"

View File

@ -106,7 +106,7 @@ class CommodityContract : OnLedgerAsset<Commodity, CommodityContract.Commands, C
override val participants = listOf(owner)
override fun move(newAmount: Amount<Issued<Commodity>>, newOwner: CompositeKey): FungibleAsset<Commodity>
= copy(amount = amount.copy(newAmount.quantity, amount.token), owner = newOwner)
= copy(amount = amount.copy(newAmount.quantity), owner = newOwner)
override fun toString() = "Commodity($amount at ${amount.token.issuer} owned by $owner)"