Correct outInputState -> ourInputState (#1435)

This commit is contained in:
Ross Nicoll 2017-09-06 17:50:21 +01:00 committed by GitHub
parent e27e18a9ec
commit 8d261faac0

View File

@ -109,10 +109,10 @@ class ForeignExchangeFlow(val tradeId: String,
} else throw IllegalArgumentException("Our identity must be one of the parties in the trade.")
// Call the helper method to identify suitable inputs and make the outputs
val (outInputStates, ourOutputStates) = prepareOurInputsAndOutputs(serviceHub, runId.uuid, localRequest)
val (ourInputStates, ourOutputStates) = prepareOurInputsAndOutputs(serviceHub, runId.uuid, localRequest)
// identify the notary for our states
val notary = outInputStates.first().state.notary
val notary = ourInputStates.first().state.notary
// ensure request to other side is for a consistent notary
val remoteRequestWithNotary = remoteRequest.copy(notary = notary)
@ -142,7 +142,7 @@ class ForeignExchangeFlow(val tradeId: String,
}
// having collated the data create the full transaction.
val signedTransaction = buildTradeProposal(outInputStates, ourOutputStates, theirInputStates, theirOutputStates)
val signedTransaction = buildTradeProposal(ourInputStates, ourOutputStates, theirInputStates, theirOutputStates)
// pass transaction details to the counterparty to revalidate and confirm with a signature
// Allow otherParty to access our data to resolve the transaction.