You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Tokens/stockpaydividend/bridging-flows/src/main/kotlin/com/r3/corda/lib/tokens/bridging/flows/BridgeFungibleTokenFlow.kt
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -38,7 +38,7 @@ class BridgeFungibleTokenFlow(
38
38
39
39
@Suspendable
40
40
overridefuncall(): SignedTransaction {
41
-
val participants =listOf(holder)//TODO add confidentialIdentity
41
+
val participants =listOf(holder)
42
42
val observerSessions = sessionsForParties(observers)
43
43
val participantSessions = sessionsForParties(participants)
44
44
@@ -47,10 +47,13 @@ class BridgeFungibleTokenFlow(
47
47
val cordaTokenId = (token.state.data.amount.token.tokenType asTokenPointer<*>).pointer.pointer.id
48
48
49
49
val owners = previousOwnersOf(token).map { serviceHub.identityService.wellKnownPartyFromAnonymous(it) ?: it }
50
-
50
+
val singlePreviousOwner = owners.singleOrNull { it isParty } asParty?
51
+
require(singlePreviousOwner !=null) {
52
+
"Cannot find previous owner of the token to bridge, or multiple found: $owners"
53
+
}
51
54
val solanaAccountMapping = serviceHub.cordaService(SolanaAccountsMappingService::class.java)
52
55
val destination =
53
-
solanaAccountMapping.participants[(owners.first() asParty).name]!!//TODO handle null and ugly code
0 commit comments