Skip to content

Conversation

@MananTank
Copy link
Member

@MananTank MananTank commented Jan 7, 2026


PR-Codex overview

This PR refactors the rendering logic in the TokenInfoScreen component of the select-token-ui.tsx file. It improves the layout and handling of loading and error states while ensuring consistent styling and structure.

Detailed summary

  • Updated the minimum height of the main Container from 350px to 450px.
  • Consolidated loading and error handling logic for tokenQuery.
  • Maintained the display of token details with improved structure.
  • Ensured consistent rendering of token information while preserving existing functionality.

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

Summary by CodeRabbit

  • Refactor
    • Consolidated rendering for the token information view to centralize pending, not-found, and content states into a single conditional flow.
    • Converted token-detail area to data-driven rendering so details (name/icon, symbol, price, market cap, volume, contract link/copy) only appear when token data exists.
    • Increased minimum container height for token info in the swap widget.

✏️ Tip: You can customize this high-level summary in your review settings.

@vercel
Copy link

vercel bot commented Jan 7, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
docs-v2 Ready Ready Preview, Comment Jan 7, 2026 7:36pm
nebula Ready Ready Preview, Comment Jan 7, 2026 7:36pm
thirdweb_playground Ready Ready Preview, Comment Jan 7, 2026 7:36pm
thirdweb-www Ready Ready Preview, Comment Jan 7, 2026 7:36pm
wallet-ui Ready Ready Preview, Comment Jan 7, 2026 7:36pm

@changeset-bot
Copy link

changeset-bot bot commented Jan 7, 2026

⚠️ No Changeset found

Latest commit: 2778745

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

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 7, 2026

Walkthrough

Consolidates TokenInfoScreen rendering by replacing early returns with a single conditional branch that handles pending, not-found, and token-present states. Increases the component's min-height from 350px to 450px and moves token detail sections to render only when token data exists.

Changes

Cohort / File(s) Summary
Conditional Rendering & Layout Refactoring
packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-token-ui.tsx
Replaces separate early-return branches with a unified conditional structure for pending, not-found, and content states. Increases container min-height from 350px to 450px. Renders token details (name/icon, symbol, price, market cap, volume, contract address with link/copy) only when token data is present.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

🚥 Pre-merge checks | ✅ 1 | ❌ 2
❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Description check ⚠️ Warning The description is missing required sections from the template: no Linear issue tag, reviewer notes are incomplete, and testing instructions are absent. Add the Linear issue tag (TEAM-0000 format), expand 'Notes for the reviewer' with specific items to check, and provide clear testing instructions (unit tests, playground demo, etc.).
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title 'SDK: token details screen UI tweaks' is directly related to the main changes, which are UI refactoring and layout adjustments in the TokenInfoScreen component.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between e023f70 and 2778745.

📒 Files selected for processing (1)
  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-token-ui.tsx
🧰 Additional context used
📓 Path-based instructions (4)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.{ts,tsx}: Write idiomatic TypeScript with explicit function declarations and return types
Limit each TypeScript file to one stateless, single-responsibility function for clarity
Re-use shared types from @/types or local types.ts barrels
Prefer type aliases over interface except for nominal shapes in TypeScript
Avoid any and unknown in TypeScript unless unavoidable; narrow generics when possible
Choose composition over inheritance; leverage utility types (Partial, Pick, etc.) in TypeScript

**/*.{ts,tsx}: Write idiomatic TypeScript with explicit function declarations and return types
Limit each file to one stateless, single-responsibility function for clarity and testability
Re-use shared types from @/types or local types.ts barrel exports
Prefer type aliases over interface except for nominal shapes
Avoid any and unknown unless unavoidable; narrow generics whenever possible
Choose composition over inheritance; leverage utility types (Partial, Pick, etc.)
Comment only ambiguous logic in TypeScript files; avoid restating TypeScript types and signatures in prose

Files:

  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-token-ui.tsx
packages/thirdweb/src/**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

packages/thirdweb/src/**/*.{ts,tsx}: Comment only ambiguous logic in SDK code; avoid restating TypeScript in prose
Load heavy dependencies inside async paths to keep initial bundle lean (e.g. const { jsPDF } = await import("jspdf");)

Lazy-load heavy dependencies inside async paths to keep the initial bundle lean (e.g., const { jsPDF } = await import('jspdf');)

Files:

  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-token-ui.tsx
**/*.{js,jsx,ts,tsx,json}

📄 CodeRabbit inference engine (AGENTS.md)

Biome governs formatting and linting; its rules live in biome.json. Run pnpm fix & pnpm lint before committing, ensure there are no linting errors

Files:

  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-token-ui.tsx
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (AGENTS.md)

Lazy-import optional features; avoid top-level side-effects

Files:

  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-token-ui.tsx
🧬 Code graph analysis (1)
packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-token-ui.tsx (8)
packages/thirdweb/src/react/web/ui/components/basic.tsx (1)
  • Container (80-193)
packages/thirdweb/src/react/web/ui/components/Spinner.tsx (1)
  • Spinner (11-42)
apps/playground-web/src/app/x402/components/constants.ts (1)
  • token (4-9)
packages/thirdweb/src/react/web/ui/components/text.tsx (1)
  • Text (18-34)
packages/thirdweb/src/react/web/ui/components/Img.tsx (1)
  • Img (12-152)
packages/thirdweb/src/react/core/design-system/index.ts (2)
  • iconSize (166-176)
  • radius (156-164)
packages/thirdweb/src/react/web/ui/ConnectWallet/screens/formatTokenBalance.ts (1)
  • formatCurrencyAmount (37-42)
packages/thirdweb/src/exports/utils.ts (1)
  • shortenAddress (149-149)
⏰ 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). (5)
  • GitHub Check: E2E Tests (pnpm, webpack)
  • GitHub Check: E2E Tests (pnpm, vite)
  • GitHub Check: E2E Tests (pnpm, esbuild)
  • GitHub Check: Lint Packages
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (2)
packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-token-ui.tsx (2)

518-518: LGTM on the layout adjustment.

The increased minHeight from 350px to 450px provides more vertical space for the token details content, which aligns well with the consolidated rendering structure.


537-656: Well-structured token details rendering.

The consolidated conditional approach is cleaner than separate early returns. The detail sections (name/icon, symbol, price, market cap, volume, address) are properly guarded by their respective data availability checks:

  • "prices" in token guards price display
  • !!token.marketCapUsd and !!token.volume24hUsd guard optional financial metrics
  • Native token vs contract address distinction is handled correctly

Warning

Review ran into problems

🔥 Problems

Errors were encountered while retrieving linked issues.

Errors (1)
  • TEAM-0000: Entity not found: Issue - Could not find referenced Issue.

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot added packages SDK Involves changes to the thirdweb SDK labels Jan 7, 2026
@MananTank MananTank marked this pull request as ready for review January 7, 2026 18:12
@MananTank MananTank requested review from a team as code owners January 7, 2026 18:12
Copy link
Member Author


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.

This stack of pull requests is managed by Graphite. Learn more about stacking.

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)
packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-token-ui.tsx (1)

527-656: Consider early returns for improved readability.

The refactoring from early returns to nested conditionals increases nesting and makes the "happy path" less clear. Early returns typically improve code readability by reducing cognitive load.

♻️ Optional refactor using early returns
-      {tokenQuery.isPending ? (
-        <Container flex="column" center="both" expand>
-          <Spinner size="lg" color="secondaryText" />
-        </Container>
-      ) : !token ? (
-        <Container flex="column" center="both" expand>
-          <Text size="sm" color="secondaryText">
-            Token not found
-          </Text>
-        </Container>
-      ) : (
-        <Container flex="column" gap="md" px="md" py="lg">
+      {tokenQuery.isPending && (
+        <Container flex="column" center="both" expand>
+          <Spinner size="lg" color="secondaryText" />
+        </Container>
+      )}
+
+      {!tokenQuery.isPending && !token && (
+        <Container flex="column" center="both" expand>
+          <Text size="sm" color="secondaryText">
+            Token not found
+          </Text>
+        </Container>
+      )}
+
+      {!tokenQuery.isPending && token && (
+        <Container flex="column" gap="md" px="md" py="lg">
           {/* name + icon */}
           <Container
             flex="row"
             style={{
               justifyContent: "space-between",
               alignItems: "center",
             }}
           >
             {/* ... rest of token details ... */}
           </Container>
         </Container>
-      )}
+      )}

This approach uses logical AND (&&) for each condition, reducing nesting depth and making each state more explicit.

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 26a9153 and c284b3c.

📒 Files selected for processing (1)
  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-token-ui.tsx
🧰 Additional context used
📓 Path-based instructions (4)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.{ts,tsx}: Write idiomatic TypeScript with explicit function declarations and return types
Limit each TypeScript file to one stateless, single-responsibility function for clarity
Re-use shared types from @/types or local types.ts barrels
Prefer type aliases over interface except for nominal shapes in TypeScript
Avoid any and unknown in TypeScript unless unavoidable; narrow generics when possible
Choose composition over inheritance; leverage utility types (Partial, Pick, etc.) in TypeScript

**/*.{ts,tsx}: Write idiomatic TypeScript with explicit function declarations and return types
Limit each file to one stateless, single-responsibility function for clarity and testability
Re-use shared types from @/types or local types.ts barrel exports
Prefer type aliases over interface except for nominal shapes
Avoid any and unknown unless unavoidable; narrow generics whenever possible
Choose composition over inheritance; leverage utility types (Partial, Pick, etc.)
Comment only ambiguous logic in TypeScript files; avoid restating TypeScript types and signatures in prose

Files:

  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-token-ui.tsx
packages/thirdweb/src/**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

packages/thirdweb/src/**/*.{ts,tsx}: Comment only ambiguous logic in SDK code; avoid restating TypeScript in prose
Load heavy dependencies inside async paths to keep initial bundle lean (e.g. const { jsPDF } = await import("jspdf");)

Lazy-load heavy dependencies inside async paths to keep the initial bundle lean (e.g., const { jsPDF } = await import('jspdf');)

Files:

  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-token-ui.tsx
**/*.{js,jsx,ts,tsx,json}

📄 CodeRabbit inference engine (AGENTS.md)

Biome governs formatting and linting; its rules live in biome.json. Run pnpm fix & pnpm lint before committing, ensure there are no linting errors

Files:

  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-token-ui.tsx
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (AGENTS.md)

Lazy-import optional features; avoid top-level side-effects

Files:

  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-token-ui.tsx
🧬 Code graph analysis (1)
packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-token-ui.tsx (7)
packages/thirdweb/src/react/web/ui/components/Spinner.tsx (1)
  • Spinner (11-42)
apps/playground-web/src/app/x402/components/constants.ts (1)
  • token (4-9)
packages/thirdweb/src/react/web/ui/components/text.tsx (2)
  • Text (18-34)
  • Link (46-64)
packages/thirdweb/src/react/web/ui/components/Img.tsx (1)
  • Img (12-152)
packages/thirdweb/src/react/core/design-system/index.ts (2)
  • iconSize (166-176)
  • radius (156-164)
packages/thirdweb/src/react/web/ui/ConnectWallet/screens/formatTokenBalance.ts (1)
  • formatCurrencyAmount (37-42)
packages/thirdweb/src/exports/utils.ts (1)
  • shortenAddress (149-149)
⏰ 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)
  • GitHub Check: Unit Tests
  • GitHub Check: Size
  • GitHub Check: E2E Tests (pnpm, webpack)
  • GitHub Check: Lint Packages
  • GitHub Check: E2E Tests (pnpm, vite)
  • GitHub Check: Build Packages
  • GitHub Check: E2E Tests (pnpm, esbuild)
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (1)
packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-token-ui.tsx (1)

518-518: Apply responsive minHeight logic to the TokenInfoScreen container.

The minHeight was increased from 350px to 450px without responsive handling. The file already uses props.isMobile for responsive styling elsewhere (e.g., line 791), so this should follow the same pattern to prevent layout issues on smaller viewports.

@codecov
Copy link

codecov bot commented Jan 7, 2026

Codecov Report

❌ Patch coverage is 0% with 96 lines in your changes missing coverage. Please review.
✅ Project coverage is 53.02%. Comparing base (4fc02b3) to head (2778745).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...eact/web/ui/Bridge/swap-widget/select-token-ui.tsx 0.00% 96 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8612      +/-   ##
==========================================
- Coverage   53.05%   53.02%   -0.04%     
==========================================
  Files         924      924              
  Lines       61738    61726      -12     
  Branches     4039     4035       -4     
==========================================
- Hits        32757    32730      -27     
- Misses      28884    28898      +14     
- Partials       97       98       +1     
Flag Coverage Δ
packages 53.02% <0.00%> (-0.04%) ⬇️
Files with missing lines Coverage Δ
...eact/web/ui/Bridge/swap-widget/select-token-ui.tsx 4.46% <0.00%> (+0.07%) ⬆️

... and 5 files with indirect coverage changes

🚀 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.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 7, 2026

size-limit report 📦

Path Size
@thirdweb-dev/nexus (esm) 105.66 KB (0%)
@thirdweb-dev/nexus (cjs) 319.47 KB (0%)

@graphite-app
Copy link
Contributor

graphite-app bot commented Jan 7, 2026

Merge activity

  • Jan 7, 6:37 PM UTC: MananTank added this pull request to the Graphite merge queue.
  • Jan 7, 6:46 PM UTC: The Graphite merge queue couldn't merge this PR because it was not satisfying all requirements (Failed CI: 'Vercel – thirdweb-www', 'codecov/patch/packages').
  • Jan 7, 7:19 PM UTC: MananTank added this pull request to the Graphite merge queue.
  • Jan 7, 7:37 PM UTC: Merged by the Graphite merge queue.

graphite-app bot pushed a commit that referenced this pull request Jan 7, 2026
<!--

## 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 improving the user interface of the `TokenInfoScreen` component in the `select-token-ui.tsx` file by enhancing loading states, error handling, and layout adjustments.

### Detailed summary
- Removed redundant loading and error handling blocks.
- Consolidated conditional rendering for loading and error states.
- Increased minimum height of the main container from `350px` to `450px`.
- Maintained structure for displaying token information, including name, symbol, price, market cap, and address.

> ✨ 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**
  * Improved internal code organization for token information display component
  * Adjusted minimum container height for token information screens in the bridge swap widget

<sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub>

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
@graphite-app graphite-app bot force-pushed the 01-07-sdk_token_details_screen_ui_tweaks branch from c284b3c to e023f70 Compare January 7, 2026 18:38
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

🤖 Fix all issues with AI agents
In @packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-token-ui.tsx:
- Around line 527-536: The UI currently treats both query failures and missing
tokens the same; update the JSX conditional around tokenQuery and token to
explicitly check tokenQuery.error before the !token branch and render a distinct
error state (e.g., a Container with a Text like "Failed to load token details"
and optional error message) when tokenQuery.error is truthy, leaving the
existing spinner for tokenQuery.isPending and the "Token not found" message only
for the case where the query succeeded but token is falsy; modify the
conditional that references tokenQuery, token, and tokenQuery.error in
select-token-ui.tsx accordingly.
🧹 Nitpick comments (1)
packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-token-ui.tsx (1)

518-518: Consider if the 100px minHeight increase is necessary.

The container's minimum height increased from 350px to 450px. While this provides more space, it may create unnecessary whitespace for tokens with minimal metadata (e.g., tokens without market cap or volume data). Consider whether a smaller increase or dynamic sizing would better serve the range of token detail scenarios.

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between c284b3c and e023f70.

📒 Files selected for processing (1)
  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-token-ui.tsx
🧰 Additional context used
📓 Path-based instructions (4)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.{ts,tsx}: Write idiomatic TypeScript with explicit function declarations and return types
Limit each TypeScript file to one stateless, single-responsibility function for clarity
Re-use shared types from @/types or local types.ts barrels
Prefer type aliases over interface except for nominal shapes in TypeScript
Avoid any and unknown in TypeScript unless unavoidable; narrow generics when possible
Choose composition over inheritance; leverage utility types (Partial, Pick, etc.) in TypeScript

**/*.{ts,tsx}: Write idiomatic TypeScript with explicit function declarations and return types
Limit each file to one stateless, single-responsibility function for clarity and testability
Re-use shared types from @/types or local types.ts barrel exports
Prefer type aliases over interface except for nominal shapes
Avoid any and unknown unless unavoidable; narrow generics whenever possible
Choose composition over inheritance; leverage utility types (Partial, Pick, etc.)
Comment only ambiguous logic in TypeScript files; avoid restating TypeScript types and signatures in prose

Files:

  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-token-ui.tsx
packages/thirdweb/src/**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

packages/thirdweb/src/**/*.{ts,tsx}: Comment only ambiguous logic in SDK code; avoid restating TypeScript in prose
Load heavy dependencies inside async paths to keep initial bundle lean (e.g. const { jsPDF } = await import("jspdf");)

Lazy-load heavy dependencies inside async paths to keep the initial bundle lean (e.g., const { jsPDF } = await import('jspdf');)

Files:

  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-token-ui.tsx
**/*.{js,jsx,ts,tsx,json}

📄 CodeRabbit inference engine (AGENTS.md)

Biome governs formatting and linting; its rules live in biome.json. Run pnpm fix & pnpm lint before committing, ensure there are no linting errors

Files:

  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-token-ui.tsx
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (AGENTS.md)

Lazy-import optional features; avoid top-level side-effects

Files:

  • packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-token-ui.tsx
🧬 Code graph analysis (1)
packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-token-ui.tsx (7)
packages/thirdweb/src/react/web/ui/components/basic.tsx (1)
  • Container (80-193)
packages/thirdweb/src/react/web/ui/components/Spinner.tsx (1)
  • Spinner (11-42)
apps/playground-web/src/app/x402/components/constants.ts (1)
  • token (4-9)
packages/thirdweb/src/react/web/ui/components/text.tsx (2)
  • Text (18-34)
  • Link (46-64)
packages/thirdweb/src/react/core/design-system/index.ts (2)
  • iconSize (166-176)
  • radius (156-164)
packages/thirdweb/src/react/web/ui/components/CopyIcon.tsx (1)
  • CopyIcon (12-60)
packages/thirdweb/src/exports/utils.ts (1)
  • shortenAddress (149-149)
⏰ 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)
  • GitHub Check: E2E Tests (pnpm, esbuild)
  • GitHub Check: E2E Tests (pnpm, vite)
  • GitHub Check: Build Packages
  • GitHub Check: Size
  • GitHub Check: E2E Tests (pnpm, webpack)
  • GitHub Check: Lint Packages
  • GitHub Check: Unit Tests
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (1)
packages/thirdweb/src/react/web/ui/Bridge/swap-widget/select-token-ui.tsx (1)

527-656: LGTM! Clean consolidation of conditional rendering.

The refactor successfully consolidates the loading, not-found, and content states into a single, readable conditional structure. All token detail sections are correctly rendered only when the token exists, and the type narrowing ensures safety in the token-present branch.

<!--

## 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 improving the user interface of the `TokenInfoScreen` component in the `select-token-ui.tsx` file by enhancing loading states, adjusting layout heights, and refining token display logic.

### Detailed summary
- Removed initial loading and token not found states.
- Increased `Container` minHeight from `350px` to `450px`.
- Refactored conditional rendering for token details.
- Maintained structure for displaying token name, symbol, price, market cap, volume, and contract address.

> ✨ 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**
  * Consolidated rendering logic for the token information view to centralize pending, not-found, and content states.
  * Reorganized layout so detailed token sections render only when token data is present.
  * Adjusted minimum container height for token information screens in the bridge swap widget.

<sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub>
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

packages SDK Involves changes to the thirdweb SDK

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants