Skip to content

Use dynamic token in grant application wallet helper text#1309

Open
pratik-cmyk wants to merge 1 commit intostagingfrom
codex/locate-instances-of-usdc-in-grants-page
Open

Use dynamic token in grant application wallet helper text#1309
pratik-cmyk wants to merge 1 commit intostagingfrom
codex/locate-instances-of-usdc-in-grants-page

Conversation

@pratik-cmyk
Copy link
Contributor

@pratik-cmyk pratik-cmyk commented Jan 30, 2026

Motivation

  • Replace the hardcoded stablecoin hint so the wallet helper text reflects the grant's actual payout token.

Description

  • Add tokenLabel = token ?? 'token' and use it in the wallet helper span inside ApplicationModal.tsx instead of the hardcoded USDT/USDC copy.
  • Update the helper copy to interpolate {tokenLabel} for superteam sponsors.
  • Leave the existing validation fallback (token || 'USDC') in the dynamic resolver to preserve prior validation behavior.

Testing

  • Ran pnpm lint, which completed successfully.
  • Started the dev server with pnpm dev --port 3000, which launched Next.js but requests to /earn/grants returned a 500 due to a missing environment variable (NEXT_PUBLIC_RPC_WS_URL).
  • Attempted an automated Playwright screenshot of the application modal, which failed due to the page timing out from the same runtime error.

Codex Task

Summary by CodeRabbit

  • New Features
    • Enhanced wallet address validation messaging to dynamically display which token is required, improving clarity for users when accepting multiple token types in grant applications.

✏️ Tip: You can customize this high-level summary in your review settings.

@vercel
Copy link

vercel bot commented Jan 30, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
earn Ready Ready Preview Jan 30, 2026 8:39am

Request Review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 30, 2026

Walkthrough

A single file was updated to dynamically generate a wallet address description label based on the grant's token. A tokenLabel constant replaces hardcoded text mentioning specific tokens with a template string that accepts any token value, defaulting to 'token' when absent.

Changes

Cohort / File(s) Summary
Token Label Dynamization
src/features/grants/components/Modals/ApplicationModal.tsx
Introduced tokenLabel constant derived from grant.token (with fallback to 'token') and replaced hardcoded wallet address description with a dynamic template string using the token label.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 A token by any name, now flows so free,
Dynamic labels dance where hardcodes used to be,
USDT, USDC, or just 'token' plain,
One little variable, clear and maintainable—
Hopping forward with clarity's reign! 🌟

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: dynamically using the grant token in the wallet helper text instead of hardcoded values.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch codex/locate-instances-of-usdc-in-grants-page

Tip

🧪 Unit Test Generation v2 is now available!

We have significantly improved our unit test generation capabilities.

To enable: Add this to your .coderabbit.yaml configuration:

reviews:
  finishing_touches:
    unit_tests:
      enabled: true

Try it out by using the @coderabbitai generate unit tests command on your code files or under ✨ Finishing Touches on the walkthrough!

Have feedback? Share your thoughts on our Discord thread!


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants