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

Redirect to 404 page if reserve details asset is invalid #1156

Open
drewcook opened this issue Sep 19, 2022 · 2 comments · May be fixed by #1551
Open

Redirect to 404 page if reserve details asset is invalid #1156

drewcook opened this issue Sep 19, 2022 · 2 comments · May be fixed by #1551
Labels
bug Something isn't working

Comments

@drewcook
Copy link
Contributor

drewcook commented Sep 19, 2022

Describe the bug
A clear and concise description of what the bug is, including the exact market(e.g. polygon v3) on which it was observed.

in case we use the link with invalid params:
like incorrect market value or asset address we get a white screen

example:

https://app.aave.com/reserve-overview/?underlyingAsset=0xd586e7f844cea2f87f50152665bcbc2c279d8d70&marketName=proto_avala

We have to use 404 page in this case.

@drewcook
Copy link
Contributor Author

Typically, I'd do this via getServerSideProps, inspect the query param, make the request to get the details, and display prior to page load. But because we build a static site, this may behave differently, and we'll probably want to use getStaticProps. We should do a redirect to the /404/ page if it's not a valid value.

@drewcook drewcook added the bug Something isn't working label Sep 19, 2022
@drewcook drewcook reopened this Jan 12, 2023
@Jdecristi
Copy link
Contributor

@drewcook I have a solution for this fix, and would like to take this issue.

Solution Proposal:

Implementing getStaticProps will run at build time rather than query. To handle redirection based on route parameters, redirect on static. This can be achieved by checking for the existence of a reserve based on the underlyingAsset during page mount. If the reserve exists, load the page. Otherwise, redirect to the 404 page.

@Jdecristi Jdecristi linked a pull request Apr 13, 2023 that will close this issue
17 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants