submitMulti deprecated; use submit, actAs and readAs separately

I have an old Daml Script that uses submitMulti. However, the newer compiler (e.g., 3.4.9) is telling me:

warning:
    In the use of ‘submitMulti’
    (imported from Daml.Script, but defined in Daml.Script.Internal.Questions.Submit):
    Deprecated: "Legacy API, use `submit`, `actAs` and `readAs` separately"

How do I fix this?

As an example, replace this:

submitMulti [admin, alice] []
   createCmd CosigningDelegation with
      admin, signer = alice

With this:

submit (actAs admin <> actAs alice)
   createCmd CosigningDelegation with
      admin, signer = alice
1 Like