From 463fd6f9dd4da804ebf11e61e6915ea95eacbcce Mon Sep 17 00:00:00 2001 From: Sasha Bogicevic Date: Thu, 10 Oct 2024 10:51:28 +0200 Subject: [PATCH] Address PR review comments --- hydra-cardano-api/src/Cardano/Api/UTxO.hs | 6 +++--- hydra-node/json-schemas/logs.yaml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hydra-cardano-api/src/Cardano/Api/UTxO.hs b/hydra-cardano-api/src/Cardano/Api/UTxO.hs index dd9b0e4c2ca..47e01c11e5a 100644 --- a/hydra-cardano-api/src/Cardano/Api/UTxO.hs +++ b/hydra-cardano-api/src/Cardano/Api/UTxO.hs @@ -62,11 +62,11 @@ resolve k = Map.lookup k . toMap pairs :: UTxO' out -> [(TxIn, out)] pairs = Map.toList . toMap --- | Find first 'UTxO' which satisfies given predicate. +-- | Find first 'UTxO' using the output in predicate. find :: (out -> Bool) -> UTxO' out -> Maybe (TxIn, out) -find fn utxo = List.find (fn . snd) $ pairs utxo +find fn = findBy (fn . snd) --- | Find first 'UTxO' which satisfies given predicate. +-- | Find first 'UTxO' using both input and output in predicate. findBy :: ((TxIn, out) -> Bool) -> UTxO' out -> Maybe (TxIn, out) findBy fn utxo = List.find fn $ pairs utxo diff --git a/hydra-node/json-schemas/logs.yaml b/hydra-node/json-schemas/logs.yaml index 29b1378a3a6..57c6292ed7c 100644 --- a/hydra-node/json-schemas/logs.yaml +++ b/hydra-node/json-schemas/logs.yaml @@ -2073,7 +2073,7 @@ definitions: headId: $ref: "api.yaml#/components/schemas/HeadId" recoveredTxId: - sype: string + type: string - title: OnIncrementTx type: object additionalProperties: false