Skip to content

Comments

fix: normalize Ethereum addresses for case-insensitive comparison in Merkl incentives#2877

Merged
AGMASO merged 2 commits intofeat/blacklist-ink-campaignfrom
copilot/sub-pr-2875-again
Feb 16, 2026
Merged

fix: normalize Ethereum addresses for case-insensitive comparison in Merkl incentives#2877
AGMASO merged 2 commits intofeat/blacklist-ink-campaignfrom
copilot/sub-pr-2875-again

Conversation

Copy link
Contributor

Copilot AI commented Feb 16, 2026

General Changes

  • Fixes case-sensitivity bug in address comparison that caused reward lookups to fail when API returns addresses in different casing

Developer Notes

Ethereum addresses can be lowercase, uppercase, or EIP-55 checksummed. The Merkl API may return addresses in any format, breaking direct string .includes() checks.

Changes:

  • Normalize INK_POINT_TOKEN_ADDRESSES constant to lowercase at definition
  • Add .toLowerCase() to all incoming address comparisons (3 locations: filter, find, validation check)

Before:

const INK_POINT_TOKEN_ADDRESSES = ['0x40aBd730Cc9dA34a8EE9823fEaBDBa35E50c4ac7'];
INK_POINT_TOKEN_ADDRESSES.includes(breakdown.token.address) // Fails if API returns different casing

After:

const INK_POINT_TOKEN_ADDRESSES = ['0x40aBd730Cc9dA34a8EE9823fEaBDBa35E50c4ac7'.toLowerCase()];
INK_POINT_TOKEN_ADDRESSES.includes(breakdown.token.address.toLowerCase()) // Always works

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)

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@vercel
Copy link

vercel bot commented Feb 16, 2026

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

Project Deployment Actions Updated (UTC)
interface Ready Ready Preview, Comment Feb 16, 2026 11:27am

Request Review

Co-authored-by: AGMASO <95312462+AGMASO@users.noreply.github.com>
Copilot AI changed the title [WIP] Update to address feedback on API inconsistency fix: normalize Ethereum addresses for case-insensitive comparison in Merkl incentives Feb 16, 2026
Copilot AI requested a review from AGMASO February 16, 2026 11:24
@AGMASO AGMASO marked this pull request as ready for review February 16, 2026 11:28
@AGMASO AGMASO merged commit a8646a6 into feat/blacklist-ink-campaign Feb 16, 2026
2 checks passed
@AGMASO AGMASO deleted the copilot/sub-pr-2875-again branch February 16, 2026 11:28
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