Skip to content

feat: add link to Avalanche V4 instance in market switcher - #3087

Open
sammdec wants to merge 1 commit into
mainfrom
samm/aavev3-164-add-link-to-avalanche-v4-instance
Open

feat: add link to Avalanche V4 instance in market switcher#3087
sammdec wants to merge 1 commit into
mainfrom
samm/aavev3-164-add-link-to-avalanche-v4-instance

Conversation

@sammdec

@sammdec sammdec commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Closes AAVEV3-164

General Changes

  • 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 each additional V4 instance is one line of config rather than another ~80 lines of JSX.
  • Fixes search for these rows. They were rendered outside the query filter, so searching prime showed Aave Pro (no match), and searching aave pro hid 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.
  • Clicks now fire DASHBOARD.CHANGE_MARKET with 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 single url change in V4_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 TopBarNotify banner still reads "Aave V4 is now live on Ethereum mainnet."

Verified locally against a dev build:

  • Avalanche V4 row renders in L1 Networks with the Avalanche icon, V4 pill and external-link icon
  • Clicking it opens https://pro.aave.com/ in a new tab
  • Search avalanche → Avalanche + Avalanche V4; gnosis → Gnosis only; aave pro → Aave Pro (previously returned nothing)
  • tsc --noEmit and pnpm lint clean

Reviewer 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.

  • End-to-end tests are passing without any errors
  • Code changes do not significantly increase the application bundle size
  • If there are new 3rd-party packages, they do not introduce potential security threats
  • If there are new environment variables being added, they have been added to the .env.example file as well as the pertinant .github/actions/* files
  • There are no CI changes, or they have been approved by the DevOps and Engineering team(s)

🤖 Generated with Claude Code

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>
@linear-code

linear-code Bot commented Aug 6, 2026

Copy link
Copy Markdown

AAVEV3-164

@odin-by-borg

odin-by-borg Bot commented Aug 6, 2026

Copy link
Copy Markdown

Mjolnir Security Review

VerdictCLEAN · 0 findings
Commit2b05dc2 · 27s

No security vulnerabilities identified in the reviewed changes. The PR refactors a hardcoded external link (Aave Pro) into a generic V4_LINKS array supporting multiple V4 market links in the MarketSwitcher UI component. All URLs, labels, and logo paths are compile-time constants with no user-controlled input. The window.open calls use only hardcoded URLs, and label rendering uses React's built-in text escaping. Locale file changes simply remove an unused translation key. No security-sensitive sinks (redirects, injections, auth checks) are affected.

View in Odin


9 PRs reviewed

@vercel

vercel Bot commented Aug 6, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
interface Ready Ready Preview Aug 6, 2026 11:53am

Request Review

@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown

@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown

📦 Next.js Bundle Analysis for aave-ui

This analysis was generated by the Next.js Bundle Analysis action. 🤖

⚠️ Global Bundle Size Increased

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.

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