Add NEXT_PUBLIC_CHAIN environment variable for easy chain selection#1357
Add NEXT_PUBLIC_CHAIN environment variable for easy chain selection#1357devin-ai-integration[bot] wants to merge 2 commits intomainfrom
Conversation
- Add NEXT_PUBLIC_CHAIN to .env.template with 'solana' default - Replace hardcoded 'solana' references in providers.tsx with defaultChain variable - Update README.md with chain selection instructions - Fix TypeScript errors in home.tsx and balance.tsx by using wallet type detection - Maintain backward compatibility with 'solana' as default chain Co-Authored-By: Agus <agustin@paella.dev>
Original prompt from Agus |
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
|
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
- Consolidate multi-line div element to single line as required by Biome formatter Co-Authored-By: Agus <agustin@paella.dev>
Description
Added a
NEXT_PUBLIC_CHAINenvironment variable to the wallets-quickstart application to allow users to easily switch between supported blockchains (Solana, Stellar, or EVM chains like optimism-sepolia) without modifying code. This addresses the DevRel request to make chain selection more accessible for developers.Key changes:
NEXT_PUBLIC_CHAINto.env.templatewith "solana" as default for backward compatibilityproviders.tsxwith dynamicdefaultChainvariabletypeproperty for chain detectionThe environment variable serves as a default that can still be overridden by URL parameters for testing different configurations.
Link to Devin run: https://app.devin.ai/sessions/34838c568754483da9e6611ad0082242
Requested by: Agus (agustin@paella.dev)
Test plan
Changes verified:
Requires manual testing:
NEXT_PUBLIC_CHAINvalues (solana, stellar, optimism-sepolia)?chain=optimism-sepolia)Package updates
No package dependencies were added or updated.
Human Review Checklist
High Priority:
NEXT_PUBLIC_CHAIN=optimism-sepoliaand verify EVM wallet creationNEXT_PUBLIC_CHAIN=stellarand verify Stellar wallet creationlocalhost:3000?chain=optimism-sepoliabalance.tsx- these work around type issues with wallet.balances() methodMedium Priority:
typeproperty instead ofchainLow Priority: