-
Notifications
You must be signed in to change notification settings - Fork 619
Handle contract page crash if contract is not deployed #5132
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
Handle contract page crash if contract is not deployed #5132
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
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 |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5132 +/- ##
=======================================
Coverage 45.28% 45.28%
=======================================
Files 1060 1060
Lines 54841 54841
Branches 3957 3957
=======================================
Hits 24835 24835
Misses 29315 29315
Partials 691 691
*This pull request uses carry forward flags. Click here to find out more. |
size-limit report 📦
|
Merge activity
|
## Problem solved
Short description of the bug fixed or feature added
<!-- start pr-codex -->
---
## PR-Codex overview
This PR focuses on improving error handling in the `ContractOverviewPage` and validating contract existence in the `layout.tsx`. It introduces an `ErrorBoundary` around the `PublishedBy` component and checks if a contract is deployed before rendering the layout.
### Detailed summary
- Wrapped the `PublishedBy` component in an `ErrorBoundary` in `ContractOverviewPage.tsx`.
- Added a check for contract deployment using `isContractDeployed` in `layout.tsx`.
- Implemented a `notFound()` call if the contract is not deployed, with a TODO for future improvements.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
39bf281 to
0b510f8
Compare

Problem solved
Short description of the bug fixed or feature added
PR-Codex overview
This PR enhances error handling in the
ContractOverviewPageby wrapping thePublishedBycomponent in anErrorBoundary. It also adds a validity check for the contract in thelayout.tsx, utilizingisContractDeployedto ensure the contract exists before proceeding.Detailed summary
PublishedBycomponent in anErrorBoundaryinContractOverviewPage.tsx.isContractDeployedinlayout.tsx.notFound()to handle cases where the contract is not deployed.