Skip to content

Commit

Permalink
Fix build replacing more list of parties with set of parties
Browse files Browse the repository at this point in the history
  • Loading branch information
abailly-iohk committed Sep 10, 2021
1 parent 99aaf5b commit 7f6cc31
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions hydra-tui/src/Hydra/TUI.hs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,20 @@ import Graphics.Vty.Attributes (defAttr)
import Hydra.Client (Client (Client, sendInput), HydraEvent (..), withClient)
import Hydra.ClientInput (ClientInput (..))
import Hydra.Ledger (Party, Tx (..))
import Hydra.Ledger.Cardano (CardanoAddress, CardanoKeyPair, CardanoTx, TxIn, TxOut, encodeAddress, genKeyPair, genUtxoFor, mkSimpleCardanoTx, mkVkAddress, prettyBalance, prettyUtxo)
import Hydra.Ledger.Cardano (
CardanoAddress,
CardanoKeyPair,
CardanoTx,
TxIn,
TxOut,
encodeAddress,
genKeyPair,
genUtxoFor,
mkSimpleCardanoTx,
mkVkAddress,
prettyBalance,
prettyUtxo,
)
import Hydra.Network (Host (..))
import Hydra.ServerOutput (ServerOutput (..))
import Hydra.Snapshot (Snapshot (..))
Expand Down Expand Up @@ -176,7 +189,7 @@ handleAppEvent s = \case
in s & headStateL .~ Initializing{parties = toList parties, utxo}
& feedbackL ?~ UserFeedback Info "Head initialized, ready for commit(s)."
Update Committed{party, utxo} ->
s & headStateL %~ partyCommitted party utxo
s & headStateL %~ partyCommitted [party] utxo
& feedbackL ?~ UserFeedback Info (show party <> " committed " <> prettyBalance (balance @CardanoTx utxo))
Update HeadIsOpen{utxo} ->
s & headStateL .~ Open{utxo}
Expand Down Expand Up @@ -204,7 +217,7 @@ handleAppEvent s = \case
partyCommitted party commit = \case
Initializing{parties, utxo} ->
Initializing
{ parties = parties \\ [party]
{ parties = parties \\ party
, utxo = utxo <> commit
}
hs -> hs
Expand Down

0 comments on commit 7f6cc31

Please sign in to comment.