fix mkTrapdoor fns expect key
This commit is contained in:
parent
9e808c846e
commit
a52d6b5491
1 changed files with 3 additions and 3 deletions
|
|
@ -21,16 +21,16 @@ in rec {
|
|||
defaultTrapdoorKey = "_'";
|
||||
mkTrapdoorKey = id: "${defaultTrapdoorKey}${id}";
|
||||
|
||||
mkTrapdoorFn = key: decl:
|
||||
mkTrapdoorFn = decl:
|
||||
assert enfHasAttr "default" decl "mkTrapdoorFn";
|
||||
assert enfHasAttrUnsafe "unlock" decl "mkTrapdoorFn";
|
||||
# return trapdoor function
|
||||
(x:
|
||||
if key == masterkey
|
||||
if x == masterkey
|
||||
then decl.unlock
|
||||
else decl.default x);
|
||||
|
||||
mkTrapdoorSet = key: decl:
|
||||
mkTrapdoorSet = decl:
|
||||
assert enfHasAttr "default" decl "mkTrapdoorSet";
|
||||
assert enfHasAttrUnsafe "unlock" decl "mkTrapdoorSet";
|
||||
# return trapdoor set
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue