Skip to content
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

feat(token-lists): Tests for checksummed address #250

Merged
merged 4 commits into from
Aug 20, 2021
Merged

feat(token-lists): Tests for checksummed address #250

merged 4 commits into from
Aug 20, 2021

Conversation

ChefKai
Copy link
Contributor

@ChefKai ChefKai commented Aug 20, 2021

No description provided.

@ChefKai ChefKai marked this pull request as ready for review August 20, 2021 10:40
@@ -145,7 +143,14 @@ describe.each([["pancakeswap-default"], ["pancakeswap-extended"], ["pancakeswap-

it("all addresses are valid and checksummed", () => {
for (const token of defaultTokenList.tokens) {
expect(getAddress(token.address)).toBe(token.address);
expect(token.address).toBe(getAddress(token.address));
Copy link
Contributor Author

@ChefKai ChefKai Aug 20, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrong side; it's expect actual to be formatted actual

const refersToLocalLogo =
token.logoURI === `https://tokens.pancakeswap.finance/images/${token.address}.png` ||
token.logoURI === `https://tokens.pancakeswap.finance/images/${token.address.toLowerCase()}.png`;
const refersToLocalLogo = token.logoURI === `https://tokens.pancakeswap.finance/images/${token.address}.png`;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ensure all URI's are checksummed

}
});

it("all logos addresses are valid and checksummed", async () => {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ensure that token logo as image are checksummed

@ChefKai ChefKai merged commit 2197ed5 into pancakeswap:master Aug 20, 2021
@ChefKai ChefKai deleted the test/checksummed-logo branch August 20, 2021 11:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants