Skip to content

Commit

Permalink
Update marlowe-runtime/web-server/Language/Marlowe/Runtime/Web/Server…
Browse files Browse the repository at this point in the history
…/HistoryClient.hs

Co-authored-by: Björn Kihlberg <38290734+bjornkihlberg@users.noreply.github.com>
  • Loading branch information
jhbertra and bjornkihlberg committed Nov 29, 2022
1 parent bdb3b34 commit 2b73f48
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -293,13 +293,13 @@ loadTransactionClient eb contractId txId = MarloweSyncClient $ pure clientInit
-> IO (SeekTx v)
stepSeekTx ev seekTx = \case
ApplyTransaction newTx -> case seekTx of
SeekTx prevOutputs@(prevOutput :| prevOutputs')
SeekTx prevOutputs
| txId == transactionId newTx -> do
addField ev $ FoundTx $ show txId
pure $ SeekConsuming prevOutputs newTx
| otherwise -> pure case scriptOutput $ output newTx of
Nothing -> seekTx
Just scriptOutput -> SeekTx $ (blockHeader newTx, scriptOutput) :| prevOutput : prevOutputs'
Just scriptOutput -> SeekTx $ (blockHeader newTx, scriptOutput) <| prevOutputs
SeekConsuming prevOutputs tx -> do
addField ev $ FoundConsumer $ show $ transactionId newTx
pure $ Done prevOutputs tx (blockHeader newTx) $ transactionId newTx
Expand Down

0 comments on commit 2b73f48

Please sign in to comment.