Skip to content

fix: use correct solv token #694

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sdk/src/gateway/strategy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ const tokensPointsIncentives: Map<string, PointsIncentive[]> = new Map([
],
[
// Solv (xSolvBTC)
'0x0bef2a8b771e37763c1ce02a88f404c6b2573843',
'0xCC0966D8418d412c599A6421b760a847eB169A8c',
[solvPoints, babylonPoints],
],
Comment on lines 93 to 96
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

⚠️ Potential issue

Mixed-case key breaks lookup

getTokensIncentives() lower-cases the incoming token address (line 191).
Because this new map key is mixed-case, the lookup will fail and xSolvBTC will no longer receive its incentives.

-        '0xCC0966D8418d412c599A6421b760a847eB169A8c',
+        '0xcc0966d8418d412c599a6421b760a847eb169a8c',

Make all keys lowercase (or normalise on insertion) to keep behaviour consistent.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
// Solv (xSolvBTC)
'0x0bef2a8b771e37763c1ce02a88f404c6b2573843',
'0xCC0966D8418d412c599A6421b760a847eB169A8c',
[solvPoints, babylonPoints],
],
// Solv (xSolvBTC)
'0xcc0966d8418d412c599a6421b760a847eb169a8c',
[solvPoints, babylonPoints],
],
🤖 Prompt for AI Agents
In sdk/src/gateway/strategy.ts around lines 93 to 96, the token address key for
xSolvBTC is mixed-case, but getTokensIncentives() lowercases addresses before
lookup, causing a mismatch and failed incentive retrieval. Fix this by
converting the token address key to lowercase when inserting it into the map to
ensure consistent case normalization and successful lookups.

[
Expand Down
Loading