@@ -33,8 +33,8 @@ template ExchangeInvitation
3333 name : Text
3434 location : Text
3535 do
36- create RegisteredExchange with ..
37- create Exchange with tokenPairs = [], clearedMarkets = [], binOptions = [], participants = [], ..
36+ createOrLookup RegisteredExchange with ..
37+ createOrLookup Exchange with tokenPairs = [], clearedMarkets = [], binOptions = [], participants = [], ..
3838
3939
4040-- |Request from an investor or broker to be added to the exchange
@@ -55,7 +55,7 @@ template ExchangeParticipantInvitationRequest
5555 sender = exchange, senderRole = Some ExchangeRole
5656 receiver = participant, text = "Exchange participant request accepted."
5757 exerciseByKey @Exchange (operator,exchange) Exchange_AddParticipant with exchParticipant = participant
58- create ExchangeParticipant with exchParticipant = participant, ..
58+ createOrLookup ExchangeParticipant with exchParticipant = participant, ..
5959
6060 ExchangeInvtationRequest_Reject : ()
6161 do
@@ -86,13 +86,13 @@ template Exchange
8686 nonconsuming Exchange_RequestCustodianRelationship : ContractId CustodianRelationshipRequest
8787 with
8888 custodian : Party
89- do create CustodianRelationshipRequest with requester = exchange, role = ExchangeRole, ..
89+ do createOrLookup CustodianRelationshipRequest with requester = exchange, role = ExchangeRole, ..
9090
9191 nonconsuming Exchange_RequestCCPRelationship : ContractId CCPExchangeRelationshipRequest
9292 with
9393 ccp : Party
9494 do
95- create CCPExchangeRelationshipRequest with requester = exchange, party = ccp, requesterRole = ExchangeRole, ..
95+ createOrLookup CCPExchangeRelationshipRequest with requester = exchange, party = ccp, requesterRole = ExchangeRole, ..
9696
9797 Exchange_InviteParticipant : (ContractId Exchange, ContractId ExchangeParticipantInvitation)
9898 with
0 commit comments