Skip to content

[Dashboard] Add token request route to dashboard #7112

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

Merged
merged 1 commit into from
May 27, 2025

Conversation

Joe-Thirdweb
Copy link
Contributor

@Joe-Thirdweb Joe-Thirdweb commented May 21, 2025

TOOL-4443
TOOL-4559

How to Test

  1. Log into dashboard
  2. Select a project
  3. Click on Universal Bridge on left hand side
  4. Click on Settings
  5. Scroll down to add token section
  • Failure input
    Chain: Ethereum
    Token Address: 0x7613c48e0cd50e42dd9bf0f6c235063145f6f8db

-Success input
Chain: Ethereum
Token Address:0x7613c48e0cd50e42dd9bf0f6c235063145f6f8dc


PR-Codex overview

This PR introduces a new validation schema for route discovery and integrates a RouteDiscovery component into the dashboard. It enhances the user interface for token submissions and adds functionality for adding universal bridge tokens.

Detailed summary

  • Added routeDiscoveryValidationSchema in validations.ts.
  • Created RouteDiscovery component for token discovery.
  • Integrated RouteDiscovery into the Page component in page.tsx.
  • Implemented addUniversalBridgeTokenRoute function in tokens.ts.
  • Added RouteDiscoveryCard component for UI representation.
  • Enhanced form handling and error messaging for token submissions.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

Summary by CodeRabbit

  • New Features

    • Introduced a Route Discovery workflow, allowing users to submit tokens for route discovery on selected blockchain networks.
    • Added a new card component for displaying route discovery information and actions.
    • Integrated Route Discovery into the Universal Bridge settings page for easier access.
  • Enhancements

    • Added validation for token address and chain selection to ensure proper input.
    • Provided user feedback through success and error messages, including toast notifications.
  • Style

    • Minor cleanup of extra blank lines in the Project General Settings page for improved readability.

@Joe-Thirdweb Joe-Thirdweb requested review from a team as code owners May 21, 2025 16:54
Copy link

changeset-bot bot commented May 21, 2025

⚠️ No Changeset found

Latest commit: e14a134

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

vercel bot commented May 21, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
thirdweb-www ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 27, 2025 10:21pm
4 Skipped Deployments
Name Status Preview Comments Updated (UTC)
docs-v2 ⬜️ Skipped (Inspect) May 27, 2025 10:21pm
login ⬜️ Skipped (Inspect) May 27, 2025 10:21pm
thirdweb_playground ⬜️ Skipped (Inspect) May 27, 2025 10:21pm
wallet-ui ⬜️ Skipped (Inspect) May 27, 2025 10:21pm

Copy link
Contributor

graphite-app bot commented May 21, 2025

How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • merge-queue - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

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.

Copy link
Contributor

coderabbitai bot commented May 21, 2025

"""

Walkthrough

This update introduces a new token route discovery workflow in the dashboard. It adds a reusable RouteDiscoveryCard UI component, a RouteDiscovery form with validation and submission logic, and a supporting API function. The route discovery feature is integrated into the universal bridge settings page, while minor formatting adjustments are made elsewhere.

Changes

File(s) Change Summary
apps/dashboard/src/@/components/blocks/RouteDiscoveryCard.tsx Added RouteDiscoveryCard component for displaying route discovery forms and status messages.
apps/dashboard/src/components/pay/RouteDiscovery.tsx Added RouteDiscovery component with form, validation, submission, error handling, and analytics.
apps/dashboard/src/components/settings/ApiKeys/validations.ts Introduced routeDiscoveryValidationSchema and associated TypeScript type for form validation.
apps/dashboard/src/@/api/universal-bridge/tokens.ts Added addUniversalBridgeTokenRoute API function for submitting new token routes.
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/connect/universal-bridge/settings/page.tsx Integrated RouteDiscovery into the universal bridge settings page UI.
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/settings/ProjectGeneralSettingsPage.tsx Removed extraneous blank lines between form components (formatting only).

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant RouteDiscovery (Form)
    participant API (addUniversalBridgeTokenRoute)
    participant Analytics
    participant Toast

    User->>RouteDiscovery: Select network and enter token address
    User->>RouteDiscovery: Submit form
    RouteDiscovery->>API: addUniversalBridgeTokenRoute({chainId, tokenAddress})
    API-->>RouteDiscovery: Success or Error response
    alt Success
        RouteDiscovery->>Analytics: Track success event
        RouteDiscovery->>Toast: Show success message
        RouteDiscovery-->>User: Show success UI, offer reset
    else Error
        RouteDiscovery->>Analytics: Track failure event
        RouteDiscovery->>Toast: Show error message
        RouteDiscovery-->>User: Show error UI, offer retry
    end
Loading

Assessment against linked issues

Objective Addressed Explanation
Implement form submission for route discovery/settings pages (TOOL-4443)
Provide user feedback (success/error) for adding token routes (TOOL-4559)
"""

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 80c28a4 and e14a134.

📒 Files selected for processing (6)
  • apps/dashboard/src/@/api/universal-bridge/tokens.ts (2 hunks)
  • apps/dashboard/src/@/components/blocks/RouteDiscoveryCard.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/connect/universal-bridge/settings/page.tsx (2 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/settings/ProjectGeneralSettingsPage.tsx (0 hunks)
  • apps/dashboard/src/components/pay/RouteDiscovery.tsx (1 hunks)
  • apps/dashboard/src/components/settings/ApiKeys/validations.ts (2 hunks)
💤 Files with no reviewable changes (1)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/settings/ProjectGeneralSettingsPage.tsx
🚧 Files skipped from review as they are similar to previous changes (5)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/connect/universal-bridge/settings/page.tsx
  • apps/dashboard/src/components/settings/ApiKeys/validations.ts
  • apps/dashboard/src/@/api/universal-bridge/tokens.ts
  • apps/dashboard/src/@/components/blocks/RouteDiscoveryCard.tsx
  • apps/dashboard/src/components/pay/RouteDiscovery.tsx
⏰ Context from checks skipped due to timeout of 90000ms (8)
  • GitHub Check: E2E Tests (pnpm, esbuild)
  • GitHub Check: E2E Tests (pnpm, webpack)
  • GitHub Check: E2E Tests (pnpm, vite)
  • GitHub Check: Unit Tests
  • GitHub Check: Lint Packages
  • GitHub Check: Size
  • GitHub Check: Build Packages
  • GitHub Check: Analyze (javascript)
✨ Finishing Touches
  • 📝 Generate Docstrings

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need 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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions github-actions bot added the Dashboard Involves changes to the Dashboard. label May 21, 2025
Copy link

codecov bot commented May 21, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 55.66%. Comparing base (acd8b9e) to head (e14a134).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7112   +/-   ##
=======================================
  Coverage   55.66%   55.66%           
=======================================
  Files         904      904           
  Lines       58391    58391           
  Branches     4114     4114           
=======================================
  Hits        32504    32504           
  Misses      25781    25781           
  Partials      106      106           
Flag Coverage Δ
packages 55.66% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (9)
apps/dashboard/src/@/api/universal-bridge/addRoute.ts (1)

16-42: API function implementation is robust but could enhance error handling.

The implementation correctly:

  • Authenticates with the server
  • Constructs the API URL and request body
  • Handles basic error cases
  • Parses and returns the response data with proper typing

Consider enhancing the error handling to provide more specific error messages based on HTTP status codes or response content structure.

 if (!res.ok) {
   const text = await res.text();
-  throw new Error(text);
+  let errorMessage = text;
+  try {
+    const errorJson = JSON.parse(text);
+    errorMessage = errorJson.message || errorJson.error || text;
+  } catch (e) {
+    // Use the original text if JSON parsing fails
+  }
+  throw new Error(`Failed to add token route: ${errorMessage}`);
 }
apps/dashboard/src/@/components/blocks/RouteDiscoveryCard.tsx (1)

56-81: Well-implemented footer with multiple state handling.

The footer section correctly handles different states:

  • No permission message
  • Error message
  • Standard informational message
  • Conditional rendering of the save button
  • Loading state with spinner

However, consider adding an aria-label to the button when in loading state to improve accessibility.

 <Button
   size="sm"
   className={cn("gap-2", props.saveButton.className)}
   onClick={props.saveButton.onClick}
   disabled={props.saveButton.disabled || props.saveButton.isPending}
   variant={props.saveButton.variant || "outline"}
   type={props.saveButton.type}
+  aria-label={props.saveButton.isPending ? "Submitting token request" : "Submit token request"}
 >
apps/dashboard/src/components/pay/RouteDiscovery.tsx (7)

2-2: Remove the import adjustment comment.

The comment "// Adjust the import path" appears to be a temporary note that should be removed before production.

-import { addUniversalBridgeTokenRoute } from "@/api/universal-bridge/addRoute"; // Adjust the import path
+import { addUniversalBridgeTokenRoute } from "@/api/universal-bridge/addRoute";

53-70: Provide more specific error handling for the API call.

The current error handling catches all errors and re-throws them. Consider adding more specific error handling based on different types of API errors (e.g., network errors, validation errors, authentication errors).

const submitDiscoveryMutation = useMutation({
  mutationFn: async (values: {
    tokenAddress: string;
  }) => {
    try {
      // Call the API to add the route
      const result = await addUniversalBridgeTokenRoute({
        chainId: selectedChainId,
        tokenAddress: values.tokenAddress,
      });

      return result;
    } catch (error) {
      console.error("Error adding route:", error);
+     // More specific error handling based on error type
+     if (error.response?.status === 400) {
+       throw new Error("Invalid token address or chain ID");
+     } else if (error.response?.status === 401 || error.response?.status === 403) {
+       throw new Error("Authentication error. Please log in again.");
+     } else if (error.response?.status >= 500) {
+       throw new Error("Server error. Please try again later.");
+     }
      throw error; // Re-throw to trigger onError handler
    }
  },
});

74-74: Remove console.log statement.

Remove the debug console.log statement before production deployment.

-      console.log("selectedChainId", selectedChainId);

83-83: Remove console.log statement.

Remove the debug console.log statement before production deployment.

-            console.log("Token route added successfully:", data);

115-115: Remove console.log statement from validation error handler.

Remove the debug console.log statement before production deployment.

-      console.log("Form validation errors:", errors);

122-137: Enhance accessibility of the success component.

Add appropriate ARIA attributes to improve accessibility, and ensure color is not the only indicator of success.

-  <div className="mt-4 rounded-md border border-green-200 bg-green-50 p-4">
+  <div 
+    className="mt-4 rounded-md border border-green-200 bg-green-50 p-4" 
+    role="alert" 
+    aria-live="polite"
+  >
    <h4 className="font-medium text-green-600 text-lg">
      Token submitted successfully!
    </h4>
    <p className="mb-3 text-green-600">
      Thank you for your submission. If you still do not see your token listed
      after some time, please reach out to our team for support.
    </p>
    <button
      type="button"
      onClick={resetForm}
      className="rounded-md border border-green-500 bg-green-100 px-4 py-2 text-green-700 transition-colors hover:bg-green-200"
+     aria-label="Submit another token"
    >
      Submit Another Token
    </button>
  </div>

142-157: Enhance accessibility of the failure component.

Add appropriate ARIA attributes to improve accessibility, and ensure color is not the only indicator of failure.

-  <div className="mt-4 rounded-md border border-red-200 bg-red-50 p-4">
+  <div 
+    className="mt-4 rounded-md border border-red-200 bg-red-50 p-4" 
+    role="alert" 
+    aria-live="assertive"
+  >
    <h4 className="font-medium text-lg text-red-600">
      Token submission failed!
    </h4>
    <p className="mb-2 text-red-600">
      Please double check the network and token address. If issues persist,
      please reach out to our support team.
    </p>
    <button
      type="button"
      onClick={resetForm}
      className="rounded-md border border-red-500 bg-red-100 px-4 py-2 text-red-700 transition-colors hover:bg-red-200"
+     aria-label="Try submitting again"
    >
      Try Again
    </button>
  </div>
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 243c661 and bdff84d.

📒 Files selected for processing (6)
  • apps/dashboard/src/@/api/universal-bridge/addRoute.ts (1 hunks)
  • apps/dashboard/src/@/components/blocks/RouteDiscoveryCard.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/connect/universal-bridge/settings/page.tsx (2 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/settings/ProjectGeneralSettingsPage.tsx (0 hunks)
  • apps/dashboard/src/components/pay/RouteDiscovery.tsx (1 hunks)
  • apps/dashboard/src/components/settings/ApiKeys/validations.ts (1 hunks)
💤 Files with no reviewable changes (1)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/settings/ProjectGeneralSettingsPage.tsx
⏰ Context from checks skipped due to timeout of 90000ms (8)
  • GitHub Check: E2E Tests (pnpm, esbuild)
  • GitHub Check: Unit Tests
  • GitHub Check: E2E Tests (pnpm, webpack)
  • GitHub Check: Build Packages
  • GitHub Check: E2E Tests (pnpm, vite)
  • GitHub Check: Lint Packages
  • GitHub Check: Size
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (8)
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/connect/universal-bridge/settings/page.tsx (2)

5-5: New component import looks good.

The import for RouteDiscovery is correctly added and aligns with the existing import pattern.


52-63: Clean integration of the RouteDiscovery component.

The modified component structure now properly organizes the page with:

  • A flex column container for consistent layout
  • Appropriate padding and spacing between components
  • Well-structured component hierarchy

The RouteDiscovery component is correctly placed below the PayConfig section, matching the UI flow described in the PR objectives.

apps/dashboard/src/components/settings/ApiKeys/validations.ts (1)

126-137: Well-structured validation schema for token routes.

The validation schema is properly implemented with:

  • Correct validation for chainId as a number
  • Proper tokenAddress validation with regex for Ethereum addresses
  • Clear error messages for required fields and invalid formats
  • Type export for use with TypeScript

This validation will ensure that only properly formatted token addresses are submitted, which is essential for the token request functionality.

apps/dashboard/src/@/api/universal-bridge/addRoute.ts (2)

1-6: Proper server-side implementation with environment configuration.

The server action is correctly defined with the "use server" directive and imports the necessary authentication utilities. The base URL is appropriately sourced from environment constants.


7-14: Well-defined TokenMetadata type.

The type definition is comprehensive and includes all necessary fields for token metadata with appropriate types. The optional iconUri field is correctly marked.

apps/dashboard/src/@/components/blocks/RouteDiscoveryCard.tsx (2)

6-31: Well-structured component props with comprehensive type definitions.

The props interface is thorough and provides good flexibility for the component:

  • Clear organization of related properties (header, saveButton)
  • Proper typing for all properties
  • Good use of optional props for conditional rendering
  • Support for various button variants and states

This approach makes the component highly reusable across different contexts.


32-55: Clean implementation of the card header with conditional rendering.

The header section is well-implemented with:

  • Proper conditional rendering of title and description
  • Good use of CSS utilities for styling
  • Appropriate cursor handling for disabled state
  • Clean rendering of children content

The component structure follows best practices for reusable UI components.

apps/dashboard/src/components/pay/RouteDiscovery.tsx (1)

1-236: Overall implementation looks good.

The RouteDiscovery component is well-structured and implements the token request route functionality effectively. It provides clear user feedback, handles form validation, and integrates with the API and analytics tracking. The UI is responsive and provides appropriate error handling and success states.

There are a few minor improvements suggested above, but the overall implementation is solid and aligns well with the PR objectives.

Copy link
Contributor

github-actions bot commented May 21, 2025

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 61.75 KB (0%) 1.3 s (0%) 2.2 s (+2.31% 🔺) 3.4 s
thirdweb (cjs) 344.4 KB (0%) 6.9 s (0%) 15.2 s (+5.21% 🔺) 22.1 s
thirdweb (minimal + tree-shaking) 5.69 KB (0%) 114 ms (0%) 148 ms (+35.13% 🔺) 262 ms
thirdweb/chains (tree-shaking) 531 B (0%) 11 ms (0%) 49 ms (-1.35% 🔽) 59 ms
thirdweb/react (minimal + tree-shaking) 19.54 KB (0%) 391 ms (0%) 321 ms (-3.5% 🔽) 712 ms

<p className="text-muted-foreground text-sm">
{props.noPermissionText}
</p>
) : props.errorText ? (
Copy link
Member

Choose a reason for hiding this comment

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

Won't need these if you make the error and success messages toasts

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated to toasts .

Copy link
Member

Choose a reason for hiding this comment

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

Is it pushed? Code looks the same

@vercel vercel bot temporarily deployed to Preview – docs-v2 May 23, 2025 00:55 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui May 23, 2025 00:55 Inactive
@vercel vercel bot temporarily deployed to Preview – login May 23, 2025 00:55 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground May 23, 2025 00:55 Inactive
>
{props.saveButton.isPending && <Spinner className="size-3" />}
{props.saveButton.label ||
(props.saveButton.isPending ? "Submit" : "Submit Token")}
Copy link
Member

Choose a reason for hiding this comment

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

Submit vs Submit Token? Is there any difference?

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/connect/universal-bridge/settings/page.tsx (1)

52-64: Simplify the layout structure and verify RouteDiscovery props.

The integration looks good overall, but consider these improvements:

  1. Unnecessary wrapper: The inner flex div around RouteDiscovery (lines 60-62) seems redundant. You can apply the padding directly to the component.

  2. Missing props verification: RouteDiscovery doesn't receive any props like project, teamId, or teamSlug. Please verify this is intentional if the component is fully self-contained.

Consider this simplified structure:

 return (
   <div className="flex flex-col p-5">
     <PayConfig
       project={project}
       teamId={team.id}
       teamSlug={team_slug}
       fees={fees}
     />
-
-    <div className="flex pt-5">
-      <RouteDiscovery />
-    </div>
+    <RouteDiscovery className="pt-5" />
   </div>
 );

This assumes RouteDiscovery accepts a className prop. If not, you could wrap it in a simpler div without the unnecessary flex class.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b869ead and a983665.

📒 Files selected for processing (2)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/connect/universal-bridge/settings/page.tsx (2 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/settings/ProjectGeneralSettingsPage.tsx (0 hunks)
💤 Files with no reviewable changes (1)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/settings/ProjectGeneralSettingsPage.tsx
⏰ Context from checks skipped due to timeout of 90000ms (8)
  • GitHub Check: Size
  • GitHub Check: E2E Tests (pnpm, esbuild)
  • GitHub Check: Build Packages
  • GitHub Check: Unit Tests
  • GitHub Check: E2E Tests (pnpm, webpack)
  • GitHub Check: Lint Packages
  • GitHub Check: E2E Tests (pnpm, vite)
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (1)
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/connect/universal-bridge/settings/page.tsx (1)

5-5: LGTM: Clean import addition.

The RouteDiscovery import follows the established pattern and is properly added alongside the existing PayConfig import.

@gregfromstl gregfromstl added the merge-queue Adds the pull request to Graphite's merge queue. label May 27, 2025
Copy link
Member

gregfromstl commented May 27, 2025

Merge activity

  • May 27, 10:05 PM UTC: The merge label 'merge-queue' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • May 27, 10:06 PM UTC: The merge label 'merge-queue' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • May 27, 10:13 PM UTC: gregfromstl added this pull request to the Graphite merge queue.
  • May 27, 10:22 PM UTC: Merged by the Graphite merge queue.

TOOL-4443
TOOL-4559

How to Test
1. Log into dashboard
2. Select a project
3. Click on Universal Bridge on left hand side
4. Click on Settings
5. Scroll down to add token section

-  Failure input
Chain: Ethereum
Token Address: 0x7613c48e0cd50e42dd9bf0f6c235063145f6f8db

-Success input
Chain: Ethereum
Token Address:0x7613c48e0cd50e42dd9bf0f6c235063145f6f8dc

<!-- start pr-codex -->

---

## PR-Codex overview
This PR introduces a new validation schema for route discovery, enhances the UI for token submission, and integrates a new `RouteDiscovery` component to facilitate token discovery in the dashboard.

### Detailed summary
- Added `routeDiscoveryValidationSchema` in `validations.ts` for validating token discovery inputs.
- Created `RouteDiscovery` component to handle token submission.
- Updated `page.tsx` to include `RouteDiscovery` below `PayConfig`.
- Implemented `addUniversalBridgeTokenRoute` function in `tokens.ts` for API token submission.
- Added `RouteDiscoveryCard` component for better UI presentation of token discovery.

> ✨ 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

- **New Features**
  - Introduced a Route Discovery workflow, allowing users to submit tokens for route discovery on selected blockchain networks.
  - Added a new card component for displaying route discovery information and actions.
  - Integrated Route Discovery into the Universal Bridge settings page for easier access.

- **Enhancements**
  - Added validation for token address and chain selection to ensure proper input.
  - Provided user feedback through success and error messages, including toast notifications.

- **Style**
  - Minor cleanup of extra blank lines in the Project General Settings page for improved readability.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
@graphite-app graphite-app bot force-pushed the joe-UB-Route-Discovery branch from 80c28a4 to e14a134 Compare May 27, 2025 22:14
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground May 27, 2025 22:14 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui May 27, 2025 22:14 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 May 27, 2025 22:14 Inactive
@vercel vercel bot temporarily deployed to Preview – login May 27, 2025 22:14 Inactive
@graphite-app graphite-app bot merged commit e14a134 into main May 27, 2025
24 checks passed
@graphite-app graphite-app bot deleted the joe-UB-Route-Discovery branch May 27, 2025 22:22
@graphite-app graphite-app bot removed the merge-queue Adds the pull request to Graphite's merge queue. label May 27, 2025
@vercel vercel bot temporarily deployed to Production – docs-v2 May 27, 2025 22:22 Inactive
@vercel vercel bot temporarily deployed to Production – login May 27, 2025 22:22 Inactive
@vercel vercel bot temporarily deployed to Production – wallet-ui May 27, 2025 22:22 Inactive
@vercel vercel bot temporarily deployed to Production – thirdweb_playground May 27, 2025 22:22 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Dashboard Involves changes to the Dashboard.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants