diff --git a/samples/simm-valuation-demo/build.gradle b/samples/simm-valuation-demo/build.gradle index e570d01a55..42099153ff 100644 --- a/samples/simm-valuation-demo/build.gradle +++ b/samples/simm-valuation-demo/build.gradle @@ -20,6 +20,8 @@ sourceSets { } } +compileKotlin.dependsOn(":samples:simm-valuation-demo:contracts-states:shrink") + configurations { integrationTestImplementation.extendsFrom testImplementation integrationTestRuntimeOnly.extendsFrom testRuntimeOnly @@ -35,7 +37,7 @@ dependencies { // The SIMM demo CorDapp depends upon Cash CorDapp features cordapp project(':finance:contracts') cordapp project(':finance:workflows') - cordapp project(':samples:simm-valuation-demo:contracts-states') + cordapp project(path: ':samples:simm-valuation-demo:contracts-states', configuration: 'shrinkArtifacts') cordapp project(':samples:simm-valuation-demo:flows') cordaBootstrapper "org.slf4j:slf4j-simple:$slf4j_version" diff --git a/samples/simm-valuation-demo/contracts-states/build.gradle b/samples/simm-valuation-demo/contracts-states/build.gradle index f4daf59e12..777a908910 100644 --- a/samples/simm-valuation-demo/contracts-states/build.gradle +++ b/samples/simm-valuation-demo/contracts-states/build.gradle @@ -122,5 +122,5 @@ jar.finalizedBy shrink shrink.finalizedBy sign artifacts { -// shrinkArtifacts file: sign.outputJars.singleFile, name: project.name, type: 'jar', extension: 'jar', classifier: 'tiny', builtBy: sign + shrinkArtifacts shrinkJar } diff --git a/samples/simm-valuation-demo/src/main/kotlin/net/corda/vega/api/PortfolioApi.kt b/samples/simm-valuation-demo/src/main/kotlin/net/corda/vega/api/PortfolioApi.kt index a8ffecff93..fee3363a0a 100644 --- a/samples/simm-valuation-demo/src/main/kotlin/net/corda/vega/api/PortfolioApi.kt +++ b/samples/simm-valuation-demo/src/main/kotlin/net/corda/vega/api/PortfolioApi.kt @@ -135,7 +135,7 @@ class PortfolioApi(val rpc: CordaRPCOps) { it.toView(ownParty, latestPortfolioStateData?.portfolio?.toStateAndRef(rpc)?.toPortfolio(), PVs?.get(it.id.second) ?: MultiCurrencyAmount.empty(), - IMs?.get(it.id.second) ?: InitialMarginTriple.zero() + IMs?.get(it.id.second) ?: InitialMarginTriple(0.0, 0.0, 0.0) ) }).build() }