Skip to content

fix: preserve wallet context for email-style wallet IDs (#1795)#1815

Open
DukeDeSouth wants to merge 1 commit intoGreenstand:mainfrom
DukeDeSouth:fix/1795-wallet-context-email-ids
Open

fix: preserve wallet context for email-style wallet IDs (#1795)#1815
DukeDeSouth wants to merge 1 commit intoGreenstand:mainfrom
DukeDeSouth:fix/1795-wallet-context-email-ids

Conversation

@DukeDeSouth
Copy link

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

)

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant