ENT-11003 [CRAFT][Sample CorDapp] simm-demo fails to create a trade (#7604)

* Reference tiny contract-states jar (do this also gets deployed to node cordapps)
* Update artifact publishing.
* Add explicit compileKotlin pendency to sub-project shrink task.
This commit is contained in:
Jose Coll 2023-12-19 11:14:35 +00:00 committed by GitHub
parent dce725ff4b
commit fb6c4f6a3d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 3 deletions

View File

@ -20,6 +20,8 @@ sourceSets {
} }
} }
compileKotlin.dependsOn(":samples:simm-valuation-demo:contracts-states:shrink")
configurations { configurations {
integrationTestImplementation.extendsFrom testImplementation integrationTestImplementation.extendsFrom testImplementation
integrationTestRuntimeOnly.extendsFrom testRuntimeOnly integrationTestRuntimeOnly.extendsFrom testRuntimeOnly
@ -35,7 +37,7 @@ dependencies {
// The SIMM demo CorDapp depends upon Cash CorDapp features // The SIMM demo CorDapp depends upon Cash CorDapp features
cordapp project(':finance:contracts') cordapp project(':finance:contracts')
cordapp project(':finance:workflows') 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') cordapp project(':samples:simm-valuation-demo:flows')
cordaBootstrapper "org.slf4j:slf4j-simple:$slf4j_version" cordaBootstrapper "org.slf4j:slf4j-simple:$slf4j_version"

View File

@ -122,5 +122,5 @@ jar.finalizedBy shrink
shrink.finalizedBy sign shrink.finalizedBy sign
artifacts { artifacts {
// shrinkArtifacts file: sign.outputJars.singleFile, name: project.name, type: 'jar', extension: 'jar', classifier: 'tiny', builtBy: sign shrinkArtifacts shrinkJar
} }

View File

@ -135,7 +135,7 @@ class PortfolioApi(val rpc: CordaRPCOps) {
it.toView(ownParty, it.toView(ownParty,
latestPortfolioStateData?.portfolio?.toStateAndRef<IRSState>(rpc)?.toPortfolio(), latestPortfolioStateData?.portfolio?.toStateAndRef<IRSState>(rpc)?.toPortfolio(),
PVs?.get(it.id.second) ?: MultiCurrencyAmount.empty(), 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() }).build()
} }