-
Notifications
You must be signed in to change notification settings - Fork 619
Dashboard: Remove OP superchain banner, CTAs, credits #7569
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
Dashboard: Remove OP superchain banner, CTAs, credits #7569
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
WalkthroughThe changes remove all logic and UI related to gas sponsorship and Optimism-specific credits from the codebase. This includes deleting API calls, special UI components, and conditional logic for gas-sponsored chains and credits. Components and utility functions are simplified to exclude authentication, thirdweb client dependencies, and all gas sponsorship handling. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant CreditsInfoCard
participant useAccountCredits
User->>CreditsInfoCard: Render
CreditsInfoCard->>useAccountCredits: Fetch credits
useAccountCredits-->>CreditsInfoCard: Return credits
CreditsInfoCard->>User: Display filtered credits (no OP/gas sponsorship logic)
sequenceDiagram
participant User
participant getChainMetadata
User->>getChainMetadata: Request chain metadata (with chainId)
getChainMetadata-->>User: Return static metadata (no gas sponsorship logic)
Warning Review ran into problems🔥 ProblemsErrors were encountered while retrieving linked issues. Errors (1)
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (6)
💤 Files with no reviewable changes (2)
🚧 Files skipped from review as they are similar to previous changes (4)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #7569 +/- ##
=======================================
Coverage 56.49% 56.49%
=======================================
Files 906 906
Lines 58028 58028
Branches 4226 4226
=======================================
Hits 32783 32783
Misses 25137 25137
Partials 108 108
🚀 New features to boost your workflow:
|
size-limit report 📦
|
Merge activity
|
<!--
## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"
If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):
## Notes for the reviewer
Anything important to call out? Be sure to also clarify these in your comments.
## How to test
Unit tests, playground, etc.
-->
<!-- start pr-codex -->
---
## PR-Codex overview
This PR focuses on refactoring the code in various files by removing unused imports, simplifying components, and eliminating the `getGasSponsoredChains` function. It also streamlines the `CreditsInfoCard` and `CreditsItem` components, enhancing clarity and functionality.
### Detailed summary
- Removed the `getGasSponsoredChains` function from `chain.ts`.
- Simplified `CreditsInfoCard` component by removing props and directly using `useAccountCredits`.
- Updated `CreditsItem` component to remove unused props and functionality related to OP credits.
- Eliminated `GasCreditAlert` from `AccountAbstractionLayout`.
- Adjusted imports in `utils.ts` to exclude `getGasSponsoredChains`.
- Removed temporary OP_CTA definition from `utils.ts`.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
* **Refactor**
* Simplified the billing credits display by removing special handling and application UI for "Optimism sponsorship credits".
* Streamlined the CreditsInfoCard component to reduce dependencies and remove special credit handling.
* Removed logic and UI related to gas-sponsored chains and gas sponsorship call-to-actions.
* Deleted the GasCreditAlert component and its alert UI from the account abstraction page.
* Reduced authentication and client dependencies in the billing page for improved simplicity.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
9b53461 to
581cdda
Compare
<!--
## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"
If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):
## Notes for the reviewer
Anything important to call out? Be sure to also clarify these in your comments.
## How to test
Unit tests, playground, etc.
-->
<!-- start pr-codex -->
---
## PR-Codex overview
This PR focuses on refactoring the code by removing unnecessary imports and simplifying components, particularly in the billing and chain management sections. It also eliminates unused functions and optimizes the handling of credits.
### Detailed summary
- Removed `getGasSponsoredChains` function and its usage.
- Simplified `CreditsInfoCard` by removing props and using `useAccountCredits`.
- Removed `GasCreditAlert` component and its references.
- Cleaned up `CreditsItem` by removing unnecessary props and logic.
- Removed unused imports in various files, improving code clarity.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
* **Refactor**
* Simplified the billing credits display by removing special handling and application UI for "Optimism sponsorship credits".
* Streamlined the CreditsInfoCard component to reduce dependencies and remove special credit handling.
* Removed logic and UI related to gas-sponsored chains and gas sponsorship call-to-actions.
* Deleted the GasCreditAlert component and its alert UI from the account abstraction page.
* Reduced authentication and client dependencies in the billing page for improved simplicity.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
581cdda to
a3cdc9e
Compare

PR-Codex overview
This PR focuses on refactoring the billing and chain management functionalities in the dashboard application. It removes unused code and simplifies components, enhancing readability and maintainability.
Detailed summary
getGasSponsoredChainsfunction and its usage.CreditsInfoCardto remove unnecessary props.GasCreditAlertcomponent.CreditsItemto reduce props and improve clarity.page.tsxto remove unusedgetAuthToken.Summary by CodeRabbit