-
Notifications
You must be signed in to change notification settings - Fork 563
Show 404 on deprecated chain contract page #5139
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
Show 404 on deprecated chain contract page #5139
Conversation
Your org has enabled the Graphite merge queue for merging into mainAdd the label “merge-queue” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “hotfix” to add to the merge queue as a hot fix. You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link. |
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @MananTank and the rest of your teammates on |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5139 +/- ##
=======================================
Coverage 45.43% 45.43%
=======================================
Files 1066 1066
Lines 55150 55150
Branches 3974 3974
=======================================
Hits 25055 25055
Misses 29403 29403
Partials 692 692
*This pull request uses carry forward flags. Click here to find out more. |
size-limit report 📦
|
if (chainMetadata.status === "deprecated") { | ||
notFound(); | ||
} |
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.
we need to show the user some more info for this down the line, fine for now
Merge activity
|
## Problem solved Short description of the bug fixed or feature added <!-- start pr-codex --> --- ## PR-Codex overview This PR focuses on improving the handling of contract metadata and checking for deprecated chains in the `layout.tsx` file. It ensures that the correct contract information is used and adds a condition to handle deprecated chain statuses. ### Detailed summary - Added a check for `chainMetadata.status` to call `notFound()` if the status is "deprecated". - Updated the `isValidContract` check to use `contract` from `info` instead of the previous variable. - Rearranged the destructuring of `contract` and `chainMetadata` for clarity. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
c1230e6
to
09b7404
Compare
|
Problem solved
Short description of the bug fixed or feature added
PR-Codex overview
This PR updates the
layout.tsx
file to improve the handling of contract information and metadata, particularly addressing deprecated chain statuses and modifying the contract validation logic.Detailed summary
chainMetadata.status
to callnotFound()
if the status is "deprecated".isContractDeployed
frominfo.contract
tocontract
.contract
andchainMetadata
.