From 3fbc5fe555334f62526578073bdd715a6dc1cf9c Mon Sep 17 00:00:00 2001 From: Ross Nicoll Date: Wed, 2 Aug 2017 14:00:52 +0100 Subject: [PATCH] Remove BOC reference from trader demo client API * Remove BOC reference from trader demo client API as it fails at runtime because the test constants are not available. * Disable anonymisation in the command line trader demo. --- .../main/kotlin/net/corda/traderdemo/TraderDemoClientApi.kt | 2 +- .../src/main/kotlin/net/corda/traderdemo/flow/SellerFlow.kt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/samples/trader-demo/src/main/kotlin/net/corda/traderdemo/TraderDemoClientApi.kt b/samples/trader-demo/src/main/kotlin/net/corda/traderdemo/TraderDemoClientApi.kt index f9f25b7aba..804e0d0eab 100644 --- a/samples/trader-demo/src/main/kotlin/net/corda/traderdemo/TraderDemoClientApi.kt +++ b/samples/trader-demo/src/main/kotlin/net/corda/traderdemo/TraderDemoClientApi.kt @@ -47,7 +47,7 @@ class TraderDemoClientApi(val rpc: CordaRPCOps) { return rpc.vaultQueryBy(countCriteria).otherResults.single() as Long } - fun runBuyer(amount: Amount = 30000.DOLLARS, anonymous: Boolean = true) { + fun runBuyer(amount: Amount = 30000.DOLLARS, anonymous: Boolean = false) { val bankOfCordaParty = rpc.partyFromX500Name(BOC.name) ?: throw IllegalStateException("Unable to locate ${BOC.name} in Network Map Service") val notaryLegalIdentity = rpc.partyFromX500Name(DUMMY_NOTARY.name) diff --git a/samples/trader-demo/src/main/kotlin/net/corda/traderdemo/flow/SellerFlow.kt b/samples/trader-demo/src/main/kotlin/net/corda/traderdemo/flow/SellerFlow.kt index b67ec09f6e..c82a5da116 100644 --- a/samples/trader-demo/src/main/kotlin/net/corda/traderdemo/flow/SellerFlow.kt +++ b/samples/trader-demo/src/main/kotlin/net/corda/traderdemo/flow/SellerFlow.kt @@ -19,7 +19,7 @@ import net.corda.core.transactions.SignedTransaction import net.corda.core.transactions.TransactionBuilder import net.corda.core.utilities.ProgressTracker import net.corda.flows.TwoPartyTradeFlow -import net.corda.testing.BOC +import org.bouncycastle.asn1.x500.X500Name import java.time.Instant import java.util.* @@ -70,7 +70,7 @@ class SellerFlow(val otherParty: Party, @Suspendable fun selfIssueSomeCommercialPaper(ownedBy: AbstractParty, notaryNode: NodeInfo): StateAndRef { // Make a fake company that's issued its own paper. - val party = Party(BOC.name, serviceHub.legalIdentityKey) + val party = Party(X500Name("CN=BankOfCorda,O=R3,L=New York,C=US"), serviceHub.legalIdentityKey) val issuance: SignedTransaction = run { val tx = CommercialPaper().generateIssue(party.ref(1, 2, 3), 1100.DOLLARS `issued by` DUMMY_CASH_ISSUER,