-
Notifications
You must be signed in to change notification settings - Fork 163
feat: add ENS forward resolution for referrer parameter #1089
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
storywithoutend
wants to merge
13
commits into
main
Choose a base branch
from
feature/fet-2614-add-reverse-resolving-to-referrer-paramter
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
feat: add ENS forward resolution for referrer parameter #1089
storywithoutend
wants to merge
13
commits into
main
from
feature/fet-2614-add-reverse-resolving-to-referrer-paramter
+1,927
−27
Conversation
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
- Resolves ENS names to addresses (address record → owner fallback) - Converts resolved addresses to 32-byte hex format - Handles invalid names and resolution errors gracefully
- React hook wrapping resolveReferrerToHex utility - Uses React Query for caching with 5min stale time - Returns loading/error states for UI integration
- Use useResolvedReferrer hook to resolve ENS names - Add loading state for referrer resolution - Remove direct use of getReferrerHex utility 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
- Use useResolvedReferrer to resolve ENS names to addresses - Update registration reducer with resolved hex value - Automatic resolution on component mount and when referrer changes
- Replace getReferrerHex with useResolvedReferrer hook - Add loading state (disabled button while resolving) - Use referrerHex ?? undefined pattern for null to undefined conversion - Follows same pattern as ExtendNames flow 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
- Documents the complete implementation plan for referrer parameter enhancement - Includes detailed steps for adding forward resolution (ENS name → address) - Resolution flow: address record → owner fallback → 32-byte hex conversion
|
No dependency changes detected. Learn more about Socket for GitHub. 👍 No dependency changes detected in pull request |
Deploying ens-app-v3 with
|
| Latest commit: |
a5c3f91
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://f79624e2.ens-app-v3.pages.dev |
| Branch Preview URL: | https://feature-fet-2614-add-reverse.ens-app-v3.pages.dev |
Base automatically changed from
feature/fet-2425-update-manager-app-for-ens-contracts160
to
main
November 29, 2025 09:44
…tate Move setReferrer dispatch from useEffect to pricingCallback to ensure referrer is set synchronously when user proceeds. Add isLoading prop to Pricing component to disable continue button while referrer is resolving. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Add DesyncedMessage.test.tsx with tests for button disabled state during referrer resolution and referrer passed to transaction - Add Pricing.test.tsx test for isLoading prop showing loading button - Add useResolvedReferrer.test.tsx test for hex address pass-through - Rename referrerParam to referrer and referrerHex to resolvedReferrer across all components for clarity - Remove debug console.logs from useResolvedReferrer and ExtendNames - Simplify resolveReferrer to only use getAddressRecord (remove getOwner) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
Move ENS name resolution logic from utility function into useResolvedReferrer hook to follow React Query semantics. Add loading indicators to buttons in ExtendNames, DesyncedMessage, and Pricing flows while referrer resolves. - Remove resolveReferrer utility, keep only getReferrerHex - Inline resolution logic in hook's query function - Show loading spinner on buttons during referrer resolution - Update tests to mock getAddressRecord directly 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
…ation - Use ExtendNamesModal page object instead of unreliable button selectors - Fix success message case sensitivity (Extend names not Extend Names) - Add wait for button to be enabled when resolving ENS name referrers - Add isValidEnsName check before attempting ENS resolution - Add ensValidation utility with normalize from viem/ens - Update tests to follow existing patterns and handle async resolution 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
Add ReferrerNotifications component that displays a toast when resolvedReferrer errors (e.g., invalid ENS name or address). The toast shows only once per referrer value to avoid spamming the user. - Create ReferrerNotifications component with show-once logic using useRef - Add unit tests for error display and show-once behavior - Add e2e tests for referrer error scenarios - Add translation key for referrer error title - Mount component in _app.tsx 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
|
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.



Summary
Enables the referrer parameter to accept ENS names and automatically resolve them to addresses using forward resolution.
Changes
resolveReferrerToHexutility function with ENS forward resolution (address record → owner fallback)useResolvedReferrerReact hook with React Query caching (5min stale time)Resolution Flow
referrer=vitalik.eth(ENS name)getAddressRecord('vitalik.eth')→ if exists, use addressgetOwner('vitalik.eth')→ use owner/registrant0x000...000<address>Test Coverage
resolveReferrerToHexutilityuseResolvedReferrerhookFiles Changed
src/utils/referrer.tssrc/hooks/useResolvedReferrer.tsBackward Compatibility
✅ Hex addresses still work as before (passthrough)
✅ Failed resolution doesn't block user flows (graceful degradation)
✅ Optional parameter - transactions proceed without referrer if resolution fails
🤖 Generated with Claude Code