Skip to content

Conversation

@joaquim-verges
Copy link
Member

@joaquim-verges joaquim-verges commented May 7, 2025


PR-Codex overview

This PR focuses on enhancing the PayEmbed functionality by ensuring it always connects to the destination chain when available. It also refines the handling of chain and chains properties in the BuyScreen component.

Detailed summary

  • Updated BuyScreen.tsx to always connect to the destination chain if available.
  • Changed chain assignment to use toChain or fallback to props.connectOptions?.chain.
  • Modified chains to include toChain and existing chains from props.connectOptions?.chains.

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

@vercel
Copy link

vercel bot commented May 7, 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 May 7, 2025 2:04am
login ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 7, 2025 2:04am
thirdweb_playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 7, 2025 2:04am
thirdweb-www ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 7, 2025 2:04am
wallet-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 7, 2025 2:04am

@changeset-bot
Copy link

changeset-bot bot commented May 7, 2025

🦋 Changeset detected

Latest commit: ebf2840

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

This PR includes changesets to release 2 packages
Name Type
thirdweb Patch
@thirdweb-dev/wagmi-adapter 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

@joaquim-verges joaquim-verges marked this pull request as ready for review May 7, 2025 01:56
@joaquim-verges joaquim-verges requested a review from a team as a code owner May 7, 2025 01:56
@github-actions github-actions bot added packages SDK Involves changes to the thirdweb SDK labels May 7, 2025
@joaquim-verges joaquim-verges requested a review from a team as a code owner May 7, 2025 01:56
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.

Comment on lines +274 to +275
chain={toChain || props.connectOptions?.chain}
chains={[toChain, ...(props.connectOptions?.chains || [])]}
Copy link
Contributor

Choose a reason for hiding this comment

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

The current change always prioritizes the destination chain (toChain) which is causing test failures. We should only use toChain when it's explicitly needed for the payment flow, and preserve the original chain configuration in test environments. Consider adding a condition to check if we're in a test environment or if the original chain should be preserved for certain operations.

Spotted by Diamond (based on CI logs)

Is this helpful? React 👍 or 👎 to let us know.

@github-actions
Copy link
Contributor

github-actions bot commented May 7, 2025

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 51.01 KB (0%) 1.1 s (0%) 248 ms (+142.75% 🔺) 1.3 s
thirdweb (cjs) 143.13 KB (0%) 2.9 s (0%) 420 ms (+70.13% 🔺) 3.3 s
thirdweb (minimal + tree-shaking) 5.67 KB (0%) 114 ms (0%) 113 ms (+925% 🔺) 227 ms
thirdweb/chains (tree-shaking) 514 B (0%) 11 ms (0%) 39 ms (+1956.99% 🔺) 49 ms
thirdweb/react (minimal + tree-shaking) 19.47 KB (0%) 390 ms (0%) 114 ms (+524.59% 🔺) 504 ms

@joaquim-verges joaquim-verges merged commit 5a069fe into main May 7, 2025
22 of 23 checks passed
@joaquim-verges joaquim-verges deleted the _PayEmbed_Always_connect_to_destination_chain_if_available branch May 7, 2025 02:05
@joaquim-verges joaquim-verges mentioned this pull request May 7, 2025
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