@@ -34,13 +34,10 @@ internal const val INITIATING_TOKENS_FLOW = "com.r3.corda.lib.tokens.workflows.f
34
34
@Suspendable
35
35
internal fun FlowLogic <* >.provideKeyVersion (session : FlowSession ): AbstractParty {
36
36
val otherFlowVersion = session.getCounterpartyFlowInfo().flowVersion
37
- val topLevelName = FlowLogic .currentTopLevel?.let { it::class .java.canonicalName } ? : " "
38
37
// This will work only for initiating flow
39
38
return if (otherFlowVersion == 1 ) {
40
- if (! topLevelName.startsWith(INITIATING_TOKENS_FLOW )) {
41
- logger.warn(" Your CorDapp is using new confidential identities, but other party flow has version 1. Falling back to old CI." +
42
- " If this is not intended behaviour version your flows with version >= 2" )
43
- }
39
+ logger.warn(" Your CorDapp is using new confidential identities, but other party flow has version 1. Falling back to old CI." +
40
+ " If this is not intended behaviour version your flows with version >= 2" )
44
41
// Old Confidential Identities case
45
42
subFlow(RequestConfidentialIdentityFlowHandler (session))
46
43
} else {
@@ -52,13 +49,10 @@ internal fun FlowLogic<*>.provideKeyVersion(session: FlowSession): AbstractParty
52
49
@Suspendable
53
50
internal fun FlowLogic <* >.requestKeyVersion (session : FlowSession ): AnonymousParty {
54
51
val otherFlowVersion = session.getCounterpartyFlowInfo().flowVersion
55
- val topLevelName = FlowLogic .currentTopLevel?.let { it::class .java.canonicalName } ? : " "
56
52
// This will work only for initiating flow
57
53
return if (otherFlowVersion == 1 ) {
58
- if (! topLevelName.startsWith(INITIATING_TOKENS_FLOW )) {
59
- logger.warn(" Your CorDapp is using new confidential identities, but other party flow has version 1. Falling back to old CI." +
60
- " If this is not intended behaviour version your flows with version >= 2" )
61
- }
54
+ logger.warn(" Your CorDapp is using new confidential identities, but other party flow has version 1. Falling back to old CI." +
55
+ " If this is not intended behaviour version your flows with version >= 2" )
62
56
// Old Confidential Identities case
63
57
val key = subFlow(RequestConfidentialIdentityFlow (session)).owningKey
64
58
AnonymousParty (key)
@@ -71,13 +65,10 @@ internal fun FlowLogic<*>.requestKeyVersion(session: FlowSession): AnonymousPart
71
65
@Suspendable
72
66
internal fun FlowLogic <* >.syncKeyVersionHandler (session : FlowSession ) {
73
67
val otherFlowVersion = session.getCounterpartyFlowInfo().flowVersion
74
- val topLevelName = FlowLogic .currentTopLevel?.let { it::class .java.canonicalName } ? : " "
75
68
// This will work only for initiating flow
76
69
if (otherFlowVersion == 1 ) {
77
- if (! topLevelName.startsWith(INITIATING_TOKENS_FLOW )) {
78
- logger.warn(" Your CorDapp is using new confidential identities, but other party flow has version 1. Falling back to old CI." +
79
- " If this is not intended behaviour version your flows with version >= 2" )
80
- }
70
+ logger.warn(" Your CorDapp is using new confidential identities, but other party flow has version 1. Falling back to old CI." +
71
+ " If this is not intended behaviour version your flows with version >= 2" )
81
72
// Old Confidential Identities case
82
73
subFlow(IdentitySyncFlow .Receive (session))
83
74
} else {
@@ -89,13 +80,10 @@ internal fun FlowLogic<*>.syncKeyVersionHandler(session: FlowSession) {
89
80
@Suspendable
90
81
internal fun FlowLogic <* >.syncKeyVersion (session : FlowSession , txBuilder : TransactionBuilder ) {
91
82
val otherFlowVersion = session.getCounterpartyFlowInfo().flowVersion
92
- val topLevelName = FlowLogic .currentTopLevel?.let { it::class .java.canonicalName } ? : " "
93
83
// This will work only for initiating flow
94
84
if (otherFlowVersion == 1 ) {
95
- if (! topLevelName.startsWith(INITIATING_TOKENS_FLOW )) {
96
- logger.warn(" Your CorDapp is using new confidential identities, but other party flow has version 1. Falling back to old CI." +
97
- " If this is not intended behaviour version your flows with version >= 2" )
98
- }
85
+ logger.warn(" Your CorDapp is using new confidential identities, but other party flow has version 1. Falling back to old CI." +
86
+ " If this is not intended behaviour version your flows with version >= 2" )
99
87
// Old Confidential Identities case
100
88
subFlow(IdentitySyncFlow .Send (session, txBuilder.toWireTransaction(serviceHub)))
101
89
} else {
0 commit comments