Skip to content

Conversation

@MananTank
Copy link
Member

@MananTank MananTank commented Oct 23, 2024

PR-Codex overview

This PR focuses on refactoring the FaucetButton and related components to use dynamic claim amounts based on the chainId, improving the flexibility of the faucet system.

Detailed summary

  • Changed amount type from string to number in FaucetButton.
  • Added customClaimAmounts mapping in claim-amount.ts for specific chains.
  • Introduced getFaucetClaimAmount function to retrieve claim amounts.
  • Updated amountToGive in FaucetSection and GetFundsFromFaucet to use getFaucetClaimAmount.
  • Modified API response in route.ts to return dynamic claim amounts.

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

@vercel
Copy link

vercel bot commented Oct 23, 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 23, 2024 5:43pm
3 Skipped Deployments
Name Status Preview Comments Updated (UTC)
docs-v2 ⬜️ Skipped (Inspect) Oct 23, 2024 5:43pm
thirdweb_playground ⬜️ Skipped (Inspect) Oct 23, 2024 5:43pm
wallet-ui ⬜️ Skipped (Inspect) Oct 23, 2024 5:43pm

@changeset-bot
Copy link

changeset-bot bot commented Oct 23, 2024

⚠️ No Changeset found

Latest commit: d580fe0

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 vercel bot temporarily deployed to Preview – wallet-ui October 23, 2024 17:14 Inactive
@graphite-app
Copy link
Contributor

graphite-app bot commented Oct 23, 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.

@vercel vercel bot temporarily deployed to Preview – thirdweb_playground October 23, 2024 17:14 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 October 23, 2024 17:14 Inactive
@MananTank MananTank marked this pull request as ready for review October 23, 2024 17:15
@github-actions github-actions bot added the Dashboard Involves changes to the Dashboard. label Oct 23, 2024
Copy link
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @MananTank and the rest of your teammates on Graphite Graphite

@codecov
Copy link

codecov bot commented Oct 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 45.43%. Comparing base (7a1099b) to head (d580fe0).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5143   +/-   ##
=======================================
  Coverage   45.43%   45.43%           
=======================================
  Files        1066     1066           
  Lines       55150    55150           
  Branches     3974     3974           
=======================================
  Hits        25055    25055           
  Misses      29403    29403           
  Partials      692      692           
Flag Coverage Δ *Carryforward flag
legacy_packages 65.68% <ø> (ø) Carriedforward from 7a1099b
packages 40.45% <ø> (ø)

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

@github-actions
Copy link
Contributor

github-actions bot commented Oct 23, 2024

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 42.81 KB (0%) 857 ms (0%) 747 ms (+55.4% 🔺) 1.7 s
thirdweb (cjs) 102.66 KB (0%) 2.1 s (0%) 1.4 s (-4.59% 🔽) 3.5 s
thirdweb (minimal + tree-shaking) 4.84 KB (0%) 97 ms (0%) 66 ms (+17.4% 🔺) 163 ms
thirdweb/chains (tree-shaking) 498 B (0%) 10 ms (0%) 11 ms (-25.57% 🔽) 21 ms
thirdweb/react (minimal + tree-shaking) 17.33 KB (0%) 347 ms (0%) 235 ms (+47.17% 🔺) 582 ms

@MananTank MananTank force-pushed the 10-23-customize_faucet_claim_amount_for_various_chains branch from 7a043ff to af8f58c Compare October 23, 2024 17:22
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground October 23, 2024 17:22 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui October 23, 2024 17:22 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 October 23, 2024 17:22 Inactive
@graphite-app
Copy link
Contributor

graphite-app bot commented Oct 23, 2024

Merge activity

<!-- start pr-codex -->

## PR-Codex overview
This PR focuses on updating the `FaucetButton` and related components to use dynamic claim amounts based on the `chainId`, replacing hardcoded values with a function that retrieves the appropriate amount.

### Detailed summary
- Changed `amount` type from `string` to `number` in `FaucetButton.tsx`.
- Introduced `customClaimAmounts` and `defaultClaimAmount` in `claim-amount.ts`.
- Updated `FaucetSection` and `GetFundsFromFaucet` to use `getFaucetClaimAmount`.
- Modified API response in `route.ts` to return dynamic claim amounts.

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

<!-- end pr-codex -->
@jnsdls jnsdls force-pushed the 10-23-customize_faucet_claim_amount_for_various_chains branch from af8f58c to d580fe0 Compare October 23, 2024 17:33
@vercel vercel bot temporarily deployed to Preview – docs-v2 October 23, 2024 17:33 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui October 23, 2024 17:33 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground October 23, 2024 17:33 Inactive
@graphite-app graphite-app bot merged commit d580fe0 into main Oct 23, 2024
31 checks passed
@graphite-app graphite-app bot deleted the 10-23-customize_faucet_claim_amount_for_various_chains branch October 23, 2024 17:43
@vercel vercel bot temporarily deployed to Production – wallet-ui October 23, 2024 17:43 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Dashboard Involves changes to the Dashboard.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants