Skip to content

Conversation

@gregfromstl
Copy link
Contributor

@gregfromstl gregfromstl commented Oct 24, 2024

PR-Codex overview

This PR focuses on enhancing the useUserOpUsageAggregate hook in the useApi.ts file by incorporating chain data and refining the aggregation logic to exclude testnets. Additionally, it updates the rendering logic in stat.tsx for better handling of value and formatter.

Detailed summary

  • Updated rendering logic in stat.tsx to check for value using !== undefined.
  • Added useAllChainsData import in useApi.ts.
  • Introduced chainStore to access chain data in useUserOpUsageAggregate.
  • Modified userOpStats type to include optional chainId.
  • Implemented logic to skip testnets in aggregated stats.

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

@changeset-bot
Copy link

changeset-bot bot commented Oct 24, 2024

⚠️ No Changeset found

Latest commit: cd22bca

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@vercel
Copy link

vercel bot commented Oct 24, 2024

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

Name Status Preview Comments Updated (UTC)
thirdweb-www ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 24, 2024 11:28pm
3 Skipped Deployments
Name Status Preview Comments Updated (UTC)
docs-v2 ⬜️ Skipped (Inspect) Oct 24, 2024 11:28pm
thirdweb_playground ⬜️ Skipped (Inspect) Oct 24, 2024 11:28pm
wallet-ui ⬜️ Skipped (Inspect) Oct 24, 2024 11:28pm

@graphite-app
Copy link
Contributor

graphite-app bot commented Oct 24, 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 Bug Something isn't working as intended in a provided reproduction. Dashboard Involves changes to the Dashboard. labels Oct 24, 2024
@codecov
Copy link

codecov bot commented Oct 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 45.35%. Comparing base (e4b6d87) to head (cd22bca).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5166   +/-   ##
=======================================
  Coverage   45.35%   45.35%           
=======================================
  Files        1068     1068           
  Lines       55230    55230           
  Branches     3971     3971           
=======================================
  Hits        25050    25050           
  Misses      29488    29488           
  Partials      692      692           
Flag Coverage Δ *Carryforward flag
legacy_packages 65.68% <ø> (ø) Carriedforward from e4b6d87
packages 40.36% <ø> (ø)

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

@github-actions
Copy link
Contributor

github-actions bot commented Oct 24, 2024

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 42.9 KB (0%) 859 ms (0%) 379 ms (+75.61% 🔺) 1.3 s
thirdweb (cjs) 102.73 KB (0%) 2.1 s (0%) 665 ms (+11.81% 🔺) 2.8 s
thirdweb (minimal + tree-shaking) 4.84 KB (0%) 97 ms (0%) 29 ms (+36.15% 🔺) 126 ms
thirdweb/chains (tree-shaking) 498 B (0%) 10 ms (0%) 89 ms (+2188.61% 🔺) 99 ms
thirdweb/react (minimal + tree-shaking) 17.34 KB (0%) 347 ms (0%) 97 ms (+5.85% 🔺) 444 ms

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

gregfromstl commented Oct 24, 2024

Merge activity

  • Oct 24, 6:24 PM EDT: The merge label 'merge-queue' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Oct 24, 6:25 PM EDT: A user added this pull request to the Graphite merge queue.
  • Oct 24, 7:29 PM EDT: A user merged this pull request with the Graphite merge queue.

gregfromstl added a commit that referenced this pull request Oct 24, 2024
<!-- start pr-codex -->

## PR-Codex overview
This PR focuses on improving the usage and handling of user operation statistics in the `useUserOpUsageAggregate` function by incorporating chain data and refining the conditions under which statistics are aggregated.

### Detailed summary
- Updated the condition in `stat.tsx` to check for `value !== undefined` instead of `value &&`.
- Added the import of `useAllChainsData` in `useApi.ts`.
- Introduced `chainStore` to access chain data in `useUserOpUsageAggregate`.
- Modified the type of `userOpStats` to include an optional `chainId`.
- Added logic to skip aggregating stats for testnets.

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

<!-- end pr-codex -->
@vercel vercel bot temporarily deployed to Preview – wallet-ui October 24, 2024 22:49 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 October 24, 2024 22:49 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground October 24, 2024 22:49 Inactive
gregfromstl added a commit that referenced this pull request Oct 24, 2024
<!-- start pr-codex -->

## PR-Codex overview
This PR focuses on improving the handling of analytics data in the `stat.tsx` component and enhancing the `useUserOpUsageAggregate` function in `useApi.ts` to include chain data and filter out testnets.

### Detailed summary
- In `stat.tsx`, updated the conditional rendering for `value` to check for `undefined` instead of using a truthy check.
- In `useApi.ts`, imported `useAllChainsData` for accessing chain information.
- Modified `userOpStats` to include an optional `chainId`.
- Added logic to skip testnets in the aggregated stats calculation.

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

<!-- end pr-codex -->
@vercel vercel bot temporarily deployed to Preview – docs-v2 October 24, 2024 22:52 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground October 24, 2024 22:52 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui October 24, 2024 22:52 Inactive
<!-- start pr-codex -->

## PR-Codex overview
This PR focuses on improving the handling of analytics data in the `useUserOpUsageAggregate` function by incorporating chain data and refining the conditional rendering in the `stat.tsx` component.

### Detailed summary
- In `stat.tsx`, changed the conditional rendering to check for `value !== undefined` instead of `value &&`.
- In `useApi.ts`, imported `useAllChainsData` for accessing chain data.
- Added `chainStore` to hold all chains data.
- Modified `userOpStats` type to include `chainId`.
- Implemented a check to skip testnets in aggregated stats based on `chainId`.

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

<!-- end pr-codex -->
@vercel vercel bot temporarily deployed to Preview – docs-v2 October 24, 2024 23:05 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui October 24, 2024 23:05 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground October 24, 2024 23:05 Inactive
@graphite-app graphite-app bot merged commit cd22bca into main Oct 24, 2024
31 checks passed
@graphite-app graphite-app bot deleted the fix/exclude-testnets branch October 24, 2024 23:29
@vercel vercel bot temporarily deployed to Production – wallet-ui October 24, 2024 23:29 Inactive
@vercel vercel bot temporarily deployed to Production – thirdweb_playground October 24, 2024 23:29 Inactive
@vercel vercel bot temporarily deployed to Production – docs-v2 October 24, 2024 23:29 Inactive
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. Dashboard Involves changes to the Dashboard. merge-queue Adds the pull request to Graphite's merge queue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants