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