Skip to content
This repository was archived by the owner on Jan 9, 2025. It is now read-only.

Commit 31a18e5

Browse files
Merge pull request #58 from mlabs-haskell/borja/fix-check-balance-ref-scripts
Fix check balance with ref. scripts
2 parents 2962ade + 4789aec commit 31a18e5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Plutus/Model/Contract.hs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -766,10 +766,11 @@ checkBalanceBy :: (a -> BalanceDiff) -> Run a -> Run a
766766
checkBalanceBy getDiffs act = do
767767
beforeSt <- get
768768
res <- act
769+
afterSt <- get
769770
let BalanceDiff diffs = getDiffs res
770771
addrs = M.keys diffs
771772
before = fmap (`valueAtState` beforeSt) addrs
772-
after <- mapM valueAt addrs
773+
after = fmap (`valueAtState` afterSt) addrs
773774
mapM_ (logError . show . vcat <=< mapM ppError) (check addrs diffs before after)
774775
pure res
775776
where

0 commit comments

Comments
 (0)