You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hmm, good question. The exchange currently rejects buyToken == sellToken so it would also make sense for it to be an error in the Element parsing. That being said, it would require buy and sell properties on TokenPair to be private (so an invalid token pair can't be created), and for it to have a constructor that returns an Option which is significantly more work. I'm OK with the current implementation for now, but a checked TokenPair type that only accepts valid token pairs is more "correct" IMO.
Hmm, good question. The exchange currently rejects
buyToken == sellToken
so it would also make sense for it to be an error in theElement
parsing. That being said, it would requirebuy
andsell
properties onTokenPair
to be private (so an invalid token pair can't be created), and for it to have a constructor that returns anOption
which is significantly more work. I'm OK with the current implementation for now, but a checkedTokenPair
type that only accepts valid token pairs is more "correct" IMO.Originally posted by @nlordell in #1421 (comment)
The text was updated successfully, but these errors were encountered: