Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Triggers] prevent attempt of creating of interface #18961

Merged
merged 1 commit into from
Apr 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion sdk/triggers/daml/Daml/Trigger.daml
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ emitCommandsV2 cmds pending = do
-- Note that this will send the create as a single-command transaction.
-- If you need to send multiple commands in one transaction, use
-- `emitCommands` with `createCmd` and handle filtering yourself.
dedupCreate : (Eq t, Template t) => t -> TriggerA s ()
dedupCreate : (Eq t, Template t, HasAgreement t) => t -> TriggerA s ()
dedupCreate t = do
aState <- liftTriggerRule get
-- This is a very naive approach that is linear in the number of commands in flight.
Expand Down
2 changes: 1 addition & 1 deletion sdk/triggers/daml/Daml/Trigger/LowLevel.daml
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ data Command
}

-- | Create a contract of the given template.
createCmd : Template t => t -> Command
createCmd : (Template t, HasAgreement t) => t -> Command
createCmd templateArg =
CreateCommand (toAnyTemplate templateArg)

Expand Down