Skip to content

Commit

Permalink
Address PR review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
v0d1ch committed Oct 10, 2024
1 parent 0a36f5b commit 463fd6f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions hydra-cardano-api/src/Cardano/Api/UTxO.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion hydra-node/json-schemas/logs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2073,7 +2073,7 @@ definitions:
headId:
$ref: "api.yaml#/components/schemas/HeadId"
recoveredTxId:
sype: string
type: string
- title: OnIncrementTx
type: object
additionalProperties: false
Expand Down

0 comments on commit 463fd6f

Please sign in to comment.