Skip to content

Commit

Permalink
Make evalGasPayerCap have the same Expr type as evalExecTerm
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcardon committed Oct 24, 2024
1 parent 7f17548 commit e4ed6c8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions pact/Pact/Core/Evaluate.hs
Original file line number Diff line number Diff line change
Expand Up @@ -261,11 +261,11 @@ evalGasPayerCap
-> Set ExecutionFlag -> NamespacePolicy
-> PublicData -> MsgData
-> CapState QualifiedName PactValue
-> Lisp.Expr Info -> IO (Either (PactError Info) EvalResult)
-> Lisp.Expr SpanInfo -> IO (Either (PactError Info) EvalResult)
evalGasPayerCap capToken db spv gasModel flags nsp publicData msgData capState body = do
evalEnv <- setupEvalEnv db Transactional msgData Nothing gasModel nsp spv publicData flags
let evalState = def & esCaps .~ capState
interpretGasPayerTerm evalEnv evalState capToken body
interpretGasPayerTerm evalEnv evalState capToken (def <$ body)


interpret
Expand Down
6 changes: 3 additions & 3 deletions pact/Pact/Core/Serialise/LegacyPact.hs
Original file line number Diff line number Diff line change
Expand Up @@ -705,9 +705,9 @@ fromLegacyTerm mh = \case
BuiltinForm CAnd{} _ -> traverse (fromLegacyTerm mh) args >>= \case
[b1, b2] -> pure (BuiltinForm (CAnd b1 b2) ())
[b1] -> mkOneArgLam $ \x -> BuiltinForm (CAnd b1 x) ()
[] -> mkTwoArgLam $ \x y -> BuiltinForm (CAnd x y) ()
args' ->
pure $ App fn' args' ()
args' -> do
lam <- mkTwoArgLam $ \x y -> BuiltinForm (CAnd x y) ()
pure $ App lam args' ()

BuiltinForm COr{} _ -> traverse (fromLegacyTerm mh) args >>= \case
[b1, b2] -> pure (BuiltinForm (COr b1 b2) ())
Expand Down

0 comments on commit e4ed6c8

Please sign in to comment.