fix: preserve wallet context for email-style wallet IDs (#1795)#1815
Open
DukeDeSouth wants to merge 1 commit intoGreenstand:mainfrom
Open
fix: preserve wallet context for email-style wallet IDs (#1795)#1815DukeDeSouth wants to merge 1 commit intoGreenstand:mainfrom
DukeDeSouth wants to merge 1 commit intoGreenstand:mainfrom
Conversation
) Update URL regex patterns in pathResolver.js and next.config.js rewrites to support wallet IDs containing special characters like dots and @ signs (e.g. email addresses). The previous [a-z0-9-]+ character class didn't match these characters, causing wallet context to be lost when clicking tokens on the map. Also fix null safety issue in getContext() that could crash when URL doesn't match any known pattern, and remove unreachable dead code. Co-authored-by: Cursor <cursoragent@cursor.com>
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.
When you pick a wallet with an email-style name like max.anders@plantamiarbol.com and click a tree on the map, the app was losing track of which wallet you were looking at and showing every token instead of just that wallet's tokens. Turns out the URL matching code only expected simple IDs with letters, numbers, and dashes — dots and @ signs weren't covered. Fixed the regex patterns in the path resolver and the Next.js rewrites so they handle any valid URL characters, also cleaned up a potential crash in getContext when it hit an unknown URL.
Made with Cursor