Skip to content

Conversation

@GWSzeto
Copy link
Contributor

@GWSzeto GWSzeto commented Nov 28, 2024

https://linear.app/thirdweb/issue/DASH-489/modules-ui-bug-with-erc20-modules-showing-tokenid


PR-Codex overview

This PR focuses on refactoring the handling of ERC token types across various components to improve clarity and maintainability. It replaces boolean flags for token types with string identifiers, streamlining the logic for determining contract behavior based on the token type.

Detailed summary

  • Replaced boolean flags for token types with string comparisons in various components.
  • Updated uploadMetadata, transferable, and mintable logic to use props.contractInfo.name.
  • Changed UI components to utilize Select for token type selection instead of checkboxes.
  • Modified contract interaction methods to accommodate new token type handling.
  • Enhanced readability and maintainability of the codebase.

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

@changeset-bot
Copy link

changeset-bot bot commented Nov 28, 2024

⚠️ No Changeset found

Latest commit: e2754df

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 Nov 28, 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 Nov 29, 2024 2:14pm
3 Skipped Deployments
Name Status Preview Comments Updated (UTC)
docs-v2 ⬜️ Skipped (Inspect) Nov 29, 2024 2:14pm
thirdweb_playground ⬜️ Skipped (Inspect) Nov 29, 2024 2:14pm
wallet-ui ⬜️ Skipped (Inspect) Nov 29, 2024 2:14pm

@graphite-app
Copy link
Contributor

graphite-app bot commented Nov 28, 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.

@github-actions github-actions bot added the Dashboard Involves changes to the Dashboard. label Nov 28, 2024
@codecov
Copy link

codecov bot commented Nov 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 46.19%. Comparing base (e87eb2f) to head (e2754df).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5536   +/-   ##
=======================================
  Coverage   46.19%   46.19%           
=======================================
  Files        1081     1081           
  Lines       58613    58613           
  Branches     3933     3933           
=======================================
  Hits        27075    27075           
  Misses      30855    30855           
  Partials      683      683           
Flag Coverage Δ *Carryforward flag
legacy_packages 65.68% <ø> (ø) Carriedforward from e87eb2f
packages 41.75% <ø> (ø)

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

@github-actions
Copy link
Contributor

github-actions bot commented Nov 28, 2024

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 47.92 KB (0%) 959 ms (0%) 3.2 s (-0.86% 🔽) 4.1 s
thirdweb (cjs) 107.27 KB (0%) 2.2 s (0%) 5.4 s (-21.6% 🔽) 7.5 s
thirdweb (minimal + tree-shaking) 5.58 KB (0%) 112 ms (0%) 521 ms (+232.17% 🔺) 633 ms
thirdweb/chains (tree-shaking) 506 B (0%) 10 ms (0%) 59 ms (+57.33% 🔺) 69 ms
thirdweb/react (minimal + tree-shaking) 18.28 KB (0%) 366 ms (0%) 532 ms (+42.99% 🔺) 898 ms

@vercel vercel bot temporarily deployed to Preview – thirdweb_playground November 29, 2024 14:01 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 November 29, 2024 14:01 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui November 29, 2024 14:01 Inactive
@GWSzeto GWSzeto added the merge-queue Adds the pull request to Graphite's merge queue. label Nov 29, 2024
Copy link
Contributor Author

GWSzeto commented Nov 29, 2024

Merge activity

  • Nov 29, 9:01 AM EST: The merge label 'merge-queue' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Nov 29, 9:10 AM EST: A user added this pull request to the Graphite merge queue.
  • Nov 29, 9:14 AM EST: A user merged this pull request with the Graphite merge queue.

https://linear.app/thirdweb/issue/DASH-489/modules-ui-bug-with-erc20-modules-showing-tokenid

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on refactoring the handling of different ERC token types in various components of a dashboard application. It replaces boolean flags with string identifiers for token types, enhancing clarity and maintainability.

### Detailed summary
- Replaced boolean flags (`isErc721`, `isErc20`) with string identifiers (`name`) for token types in multiple components.
- Updated metadata upload logic to use `props.contractInfo.name` for conditional checks.
- Refactored the `uploadMetadata`, `setTransferable`, and `mint` functions to use the new string identifiers.
- Modified UI components to use `Select` for token type selection instead of checkboxes.
- Adjusted condition checks for enabling transfer and minting based on the updated token type handling.
- Updated the `ClaimableModule` to handle ERC20 and ERC721 claims with the new string-based approach.
- Ensured consistent handling of token decimals and claim conditions based on token type.

> ✨ 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 November 29, 2024 14:11 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground November 29, 2024 14:11 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui November 29, 2024 14:11 Inactive
@graphite-app graphite-app bot merged commit e2754df into main Nov 29, 2024
31 checks passed
@graphite-app graphite-app bot deleted the erc20-token-id-bug branch November 29, 2024 14:14
@vercel vercel bot temporarily deployed to Production – docs-v2 November 29, 2024 14:14 Inactive
@vercel vercel bot temporarily deployed to Production – thirdweb_playground November 29, 2024 14:14 Inactive
@vercel vercel bot temporarily deployed to Production – wallet-ui November 29, 2024 14:14 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. 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