-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Address comparation bug #10912
base: develop
Are you sure you want to change the base?
fix: Address comparation bug #10912
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
@@ -38,7 +38,9 @@ export const getAllGauges = async ( | |||
if (!killed) allActiveGaugeInfos = allActiveGaugeInfos.filter((gauge) => !gauge.killed) | |||
|
|||
const allGaugeInfoConfigs = allActiveGaugeInfos.reduce((prev, gauge) => { | |||
const filters = presets.filter((p) => p.address === gauge.pairAddress && Number(p.chainId) === gauge.chainId) | |||
const filters = presets.filter( | |||
(p) => p.address.toLowerCase() === gauge.pairAddress.toLowerCase() && Number(p.chainId) === gauge.chainId, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use isAddressEqual from utils
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@chef-ryan @chefjackson I have done it for web package #10916 please review
PR-Codex overview
This PR focuses on improving the filter logic in the
getAllGauges.ts
file by ensuring case-insensitive comparison forgauge.pairAddress
.Detailed summary
filters
definition to usetoLowerCase()
forgauge.pairAddress
andp.address
to ensure case-insensitive matching.filter
function for better readability by spreading it across multiple lines.