mirror of
https://github.com/corda/corda.git
synced 2024-12-26 08:01:09 +00:00
Merge pull request #3876 from corda/thomas/cherry-pick-ENT-2054
Cherry pick ENT-2054
This commit is contained in:
commit
6e1cbd2aa3
@ -48,6 +48,7 @@ open class CashPaymentFlow(
|
||||
val anonymousRecipient = txIdentities[recipient] ?: recipient
|
||||
progressTracker.currentStep = GENERATING_TX
|
||||
val builder = TransactionBuilder(notary = null)
|
||||
logger.info("Generating spend for: ${builder.lockId}")
|
||||
// TODO: Have some way of restricting this to states the caller controls
|
||||
val (spendTX, keysForSigning) = try {
|
||||
Cash.generateSpend(serviceHub,
|
||||
@ -61,10 +62,13 @@ open class CashPaymentFlow(
|
||||
}
|
||||
|
||||
progressTracker.currentStep = SIGNING_TX
|
||||
logger.info("Signing transaction for: ${spendTX.lockId}")
|
||||
val tx = serviceHub.signInitialTransaction(spendTX, keysForSigning)
|
||||
|
||||
progressTracker.currentStep = FINALISING_TX
|
||||
logger.info("Finalising transaction for: ${tx.id}")
|
||||
val notarised = finaliseTx(tx, setOf(recipient), "Unable to notarise spend")
|
||||
logger.info("Finalised transaction for: ${notarised.id}")
|
||||
return Result(notarised, anonymousRecipient)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user