Skip to content

Fix: Bridge Playground Chain Input Form #7371

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
Jun 18, 2025
Merged

Conversation

gregfromstl
Copy link
Member

@gregfromstl gregfromstl commented Jun 18, 2025


PR-Codex overview

This PR focuses on fixing a typo in the payment confirmation widget and making adjustments to the payment handling in the application. It also updates the input type for a wallet chain ID and adds new properties related to the destination chain.

Detailed summary

  • Fixed typo in the payment confirmation widget.
  • Changed the type of the Input with id="fund-wallet-chain-id" from number to text.
  • Added destinationChain property to the payment receipt's type definition.
  • Updated CompletedStepDetailCard to display originChain name instead of chain name.

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

Summary by CodeRabbit

  • Bug Fixes

    • Corrected the display of the origin chain name in transaction details.
    • Fixed a typo in the payment confirmation widget.
  • Refactor

    • Updated the "Chain ID" input field to accept text input instead of only numbers under "Fund Wallet Mode Options".
  • New Features

    • Added display of destination chain information in payment receipts where applicable.

@gregfromstl gregfromstl requested review from a team as code owners June 18, 2025 18:37
Copy link

vercel bot commented Jun 18, 2025

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

Name Status Preview Comments Updated (UTC)
docs-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 18, 2025 7:06pm
login ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 18, 2025 7:06pm
nebula ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 18, 2025 7:06pm
thirdweb_playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 18, 2025 7:06pm
thirdweb-www ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 18, 2025 7:06pm
wallet-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 18, 2025 7:06pm

Copy link
Contributor

coderabbitai bot commented Jun 18, 2025

Walkthrough

The changes update an input field for "Chain ID" in the playground web app from a number to a text input. Separately, the PaymentReceipt component in the thirdweb package now tracks and displays destination chain metadata in transaction info and corrects the origin chain name display. Additionally, a changeset file was added documenting a patch fix for a typo in the payment confirmation widget.

Changes

File(s) Change Summary
apps/playground-web/src/app/connect/pay/embed/LeftSection.tsx Changed "Chain ID" input from type "number" to "text" in the Fund Wallet Mode Options section.
packages/thirdweb/src/react/web/ui/Bridge/payment-success/PaymentReceipt.tsx Added optional destinationChain to TransactionInfo, included it in transaction info for certain statuses, and fixed origin chain name display.
.changeset/twelve-brooms-kneel.md Added a changeset file documenting a patch update fixing a typo in the payment confirmation widget.

Suggested reviewers

  • jnsdls
  • 0xFirekeeper

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.

📜 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 168de72 and ee29c07.

📒 Files selected for processing (3)
  • .changeset/twelve-brooms-kneel.md (1 hunks)
  • apps/playground-web/src/app/connect/pay/embed/LeftSection.tsx (1 hunks)
  • packages/thirdweb/src/react/web/ui/Bridge/payment-success/PaymentReceipt.tsx (3 hunks)
✅ Files skipped from review due to trivial changes (1)
  • .changeset/twelve-brooms-kneel.md
🚧 Files skipped from review as they are similar to previous changes (2)
  • apps/playground-web/src/app/connect/pay/embed/LeftSection.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/payment-success/PaymentReceipt.tsx
⏰ Context from checks skipped due to timeout of 90000ms (7)
  • GitHub Check: E2E Tests (pnpm, esbuild)
  • GitHub Check: E2E Tests (pnpm, webpack)
  • GitHub Check: E2E Tests (pnpm, vite)
  • GitHub Check: Size
  • GitHub Check: Unit Tests
  • GitHub Check: Lint 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.

Copy link
Contributor

graphite-app bot commented Jun 18, 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.

@github-actions github-actions bot added Playground Changes involving the Playground codebase. packages SDK Involves changes to the thirdweb SDK labels Jun 18, 2025
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/playground-web/src/app/connect/pay/embed/LeftSection.tsx (1)

108-108: Good change, but consider consistency across the file.

Changing from type="number" to type="text" is beneficial as chain IDs can be very large numbers that may not be handled well by number inputs. The parsing logic correctly handles the conversion.

However, there's an inconsistency: the Chain ID input for the "checkout" mode (line 204) still uses type="number". Consider updating it for consistency:

                    <Input
                      id="direct-payment-chain-id"
-                     type="number"
+                     type="text"
                      placeholder="1 (Ethereum)"
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between be49798 and cb7e263.

📒 Files selected for processing (2)
  • apps/playground-web/src/app/connect/pay/embed/LeftSection.tsx (1 hunks)
  • packages/thirdweb/src/react/web/ui/Bridge/payment-success/PaymentReceipt.tsx (4 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
packages/thirdweb/src/react/web/ui/Bridge/payment-success/PaymentReceipt.tsx (1)
packages/thirdweb/src/react/web/ui/components/ChainName.tsx (1)
  • shorterChainName (32-40)
⏰ 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: Size
  • GitHub Check: Lint Packages
  • GitHub Check: Build Packages
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (4)
packages/thirdweb/src/react/web/ui/Bridge/payment-success/PaymentReceipt.tsx (4)

36-36: LGTM! Consistent interface extension.

The addition of destinationChain property maintains consistency with the existing originChain property and properly supports bridge transactions that span multiple chains.


106-106: LGTM! Property is properly populated.

The destinationChain property is correctly populated from the already-fetched metadata, ensuring the interface contract is fulfilled.


233-233: LGTM! Fixes incorrect chain reference.

This change corrects a logical error where the "Origin Chain" label was displaying the destination chain name instead of the origin chain name. The fix properly uses txInfo.originChain.name which aligns with the label.


289-295: LGTM! Critical syntax fix.

The missing closing brace has been properly added, fixing the malformed onClick handler that would have caused a runtime syntax error.

Copy link
Contributor

github-actions bot commented Jun 18, 2025

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 62.49 KB (0%) 1.3 s (0%) 277 ms (+241.39% 🔺) 1.6 s
thirdweb (cjs) 350.88 KB (0%) 7.1 s (0%) 713 ms (+15.87% 🔺) 7.8 s
thirdweb (minimal + tree-shaking) 5.7 KB (0%) 114 ms (0%) 113 ms (+2469% 🔺) 227 ms
thirdweb/chains (tree-shaking) 531 B (0%) 11 ms (0%) 76 ms (+4046.89% 🔺) 86 ms
thirdweb/react (minimal + tree-shaking) 19.59 KB (0%) 392 ms (0%) 160 ms (+1201.31% 🔺) 552 ms

@gregfromstl gregfromstl force-pushed the greg/fix-ub-playground branch from cb7e263 to 168de72 Compare June 18, 2025 18:46
Copy link

changeset-bot bot commented Jun 18, 2025

🦋 Changeset detected

Latest commit: ee29c07

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
thirdweb Patch
@thirdweb-dev/wagmi-adapter Patch
nebula Patch

Not sure what this means? Click here to learn what changesets are.

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

Copy link

codecov bot commented Jun 18, 2025

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Project coverage is 52.35%. Comparing base (be49798) to head (ee29c07).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...t/web/ui/Bridge/payment-success/PaymentReceipt.tsx 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7371      +/-   ##
==========================================
- Coverage   52.35%   52.35%   -0.01%     
==========================================
  Files         939      939              
  Lines       63160    63161       +1     
  Branches     4214     4214              
==========================================
  Hits        33070    33070              
- Misses      29983    29984       +1     
  Partials      107      107              
Flag Coverage Δ
packages 52.35% <0.00%> (-0.01%) ⬇️
Files with missing lines Coverage Δ
...t/web/ui/Bridge/payment-success/PaymentReceipt.tsx 5.41% <0.00%> (-0.02%) ⬇️
🚀 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
packages Playground Changes involving the Playground codebase. SDK Involves changes to the thirdweb SDK
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant