Evaluate if addressA is greater than addressB (uniswap like) #2549
Answered
by
ricmoo
Madeindreams
asked this question in
Q&A
-
Uniswap automatically sort the pair addresses In the contract we can check if and address is greater or smaller than the other one. Is there a way to do this with ethers in the front end? Thank you! |
Beta Was this translation helpful? Give feedback.
Answered by
ricmoo
Jan 14, 2022
Replies: 2 comments
-
You can use |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Madeindreams
-
Thank you Richard! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can use
BigNumber.from(A).lt(B)
to see if A < B. :)