File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
src/Simplex/Messaging/Notifications Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -470,13 +470,13 @@ toWPAuth s
470470newtype WPP256dh = WPP256dh ECC. PublicPoint
471471 deriving (Eq , Show )
472472
473+ -- This Ord instance for ECC point is quite arbitrary, it is needed because token is used as Map key
473474instance Ord WPP256dh where
474- compare (WPP256dh p1) (WPP256dh p2) = comparePt p1 p2
475- where
476- comparePt ECC. PointO ECC. PointO = EQ
477- comparePt ECC. PointO (ECC. Point _ _) = LT
478- comparePt (ECC. Point _ _) ECC. PointO = GT
479- comparePt (ECC. Point x1 y1) (ECC. Point x2 y2) = compare (x1, y1) (x2, y2)
475+ compare (WPP256dh p1) (WPP256dh p2) = case (p1, p2) of
476+ (ECC. PointO , ECC. PointO ) -> EQ
477+ (ECC. PointO , _) -> GT
478+ (_, ECC. PointO ) -> LT
479+ (ECC. Point x1 y1, ECC. Point x2 y2) -> compare (x1, y1) (x2, y2)
480480
481481data WPKey = WPKey
482482 { wpAuth :: WPAuth ,
You can’t perform that action at this time.
0 commit comments