Skip to content

Conversation

@joaquim-verges
Copy link
Member

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


PR-Codex overview

This PR focuses on displaying all tokens in the payment selection screen, regardless of whether the user has enough balance for a specific token.

Detailed summary

  • Modified the logic in the usePaymentMethods hook to show all tokens in the payment selection screen.
  • Removed the calculation of requiredDollarAmount and the filtering condition based on dollarBalance for owned tokens.

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

Summary by CodeRabbit

  • New Features
    • The payment selection screen now displays all available tokens, regardless of whether the user has sufficient balance for them.

@changeset-bot
Copy link

changeset-bot bot commented Jul 4, 2025

🦋 Changeset detected

Latest commit: 297e2b6

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

@vercel
Copy link

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

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jul 4, 2025

Walkthrough

A new changeset entry was added to document an update in the payment selection logic. The code was modified to remove the filtering of tokens based on whether their balance meets a required dollar amount, resulting in all tokens with a positive balance being displayed in the payment selection screen.

Changes

File(s) Change Summary
.changeset/three-parts-rush.md Added a changeset entry describing the updated payment selection screen behavior.
packages/thirdweb/src/react/core/hooks/usePaymentMethods.ts Removed logic filtering tokens by required dollar value; now includes all tokens with balance.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant PaymentScreen
    participant usePaymentMethods

    User->>PaymentScreen: Open payment selection
    PaymentScreen->>usePaymentMethods: Fetch available tokens
    usePaymentMethods-->>PaymentScreen: Return all tokens with positive balance
    PaymentScreen-->>User: Display all tokens (regardless of sufficient balance)
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.

@joaquim-verges joaquim-verges marked this pull request as ready for review July 4, 2025 01:43
@github-actions github-actions bot added packages SDK Involves changes to the thirdweb SDK labels Jul 4, 2025
@joaquim-verges joaquim-verges requested review from a team as code owners July 4, 2025 01:43
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)
.changeset/three-parts-rush.md (1)

5-5: Add missing determiners for clarity

Minor grammar tweak for smoother reading:

-Show all tokens in payment selection screen, even if not enough balance
+Show all tokens in the payment selection screen, even if the user does not have enough balance
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 7500d87 and 297e2b6.

📒 Files selected for processing (2)
  • .changeset/three-parts-rush.md (1 hunks)
  • packages/thirdweb/src/react/core/hooks/usePaymentMethods.ts (0 hunks)
💤 Files with no reviewable changes (1)
  • packages/thirdweb/src/react/core/hooks/usePaymentMethods.ts
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
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: 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: 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.488Z
Learning: Surface breaking changes prominently in PR descriptions
.changeset/three-parts-rush.md (5)
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 EIP-1193, EIP-5792, EIP-7702 standards in wallet architecture
Learnt from: MananTank
PR: thirdweb-dev/js#7081
File: apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/create/create-token-page-impl.tsx:110-118
Timestamp: 2025-05-20T18:54:15.781Z
Learning: In the thirdweb dashboard's token asset creation flow, the `transferBatch` function from `thirdweb/extensions/erc20` accepts the raw quantity values from the form without requiring explicit conversion to wei using `toUnits()`. The function appears to handle this conversion internally or is designed to work with the values in the format they're already provided.
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#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.
🪛 LanguageTool
.changeset/three-parts-rush.md

[uncategorized] ~5-~5: You might be missing the article “the” here.
Context: ...hirdweb": patch --- Show all tokens in payment selection screen, even if not enough ba...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)

⏰ Context from checks skipped due to timeout of 90000ms (8)
  • GitHub Check: Lint Packages
  • GitHub Check: E2E Tests (pnpm, esbuild)
  • GitHub Check: E2E Tests (pnpm, vite)
  • GitHub Check: E2E Tests (pnpm, webpack)
  • GitHub Check: Size
  • GitHub Check: Unit Tests
  • GitHub Check: Build Packages
  • GitHub Check: Analyze (javascript)

@github-actions
Copy link
Contributor

github-actions bot commented Jul 4, 2025

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 63.11 KB (0%) 1.3 s (0%) 258 ms (+120.53% 🔺) 1.6 s
thirdweb (cjs) 352.76 KB (0%) 7.1 s (0%) 926 ms (+5.69% 🔺) 8 s
thirdweb (minimal + tree-shaking) 5.72 KB (0%) 115 ms (0%) 97 ms (+1290.36% 🔺) 212 ms
thirdweb/chains (tree-shaking) 530 B (0%) 11 ms (0%) 37 ms (+1332.68% 🔺) 47 ms
thirdweb/react (minimal + tree-shaking) 19.59 KB (0%) 392 ms (0%) 59 ms (+310.88% 🔺) 451 ms

@codecov
Copy link

codecov bot commented Jul 4, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 51.97%. Comparing base (0e159f7) to head (297e2b6).
Report is 4 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7523   +/-   ##
=======================================
  Coverage   51.96%   51.97%           
=======================================
  Files         952      952           
  Lines       64224    64212   -12     
  Branches     4239     4237    -2     
=======================================
- Hits        33377    33375    -2     
+ Misses      30740    30730   -10     
  Partials      107      107           
Flag Coverage Δ
packages 51.97% <ø> (+<0.01%) ⬆️
Files with missing lines Coverage Δ
...thirdweb/src/react/core/hooks/usePaymentMethods.ts 5.75% <ø> (+0.31%) ⬆️

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

@joaquim-verges joaquim-verges merged commit 341325f into main Jul 4, 2025
27 checks passed
@joaquim-verges joaquim-verges deleted the _SDK_Show_all_tokens_in_payment_selection_regardless_of_balance branch July 4, 2025 02:16
@joaquim-verges joaquim-verges mentioned this pull request Jul 4, 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