Skip to content

Conversation

joaquim-verges
Copy link
Member

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


PR-Codex overview

This PR focuses on removing several components related to the Buy functionality in the thirdweb project and replacing them with a new BuyWidget for improved wallet interactions.

Detailed summary

  • Deleted multiple files related to the Buy functionality and UI components.
  • Introduced BuyWidget in the wallet details modal.
  • Updated DetailsModal to use BuyWidget instead of LazyBuyScreen.
  • Refactored UI components for consistency and improved styling.

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

Summary by CodeRabbit

  • New Features

    • Updated the wallet details modal to use an improved BuyWidget for purchasing funds, enhancing the user experience.
  • Bug Fixes

    • The "Buy Funds" button in the wallet details modal is now hidden when using testnet networks.
  • Style

    • Adjusted button and component styles throughout the app by removing a CSS reset property, which may result in minor visual changes due to inherited or default browser styles.
  • Refactor

    • Simplified payment and wallet connection flows by removing legacy components and screens related to the old buy and swap experience.
  • Chores

    • Removed unused internal utilities and components to streamline the codebase and improve maintainability.

Copy link

vercel bot commented Jul 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 Jul 8, 2025 0:02am
nebula ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 8, 2025 0:02am
thirdweb_playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 8, 2025 0:02am
thirdweb-www ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 8, 2025 0:02am
wallet-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 8, 2025 0:02am

Copy link

changeset-bot bot commented Jul 7, 2025

🦋 Changeset detected

Latest commit: 7bcb1be

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/nebula 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

Copy link
Contributor

coderabbitai bot commented Jul 7, 2025

Walkthrough

This update removes a large number of files and components related to the "Buy" screen and associated payment, swap, fiat, and drawer UI flows in the wallet connection interface. The wallet details modal now directly uses a new BuyWidget component in place of the previous multi-step buy flow. Many hooks, React components, and utility functions for token selection, fiat onramps, swap flows, and UI elements are deleted. Several minor style adjustments are made, mainly removing the all: "unset" CSS property from various styled components. Some previously exported constants and types are now module-private or removed entirely.

Changes

File(s) / Path(s) Change Summary
.../ConnectWallet/screens/Buy/* (multiple files) Deleted all components, hooks, and utilities for the Buy screen, swap/fiat flows, token selection, stepper, and UI states.
.../ConnectWallet/screens/Buy/fiat/* Deleted fiat onramp, provider selection, currency selection, and step UI components.
.../ConnectWallet/screens/Buy/swap/* Deleted swap flow, confirmation, status, summary, fees, error display, and wallet balance logic.
.../ConnectWallet/screens/Buy/pay-transactions/* Deleted transaction details table, status meta, and related test files.
.../ConnectWallet/screens/Buy/main/* Deleted types and hooks for managing enabled payment methods and UI selection states.
.../ConnectWallet/screens/Buy/utils.ts Removed getProviderLabel function.
.../ConnectWallet/screens/Buy/openOnRamppopup.tsx Deleted popup opening utility.
.../ConnectWallet/screens/Buy/usePayerSetup.tsx Deleted payer setup hook.
.../ConnectWallet/screens/Buy/swap/fetchBalancesForWallet.tsx Deleted hook and logic for fetching wallet token balances.
.../ConnectWallet/screens/Buy/swap/pendingSwapTx.ts Deleted pending transactions store and add function.
.../ConnectWallet/screens/Buy/swap/useSwapSupportedChains.ts Deleted hooks and logic for fetching supported chains and tokens for swaps/buys.
.../ConnectWallet/Details.tsx Replaced LazyBuyScreen with BuyWidget, added testnet check for Buy Funds button, updated imports and props.
.../ConnectWallet/MenuButton.tsx, .../ConnectWallet/WalletSelector.tsx, .../ConnectWallet/NetworkSelector.tsx, .../ReceiveFunds.tsx, .../TransactionButton/DepositScreen.tsx, .../components/buttons.tsx, .../components/text.tsx, .../wallets/shared/GetStartedScreen.tsx, .../wallets/shared/OTPLoginUI.tsx Removed all: "unset" from various styled components.
.../ConnectWallet/screens/Buy/fiat/currencies.tsx Made getFiatIcon function module-private.
.../ConnectWallet/screens/Buy/main/types.ts Removed SelectedScreen type and related imports.
.../ConnectWallet/screens/Buy/pay-transactions/statusMeta.ts Deleted status meta types and function.
.../ConnectWallet/screens/Buy/pay-transactions/statusMeta.test.ts Deleted status meta test file.
.../ConnectWallet/screens/Buy/swap/SwapSummary.tsx, .../swap/TokenSelectorScreen.tsx, .../swap/BuyTokenInput.tsx, .../swap/PayWithCrypto.tsx, .../swap/SwapStatusScreen.tsx, .../swap/SwapFlow.tsx, .../swap/SwapScreenContent.tsx, .../swap/TransferFlow.tsx, .../swap/TransferConfirmationScreen.tsx, .../swap/ErrorText.tsx, .../swap/Fees.tsx Deleted all swap-related UI and logic files.
.../ConnectWallet/screens/Buy/DirectPaymentModeScreen.tsx, .../TransactionModeScreen.tsx Deleted direct payment and transaction mode screen components.
.../ConnectWallet/screens/Buy/EstimatedTimeAndFees.tsx Deleted estimated time and fees component.
.../ConnectWallet/screens/Buy/PayProviderSelection.tsx, .../PayWIthCreditCard.tsx, .../fiat/Providers.tsx, .../fiat/FiatScreenContent.tsx, .../fiat/FiatSteps.tsx, .../fiat/OnRampScreen.tsx, .../fiat/CurrencySelection.tsx Deleted fiat provider and currency selection, onramp, and related UI components.
.../components/Drawer.tsx Deleted Drawer component, overlay, and drawer hook.
.../components/StepBar.tsx Deleted StepBar component.
.../components/SwitchNetwork.tsx Deleted SwitchNetworkButton component.
.../components/token/TokenRow.tsx Deleted TokenRow and styled TokenButton components.
.../web/utils/errors.ts Deleted error formatting utility and types.
.../pay/buyWithCrypto/getStatus.ts Removed ValidBuyWithCryptoStatus type alias.
.../pay/buyWithFiat/isSwapRequiredPostOnramp.ts Removed getOnRampSteps function and OnRampStep type.
.../pay/utils/commonTypes.ts Made FiatProviders constant module-private.
.../insight/common.ts Removed isInsightEnabled function.
.../react/core/hooks/usePaymentMethods.ts Removed "popularity" sort param, added check to skip adding destination token as origin token.
.../react/core/utils/storage.ts Removed PREFERRED_FIAT_PROVIDER_STORAGE_KEY constant.
.../web/ui/Bridge/BridgeOrchestrator.tsx Modified onCancel handler to reset state before calling external handler.
.../web/ui/PayEmbed.tsx Removed all embedded buy/connect wallet UI and logic; now only renders core payment widgets.
.../web/ui/components/Modal.tsx Made CrossContainer styled component module-private.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant WalletDetailsModal
    participant BuyWidget

    User->>WalletDetailsModal: Open wallet details
    WalletDetailsModal->>WalletDetailsModal: Check if Buy Funds button should show (not testnet, data loaded)
    User->>WalletDetailsModal: Click "Buy Funds" button
    WalletDetailsModal->>BuyWidget: Render BuyWidget with props (amount, chain, etc.)
    BuyWidget-->>WalletDetailsModal: On cancel or success, reset to main screen
Loading
sequenceDiagram
    participant PayEmbed
    participant BuyWidget
    participant CheckoutWidget
    participant TransactionWidget

    PayEmbed->>PayEmbed: Check payOptions.mode
    alt mode == "buy"
        PayEmbed->>BuyWidget: Render BuyWidget
    else mode == "checkout"
        PayEmbed->>CheckoutWidget: Render CheckoutWidget
    else mode == "transaction"
        PayEmbed->>TransactionWidget: Render TransactionWidget
    else
        PayEmbed->>PayEmbed: Render empty container
    end
Loading

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.
✨ 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 packages SDK Involves changes to the thirdweb SDK labels Jul 7, 2025
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

github-actions bot commented Jul 7, 2025

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 63.23 KB (0%) 1.3 s (0%) 553 ms (+67.37% 🔺) 1.9 s
thirdweb (cjs) 352.58 KB (-0.07% 🔽) 7.1 s (-0.07% 🔽) 2.8 s (-2.21% 🔽) 9.8 s
thirdweb (minimal + tree-shaking) 5.69 KB (0%) 114 ms (0%) 190 ms (+788.88% 🔺) 304 ms
thirdweb/chains (tree-shaking) 526 B (0%) 11 ms (0%) 9 ms (-15.23% 🔽) 19 ms
thirdweb/react (minimal + tree-shaking) 19.57 KB (0%) 392 ms (0%) 78 ms (+70.34% 🔺) 469 ms

@joaquim-verges joaquim-verges changed the title Use new BuyWidget in wallet details modal [SDK] Use new BuyWidget in wallet details modal Jul 7, 2025
@joaquim-verges joaquim-verges marked this pull request as ready for review July 7, 2025 23:52
@joaquim-verges joaquim-verges requested review from a team as code owners July 7, 2025 23:52
title={locale.buy}
tokenAddress={
props.displayBalanceToken?.[Number(requestedChainId)] as
| `0x${string}`
Copy link
Member

Choose a reason for hiding this comment

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

nit: Address type

Copy link

codecov bot commented Jul 8, 2025

Codecov Report

Attention: Patch coverage is 20.31250% with 51 lines in your changes missing coverage. Please review.

Project coverage is 56.53%. Comparing base (67c3d86) to head (7bcb1be).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...hirdweb/src/react/web/ui/ConnectWallet/Details.tsx 11.36% 39 Missing ⚠️
...thirdweb/src/react/core/hooks/usePaymentMethods.ts 0.00% 7 Missing ⚠️
...web/src/react/web/ui/Bridge/BridgeOrchestrator.tsx 0.00% 4 Missing ⚠️
...b/ui/ConnectWallet/screens/Buy/fiat/currencies.tsx 0.00% 1 Missing ⚠️

❌ Your patch status has failed because the patch coverage (20.31%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7551      +/-   ##
==========================================
+ Coverage   51.87%   56.53%   +4.65%     
==========================================
  Files         954      905      -49     
  Lines       64353    57952    -6401     
  Branches     4232     4225       -7     
==========================================
- Hits        33382    32761     -621     
+ Misses      30863    25083    -5780     
  Partials      108      108              
Flag Coverage Δ
packages 56.53% <20.31%> (+4.65%) ⬆️
Files with missing lines Coverage Δ
packages/thirdweb/src/insight/common.ts 100.00% <ø> (+23.52%) ⬆️
...ckages/thirdweb/src/pay/buyWithCrypto/getStatus.ts 0.97% <ø> (ø)
packages/thirdweb/src/react/core/utils/storage.ts 100.00% <ø> (ø)
...dweb/src/react/web/ui/ConnectWallet/MenuButton.tsx 100.00% <ø> (ø)
...src/react/web/ui/ConnectWallet/NetworkSelector.tsx 36.22% <100.00%> (-0.43%) ⬇️
.../src/react/web/ui/ConnectWallet/WalletSelector.tsx 9.52% <ø> (-0.17%) ⬇️
...rc/react/web/ui/ConnectWallet/screens/Buy/utils.ts 100.00% <ø> (+33.33%) ⬆️
...eact/web/ui/ConnectWallet/screens/ReceiveFunds.tsx 90.54% <ø> (-0.13%) ⬇️
packages/thirdweb/src/react/web/ui/PayEmbed.tsx 27.88% <100.00%> (-6.71%) ⬇️
...c/react/web/ui/TransactionButton/DepositScreen.tsx 12.91% <ø> (+0.05%) ⬆️
... and 9 more

... and 10 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.

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

🔭 Outside diff range comments (1)
packages/thirdweb/src/react/web/ui/PayEmbed.tsx (1)

301-301: Component is deprecated - ensure migration path is documented.

The @deprecated JSDoc indicates users should migrate to BuyWidget, CheckoutWidget, or TransactionWidget. This breaking change should be prominently documented in the PR description and migration guide.

🧹 Nitpick comments (1)
packages/thirdweb/src/react/web/ui/PayEmbed.tsx (1)

406-416: Unused code path with empty container.

When none of the payment modes match, the component renders an empty container wrapped in theme and embed providers. This seems unnecessary - consider returning null or throwing an error for invalid modes.

-  return (
-    <CustomThemeProvider theme={theme}>
-      <EmbedContainer
-        className={props.className}
-        modalSize="compact"
-        style={props.style}
-      >
-        <DynamicHeight>{content}</DynamicHeight>
-      </EmbedContainer>
-    </CustomThemeProvider>
-  );
+  // If no valid mode is provided, return null
+  return null;
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 2136c7b and 7bcb1be.

📒 Files selected for processing (65)
  • .changeset/dirty-bananas-fall.md (1 hunks)
  • packages/thirdweb/src/insight/common.ts (0 hunks)
  • packages/thirdweb/src/pay/buyWithCrypto/getStatus.ts (0 hunks)
  • packages/thirdweb/src/pay/buyWithFiat/isSwapRequiredPostOnramp.ts (0 hunks)
  • packages/thirdweb/src/pay/utils/commonTypes.ts (1 hunks)
  • packages/thirdweb/src/react/core/hooks/usePaymentMethods.ts (1 hunks)
  • packages/thirdweb/src/react/core/utils/storage.ts (0 hunks)
  • packages/thirdweb/src/react/web/ui/Bridge/BridgeOrchestrator.tsx (1 hunks)
  • packages/thirdweb/src/react/web/ui/ConnectWallet/Details.tsx (6 hunks)
  • packages/thirdweb/src/react/web/ui/ConnectWallet/MenuButton.tsx (0 hunks)
  • packages/thirdweb/src/react/web/ui/ConnectWallet/NetworkSelector.tsx (2 hunks)
  • packages/thirdweb/src/react/web/ui/ConnectWallet/WalletSelector.tsx (0 hunks)
  • packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.tsx (0 hunks)
  • packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/DirectPaymentModeScreen.tsx (0 hunks)
  • packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/EstimatedTimeAndFees.tsx (0 hunks)
  • packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/LazyBuyScreen.tsx (0 hunks)
  • packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/PayProviderSelection.tsx (0 hunks)
  • packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/PayTokenIcon.tsx (0 hunks)
  • packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/PayWIthCreditCard.tsx (0 hunks)
  • packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/Stepper.tsx (0 hunks)
  • packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/TransactionModeScreen.tsx (0 hunks)
  • packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/fiat/CurrencySelection.tsx (0 hunks)
  • packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatScreenContent.tsx (0 hunks)
  • packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatSteps.tsx (0 hunks)
  • packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/fiat/OnRampScreen.tsx (0 hunks)
  • packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/fiat/Providers.tsx (0 hunks)
  • packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/fiat/currencies.tsx (1 hunks)
  • packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/main/types.ts (0 hunks)
  • packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/main/useEnabledPaymentMethods.ts (0 hunks)
  • packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/main/useUISelectionStates.ts (0 hunks)
  • packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/openOnRamppopup.tsx (0 hunks)
  • packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/SwapDetailsScreen.tsx (0 hunks)
  • packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/TokenInfoRow.tsx (0 hunks)
  • packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/statusMeta.test.ts (0 hunks)
  • packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/statusMeta.ts (0 hunks)
  • packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/swap/BuyTokenInput.tsx (0 hunks)
  • packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/swap/ConfirmationScreen.tsx (0 hunks)
  • packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/swap/ErrorText.tsx (0 hunks)
  • packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/swap/Fees.tsx (0 hunks)
  • packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/swap/PayWithCrypto.tsx (0 hunks)
  • packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/swap/SwapFlow.tsx (0 hunks)
  • packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/swap/SwapScreenContent.tsx (0 hunks)
  • packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/swap/SwapStatusScreen.tsx (0 hunks)
  • packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/swap/SwapSummary.tsx (0 hunks)
  • packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/swap/TokenSelectorScreen.tsx (0 hunks)
  • packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/swap/TransferConfirmationScreen.tsx (0 hunks)
  • packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/swap/TransferFlow.tsx (0 hunks)
  • packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/swap/fetchBalancesForWallet.tsx (0 hunks)
  • packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/swap/pendingSwapTx.ts (0 hunks)
  • packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/swap/useSwapSupportedChains.ts (0 hunks)
  • packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/usePayerSetup.tsx (0 hunks)
  • packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/utils.ts (0 hunks)
  • packages/thirdweb/src/react/web/ui/ConnectWallet/screens/ReceiveFunds.tsx (0 hunks)
  • packages/thirdweb/src/react/web/ui/PayEmbed.tsx (3 hunks)
  • packages/thirdweb/src/react/web/ui/TransactionButton/DepositScreen.tsx (0 hunks)
  • packages/thirdweb/src/react/web/ui/components/Drawer.tsx (0 hunks)
  • packages/thirdweb/src/react/web/ui/components/Modal.tsx (1 hunks)
  • packages/thirdweb/src/react/web/ui/components/StepBar.tsx (0 hunks)
  • packages/thirdweb/src/react/web/ui/components/SwitchNetwork.tsx (0 hunks)
  • packages/thirdweb/src/react/web/ui/components/buttons.tsx (1 hunks)
  • packages/thirdweb/src/react/web/ui/components/text.tsx (0 hunks)
  • packages/thirdweb/src/react/web/ui/components/token/TokenRow.tsx (0 hunks)
  • packages/thirdweb/src/react/web/utils/errors.ts (0 hunks)
  • packages/thirdweb/src/react/web/wallets/shared/GetStartedScreen.tsx (0 hunks)
  • packages/thirdweb/src/react/web/wallets/shared/OTPLoginUI.tsx (0 hunks)
💤 Files with no reviewable changes (55)
  • packages/thirdweb/src/react/web/ui/ConnectWallet/MenuButton.tsx
  • packages/thirdweb/src/react/core/utils/storage.ts
  • packages/thirdweb/src/react/web/ui/ConnectWallet/WalletSelector.tsx
  • packages/thirdweb/src/react/web/ui/TransactionButton/DepositScreen.tsx
  • packages/thirdweb/src/insight/common.ts
  • packages/thirdweb/src/pay/buyWithCrypto/getStatus.ts
  • packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/utils.ts
  • packages/thirdweb/src/react/web/wallets/shared/GetStartedScreen.tsx
  • packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/main/types.ts
  • packages/thirdweb/src/react/web/wallets/shared/OTPLoginUI.tsx
  • packages/thirdweb/src/react/web/ui/ConnectWallet/screens/ReceiveFunds.tsx
  • packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/openOnRamppopup.tsx
  • packages/thirdweb/src/react/web/ui/components/text.tsx
  • packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/LazyBuyScreen.tsx
  • packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/swap/ErrorText.tsx
  • packages/thirdweb/src/react/web/ui/components/StepBar.tsx
  • packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/swap/pendingSwapTx.ts
  • packages/thirdweb/src/pay/buyWithFiat/isSwapRequiredPostOnramp.ts
  • packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/EstimatedTimeAndFees.tsx
  • packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/fiat/Providers.tsx
  • packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/TokenInfoRow.tsx
  • packages/thirdweb/src/react/web/ui/components/SwitchNetwork.tsx
  • packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/usePayerSetup.tsx
  • packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/PayProviderSelection.tsx
  • packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatScreenContent.tsx
  • packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/swap/useSwapSupportedChains.ts
  • packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/main/useEnabledPaymentMethods.ts
  • packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/PayTokenIcon.tsx
  • packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/PayWIthCreditCard.tsx
  • packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/swap/SwapFlow.tsx
  • packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/Stepper.tsx
  • packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/swap/SwapSummary.tsx
  • packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/statusMeta.test.ts
  • packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/fiat/CurrencySelection.tsx
  • packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/swap/TokenSelectorScreen.tsx
  • packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/swap/PayWithCrypto.tsx
  • packages/thirdweb/src/react/web/ui/components/Drawer.tsx
  • packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/statusMeta.ts
  • packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatSteps.tsx
  • packages/thirdweb/src/react/web/ui/components/token/TokenRow.tsx
  • packages/thirdweb/src/react/web/utils/errors.ts
  • packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/swap/SwapStatusScreen.tsx
  • packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/TransactionModeScreen.tsx
  • packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/swap/Fees.tsx
  • packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/swap/ConfirmationScreen.tsx
  • packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/SwapDetailsScreen.tsx
  • packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/DirectPaymentModeScreen.tsx
  • packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/swap/TransferFlow.tsx
  • packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.tsx
  • packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/swap/SwapScreenContent.tsx
  • packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/swap/BuyTokenInput.tsx
  • packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/fiat/OnRampScreen.tsx
  • packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/swap/TransferConfirmationScreen.tsx
  • packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/swap/fetchBalancesForWallet.tsx
  • packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/main/useUISelectionStates.ts
🧰 Additional context used
📓 Path-based instructions (1)
`**/*.{ts,tsx}`: Write idiomatic TypeScript with explicit function declarations ...

**/*.{ts,tsx}: Write idiomatic TypeScript with explicit function declarations and return types
Limit each 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
Avoid any and unknown unless unavoidable; narrow generics when possible
Choose composition over inheritance; leverage utility types (Partial, Pick, etc.)
Comment only ambiguous logic; avoid restating TypeScript in prose
Load heavy dependencies inside async paths to keep initial bundle lean (lazy loading)

📄 Source: CodeRabbit Inference Engine (CLAUDE.md)

List of files the instruction was applied to:

  • packages/thirdweb/src/react/core/hooks/usePaymentMethods.ts
  • packages/thirdweb/src/react/web/ui/components/Modal.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/BridgeOrchestrator.tsx
  • packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/fiat/currencies.tsx
  • packages/thirdweb/src/react/web/ui/components/buttons.tsx
  • packages/thirdweb/src/pay/utils/commonTypes.ts
  • packages/thirdweb/src/react/web/ui/ConnectWallet/NetworkSelector.tsx
  • packages/thirdweb/src/react/web/ui/PayEmbed.tsx
  • packages/thirdweb/src/react/web/ui/ConnectWallet/Details.tsx
🧠 Learnings (11)
📓 Common learnings
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T10:25:29.488Z
Learning: Surface breaking changes prominently in PR descriptions
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T10:25:29.489Z
Learning: Applies to apps/{dashboard,playground-web}/**/*.{tsx,ts} : Client Components: Handle interactive UI with React hooks (`useState`, `useEffect`, React Query, wallet hooks)
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-06-30T10:26:04.389Z
Learning: Applies to dashboard/**/components/*.client.tsx : Interactive UI that relies on hooks (`useState`, `useEffect`, React Query, wallet hooks).
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T10:25:29.489Z
Learning: Applies to src/wallets/**/*.{ts,tsx} : Support for in-app wallets (social/email login) in wallet architecture
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T10:25:29.489Z
Learning: Applies to src/wallets/**/*.{ts,tsx} : Unified `Wallet` and `Account` interfaces in wallet architecture
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T10:25:29.489Z
Learning: Applies to src/wallets/**/*.{ts,tsx} : Support EIP-1193, EIP-5792, EIP-7702 standards in wallet architecture
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T10:25:29.489Z
Learning: Applies to src/wallets/**/*.{ts,tsx} : Smart wallets with account abstraction in wallet architecture
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T10:25:29.488Z
Learning: Applies to apps/{dashboard,playground-web}/**/*.{tsx,ts} : Import UI primitives from `@/components/ui/*` (Button, Input, Select, Tabs, Card, Sidebar, Badge, Separator) in dashboard and playground apps
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T10:25:29.489Z
Learning: Applies to apps/{dashboard,playground-web}/**/*.{tsx,ts} : Client Components: Support fast transitions with prefetched data
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T10:25:29.488Z
Learning: Applies to apps/{dashboard,playground-web}/**/*.{tsx,ts} : Use design system tokens (e.g., `bg-card`, `border-border`, `text-muted-foreground`)
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-06-30T10:26:04.389Z
Learning: Applies to dashboard/**/components/**/*.{ts,tsx} : Prefer composable primitives over custom markup: `Button`, `Input`, `Select`, `Tabs`, `Card`, `Sidebar`, `Separator`, `Badge`.
.changeset/dirty-bananas-fall.md (5)
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T10:25:29.489Z
Learning: Applies to src/wallets/**/*.{ts,tsx} : Support EIP-1193, EIP-5792, EIP-7702 standards in wallet architecture
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T10:25:29.488Z
Learning: Surface breaking changes prominently in PR descriptions
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T10:25:29.489Z
Learning: Applies to src/wallets/**/*.{ts,tsx} : Support for in-app wallets (social/email login) in wallet architecture
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T10:25:29.489Z
Learning: Applies to src/wallets/**/*.{ts,tsx} : Unified `Wallet` and `Account` interfaces in wallet architecture
Learnt from: MananTank
PR: thirdweb-dev/js#7227
File: apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/OpenEditionMetadata.tsx:26-26
Timestamp: 2025-05-30T17:14:25.332Z
Learning: The ModuleCardUIProps interface already includes a client prop of type ThirdwebClient, so when components use `Omit<ModuleCardUIProps, "children" | "updateButton">`, they inherit the client prop without needing to add it explicitly.
packages/thirdweb/src/react/core/hooks/usePaymentMethods.ts (10)
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-06-30T10:26:04.389Z
Learning: Applies to dashboard/**/hooks/**/*.{ts,tsx} : Prefer API routes or server actions to keep tokens secret; the browser only sees relative paths.
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T10:25:29.489Z
Learning: Applies to src/wallets/**/*.{ts,tsx} : Support EIP-1193, EIP-5792, EIP-7702 standards in wallet architecture
Learnt from: MananTank
PR: thirdweb-dev/js#7177
File: apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/erc20/_hooks/useTokenPriceData.ts:49-49
Timestamp: 2025-05-27T19:55:25.056Z
Learning: In the ERC20 public pages token price data hook (`useTokenPriceData.ts`), direct array access on `json.data[0]` without optional chaining is intentionally correct and should not be changed to use safety checks.
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T10:25:29.489Z
Learning: Applies to src/wallets/**/*.{ts,tsx} : Unified `Wallet` and `Account` interfaces in wallet architecture
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T10:25:29.489Z
Learning: Applies to src/wallets/**/*.{ts,tsx} : Support for in-app wallets (social/email login) in wallet architecture
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T10:25:29.489Z
Learning: Applies to src/wallets/**/*.{ts,tsx} : Smart wallets with account abstraction in wallet architecture
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T10:25:29.489Z
Learning: Applies to apps/{dashboard,playground-web}/**/*.{tsx,ts} : Client Components: Handle interactive UI with React hooks (`useState`, `useEffect`, React Query, wallet hooks)
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T10:25:29.489Z
Learning: Applies to apps/{dashboard,playground-web}/**/*.{tsx,ts} : Client Side Data Fetching: Keep tokens secret via internal API routes or server actions
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T10:25:29.489Z
Learning: Applies to src/exports/react.native.ts : React Native specific exports are in `src/exports/react.native.ts`
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-06-30T10:26:04.389Z
Learning: Applies to dashboard/**/components/*.client.tsx : Interactive UI that relies on hooks (`useState`, `useEffect`, React Query, wallet hooks).
packages/thirdweb/src/react/web/ui/components/Modal.tsx (11)
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T10:25:29.489Z
Learning: Applies to src/exports/react.native.ts : React Native specific exports are in `src/exports/react.native.ts`
Learnt from: MananTank
PR: thirdweb-dev/js#7356
File: apps/nebula/src/app/not-found.tsx:1-1
Timestamp: 2025-06-17T18:30:52.976Z
Learning: In the thirdweb/js project, the React namespace is available for type annotations (like React.FC) without needing to explicitly import React. This is project-specific configuration that differs from typical TypeScript/React setups.
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T10:25:29.488Z
Learning: Applies to packages/thirdweb/src/exports/**/*.{ts,tsx} : Export everything via `exports/` directory, grouped by feature in the public API of the SDK
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T10:25:29.489Z
Learning: Applies to packages/react-native-adapter/**/*.{ts,tsx} : Mobile platform shims are in `packages/react-native-adapter/`
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T10:25:29.488Z
Learning: Applies to apps/{dashboard,playground-web}/**/*.{tsx,ts} : Expose `className` prop on root element for overrides in UI components
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T10:25:29.488Z
Learning: Applies to apps/{dashboard,playground-web}/**/*.{tsx,ts} : Import UI primitives from `@/components/ui/*` (Button, Input, Select, Tabs, Card, Sidebar, Badge, Separator) in dashboard and playground apps
Learnt from: MananTank
PR: thirdweb-dev/js#7227
File: apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/OpenEditionMetadata.tsx:26-26
Timestamp: 2025-05-30T17:14:25.332Z
Learning: The ModuleCardUIProps interface already includes a client prop of type ThirdwebClient, so when components use `Omit<ModuleCardUIProps, "children" | "updateButton">`, they inherit the client prop without needing to add it explicitly.
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-06-30T10:26:04.389Z
Learning: Applies to dashboard/**/components/*.client.tsx : Anything that consumes hooks from `@tanstack/react-query` or thirdweb SDKs.
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T10:25:29.489Z
Learning: Applies to apps/{dashboard,playground-web}/**/*.{tsx,ts} : Client Components: Handle interactive UI with React hooks (`useState`, `useEffect`, React Query, wallet hooks)
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-06-30T10:26:04.389Z
Learning: Applies to dashboard/**/components/*.client.tsx : Interactive UI that relies on hooks (`useState`, `useEffect`, React Query, wallet hooks).
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-06-30T10:26:04.389Z
Learning: Applies to dashboard/**/*.{ts,tsx} : Use the `container` class with a `max-w-7xl` cap for page width consistency.
packages/thirdweb/src/react/web/ui/Bridge/BridgeOrchestrator.tsx (1)
Learnt from: jnsdls
PR: thirdweb-dev/js#7364
File: apps/dashboard/src/app/(app)/account/components/AccountHeader.tsx:36-41
Timestamp: 2025-06-18T02:13:34.500Z
Learning: In the logout flow in apps/dashboard/src/app/(app)/account/components/AccountHeader.tsx, when `doLogout()` fails, the cleanup steps (resetAnalytics(), wallet disconnect, router refresh) should NOT execute. This is intentional to maintain consistency - if server-side logout fails, client-side cleanup should not occur.
packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/fiat/currencies.tsx (10)
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T10:25:29.489Z
Learning: Applies to src/exports/react.native.ts : React Native specific exports are in `src/exports/react.native.ts`
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T10:25:29.489Z
Learning: Applies to src/wallets/**/*.{ts,tsx} : Unified `Wallet` and `Account` interfaces in wallet architecture
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T10:25:29.489Z
Learning: Applies to src/wallets/**/*.{ts,tsx} : Support for in-app wallets (social/email login) in wallet architecture
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T10:25:29.489Z
Learning: Applies to src/wallets/**/*.{ts,tsx} : Smart wallets with account abstraction in wallet architecture
Learnt from: saminacodes
PR: thirdweb-dev/js#7543
File: apps/portal/src/app/pay/page.mdx:4-4
Timestamp: 2025-07-07T21:21:47.463Z
Learning: In the thirdweb-dev/js repository, lucide-react icons must be imported with the "Icon" suffix (e.g., ExternalLinkIcon, RocketIcon) as required by the new linting rule, contrary to the typical lucide-react convention of importing without the suffix.
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-06-30T10:26:04.389Z
Learning: Applies to dashboard/**/components/**/*.{ts,tsx} : Icons come from `lucide-react` or the project-specific `…/icons` exports – never embed raw SVG.
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T10:25:29.489Z
Learning: Applies to src/wallets/**/*.{ts,tsx} : Support EIP-1193, EIP-5792, EIP-7702 standards in wallet architecture
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-06-30T10:26:04.389Z
Learning: Applies to dashboard/**/api/**/*.{ts,tsx} : Export default async functions without `'use client';` – they run on the Node edge.
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T10:25:29.488Z
Learning: Applies to packages/thirdweb/src/exports/**/*.{ts,tsx} : Export everything via `exports/` directory, grouped by feature in the public API of the SDK
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-06-30T10:26:04.389Z
Learning: Applies to dashboard/**/components/*.client.tsx : Interactive UI that relies on hooks (`useState`, `useEffect`, React Query, wallet hooks).
packages/thirdweb/src/react/web/ui/components/buttons.tsx (13)
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T10:25:29.488Z
Learning: Applies to apps/{dashboard,playground-web}/**/*.{tsx,ts} : Import UI primitives from `@/components/ui/*` (Button, Input, Select, Tabs, Card, Sidebar, Badge, Separator) in dashboard and playground apps
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-06-30T10:26:04.389Z
Learning: Applies to dashboard/**/components/**/*.{ts,tsx} : Always import from the central UI library under `@/components/ui/*` – e.g. `import { Button } from "@/components/ui/button"`.
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-06-30T10:26:04.389Z
Learning: Applies to dashboard/**/components/**/*.{ts,tsx} : Prefer composable primitives over custom markup: `Button`, `Input`, `Select`, `Tabs`, `Card`, `Sidebar`, `Separator`, `Badge`.
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T10:25:29.488Z
Learning: Applies to apps/{dashboard,playground-web}/**/*.{tsx,ts} : Use Tailwind CSS only – no inline styles or CSS modules
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-06-30T10:26:04.389Z
Learning: Applies to dashboard/**/components/**/*.{ts,tsx} : Reuse core UI primitives; avoid re-implementing buttons, cards, modals.
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T10:25:29.489Z
Learning: Applies to src/exports/react.native.ts : React Native specific exports are in `src/exports/react.native.ts`
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T10:25:29.488Z
Learning: Applies to apps/{dashboard,playground-web}/**/*.{tsx,ts} : Expose `className` prop on root element for overrides in UI components
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-06-30T10:26:04.389Z
Learning: Applies to dashboard/**/components/**/*.{ts,tsx} : Icons come from `lucide-react` or the project-specific `…/icons` exports – never embed raw SVG.
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-06-30T10:26:04.389Z
Learning: Applies to dashboard/**/components/**/*.{ts,tsx} : Tailwind CSS is the styling system – avoid inline styles or CSS modules.
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T10:25:29.489Z
Learning: Applies to apps/{dashboard,playground-web}/**/*.{tsx,ts} : Client Components: Handle interactive UI with React hooks (`useState`, `useEffect`, React Query, wallet hooks)
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-06-30T10:26:04.389Z
Learning: Applies to dashboard/**/components/**/*.{ts,tsx} : Accept a typed `props` object and export a named function (`export function MyComponent()`).
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T10:25:29.488Z
Learning: Applies to apps/{dashboard,playground-web}/**/*.{tsx,ts} : Use design system tokens (e.g., `bg-card`, `border-border`, `text-muted-foreground`)
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-06-30T10:26:04.389Z
Learning: Applies to dashboard/**/components/**/*.{ts,tsx} : Stick to design-tokens: background (`bg-card`), borders (`border-border`), muted text (`text-muted-foreground`) etc.
packages/thirdweb/src/pay/utils/commonTypes.ts (6)
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T10:25:29.489Z
Learning: Applies to src/wallets/**/*.{ts,tsx} : Unified `Wallet` and `Account` interfaces in wallet architecture
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T10:25:29.489Z
Learning: Applies to src/wallets/**/*.{ts,tsx} : Smart wallets with account abstraction in wallet architecture
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T10:25:29.489Z
Learning: Applies to src/extensions/**/*.{ts,tsx} : Auto-generated contracts from ABI definitions in extensions
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T10:25:29.489Z
Learning: Applies to src/wallets/**/*.{ts,tsx} : Support EIP-1193, EIP-5792, EIP-7702 standards in wallet architecture
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T10:25:29.488Z
Learning: Applies to test/src/test-wallets.ts : Predefined test accounts are in `test/src/test-wallets.ts`
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T10:25:29.488Z
Learning: Applies to packages/thirdweb/src/exports/**/*.{ts,tsx} : Export everything via `exports/` directory, grouped by feature in the public API of the SDK
packages/thirdweb/src/react/web/ui/ConnectWallet/NetworkSelector.tsx (11)
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-06-30T10:26:04.389Z
Learning: Applies to dashboard/**/components/*.client.tsx : Interactive UI that relies on hooks (`useState`, `useEffect`, React Query, wallet hooks).
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T10:25:29.489Z
Learning: Applies to apps/{dashboard,playground-web}/**/*.{tsx,ts} : Client Components: Handle interactive UI with React hooks (`useState`, `useEffect`, React Query, wallet hooks)
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T10:25:29.489Z
Learning: Applies to src/wallets/**/*.{ts,tsx} : Unified `Wallet` and `Account` interfaces in wallet architecture
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-06-30T10:26:04.389Z
Learning: Applies to dashboard/**/components/**/*.{ts,tsx} : Prefer composable primitives over custom markup: `Button`, `Input`, `Select`, `Tabs`, `Card`, `Sidebar`, `Separator`, `Badge`.
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T10:25:29.489Z
Learning: Applies to src/wallets/**/*.{ts,tsx} : Support EIP-1193, EIP-5792, EIP-7702 standards in wallet architecture
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T10:25:29.489Z
Learning: Applies to src/wallets/**/*.{ts,tsx} : Support for in-app wallets (social/email login) in wallet architecture
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-06-30T10:26:04.389Z
Learning: Applies to dashboard/**/components/**/*.{ts,tsx} : Merge class names with `cn` from `@/lib/utils` to keep conditional logic readable.
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T10:25:29.488Z
Learning: Applies to apps/{dashboard,playground-web}/**/*.{tsx,ts} : Import UI primitives from `@/components/ui/*` (Button, Input, Select, Tabs, Card, Sidebar, Badge, Separator) in dashboard and playground apps
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T10:25:29.488Z
Learning: Applies to apps/{dashboard,playground-web}/**/*.{tsx,ts} : Use `cn()` from `@/lib/utils` for conditional class merging
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T10:25:29.489Z
Learning: Applies to src/wallets/**/*.{ts,tsx} : Smart wallets with account abstraction in wallet architecture
Learnt from: MananTank
PR: thirdweb-dev/js#7177
File: apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/erc20/_components/ContractHeader.tsx:26-43
Timestamp: 2025-05-29T10:49:52.981Z
Learning: In React image components, conditional rendering of the entire image container (e.g., `{props.image && <Img />}`) serves a different purpose than fallback handling. The conditional prevents rendering any image UI when no image metadata exists, while the fallback prop handles cases where image metadata exists but the image fails to load. This pattern is intentional to distinguish between "no image intended" vs "image intended but failed to load".
packages/thirdweb/src/react/web/ui/PayEmbed.tsx (19)
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T10:25:29.489Z
Learning: Applies to apps/{dashboard,playground-web}/**/*.{tsx,ts} : Client Components: Handle interactive UI with React hooks (`useState`, `useEffect`, React Query, wallet hooks)
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-06-30T10:26:04.389Z
Learning: Applies to dashboard/**/components/*.client.tsx : Interactive UI that relies on hooks (`useState`, `useEffect`, React Query, wallet hooks).
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T10:25:29.489Z
Learning: Applies to src/wallets/**/*.{ts,tsx} : Unified `Wallet` and `Account` interfaces in wallet architecture
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T10:25:29.489Z
Learning: Applies to src/wallets/**/*.{ts,tsx} : Support for in-app wallets (social/email login) in wallet architecture
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T10:25:29.489Z
Learning: Applies to src/wallets/**/*.{ts,tsx} : Smart wallets with account abstraction in wallet architecture
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T10:25:29.489Z
Learning: Applies to src/wallets/**/*.{ts,tsx} : Support EIP-1193, EIP-5792, EIP-7702 standards in wallet architecture
Learnt from: MananTank
PR: thirdweb-dev/js#7227
File: apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/OpenEditionMetadata.tsx:26-26
Timestamp: 2025-05-30T17:14:25.332Z
Learning: The ModuleCardUIProps interface already includes a client prop of type ThirdwebClient, so when components use `Omit<ModuleCardUIProps, "children" | "updateButton">`, they inherit the client prop without needing to add it explicitly.
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-06-30T10:26:04.389Z
Learning: Applies to dashboard/**/components/*.client.tsx : Anything that consumes hooks from `@tanstack/react-query` or thirdweb SDKs.
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T10:25:29.489Z
Learning: Applies to src/exports/react.native.ts : React Native specific exports are in `src/exports/react.native.ts`
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T10:25:29.488Z
Learning: Applies to apps/{dashboard,playground-web}/**/*.{tsx,ts} : Import UI primitives from `@/components/ui/*` (Button, Input, Select, Tabs, Card, Sidebar, Badge, Separator) in dashboard and playground apps
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-06-30T10:26:04.389Z
Learning: Applies to dashboard/**/components/*.client.tsx : Client components must start with `'use client';` before imports.
Learnt from: MananTank
PR: thirdweb-dev/js#7356
File: apps/nebula/src/app/not-found.tsx:1-1
Timestamp: 2025-06-17T18:30:52.976Z
Learning: In the thirdweb/js project, the React namespace is available for type annotations (like React.FC) without needing to explicitly import React. This is project-specific configuration that differs from typical TypeScript/React setups.
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-06-30T10:26:04.389Z
Learning: Applies to dashboard/**/components/*.client.tsx : When you need access to browser APIs (localStorage, window, IntersectionObserver etc.).
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T10:25:29.489Z
Learning: Applies to apps/{dashboard,playground-web}/**/*.{tsx,ts} : Client Components (browser): Begin files with `'use client';`
Learnt from: MananTank
PR: thirdweb-dev/js#7298
File: apps/dashboard/src/app/nebula-app/move-funds/move-funds.tsx:424-424
Timestamp: 2025-06-06T23:46:08.795Z
Learning: The thirdweb project has an ESLint rule that restricts direct usage of `defineChain`. When it's necessary to use `defineChain` directly, it's acceptable to disable the rule with `// eslint-disable-next-line no-restricted-syntax`.
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T10:25:29.489Z
Learning: Applies to apps/{dashboard,playground-web}/**/*.{tsx,ts} : Client Components: Access browser APIs (`localStorage`, `window`, `IntersectionObserver`)
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T10:25:29.488Z
Learning: Applies to apps/{dashboard,playground-web}/**/*.{tsx,ts} : Use design system tokens (e.g., `bg-card`, `border-border`, `text-muted-foreground`)
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-06-30T10:26:04.389Z
Learning: Applies to dashboard/**/layout.tsx : Building layout shells (`layout.tsx`) and top-level pages that mainly assemble data.
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T10:25:29.489Z
Learning: Applies to apps/{dashboard,playground-web}/**/*.{tsx,ts} : Client Components: Support fast transitions with prefetched data
packages/thirdweb/src/react/web/ui/ConnectWallet/Details.tsx (25)
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-06-30T10:26:04.389Z
Learning: Applies to dashboard/**/components/*.client.tsx : Interactive UI that relies on hooks (`useState`, `useEffect`, React Query, wallet hooks).
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T10:25:29.489Z
Learning: Applies to src/wallets/**/*.{ts,tsx} : Support for in-app wallets (social/email login) in wallet architecture
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T10:25:29.489Z
Learning: Applies to src/wallets/**/*.{ts,tsx} : Unified `Wallet` and `Account` interfaces in wallet architecture
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T10:25:29.489Z
Learning: Applies to apps/{dashboard,playground-web}/**/*.{tsx,ts} : Client Components: Handle interactive UI with React hooks (`useState`, `useEffect`, React Query, wallet hooks)
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T10:25:29.489Z
Learning: Applies to src/wallets/**/*.{ts,tsx} : Smart wallets with account abstraction in wallet architecture
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T10:25:29.489Z
Learning: Applies to src/wallets/**/*.{ts,tsx} : Support EIP-1193, EIP-5792, EIP-7702 standards in wallet architecture
Learnt from: joaquim-verges
PR: thirdweb-dev/js#7268
File: packages/thirdweb/src/wallets/in-app/core/wallet/in-app-core.ts:210-216
Timestamp: 2025-06-03T23:44:40.243Z
Learning: EIP7702 wallets do not need special handling for switching chains, unlike EIP4337 wallets which require reconnection when switching chains. In the switchChain method condition, EIP7702 should be intentionally excluded from the reconnection logic.
Learnt from: MananTank
PR: thirdweb-dev/js#7177
File: apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/erc20/_hooks/useTokenPriceData.ts:49-49
Timestamp: 2025-05-27T19:55:25.056Z
Learning: In the ERC20 public pages token price data hook (`useTokenPriceData.ts`), direct array access on `json.data[0]` without optional chaining is intentionally correct and should not be changed to use safety checks.
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T10:25:29.488Z
Learning: Applies to test/src/test-wallets.ts : Predefined test accounts are in `test/src/test-wallets.ts`
Learnt from: MananTank
PR: thirdweb-dev/js#7298
File: apps/dashboard/src/app/nebula-app/move-funds/move-funds.tsx:424-424
Timestamp: 2025-06-06T23:46:08.795Z
Learning: The thirdweb project has an ESLint rule that restricts direct usage of `defineChain`. When it's necessary to use `defineChain` directly, it's acceptable to disable the rule with `// eslint-disable-next-line no-restricted-syntax`.
Learnt from: MananTank
PR: thirdweb-dev/js#7356
File: apps/nebula/src/app/not-found.tsx:1-1
Timestamp: 2025-06-17T18:30:52.976Z
Learning: In the thirdweb/js project, the React namespace is available for type annotations (like React.FC) without needing to explicitly import React. This is project-specific configuration that differs from typical TypeScript/React setups.
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-06-30T10:26:04.389Z
Learning: Applies to dashboard/**/components/*.client.tsx : Anything that consumes hooks from `@tanstack/react-query` or thirdweb SDKs.
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T10:25:29.488Z
Learning: Applies to **/*.test.{ts,tsx} : Use `FORKED_ETHEREUM_CHAIN` for mainnet interactions and `ANVIL_CHAIN` for isolated tests
Learnt from: MananTank
PR: thirdweb-dev/js#7177
File: apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/erc20/erc20.tsx:15-17
Timestamp: 2025-05-27T19:54:55.885Z
Learning: The `fetchDashboardContractMetadata` function from "@3rdweb-sdk/react/hooks/useDashboardContractMetadata" has internal error handlers for all promises and cannot throw errors, so external error handling is not needed when calling this function.
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-06-30T10:26:04.389Z
Learning: Applies to dashboard/**/components/*.client.tsx : When you need access to browser APIs (localStorage, window, IntersectionObserver etc.).
Learnt from: MananTank
PR: thirdweb-dev/js#7332
File: apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/nft/overview/nft-drop-claim.tsx:82-90
Timestamp: 2025-06-13T13:03:41.732Z
Learning: The thirdweb `contract` object is serializable and can safely be used in contexts (e.g., React-Query keys) that require serializable values.
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T10:25:29.488Z
Learning: Applies to apps/{dashboard,playground-web}/**/*.{tsx,ts} : Import UI primitives from `@/components/ui/*` (Button, Input, Select, Tabs, Card, Sidebar, Badge, Separator) in dashboard and playground apps
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-06-30T10:26:04.389Z
Learning: Applies to dashboard/**/components/**/*.{ts,tsx} : Always import from the central UI library under `@/components/ui/*` – e.g. `import { Button } from "@/components/ui/button"`.
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-06-30T10:26:04.389Z
Learning: Applies to dashboard/**/components/**/*.{ts,tsx} : Reuse core UI primitives; avoid re-implementing buttons, cards, modals.
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T10:25:29.488Z
Learning: Applies to apps/{dashboard,playground-web}/**/*.{tsx,ts} : Use design system tokens (e.g., `bg-card`, `border-border`, `text-muted-foreground`)
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T10:25:29.489Z
Learning: Applies to src/exports/react.native.ts : React Native specific exports are in `src/exports/react.native.ts`
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T10:25:29.489Z
Learning: Applies to apps/{dashboard,playground-web}/**/*.{tsx,ts} : Client Components: Support fast transitions with prefetched data
Learnt from: MananTank
PR: thirdweb-dev/js#7307
File: apps/dashboard/src/app/nebula-app/move-funds/move-funds.tsx:324-346
Timestamp: 2025-06-09T15:15:02.350Z
Learning: In the move-funds functionality, MananTank prefers having both individual toast.promise notifications for each token transfer AND batch summary toasts, even though this creates multiple notifications. This dual notification approach is acceptable for the move-funds user experience.
Learnt from: MananTank
PR: thirdweb-dev/js#7227
File: apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/OpenEditionMetadata.tsx:26-26
Timestamp: 2025-05-30T17:14:25.332Z
Learning: The ModuleCardUIProps interface already includes a client prop of type ThirdwebClient, so when components use `Omit<ModuleCardUIProps, "children" | "updateButton">`, they inherit the client prop without needing to add it explicitly.
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-06-30T10:26:04.389Z
Learning: Applies to dashboard/**/components/**/*.{ts,tsx} : Stick to design-tokens: background (`bg-card`), borders (`border-border`), muted text (`text-muted-foreground`) etc.
⏰ 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). (4)
  • GitHub Check: Size
  • GitHub Check: Unit Tests
  • GitHub Check: Lint Packages
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (13)
packages/thirdweb/src/react/web/ui/ConnectWallet/NetworkSelector.tsx (1)

693-697: Switch from <div> to Container reads better & keeps consistent spacing – looks good

Replacing the ad-hoc <div> with the project-level Container (with flex="column" & a design-token gap) brings the markup in line with the rest of the DS primitives, and the explicit width: "100%" keeps the click target intact inside NetworkButton. No functional or a11y regressions spotted.

.changeset/dirty-bananas-fall.md (1)

1-6: LGTM! Changeset correctly documents the patch version change.

The changeset format and description accurately reflect the integration of the new BuyWidget component.

packages/thirdweb/src/react/web/ui/components/Modal.tsx (1)

153-158: Good encapsulation improvement.

Making CrossContainer module-private is appropriate since it's a specialized styled component for modal close button positioning that shouldn't be exposed in the public API.

packages/thirdweb/src/react/web/ui/components/buttons.tsx (1)

11-17: Good encapsulation by making ButtonProps module-private.

The ButtonProps type is appropriately scoped to this module since it's an internal interface for button styling configuration.

packages/thirdweb/src/pay/utils/commonTypes.ts (1)

22-22: Appropriate encapsulation of FiatProviders constant.

Making this module-private aligns with the removal of fiat-related UI components and consolidation into the new BuyWidget, while still supporting the internal FiatProvider type definition.

packages/thirdweb/src/react/web/ui/Bridge/BridgeOrchestrator.tsx (1)

230-233: Good state management improvement.

Adding the state reset before external cancellation ensures consistent state machine behavior and follows the established pattern used in other completion handlers.

packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/fiat/currencies.tsx (1)

87-87: Internal helper not part of public API—no breaking change
The getFiatIcon function is declared and used only within
packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/fiat/currencies.tsx
and is never exported or imported elsewhere. There are no external references in the codebase, so removing an export doesn’t constitute a breaking change. Ignore the original breaking-change warning.

Likely an incorrect or invalid review comment.

packages/thirdweb/src/react/core/hooks/usePaymentMethods.ts (2)

148-155: Good addition: Prevents duplicate destination token in the list.

The logic correctly prevents the destination token from appearing as an origin token unless explicitly requested via includeDestinationToken. The case-insensitive address comparison is appropriate.


136-144: Verify default sorting behavior when sortBy is omitted

Removing sortBy: "popularity" means the sortBy query parameter will no longer be sent to the backend, causing the server to fall back to its own default sort order (which may not be “popularity”). Ensure that this default matches the previous user experience. If not, re-include the parameter:

• Location:
• packages/thirdweb/src/react/core/hooks/usePaymentMethods.ts (around lines 136–144)

• Suggested update (if you want to preserve the previous ordering):

 const routesForChain = await routes({
   client,
   destinationChainId: destinationToken.chainId,
   destinationTokenAddress: destinationToken.address,
+  sortBy: "popularity",
   includePrices: true,
   limit: 100,
   maxSteps: 3,
   originChainId: chainId,
 });
packages/thirdweb/src/react/web/ui/PayEmbed.tsx (1)

325-404: Simplified implementation looks correct.

The refactored component now acts as a simple wrapper that conditionally renders the appropriate widget based on payOptions.mode. The removal of wallet connection logic aligns with the separation of concerns principle.

packages/thirdweb/src/react/web/ui/ConnectWallet/Details.tsx (3)

630-658: Good addition: Hiding buy button on testnets.

The check for !chainMetadataQuery.data.testnet prevents users from attempting to buy funds on testnet chains, which is a sensible UX improvement.


966-970: Fallback chain logic validated
The default fallback to chain ID 1 (Ethereum mainnet) is consistent with existing patterns across the codebase (used extensively in tests, components, and SDK defaults). No changes are needed here.


1148-1171: Ensure CSS Reset on WalletInfoButton After Dropping all: "unset"

We didn’t find any other removals of all: "unset" in the codebase, so please double-check that dropping this reset won’t allow inherited styles to bleed into the button. In particular:

  • Confirm that StyledButton provides its own resets for box‐model, typography, etc.
  • Manually test in all supported themes to ensure no unexpected margins, paddings, fonts or colors are inherited.
  • Verify hover, focus and disabled states still render correctly across browsers.

@joaquim-verges joaquim-verges merged commit c644463 into main Jul 8, 2025
24 of 25 checks passed
@joaquim-verges joaquim-verges deleted the Use_new_BuyWidget_in_wallet_details_modal branch July 8, 2025 00:18
@joaquim-verges joaquim-verges mentioned this pull request Jul 8, 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