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

fix: check tokentype in validateLinkDetails #129

Merged
merged 3 commits into from
Apr 22, 2024
Merged

Conversation

borcherd
Copy link
Contributor

@borcherd borcherd commented Apr 19, 2024

Changes the check to fetch the tokenType/decimals. Previously, it would check if either the decimals or tokenType were undefined. If any of those were undefined, it'd refetch the decimals AND type.
However, for erc721 and erc1155, the decimals can be undefined. I've changed the check.

Copy link

Live tests failed. Please check the logs to see which checks failed.

Copy link

Live tests failed. Please check the logs to see which checks failed.

})
if (
linkDetails.tokenType == interfaces.EPeanutLinkType.erc20 ||
linkDetails.tokenType == interfaces.EPeanutLinkType.native ||
Copy link
Contributor

Choose a reason for hiding this comment

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

getTokenContractDetails should be renamed to getTokenDetails

Copy link
Contributor

Choose a reason for hiding this comment

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

What's the point of the triple type check?

@borcherd borcherd merged commit c9a57cd into main Apr 22, 2024
1 of 2 checks passed
Copy link

Live tests failed. Please check the logs to see which checks failed.

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