Fix/farcaster miniapp environment detection#368
Merged
GigaHierz merged 4 commits intoJun 1, 2026
Merged
Conversation
GigaHierz
approved these changes
Jun 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix Farcaster Miniapp Environment Detection and Browser Compatibility Issues
Problem Summary
The Farcaster miniapp template had some issues when running in non-mini app browser environments:
Before Fix Issues:
Solution Overview
Visual Changes
Before Fix:
❌ Shows "You are signed in!" even in regular browser
❌ Wallet status stuck on "Connecting..." indefinitely
❌ Displays hardcoded wallet address 0x1e4B...605B
❌ No distinction between environments
After Fix:
✅ Shows "You are not signed in" in regular browser
✅ Shows "You are signed in!" only when actually authenticated
✅ Wallet status shows "Not Connected" with "No wallet connected"
✅ Proper environment detection and state management
Testing
✅ Template Generation: Successfully created test project with --template farcaster-miniapp
✅ TypeScript Compilation: No type errors in generated code
✅ Environment Detection: Correctly identifies Farcaster miniapp vs browser
✅ State Management: Proper wallet and authentication status handling
✅ Cross-Environment: Works in both Farcaster miniapp and regular browser
Files Changed