Skip to content

Commit

Permalink
simplify Inject WrapGenTxId and make it match Inject WrapHeaderHash
Browse files Browse the repository at this point in the history
  • Loading branch information
fraser-iohk committed Jan 6, 2025
1 parent 7665aa0 commit 6b0701b
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,14 @@ instance Inject GenTx where
inject _ = injectNS' (Proxy @GenTx)

instance Inject WrapGenTxId where
inject _ ix w = WrapGenTxId $ HardForkGenTxId $ OneEraGenTxId $
hcollapse $ hcmap proxySingle (K . toRawTxIdHash . unwrapGenTxId) $ injectNS ix w
inject _ (idx :: Index xs x) =
case dictIndexAll (Proxy @SingleEraBlock) idx of
Dict ->
WrapGenTxId
. HardForkGenTxId
. OneEraGenTxId
. toRawTxIdHash
. unwrapGenTxId

instance Inject WrapApplyTxErr where
inject _ =
Expand Down

0 comments on commit 6b0701b

Please sign in to comment.