Skip to content

Commit 8f67488

Browse files
committed
Fix fourmolu formatting and add changelog fragment
1 parent 79c6068 commit 8f67488

4 files changed

Lines changed: 12 additions & 3 deletions

File tree

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
project: cardano-api
2+
pr: 1175
3+
kind:
4+
- compatible
5+
description: |
6+
Add HasCallStack constraints to standalone functions that call error
7+
directly or indirectly, improving stack traces. Dijkstra-era placeholder
8+
error messages are also improved.

cardano-api/src/Cardano/Api/Experimental/Tx/Internal/Certificate/Compatible.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ makeStakeAddressDelegationCertificate sCred delegatee =
7171
e@ShelleyBasedEraMary -> cert e delegatee
7272
e@ShelleyBasedEraAllegra -> cert e delegatee
7373
e@ShelleyBasedEraShelley -> cert e delegatee
74-
ShelleyBasedEraDijkstra -> error "TODO: makeStakeAddressDelegationCertificate DijkstraEra"
74+
ShelleyBasedEraDijkstra -> error "makeStakeAddressDelegationCertificate: Dijkstra era not supported"
7575
where
7676
cert
7777
:: Delegatee era ~ Api.Hash Api.StakePoolKey

cardano-api/src/Cardano/Api/Tx/Internal/Body.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2662,7 +2662,7 @@ makeShelleyTransactionBody
26622662

26632663
txAuxData :: Maybe (L.TxAuxData E.ConwayEra)
26642664
txAuxData = toAuxiliaryData sbe txMetadata txAuxScripts
2665-
makeShelleyTransactionBody ShelleyBasedEraDijkstra _ = error "makeShelleyTransactionBody: Dijkstra is not supported"
2665+
makeShelleyTransactionBody ShelleyBasedEraDijkstra _ = error "makeShelleyTransactionBody: Dijkstra era not supported"
26662666

26672667
-- ----------------------------------------------------------------------------
26682668
-- Script witnesses within the tx body

cardano-api/src/Cardano/Api/UTxO.hs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,8 @@ fromMap = UTxO
355355
--------------------------------------------------------------------}
356356

357357
-- | Convert from a `cardano-api` `UTxO` to a `cardano-ledger` UTxO.
358-
toShelleyUTxO :: HasCallStack => ShelleyBasedEra era -> UTxO era -> Ledger.UTxO (ShelleyLedgerEra era)
358+
toShelleyUTxO
359+
:: HasCallStack => ShelleyBasedEra era -> UTxO era -> Ledger.UTxO (ShelleyLedgerEra era)
359360
toShelleyUTxO sbe =
360361
Ledger.UTxO . Map.foldMapWithKey f . unUTxO
361362
where

0 commit comments

Comments
 (0)