-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sorting tokens in fixture does not work #99
Comments
Good catch! I guess token0 and token1 must always be the same for the fixture, so we never had failing tests out of it. |
Sir, how can token0 and token1 be same for pairFixture ? |
I mean same addresses across test runs (but token0 != token1), since we use the same mnemonic for every test run |
Okay so it'll fail for different pair address and pass for same pair address right? |
I think the best fix would be to lowercase the addresses of the token and just compare like how it is done from the factory contract as well. |
https://github.com/Uniswap/uniswap-v2-core/blob/4dd59067c76dea4a0e8e4bfdda41877a6b16dedc/test/shared/fixtures.ts#L40
Because ethers returns a string from this method call,
.address
always results in undefined, thus the order of tokens is never changed.The text was updated successfully, but these errors were encountered: