Skip to content

Commit

Permalink
Add root for Hydra.Model.Payment.IsTx and remove unused Payment insta…
Browse files Browse the repository at this point in the history
…nces
  • Loading branch information
locallycompact committed Dec 31, 2024
1 parent a889e65 commit 90a4763
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
6 changes: 0 additions & 6 deletions hydra-node/test/Hydra/Model/Payment.hs
Original file line number Diff line number Diff line change
Expand Up @@ -72,18 +72,12 @@ instance Show Payment where
<> show value
<> " }"

instance Arbitrary Payment where
arbitrary = error "don't use"

instance ToCBOR Payment where
toCBOR = error "don't use"

instance FromCBOR Payment where
fromCBOR = error "don't use"

instance HasVariables Payment where
getAllVariables _ = mempty

-- | Making `Payment` an instance of `IsTx` allows us to use it with `HeadLogic'`s messages.
instance IsTx Payment where
type TxIdType Payment = Int
Expand Down
2 changes: 2 additions & 0 deletions weeder.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ root-instances = [
, { module = "Hydra.Contract.MintAction", instance = "FromData MintAction" }
# This one is odd.
, { module = "Hydra.Network.Ouroboros.Type", instance = "Protocol" }
# TODO: Remove this
, { module = "Hydra.Model.Payment", instance = "IsTx" }
# These are used for debugging.
, { module = "Hydra.Chain.Direct.TxTraceSpec", instance = "HasVariables" }
, { module = "Hydra.Chain.Direct.TxTraceSpec", instance = "MonadFail AppM" }
Expand Down

0 comments on commit 90a4763

Please sign in to comment.