From e41c1e27f3f43c4d227cc323bbc30d14aacab408 Mon Sep 17 00:00:00 2001 From: Paul Brauner Date: Thu, 14 Nov 2024 18:27:55 +0100 Subject: [PATCH] allow losing observers that are also signatories --- .../main/scala/com/digitalasset/daml/lf/speedy/SBuiltin.scala | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sdk/daml-lf/interpreter/src/main/scala/com/digitalasset/daml/lf/speedy/SBuiltin.scala b/sdk/daml-lf/interpreter/src/main/scala/com/digitalasset/daml/lf/speedy/SBuiltin.scala index 3782ef76d056..618f8b11eb80 100644 --- a/sdk/daml-lf/interpreter/src/main/scala/com/digitalasset/daml/lf/speedy/SBuiltin.scala +++ b/sdk/daml-lf/interpreter/src/main/scala/com/digitalasset/daml/lf/speedy/SBuiltin.scala @@ -2402,7 +2402,8 @@ private[lf] object SBuiltin { List( check(_.signatories, "signatories"), - check(_.observers, "observers"), + // This definition of observers allows observers to lose parties that are signatories + check(c => c.stakeholders -- c.signatories, "observers"), check(_.keyOpt.map(_.maintainers), "key maintainers"), check(_.keyOpt.map(_.globalKey.key), "key value"), ).flatten match {