Skip to content

Commit

Permalink
Rename setverifiers to envVerifiers
Browse files Browse the repository at this point in the history
  • Loading branch information
edmundnoble committed Dec 14, 2023
1 parent e5c876c commit 34b6229
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Pact/Repl/Lib.hs
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ replDefs = ("Repl",
"{'key: \"admin-key\", 'caps: []}"]
("Set transaction signature keys and capabilities. SIGS is a list of objects with \"key\" " <>
"specifying the signer key, and \"caps\" specifying a list of associated capabilities.")
,defZNative "env-verifiers" setverifiers (funType tTyString [("verifiers",TyList (tTyObject TyAny))])
,defZNative "env-verifiers" envVerifiers (funType tTyString [("verifiers",TyList (tTyObject TyAny))])
[LitExample $ "(env-verifiers [({'name: \"COOLZK\", 'caps: [(accounts.USER_GUARD \"my-account\")]}, " <>
"{'name: \"HYPERCHAIN-BRIDGE\", 'caps: [(bridge.MINT \"mycoin\" 20)]}])"]
("Set transaction verifier names and capabilities. VERIFIERS is a list of objects with \"name\" " <>
Expand Down Expand Up @@ -365,8 +365,8 @@ setsigs' _ [TList ts _ _] = do
return $ tStr "Setting transaction signatures/caps"
setsigs' i as = argsError' i as

setverifiers :: ZNativeFun LibState
setverifiers _ [TList ts _ _] = do
envVerifiers :: ZNativeFun LibState
envVerifiers _ [TList ts _ _] = do
vers <- forM ts $ \t -> case t of
TObject (Object (ObjectMap om) _ _ _) _ -> do
case (M.lookup "name" om, M.lookup "caps" om) of
Expand All @@ -382,7 +382,7 @@ setverifiers _ [TList ts _ _] = do
_ -> evalError' t $ "Expected object"
setenv eeMsgVerifiers $ M.fromList $ V.toList vers
return $ tStr "Setting transaction verifiers/caps"
setverifiers i as = argsError' i as
envVerifiers i as = argsError' i as


setmsg :: RNativeFun LibState
Expand Down

0 comments on commit 34b6229

Please sign in to comment.