-
Notifications
You must be signed in to change notification settings - Fork 753
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
Conversation
@@ -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)); |
There was a problem hiding this comment.
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`; |
There was a problem hiding this comment.
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 () => { |
There was a problem hiding this comment.
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
No description provided.