From be0e7a8877fb6980fd0fdc2ed92de318b6fcac1b Mon Sep 17 00:00:00 2001 From: Ross Nicoll Date: Mon, 25 Sep 2017 22:53:49 +0100 Subject: [PATCH] Correct flow calls to generateSpend() (#1643) Correct flow calls to generateSpend() to match 1.0 API changes --- .../src/main/kotlin/net/corda/finance/flows/CashPaymentFlow.kt | 2 +- .../main/kotlin/net/corda/finance/flows/TwoPartyTradeFlow.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/finance/src/main/kotlin/net/corda/finance/flows/CashPaymentFlow.kt b/finance/src/main/kotlin/net/corda/finance/flows/CashPaymentFlow.kt index 49418436c3..8857835da2 100644 --- a/finance/src/main/kotlin/net/corda/finance/flows/CashPaymentFlow.kt +++ b/finance/src/main/kotlin/net/corda/finance/flows/CashPaymentFlow.kt @@ -51,7 +51,7 @@ open class CashPaymentFlow( Cash.generateSpend(serviceHub, builder, amount, - ourIdentity, + ourIdentityAndCert, anonymousRecipient, issuerConstraint) } catch (e: InsufficientBalanceException) { diff --git a/finance/src/main/kotlin/net/corda/finance/flows/TwoPartyTradeFlow.kt b/finance/src/main/kotlin/net/corda/finance/flows/TwoPartyTradeFlow.kt index 75ef987fb1..47da4a403a 100644 --- a/finance/src/main/kotlin/net/corda/finance/flows/TwoPartyTradeFlow.kt +++ b/finance/src/main/kotlin/net/corda/finance/flows/TwoPartyTradeFlow.kt @@ -219,7 +219,7 @@ object TwoPartyTradeFlow { val ptx = TransactionBuilder(notary) // Add input and output states for the movement of cash, by using the Cash contract to generate the states - val (tx, cashSigningPubKeys) = Cash.generateSpend(serviceHub, ptx, tradeRequest.price, ourIdentity, tradeRequest.payToIdentity.party) + val (tx, cashSigningPubKeys) = Cash.generateSpend(serviceHub, ptx, tradeRequest.price, ourIdentityAndCert, tradeRequest.payToIdentity.party) // Add inputs/outputs/a command for the movement of the asset. tx.addInputState(assetForSale)