File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed
cardano-api/src/Cardano/Api Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -110,7 +110,7 @@ import Cardano.Api.Script
110
110
import Cardano.Api.SerialiseBech32
111
111
import Cardano.Api.SerialiseRaw
112
112
import Cardano.Api.Utils
113
- import Control.DeepSeq (NFData (.. ), deepseq )
113
+ import Control.DeepSeq (NFData (.. ), deepseq )
114
114
115
115
116
116
@@ -412,6 +412,19 @@ instance Eq (AddressInEra era) where
412
412
(==) (AddressInEra ShelleyAddressInEra {} _)
413
413
(AddressInEra ByronAddressInAnyEra _) = False
414
414
415
+ instance Ord (AddressInEra era ) where
416
+ compare (AddressInEra ByronAddressInAnyEra addr1)
417
+ (AddressInEra ByronAddressInAnyEra addr2) = compare addr1 addr2
418
+
419
+ compare (AddressInEra ShelleyAddressInEra {} addr1)
420
+ (AddressInEra ShelleyAddressInEra {} addr2) = compare addr1 addr2
421
+
422
+ compare (AddressInEra ByronAddressInAnyEra _)
423
+ (AddressInEra ShelleyAddressInEra {} _) = LT
424
+
425
+ compare (AddressInEra ShelleyAddressInEra {} _)
426
+ (AddressInEra ByronAddressInAnyEra _) = GT
427
+
415
428
deriving instance Show (AddressInEra era )
416
429
417
430
data AddressTypeInEra addrtype era where
You can’t perform that action at this time.
0 commit comments