Why is there no `submitUserMustFail`?
- DarkoOP
Is there a particular reason why not all party submission functions also exist for users?
(For examplesubmitUserMustFail)When it comes to
submitMultiI’m assuming that the argument would be to just add the additional actAs/readAs parties to the user, but I don’t see an easy workaround for..MustFail, except to use(fromSome myUser.primaryParty) `submitMustFail` ... - Darko
The same question also holds for queries
- cocreature 3
There is no good reason, we just started with the minimal API. However,
submitUseris just a wrapper, you can see the definition in the code.You can relatively easily define your own wrapper for
submitMultiMustFail:submitUserMustFail : HasCallStack => UserId -> Commands a -> Script () submitUserMustFail userId cmds = do rights <- listUserRights userId let actAs = [ p | CanActAs p <- rights ] let readAs = [ p | CanReadAs p <- rights ] submitMultiMustFail actAs readAs cmds