Skip to content

Commit

Permalink
Fix response decoding when retrieving from contract store
Browse files Browse the repository at this point in the history
this was originally trying to decode a `PABResp` into a `Response PABResp`
  • Loading branch information
luigy committed Jul 28, 2021
1 parent 0bdbeb2 commit 83a1f39
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plutus-pab/src/Plutus/PAB/Effects/Contract/Builtin.hs
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ fromResponse cid (SomeBuiltin contract) ContractResponse{newState=State{record}}
let runUpdate (SomeBuiltinState oldS oldW) n = do
case fromJSON (rspResponse (snd <$> n)) of
Error e -> throwError . OtherError $ "Couldn't decode JSON response when reconstruting state: " <> Text.pack e
Success resp -> updateBuiltin @effs @a cid oldS oldW resp
Success resp -> updateBuiltin @effs @a cid oldS oldW (resp <$ n)

foldlM runUpdate initialState (responses record)

Expand Down

0 comments on commit 83a1f39

Please sign in to comment.