diff --git a/corda/workflows/src/main/java/djmil/cordacheckers/gamestate/CommitTrx.java b/corda/workflows/src/main/java/djmil/cordacheckers/gamestate/CommitTrx.java index f6acd8e..d7542cc 100644 --- a/corda/workflows/src/main/java/djmil/cordacheckers/gamestate/CommitTrx.java +++ b/corda/workflows/src/main/java/djmil/cordacheckers/gamestate/CommitTrx.java @@ -58,10 +58,9 @@ public class CommitTrx implements SubFlow { * notarises the transaction and persists the transaction to each party's vault. */ - FlowSession counterpartySession = flowMessaging.initiateFlow(this.counterpartyName); - FlowSession custodySession = (this.custodyName != null) ? flowMessaging.initiateFlow(this.custodyName) : null; - - List sessionsList = Arrays.asList(counterpartySession, custodySession); + List sessionsList = (this.custodyName != null) + ? Arrays.asList(flowMessaging.initiateFlow(this.counterpartyName), flowMessaging.initiateFlow(this.custodyName)) + : Arrays.asList(flowMessaging.initiateFlow(this.counterpartyName); System.out.println("sessionsList size " + sessionsList.size());