Skip to content

Commit 34a5569

Browse files
vrom911v0d1ch
authored andcommitted
Try to fix the build
1 parent eb8034f commit 34a5569

File tree

9 files changed

+28
-4
lines changed

9 files changed

+28
-4
lines changed

hydra-cardano-api/hydra-cardano-api.cabal

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ library
5050
Hydra.Cardano.Api.Hash
5151
Hydra.Cardano.Api.NetworkId
5252
Hydra.Cardano.Api.NetworkMagic
53+
Hydra.Cardano.Api.PolicyAssets
5354
Hydra.Cardano.Api.PolicyId
5455
Hydra.Cardano.Api.Prelude
5556
Hydra.Cardano.Api.Pretty

hydra-cardano-api/src/Hydra/Cardano/Api.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ import Hydra.Cardano.Api.ExecutionUnits as Extras
129129
import Hydra.Cardano.Api.Hash as Extras
130130
import Hydra.Cardano.Api.NetworkId ()
131131
import Hydra.Cardano.Api.NetworkMagic ()
132+
import Hydra.Cardano.Api.PolicyAssets ()
132133
import Hydra.Cardano.Api.PolicyId as Extras
133134
import Hydra.Cardano.Api.ReferenceScript as Extras
134135
import Hydra.Cardano.Api.ScriptData as Extras
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{-# OPTIONS_GHC -Wno-orphans #-}
2+
3+
module Hydra.Cardano.Api.PolicyAssets where
4+
5+
import Hydra.Cardano.Api.Prelude
6+
7+
-- * Orphans
8+
9+
instance ToJSON PolicyAssets where
10+
toJSON (PolicyAssets assets) = toJSON assets
11+
12+
instance FromJSON PolicyAssets where
13+
parseJSON v = PolicyAssets <$> parseJSON v

hydra-cardano-api/src/Hydra/Cardano/Api/PolicyId.hs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,17 @@ import Hydra.Cardano.Api.Prelude
66

77
import Cardano.Ledger.Alonzo.Plutus.TxInfo qualified as Ledger
88
import Cardano.Ledger.Mary.Value qualified as Ledger
9+
import Data.Aeson (FromJSONKey (..), ToJSONKey (..))
910
import Hydra.Cardano.Api.ScriptHash ()
1011
import PlutusLedgerApi.V3 (CurrencySymbol, fromBuiltin, unCurrencySymbol)
1112
import Test.Gen.Cardano.Api.Typed (genPolicyId)
1213
import Test.QuickCheck.Hedgehog (hedgehog)
1314

1415
-- * Orphans
1516

17+
instance ToJSONKey PolicyId
18+
instance FromJSONKey PolicyId
19+
1620
instance Arbitrary PolicyId where
1721
arbitrary = hedgehog genPolicyId
1822

hydra-cluster/src/HydraNode.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ requestCommitTx' HydraClient{apiHost = Host{hostname, port}} utxos amount =
202202
Req.req
203203
POST
204204
(Req.http hostname /: "commit")
205-
(ReqBodyJson $ SimpleCommitRequest @Tx utxos amount)
205+
(ReqBodyJson $ SimpleCommitRequest @Tx utxos amount mempty)
206206
(Proxy :: Proxy (JsonResponse (DraftCommitTxResponse Tx)))
207207
(Req.port (fromInteger . toInteger $ port))
208208

hydra-node/golden/ReasonablySized (DraftCommitTxRequest (Tx ConwayEra)).json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"txId": "1fa9e36c69db7285e6179979c23332062085743af5cbf2b41c85461ca00f4d97",
99
"type": "Tx ConwayEra"
1010
},
11+
"tokens": null,
1112
"utxo": {
1213
"0206070403000305070403040207020401080205070508080702040400060503#7": {
1314
"address": "addr_test1yrg0h9r48kll4c97rnvsrnxva5jewvvjy25t0rsfana27l4k5tl0asswrudpvy903ywnuhd2k527q2h3d4n8wr7k4k9s9k0l23",
@@ -108,6 +109,7 @@
108109
},
109110
{
110111
"amount": 221173,
112+
"tokens": null,
111113
"utxoToCommit": {
112114
"0002040408040406020703010001070100050703070302060205050001050308#21": {
113115
"address": "addr_test1xr0pdat5t5we9t36k8jfucs3v6xqslp25ks2820pcg724mh8rkcvlnc2d4x382zeftrh7r6m5hyex54egznpd8cxqxwqlsf5ku",
@@ -216,6 +218,7 @@
216218
"txId": "c5b55dc364ce3da7c2f67822e56f8e3b51ffef7906c0403d146080b5b8231b1c",
217219
"type": "Tx ConwayEra"
218220
},
221+
"tokens": null,
219222
"utxo": {
220223
"0004070708010805010603070102010100040502020807000605030703050205#68": {
221224
"address": "addr_test1zrkf2ndcnjzzdras426sggfal9jl5ly2vh3z7ve0fys29wdwtad6t769ylc4xdhynylnctqudl9d7yydlt4whm6vwjzq5wvnh6",
@@ -430,6 +433,7 @@
430433
},
431434
{
432435
"amount": 459359,
436+
"tokens": null,
433437
"utxoToCommit": {
434438
"0401000402070206070405030800070702060400020206080800010703000802#88": {
435439
"address": "addr_test1wr5xkxd7u2y0rlgzxewfftla6efmqcvzd90kdftgxhl2djslw3a0t",
@@ -569,6 +573,7 @@
569573
"txId": "9b71e3586eb6d0b468d483c6e152c8e8288f569bb2982a35f64dea3d90e5733f",
570574
"type": "Tx ConwayEra"
571575
},
576+
"tokens": null,
572577
"utxo": {
573578
"0200080201080508080103030208080100040601020408030201010004020501#50": {
574579
"address": "addr_test1wpp2cj3qeccas857m0aq5ry8cjegk2rnzcv7wzdukm4p7dc0uc8fx",

hydra-tui/src/Hydra/Client.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ withClient Options{hydraNodeHost = Host{hostname, port}, cardanoSigningKey, card
126126
Req.req
127127
Req.POST
128128
(Req.http hostname Req./: "commit")
129-
(Req.ReqBodyJson $ SimpleCommitRequest @Tx payload Nothing)
129+
(Req.ReqBodyJson $ SimpleCommitRequest @Tx payload Nothing mempty)
130130
Req.jsonResponse
131131
(Req.port $ fromIntegral port)
132132

hydra-tx/exe/Main.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ main =
2020
Right (utxo :: UTxO) -> do
2121
writeFileLBS outFile
2222
. textEnvelopeToJSON Nothing
23-
$ depositTx networkId headId (mkSimpleBlueprintTx utxo) depositSlotNo depositDeadline Nothing
23+
$ depositTx networkId headId (mkSimpleBlueprintTx utxo) depositSlotNo depositDeadline Nothing mempty
2424
putStrLn $ "Wrote deposit transaction to " <> outFile
2525
Recover RecoverOptions{networkId, outFile, recoverTxId, utxoFilePath, recoverSlotNo} -> do
2626
-- XXX: Only requires network discriminator / not networkId

hydra-tx/src/Hydra/Tx/Deposit.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ depositTx ::
3535
Maybe Coin ->
3636
Map PolicyId PolicyAssets ->
3737
Tx
38-
depositTx networkId headId commitBlueprintTx upperSlot deadline amount tokens =
38+
depositTx networkId headId commitBlueprintTx upperSlot deadline amount _tokens =
3939
fromLedgerTx $
4040
toLedgerTx blueprintTx
4141
& addDepositInputs

0 commit comments

Comments
 (0)