feat: add link to Avalanche V4 instance in market switcher - #3087
Conversation
Adds an "Avalanche" entry with a V4 pill to the L1 Networks section of the market switcher, linking out to pro.aave.com. Generalises the hardcoded Aave Pro link into a V4_LINKS list plus a single renderV4Link helper, so V4 instances are one line of config each. Also fixes the search box for these rows: they were rendered outside the query filter, so searching "prime" showed Aave Pro while searching "aave pro" hid the whole Ethereum section and made it unreachable. V4 links are now filtered by the same query as real markets, and count towards the no-results check. Clicks fire DASHBOARD.CHANGE_MARKET so V4 referral traffic is measurable; previously the Aave Pro link tracked nothing. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Mjolnir Security Review
9 PRs reviewed |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
📦 Next.js Bundle Analysis for aave-uiThis analysis was generated by the Next.js Bundle Analysis action. 🤖
|
| Page | Size (compressed) |
|---|---|
global |
1.32 MB (🟡 +108 B) |
Details
The global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster.
Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis
If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!
Six Pages Changed Size
The following pages changed size from the code in this PR compared to its base branch:
| Page | Size (compressed) | First Load |
|---|---|---|
/ |
96.01 KB (🟡 +2 B) |
1.42 MB |
/dashboard |
85.59 KB (🟡 +2 B) |
1.41 MB |
/markets |
54.89 KB (🟡 +2 B) |
1.38 MB |
/safety-module |
56.45 KB (🟡 +2 B) |
1.38 MB |
/sgho |
92.99 KB (🟡 +2 B) |
1.41 MB |
/v3-migration |
52.64 KB (🟡 +2 B) |
1.37 MB |
Details
Only the gzipped size is provided here based on an expert tip.
First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.
Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis
Next to the size is how much the size has increased or decreased compared with the base branch of this PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this.
Closes AAVEV3-164
General Changes
pro.aave.com.V4_LINKSlist plus a singlerenderV4Linkhelper, so each additional V4 instance is one line of config rather than another ~80 lines of JSX.primeshowed Aave Pro (no match), and searchingaave prohid the whole Ethereum section — making the one row actually called "Aave Pro" unreachable by search. V4 links now go through the same query filter as real markets and count towards the no-results check.DASHBOARD.CHANGE_MARKETwith the link id, so V4 referral traffic from the v3 app is measurable. The Aave Pro link tracked nothing previously.Developer Notes
Both links point at
https://pro.aave.com/root — the V4 app handles chain selection itself, so there is no Avalanche-specific deep link to use yet. When one exists, it is a singleurlchange inV4_LINKS.The
<Trans>Aave Pro</Trans>wrapper is gone since the label is now data-driven. These are proper nouns and real market names (marketNaming.name) are not translated either, so this is consistent — the pre-commit i18n extract dropped the string from the catalogs accordingly.Out of scope: the Avalanche
TopBarNotifybanner still reads "Aave V4 is now live on Ethereum mainnet."Verified locally against a dev build:
https://pro.aave.com/in a new tabavalanche→ Avalanche + Avalanche V4;gnosis→ Gnosis only;aave pro→ Aave Pro (previously returned nothing)tsc --noEmitandpnpm lintcleanReviewer Checklist
Please ensure you, as the reviewer(s), have gone through this checklist to ensure that the code changes are ready to ship safely and to help mitigate any downstream issues that may occur.
.env.examplefile as well as the pertinant.github/actions/*files🤖 Generated with Claude Code