Skip to content

[TOOL-4531] Dashboard: Add Token Asset creation wizard #7081

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

MananTank
Copy link
Member

@MananTank MananTank commented May 19, 2025


PR-Codex overview

This PR focuses on enhancements to the asset management features in the application, including the creation and tracking of tokens, improved UI elements, and additional validation for forms.

Detailed summary

  • Added deploymentType and contractType properties in various components.
  • Introduced revalidatePathAction for server-side path revalidation.
  • Updated UI components to support asset creation.
  • Enhanced form validation using zod.
  • Improved visual elements and user interactions across asset management pages.

The following files were skipped due to too many changes: apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/create/launch/launch-token.tsx, apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/create/distribution/token-airdrop.tsx

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

Summary by CodeRabbit

  • New Features

    • Introduced a comprehensive asset management interface for creating, importing, and managing ERC-20 tokens within team and project dashboards.
    • Added a multi-step token creation flow with form validation, including token info, distribution, sale settings, airdrop CSV upload, and launch process with real-time status tracking.
    • Implemented visual token allocation charts and multi-step progress indicators for enhanced user experience.
    • Added a dedicated "Assets" section in the sidebar with a "New" badge.
    • Added a horizontal segmented distribution bar chart component for visualizing token allocations.
    • Introduced a multi-step status component to track asynchronous step executions with retry capabilities.
    • Added token airdrop CSV upload and validation feature with user-friendly UI and error handling.
    • Added token sale configuration section with price and allocation inputs.
    • Enhanced import modal to support both contract and asset imports with contextual UI and behavior.
    • Added new pages and components to support token asset creation and management workflows, including cards for asset actions.
  • Improvements

    • Enhanced contract and asset import workflows with clearer UI, context-aware dialogs, and improved contract table variant handling.
    • Updated number input fields to remove browser-native spinners for a cleaner appearance.
    • Improved analytics event tracking for user interactions and deployment steps.
    • Refined UI components for consistent styling and accessibility.
    • Fixed sidebar badge placement and updated UI text for clarity.
  • Bug Fixes

    • Corrected UI typos and improved analytics event tracking for deployment errors.
  • Documentation

    • Added Storybook stories for new components to facilitate UI testing and documentation.
  • Chores

    • Refactored and extended types and props to support new asset and contract features, ensuring future extensibility.
    • Added tracking utilities for token deployment and asset creation analytics.
    • Added server-side function to support path revalidation for pages and layouts.

Copy link

linear bot commented May 19, 2025

Copy link

vercel bot commented May 19, 2025

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 May 22, 2025 8:16pm
4 Skipped Deployments
Name Status Preview Comments Updated (UTC)
docs-v2 ⬜️ Skipped (Inspect) May 22, 2025 8:16pm
login ⬜️ Skipped (Inspect) May 22, 2025 8:16pm
thirdweb_playground ⬜️ Skipped (Inspect) May 22, 2025 8:16pm
wallet-ui ⬜️ Skipped (Inspect) May 22, 2025 8:16pm

@vercel vercel bot temporarily deployed to Preview – thirdweb_playground May 19, 2025 19:54 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui May 19, 2025 19:54 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 May 19, 2025 19:54 Inactive
@vercel vercel bot temporarily deployed to Preview – login May 19, 2025 19:54 Inactive
Copy link

changeset-bot bot commented May 19, 2025

⚠️ No Changeset found

Latest commit: 5b55a2b

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

@MananTank MananTank marked this pull request as ready for review May 19, 2025 19:54
@MananTank MananTank requested review from a team as code owners May 19, 2025 19:54
@github-actions github-actions bot added the Dashboard Involves changes to the Dashboard. label May 19, 2025
Copy link
Member Author

MananTank commented May 19, 2025


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

codecov bot commented May 19, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 55.61%. Comparing base (526b6b5) to head (5b55a2b).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7081   +/-   ##
=======================================
  Coverage   55.61%   55.61%           
=======================================
  Files         902      902           
  Lines       58177    58177           
  Branches     4085     4085           
=======================================
  Hits        32356    32356           
  Misses      25716    25716           
  Partials      105      105           
Flag Coverage Δ
packages 55.61% <ø> (ø)
🚀 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.

Copy link
Contributor

github-actions bot commented May 19, 2025

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 56.62 KB (0%) 1.2 s (0%) 160 ms (+134.53% 🔺) 1.3 s
thirdweb (cjs) 309.13 KB (0%) 6.2 s (0%) 610 ms (+11.57% 🔺) 6.8 s
thirdweb (minimal + tree-shaking) 5.69 KB (0%) 114 ms (0%) 64 ms (+1166.23% 🔺) 178 ms
thirdweb/chains (tree-shaking) 531 B (0%) 11 ms (0%) 25 ms (+1452.77% 🔺) 35 ms
thirdweb/react (minimal + tree-shaking) 19.5 KB (0%) 390 ms (0%) 86 ms (+421.22% 🔺) 476 ms

@MananTank MananTank force-pushed the 05-20-_tool-4531_dashboard_add_token_asset_creation_wizard branch from 7f8c64d to c37589e Compare May 19, 2025 20:23
@vercel vercel bot temporarily deployed to Preview – docs-v2 May 19, 2025 20:23 Inactive
@vercel vercel bot temporarily deployed to Preview – login May 19, 2025 20:23 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui May 19, 2025 20:23 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground May 19, 2025 20:23 Inactive
@MananTank MananTank force-pushed the 05-20-_tool-4531_dashboard_add_token_asset_creation_wizard branch from c37589e to dbe4965 Compare May 19, 2025 20:30
@vercel vercel bot temporarily deployed to Preview – docs-v2 May 19, 2025 20:30 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui May 19, 2025 20:30 Inactive
@vercel vercel bot temporarily deployed to Preview – login May 19, 2025 20:30 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground May 19, 2025 20:30 Inactive
@vercel vercel bot temporarily deployed to Preview – login May 22, 2025 18:11 Inactive
@MananTank MananTank force-pushed the 05-20-_tool-4531_dashboard_add_token_asset_creation_wizard branch from 1dc928b to b5e5f6e Compare May 22, 2025 18:57
@vercel vercel bot temporarily deployed to Preview – docs-v2 May 22, 2025 18:57 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui May 22, 2025 18:57 Inactive
@vercel vercel bot temporarily deployed to Preview – login May 22, 2025 18:57 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground May 22, 2025 18:57 Inactive
Copy link

@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: 2

♻️ Duplicate comments (1)
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/create/create-token-page.client.tsx (1)

111-114: 🛠️ Refactor suggestion

Form values may require explicit validation before launch

When combining form values for the launch step, there's no validation that both forms are valid. The previous review comments mentioned this issue.

<LaunchTokenStatus
  client={props.client}
  onPrevious={() => {
    setStep("distribution");
  }}
  createTokenFunctions={props.createTokenFunctions}
+ validateForms={async () => {
+   const [infoValid, distValid] = await Promise.all([
+     tokenInfoForm.trigger(),
+     tokenDistributionForm.trigger()
+   ]);
+   return infoValid && distValid;
+ }}
  values={{
    ...tokenInfoForm.getValues(),
    ...tokenDistributionForm.getValues(),
  }}
/>

Adding a validation function that can be called before launching would ensure both forms are valid at the time of launch.

🧹 Nitpick comments (3)
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/create/create-token-page.client.tsx (3)

3-6: Clean up empty imports

There are several empty imports that should be removed or populated with actual imports:

-import {} from "@/components/blocks/multi-step-status/multi-step-status";
-import {} from "@/components/ui/dialog";
-import {} from "lucide-react";
+// Import specific components if needed, or remove these lines

Empty imports add unnecessary noise to the codebase and can be confusing for other developers.


48-48: Consider making the default chain ID configurable

The code uses a hardcoded fallback of "1" (Ethereum mainnet) when no active chain is detected. This might not be the intended default for all use cases.

-chain: activeChain?.id ? activeChain.id.toString() : "1",
+chain: activeChain?.id ? activeChain.id.toString() : process.env.NEXT_PUBLIC_DEFAULT_CHAIN_ID || "1",

This would make the default chain configurable via environment variables.


78-118: Consider adding error boundaries and loading states

The component doesn't include error handling for potential API failures or loading states during transitions between steps or form submissions.

Consider wrapping the main component or each step with an error boundary component and adding loading indicators during transitions or API calls to improve user experience.

import { ErrorBoundary } from 'react-error-boundary';
import { LoadingSpinner } from '@/components/ui/loading-spinner';

// Then in your render method:
<ErrorBoundary fallback={<div>Something went wrong</div>}>
  {isLoading && <LoadingSpinner />}
  {!isLoading && (
    // Your existing UI code
  )}
</ErrorBoundary>
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 1dc928b and b5e5f6e.

📒 Files selected for processing (34)
  • apps/dashboard/src/@/components/blocks/distribution-chart.tsx (1 hunks)
  • apps/dashboard/src/@/components/blocks/multi-step-status/multi-step-status.stories.tsx (1 hunks)
  • apps/dashboard/src/@/components/blocks/multi-step-status/multi-step-status.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_components/claim-conditions/claim-conditions-form/index.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_layout/primary-dashboard-button.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/tokens/components/supply-layout.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/account/contracts/DeployedContractsPageHeader.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/account/contracts/_components/DeployViaCLIOrImportCard.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/account/contracts/_components/DeployedContractsPage.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/account/contracts/_components/getProjectContracts.ts (1 hunks)
  • apps/dashboard/src/app/(app)/account/contracts/_components/getSortedDeployedContracts.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/cards.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/create/create-token-card.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/create/create-token-page-impl.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/create/create-token-page.client.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/create/create-token-page.stories.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/create/distribution/token-airdrop.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/create/distribution/token-distribution.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/create/distribution/token-sale.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/create/form.ts (1 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/create/launch/launch-token.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/create/page.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/create/token-info-fieldset.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/create/tracking.ts (1 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/page.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/components/ProjectSidebarLayout.tsx (3 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/connect/account-abstraction/factories/page.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/hooks/project-contracts.ts (1 hunks)
  • apps/dashboard/src/components/contract-components/contract-deploy-form/custom-contract.tsx (1 hunks)
  • apps/dashboard/src/components/contract-components/import-contract/modal.tsx (7 hunks)
  • apps/dashboard/src/components/contract-components/tables/contract-table.stories.tsx (6 hunks)
  • apps/dashboard/src/components/contract-components/tables/contract-table.tsx (6 hunks)
  • apps/dashboard/src/contract-ui/components/solidity-inputs/address-input.tsx (3 hunks)
  • apps/dashboard/src/global.css (1 hunks)
✅ Files skipped from review due to trivial changes (2)
  • apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/tokens/components/supply-layout.tsx
  • apps/dashboard/src/contract-ui/components/solidity-inputs/address-input.tsx
🚧 Files skipped from review as they are similar to previous changes (31)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/connect/account-abstraction/factories/page.tsx
  • apps/dashboard/src/app/(app)/account/contracts/_components/DeployViaCLIOrImportCard.tsx
  • apps/dashboard/src/global.css
  • apps/dashboard/src/app/(app)/account/contracts/_components/DeployedContractsPage.tsx
  • apps/dashboard/src/app/(app)/account/contracts/DeployedContractsPageHeader.tsx
  • apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_layout/primary-dashboard-button.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/components/ProjectSidebarLayout.tsx
  • apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_components/claim-conditions/claim-conditions-form/index.tsx
  • apps/dashboard/src/app/(app)/account/contracts/_components/getSortedDeployedContracts.tsx
  • apps/dashboard/src/components/contract-components/contract-deploy-form/custom-contract.tsx
  • apps/dashboard/src/app/(app)/account/contracts/_components/getProjectContracts.ts
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/hooks/project-contracts.ts
  • apps/dashboard/src/@/components/blocks/multi-step-status/multi-step-status.stories.tsx
  • apps/dashboard/src/components/contract-components/tables/contract-table.stories.tsx
  • apps/dashboard/src/components/contract-components/tables/contract-table.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/cards.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/create/page.tsx
  • apps/dashboard/src/@/components/blocks/distribution-chart.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/create/create-token-page.stories.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/page.tsx
  • apps/dashboard/src/components/contract-components/import-contract/modal.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/create/distribution/token-sale.tsx
  • apps/dashboard/src/@/components/blocks/multi-step-status/multi-step-status.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/create/create-token-card.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/create/launch/launch-token.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/create/distribution/token-distribution.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/create/distribution/token-airdrop.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/create/form.ts
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/create/create-token-page-impl.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/create/tracking.ts
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/create/token-info-fieldset.tsx
⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: Size
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (1)
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/create/create-token-page.client.tsx (1)

31-119: Overall component structure looks good

The overall structure of the component follows good practices:

  • Clearly defined step-based UI with appropriate component separation
  • Proper use of React Hook Form with Zod validation
  • Clean separation of form definition and rendering
  • Good prop typing with ThirdwebClient and CreateTokenFunctions

@MananTank MananTank force-pushed the 05-20-_tool-4531_dashboard_add_token_asset_creation_wizard branch from b5e5f6e to 8f7ed62 Compare May 22, 2025 19:28
@vercel vercel bot temporarily deployed to Preview – wallet-ui May 22, 2025 19:28 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground May 22, 2025 19:28 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 May 22, 2025 19:28 Inactive
@vercel vercel bot temporarily deployed to Preview – login May 22, 2025 19:28 Inactive
Copy link

@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

♻️ Duplicate comments (2)
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/create/create-token-page.client.tsx (2)

85-87: Add form validation before proceeding to next step

Currently, the code transitions to the next step without validating that the current form is valid. This could lead to incomplete or invalid data being used later in the flow.

onNext={() => {
+   // Validate form before proceeding
+   tokenInfoForm.trigger().then((isValid) => {
+     if (isValid) {
        setStep("distribution");
+     }
+   });
}}

99-101: Add form validation before proceeding to launch step

Similar to the previous step transition, there's no validation before moving to the launch step.

onNext={() => {
+   // Validate form before proceeding
+   tokenDistributionForm.trigger().then((isValid) => {
+     if (isValid) {
        setStep("launch");
+     }
+   });
}}
🧹 Nitpick comments (3)
apps/dashboard/src/@/actions/revalidate.ts (1)

1-10: Good implementation of a Next.js server action, but consider adding error handling.

The implementation correctly uses the "use server" directive and properly wraps the Next.js revalidatePath function. However, there are a few improvements that could make this more robust:

  1. Add error handling with try/catch to gracefully handle any failures
  2. Return a success/failure status to inform the caller about the outcome
  3. Include JSDoc comments to document the function's purpose and usage

Here's a suggested improvement:

"use server";

import { revalidatePath } from "next/cache";

+ /**
+  * Server action to revalidate a specific path in the Next.js cache
+  * @param path - The path to revalidate
+  * @param type - Whether to revalidate just the page or the entire layout
+  * @returns A result object indicating success or failure
+  */
export async function revalidatePathAction(
  path: string,
  type: "page" | "layout",
) {
+  try {
    revalidatePath(path, type);
+    return { success: true };
+  } catch (error) {
+    console.error("Failed to revalidate path:", error);
+    return { 
+      success: false, 
+      error: error instanceof Error ? error.message : "Unknown error" 
+    };
+  }
}
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/create/create-token-page.client.tsx (2)

3-6: Remove unused imports

Several imports are declared but not used in the component:

-import {} from "@/components/blocks/multi-step-status/multi-step-status";
-import {} from "@/components/ui/dialog";
-import {} from "lucide-react";

Empty import statements should be removed to keep the code clean and improve maintainability.


114-116: Consider using a memoized combined form values object

The form values are combined on every render of the launch step. For performance optimization, consider memoizing this object:

+const combinedFormValues = React.useMemo(() => ({
+  ...tokenInfoForm.getValues(),
+  ...tokenDistributionForm.getValues(),
+}), [tokenInfoForm, tokenDistributionForm]);

{step === "launch" && (
  <LaunchTokenStatus
    client={props.client}
    onLaunchSuccess={props.onLaunchSuccess}
    onPrevious={() => {
      setStep("distribution");
    }}
    createTokenFunctions={props.createTokenFunctions}
-   values={{
-     ...tokenInfoForm.getValues(),
-     ...tokenDistributionForm.getValues(),
-   }}
+   values={combinedFormValues}
  />
)}
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between b5e5f6e and 8f7ed62.

📒 Files selected for processing (35)
  • apps/dashboard/src/@/actions/revalidate.ts (1 hunks)
  • apps/dashboard/src/@/components/blocks/distribution-chart.tsx (1 hunks)
  • apps/dashboard/src/@/components/blocks/multi-step-status/multi-step-status.stories.tsx (1 hunks)
  • apps/dashboard/src/@/components/blocks/multi-step-status/multi-step-status.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_components/claim-conditions/claim-conditions-form/index.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_layout/primary-dashboard-button.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/tokens/components/supply-layout.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/account/contracts/DeployedContractsPageHeader.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/account/contracts/_components/DeployViaCLIOrImportCard.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/account/contracts/_components/DeployedContractsPage.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/account/contracts/_components/getProjectContracts.ts (1 hunks)
  • apps/dashboard/src/app/(app)/account/contracts/_components/getSortedDeployedContracts.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/cards.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/create/create-token-card.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/create/create-token-page-impl.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/create/create-token-page.client.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/create/create-token-page.stories.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/create/distribution/token-airdrop.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/create/distribution/token-distribution.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/create/distribution/token-sale.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/create/form.ts (1 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/create/launch/launch-token.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/create/page.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/create/token-info-fieldset.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/create/tracking.ts (1 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/page.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/components/ProjectSidebarLayout.tsx (3 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/connect/account-abstraction/factories/page.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/hooks/project-contracts.ts (1 hunks)
  • apps/dashboard/src/components/contract-components/contract-deploy-form/custom-contract.tsx (1 hunks)
  • apps/dashboard/src/components/contract-components/import-contract/modal.tsx (7 hunks)
  • apps/dashboard/src/components/contract-components/tables/contract-table.stories.tsx (6 hunks)
  • apps/dashboard/src/components/contract-components/tables/contract-table.tsx (6 hunks)
  • apps/dashboard/src/contract-ui/components/solidity-inputs/address-input.tsx (3 hunks)
  • apps/dashboard/src/global.css (1 hunks)
✅ Files skipped from review due to trivial changes (3)
  • apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/tokens/components/supply-layout.tsx
  • apps/dashboard/src/contract-ui/components/solidity-inputs/address-input.tsx
  • apps/dashboard/src/@/components/blocks/multi-step-status/multi-step-status.tsx
🚧 Files skipped from review as they are similar to previous changes (30)
  • apps/dashboard/src/app/(app)/account/contracts/DeployedContractsPageHeader.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/connect/account-abstraction/factories/page.tsx
  • apps/dashboard/src/global.css
  • apps/dashboard/src/app/(app)/account/contracts/_components/DeployViaCLIOrImportCard.tsx
  • apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_layout/primary-dashboard-button.tsx
  • apps/dashboard/src/components/contract-components/contract-deploy-form/custom-contract.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/hooks/project-contracts.ts
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/components/ProjectSidebarLayout.tsx
  • apps/dashboard/src/app/(app)/account/contracts/_components/DeployedContractsPage.tsx
  • apps/dashboard/src/app/(app)/account/contracts/_components/getSortedDeployedContracts.tsx
  • apps/dashboard/src/components/contract-components/tables/contract-table.stories.tsx
  • apps/dashboard/src/app/(app)/account/contracts/_components/getProjectContracts.ts
  • apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_components/claim-conditions/claim-conditions-form/index.tsx
  • apps/dashboard/src/@/components/blocks/distribution-chart.tsx
  • apps/dashboard/src/components/contract-components/tables/contract-table.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/create/page.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/create/create-token-page.stories.tsx
  • apps/dashboard/src/components/contract-components/import-contract/modal.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/cards.tsx
  • apps/dashboard/src/@/components/blocks/multi-step-status/multi-step-status.stories.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/page.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/create/create-token-card.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/create/distribution/token-sale.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/create/distribution/token-distribution.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/create/tracking.ts
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/create/launch/launch-token.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/create/token-info-fieldset.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/create/distribution/token-airdrop.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/create/create-token-page-impl.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/create/form.ts
⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: Size
  • GitHub Check: Lint Packages
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (1)
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/create/create-token-page.client.tsx (1)

31-121: LGTM: Well-structured multi-step form implementation

The overall implementation of this multi-step form is clean and well-structured. The component:

  • Manages state for the current step
  • Uses React Hook Form with Zod validation
  • Separates concerns into different form sections
  • Provides a clear interface for token creation functions

This modular approach will make the code easier to maintain and extend.

@MananTank MananTank force-pushed the 05-20-_tool-4531_dashboard_add_token_asset_creation_wizard branch from 8f7ed62 to 580efa7 Compare May 22, 2025 19:50
@vercel vercel bot temporarily deployed to Preview – wallet-ui May 22, 2025 19:50 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground May 22, 2025 19:50 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 May 22, 2025 19:50 Inactive
@vercel vercel bot temporarily deployed to Preview – login May 22, 2025 19:50 Inactive
Copy link

@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

♻️ Duplicate comments (6)
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/create/distribution/token-airdrop.tsx (3)

53-56: ⚠️ Potential issue

Improve totalAirdropSupply calculation to handle non-numeric quantities

The current implementation could result in NaN if any quantity is non-numeric, which would break the total calculation.

-  const totalAirdropSupply = airdropAddresses.reduce(
-    (acc, curr) => acc + Number(curr.quantity),
-    0,
-  );
+  const totalAirdropSupply = airdropAddresses.reduce((acc, curr) => {
+    const qty = Number(curr.quantity);
+    return acc + (Number.isFinite(qty) ? qty : 0);
+  }, 0);

193-200: 🛠️ Refactor suggestion

Add quantity validation in CSV parser

The CSV parser doesn't validate if quantities are valid numbers, which could lead to issues in calculations.

const csvParser = (items: AirdropAddressInput[]): AirdropAddressInput[] => {
  return items
    .map(({ address, quantity }) => ({
      address: (address || "").trim(),
-     quantity: (quantity || "1").trim(),
+     quantity: (quantity || "1").trim(),
+     hasInvalidQuantity: isNaN(Number((quantity || "1").trim()))
    }))
    .filter(({ address }) => address !== "");
};

430-430: 🛠️ Refactor suggestion

Add validation display for invalid quantity values

The table displays validation for invalid addresses but doesn't indicate if quantities are non-numeric.

-              <TableCell>{item.quantity}</TableCell>
+              <TableCell>
+                {!isNaN(Number(item.quantity)) ? (
+                  item.quantity
+                ) : (
+                  <div className="flex flex-row items-center gap-2">
+                    <CircleAlertIcon className="size-4 text-red-500" />
+                    <span className="font-bold text-red-500">
+                      {item.quantity}
+                    </span>
+                  </div>
+                )}
+              </TableCell>
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/create/token-info-fieldset.tsx (3)

100-110: Handle chain data load errors

The SingleNetworkSelector lacks explicit handling for loading and error states from chain data fetching.

You should update the chain selection to handle error states and provide feedback to users when chain data fails to load.

#!/bin/bash
# Check SingleNetworkSelector implementation for error handling
rg -n "export function SingleNetworkSelector" -A30 -B10 --glob "*.tsx" apps/dashboard/src/@/components

48-57: 🛠️ Refactor suggestion

Add error handling for file uploads

The FileInput component lacks explicit error handling for file uploads (size limits, format validation).

<FileInput
  accept={{ "image/*": [] }}
  value={form.watch("image")}
  setValue={(file) =>
    form.setValue("image", file, {
      shouldTouch: true,
    })
  }
+ maxSizeInBytes={5 * 1024 * 1024} // 5MB limit
+ onError={(error) => {
+   form.setError("image", { 
+     type: "manual", 
+     message: error.message 
+   });
+ }}
  className="rounded-lg border-border bg-background transition-all duration-200 hover:border-active-border hover:bg-background"
/>

176-191: 🛠️ Refactor suggestion

Add URL validation for social URLs

The social URL field should validate that the input is a properly formatted URL.

<FormField
  control={form.control}
  name={`socialUrls.${index}.url`}
  render={({ field }) => (
    <FormItem className="flex-1">
      <FormControl>
        <Input
          {...field}
          placeholder="https://..."
          aria-label="Platform URL"
+         type="url"
        />
      </FormControl>
      <FormMessage />
    </FormItem>
  )}
/>

Also ensure your form schema includes URL validation for these fields.

🧹 Nitpick comments (1)
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/create/create-token-page-impl.tsx (1)

274-304: Consider handling zero-division edge case in sale allocation

If totalSupply is 0, calculating percentages could lead to unexpected results. Consider adding a guard clause to handle this edge case.

  const salePercent = formValues.saleEnabled
    ? Number(formValues.saleAllocationPercentage)
    : 0;

  const totalSupply = Number(formValues.supply);
+ // Guard against zero supply
+ if (totalSupply <= 0) {
+   throw new Error("Total supply must be greater than zero");
+ }
  const totalSupplyWei = toUnits(totalSupply.toString(), 18);
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 8f7ed62 and 580efa7.

📒 Files selected for processing (35)
  • apps/dashboard/src/@/actions/revalidate.ts (1 hunks)
  • apps/dashboard/src/@/components/blocks/distribution-chart.tsx (1 hunks)
  • apps/dashboard/src/@/components/blocks/multi-step-status/multi-step-status.stories.tsx (1 hunks)
  • apps/dashboard/src/@/components/blocks/multi-step-status/multi-step-status.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_components/claim-conditions/claim-conditions-form/index.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_layout/primary-dashboard-button.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/tokens/components/supply-layout.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/account/contracts/DeployedContractsPageHeader.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/account/contracts/_components/DeployViaCLIOrImportCard.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/account/contracts/_components/DeployedContractsPage.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/account/contracts/_components/getProjectContracts.ts (1 hunks)
  • apps/dashboard/src/app/(app)/account/contracts/_components/getSortedDeployedContracts.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/cards.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/create/create-token-card.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/create/create-token-page-impl.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/create/create-token-page.client.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/create/create-token-page.stories.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/create/distribution/token-airdrop.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/create/distribution/token-distribution.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/create/distribution/token-sale.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/create/form.ts (1 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/create/launch/launch-token.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/create/page.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/create/token-info-fieldset.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/create/tracking.ts (1 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/page.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/components/ProjectSidebarLayout.tsx (3 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/connect/account-abstraction/factories/page.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/hooks/project-contracts.ts (1 hunks)
  • apps/dashboard/src/components/contract-components/contract-deploy-form/custom-contract.tsx (1 hunks)
  • apps/dashboard/src/components/contract-components/import-contract/modal.tsx (7 hunks)
  • apps/dashboard/src/components/contract-components/tables/contract-table.stories.tsx (6 hunks)
  • apps/dashboard/src/components/contract-components/tables/contract-table.tsx (6 hunks)
  • apps/dashboard/src/contract-ui/components/solidity-inputs/address-input.tsx (3 hunks)
  • apps/dashboard/src/global.css (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • apps/dashboard/src/@/components/blocks/multi-step-status/multi-step-status.tsx
🚧 Files skipped from review as they are similar to previous changes (31)
  • apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/tokens/components/supply-layout.tsx
  • apps/dashboard/src/app/(app)/account/contracts/_components/DeployViaCLIOrImportCard.tsx
  • apps/dashboard/src/app/(app)/account/contracts/DeployedContractsPageHeader.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/connect/account-abstraction/factories/page.tsx
  • apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_layout/primary-dashboard-button.tsx
  • apps/dashboard/src/app/(app)/account/contracts/_components/DeployedContractsPage.tsx
  • apps/dashboard/src/global.css
  • apps/dashboard/src/@/actions/revalidate.ts
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/hooks/project-contracts.ts
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/components/ProjectSidebarLayout.tsx
  • apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_components/claim-conditions/claim-conditions-form/index.tsx
  • apps/dashboard/src/app/(app)/account/contracts/_components/getProjectContracts.ts
  • apps/dashboard/src/components/contract-components/contract-deploy-form/custom-contract.tsx
  • apps/dashboard/src/components/contract-components/tables/contract-table.stories.tsx
  • apps/dashboard/src/@/components/blocks/multi-step-status/multi-step-status.stories.tsx
  • apps/dashboard/src/app/(app)/account/contracts/_components/getSortedDeployedContracts.tsx
  • apps/dashboard/src/@/components/blocks/distribution-chart.tsx
  • apps/dashboard/src/components/contract-components/tables/contract-table.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/create/create-token-page.stories.tsx
  • apps/dashboard/src/contract-ui/components/solidity-inputs/address-input.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/create/page.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/create/create-token-page.client.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/create/create-token-card.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/create/distribution/token-sale.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/create/launch/launch-token.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/cards.tsx
  • apps/dashboard/src/components/contract-components/import-contract/modal.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/create/distribution/token-distribution.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/create/tracking.ts
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/page.tsx
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/create/form.ts
🧰 Additional context used
🧠 Learnings (1)
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/create/create-token-page-impl.tsx (2)
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:160-165
Timestamp: 2025-05-20T19:03:35.954Z
Learning: The `claimTo` function in Thirdweb's ERC20 extension does not require converting the quantity to the smallest units (using toUnits) as it handles unit conversion internally or works with the units as provided.
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.
🧬 Code Graph Analysis (1)
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/create/create-token-page-impl.tsx (8)
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/hooks/project-contracts.ts (1)
  • useAddContractToProject (6-47)
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/create/form.ts (1)
  • CreateAssetFormValues (93-94)
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/create/tracking.ts (2)
  • getTokenDeploymentTrackingData (1-14)
  • getTokenStepTrackingData (17-29)
apps/dashboard/src/lib/defineDashboardChain.ts (1)
  • defineDashboardChain (6-20)
apps/dashboard/src/constants/addresses.ts (2)
  • DEFAULT_FEE_BPS_NEW (11-11)
  • DEFAULT_FEE_RECIPIENT (7-8)
packages/thirdweb/src/exports/thirdweb.ts (2)
  • getContract (69-69)
  • sendAndConfirmTransaction (140-140)
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/create/create-token-page.client.tsx (1)
  • CreateTokenAssetPageUI (31-121)
apps/dashboard/src/@/actions/revalidate.ts (1)
  • revalidatePathAction (5-10)
⏰ Context from checks skipped due to timeout of 90000ms (5)
  • GitHub Check: Unit Tests
  • GitHub Check: E2E Tests (pnpm, webpack)
  • GitHub Check: Size
  • GitHub Check: Lint Packages
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (4)
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/create/create-token-page-impl.tsx (4)

46-116: Well-structured token deployment function with good error handling

The deployContract function properly handles wallet connection checks, tracks deployment attempts through analytics, processes user inputs, and includes thorough error handling with the try/catch pattern.


149-162: Correctly implementing batch token transfer

The implementation correctly uses the transferBatch function without explicitly converting quantities to smallest units, as confirmed by the retrieved learnings that the function handles unit conversion internally.


220-231: Token minting implementation follows correct pattern

Based on the retrieved learnings, the claimTo function correctly handles the token quantity without needing explicit conversion to the smallest units.


348-353: Path revalidation ensures UI consistency after token launch

Good use of revalidatePathAction to refresh the assets page after successful token launch, ensuring the UI stays in sync with backend state.

@MananTank MananTank force-pushed the 05-20-_tool-4531_dashboard_add_token_asset_creation_wizard branch from 580efa7 to 5b55a2b Compare May 22, 2025 20:08
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground May 22, 2025 20:08 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 May 22, 2025 20:08 Inactive
@vercel vercel bot temporarily deployed to Preview – login May 22, 2025 20:08 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui May 22, 2025 20:08 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.

2 participants