Skip to content

fix: api endpoint and logo#2916

Open
AGMASO wants to merge 2 commits intomainfrom
fix/gho-incentives-campaign
Open

fix: api endpoint and logo#2916
AGMASO wants to merge 2 commits intomainfrom
fix/gho-incentives-campaign

Conversation

@AGMASO
Copy link
Collaborator

@AGMASO AGMASO commented Mar 22, 2026

General Changes

  • Add a rule to avoid displaying the APY value next to the badge

  • Revert to the original endpoint

  • Fix the logo for GHO supply rewards

Developer Notes

Add any notes here that may be helpful for reviewers.
Before:
Screenshot 2026-03-22 at 12 24 16 PM
Now:
Screenshot 2026-03-22 at 12 25 25 PM


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)

Copilot AI review requested due to automatic review settings March 22, 2026 11:03
@vercel
Copy link

vercel bot commented Mar 22, 2026

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

Project Deployment Actions Updated (UTC)
interface Ready Ready Preview, Comment Mar 22, 2026 11:24am

Request Review

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR restores the Merkl opportunities API host used by the incentives hooks and updates the incentives symbol-to-icon mapping so GHO supply rewards render with the correct token icon.

Changes:

  • Switch Merkl opportunities endpoints back to https://api.merkl.xyz for both Aave and Ink/tydro queries.
  • Add a new IncentivesSymbolMap entry for aPlaGHO so it displays as aGHO with the GHO icon.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
src/hooks/useMerklPointsIncentives.ts Updates the hardcoded Ink/tydro Merkl API endpoint host.
src/hooks/useMerklIncentives.ts Updates the hardcoded Aave Merkl API endpoint host.
src/components/incentives/IncentivesTooltipContent.tsx Adds a symbol/icon mapping for aPlaGHO to fix GHO reward icon display.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 146 to 148
const MERKL_ENDPOINT =
'https://api-merkl.angle.money/v4/opportunities?mainProtocolId=aave&items=100&status=LIVE'; // Merkl API
'https://api.merkl.xyz/v4/opportunities?mainProtocolId=aave&items=100&status=LIVE'; // Merkl API
const WHITELIST_ENDPOINT = 'https://apps.aavechan.com/api/aave/merkl/whitelist-token-list'; // Endpoint to fetch whitelisted tokens
Copy link

Copilot AI Mar 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

useMerklIncentives fetches a third-party API but does not check response.ok before calling response.json(). If Merkl returns a non-2xx (rate limit, outage, HTML error page), this will throw a less actionable JSON parse error and can result in noisy retries/cached errors. Add an explicit response.ok guard and throw a descriptive error (include status / endpoint) similar to the whitelist fetch in this file.

Copilot uses AI. Check for mistakes.
Comment on lines 33 to 35
const MERKL_TYDRO_ENDPOINT =
'https://api-merkl.angle.money/v4/opportunities?mainProtocolId=tydro&chainName=ink&items=100&status=LIVE'; // Merkl API
'https://api.merkl.xyz/v4/opportunities?mainProtocolId=tydro&chainName=ink&items=100&status=LIVE'; // Merkl API

Copy link

Copilot AI Mar 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

useMerklPointsIncentives does not validate the Merkl API response before parsing JSON. A non-2xx response (temporary outage / rate limit) will currently surface as an unhelpful JSON parse error. Add a response.ok check (and ideally a descriptive thrown error) before response.json() to make failures debuggable and avoid confusing UI states.

Copilot uses AI. Check for mistakes.
@github-actions
Copy link

@github-actions
Copy link

📦 Next.js Bundle Analysis for aave-ui

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

🎉 Global Bundle Size Decreased

Page Size (compressed)
global 1.15 MB (-1 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
/ 65.48 KB (🟡 +51 B) 1.21 MB
/dashboard 55.3 KB (🟡 +51 B) 1.2 MB
/markets 40.32 KB (🟡 +51 B) 1.19 MB
/safety-module 29.68 KB (🟢 -5 B) 1.18 MB
/sgho 88.09 KB (-5 B) 1.24 MB
/v3-migration 36.68 KB (🟡 +48 B) 1.19 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.

2 participants