Skip to content

Conversation

@gregfromstl
Copy link
Contributor

@gregfromstl gregfromstl commented Nov 19, 2024

CNCT-2385


PR-Codex overview

This PR focuses on enhancing error handling in the Buy and TransactionModeScreen components of the thirdweb package. It improves user experience by providing clearer error messages and loading states.

Detailed summary

  • Updated error message from "No account" to "No payer account found" in useBuyTxStates.ts.
  • Added error handling for supportedDestinationsQuery in BuyScreen.tsx.
  • Introduced loading and error states for TransactionModeScreen with appropriate user feedback.
  • Enhanced logging for debugging in BuyScreenContent.

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

@gregfromstl gregfromstl added the Bug Something isn't working as intended in a provided reproduction. label Nov 19, 2024
@gregfromstl gregfromstl self-assigned this Nov 19, 2024
@linear
Copy link

linear bot commented Nov 19, 2024

@changeset-bot
Copy link

changeset-bot bot commented Nov 19, 2024

🦋 Changeset detected

Latest commit: f368793

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

This PR includes changesets to release 1 package
Name Type
thirdweb 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 Nov 19, 2024

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

Name Status Preview Comments Updated (UTC)
docs-v2 ❌ Failed (Inspect) Nov 19, 2024 11:26pm
thirdweb_playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 19, 2024 11:26pm
thirdweb-www ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 19, 2024 11:26pm
wallet-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 19, 2024 11:26pm

@graphite-app
Copy link
Contributor

graphite-app bot commented Nov 19, 2024

Your org has enabled the Graphite merge queue for merging into main

Add the label “merge-queue” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “hotfix” to add to the merge queue as a hot fix.

You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link.

@gregfromstl gregfromstl added the SDK Involves changes to the thirdweb SDK label Nov 19, 2024
Comment on lines +159 to +163
console.log("BuyScreenContent");

const activeAccount = useActiveAccount();
const { payer, setPayer } = usePayerSetup();
console.log("payer", payer);
Copy link
Contributor

Choose a reason for hiding this comment

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

Please remove the console.log statements on lines 159 and 162. These appear to be debugging statements that were inadvertently committed. The codebase should remain free of development logging in production.

Spotted by Graphite Reviewer

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

@github-actions
Copy link
Contributor

github-actions bot commented Nov 19, 2024

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 44.9 KB (0%) 899 ms (0%) 214 ms (+5.55% 🔺) 1.2 s
thirdweb (cjs) 105.02 KB (0%) 2.2 s (0%) 390 ms (+32.3% 🔺) 2.5 s
thirdweb (minimal + tree-shaking) 5.61 KB (0%) 113 ms (0%) 33 ms (+255.21% 🔺) 145 ms
thirdweb/chains (tree-shaking) 506 B (0%) 10 ms (0%) 31 ms (+1180% 🔺) 41 ms
thirdweb/react (minimal + tree-shaking) 18.41 KB (0%) 369 ms (0%) 74 ms (+185.98% 🔺) 442 ms

@codecov
Copy link

codecov bot commented Nov 19, 2024

Codecov Report

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

Project coverage is 45.49%. Comparing base (b5227c9) to head (f368793).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...onnectWallet/screens/Buy/TransactionModeScreen.tsx 0.00% 36 Missing ⚠️
...act/web/ui/ConnectWallet/screens/Buy/BuyScreen.tsx 0.00% 18 Missing ⚠️
...i/ConnectWallet/screens/Buy/main/useBuyTxStates.ts 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5463      +/-   ##
==========================================
- Coverage   45.52%   45.49%   -0.04%     
==========================================
  Files        1070     1070              
  Lines       55718    55770      +52     
  Branches     4029     4034       +5     
==========================================
+ Hits        25367    25372       +5     
- Misses      29664    29711      +47     
  Partials      687      687              
Flag Coverage Δ *Carryforward flag
legacy_packages 65.68% <ø> (ø) Carriedforward from b5227c9
packages 40.60% <0.00%> (-0.04%) ⬇️

*This pull request uses carry forward flags. Click here to find out more.

Files with missing lines Coverage Δ
...i/ConnectWallet/screens/Buy/main/useBuyTxStates.ts 1.57% <0.00%> (ø)
...act/web/ui/ConnectWallet/screens/Buy/BuyScreen.tsx 0.08% <0.00%> (-0.01%) ⬇️
...onnectWallet/screens/Buy/TransactionModeScreen.tsx 0.76% <0.00%> (-0.12%) ⬇️

... and 2 files with indirect coverage changes

---- 🚨 Try these New Features:

@gregfromstl gregfromstl added the merge-queue Adds the pull request to Graphite's merge queue. label Nov 19, 2024
Copy link
Contributor Author

gregfromstl commented Nov 19, 2024

Merge activity

  • Nov 19, 5:48 PM EST: The merge label 'merge-queue' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Nov 19, 5:48 PM EST: The merge label 'merge-queue' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Nov 19, 6:05 PM EST: A user added this pull request to the Graphite merge queue.
  • Nov 19, 6:26 PM EST: A user merged this pull request with the Graphite merge queue.

CNCT-2385

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on improving error handling and user experience in the `BuyScreen` and `TransactionModeScreen` components of the `thirdweb` package. It adds error states for loading issues and modifies error messages for better clarity.

### Detailed summary
- Updated error message for missing account in `useBuyTxStates.ts`.
- Introduced an error state in `BuyScreen` for `supportedDestinationsQuery` failures.
- Added loading and error handling in `TransactionModeScreen` for transaction cost and chain data.
- Enhanced user feedback with `ErrorState` and `LoadingScreen` components.

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

<!-- end pr-codex -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Something isn't working as intended in a provided reproduction. merge-queue Adds the pull request to Graphite's merge queue. packages SDK Involves changes to the thirdweb SDK

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants