Skip to content

fix: remove duplicate imports, params, and dead code in rewards.ts - #468

Merged
DeFiVC merged 1 commit into
ChainLearnOfficial:mainfrom
joelpeace48-cell:fix/issues-425-371-361-360
Sep 27, 2026
Merged

DeFiVC merged 1 commit into
ChainLearnOfficial:mainfrom
joelpeace48-cell:fix/issues-425-371-361-360

Conversation

@joelpeace48-cell

Copy link
Copy Markdown
Contributor

Summary

src/lib/api/rewards.ts failed to compile:

  • Duplicate PaginatedResponse import (lines 3 and 5)
  • getRewardHistory declared two parameters named params, shadowing the first with an unused GetRewardHistoryParams type
  • An incomplete apiClient.get call (unclosed paren) followed by a second, complete implementation
  • GetRewardHistoryParams was dead — grep confirms the only real caller (src/lib/hooks/use-rewards.ts) uses getRewardHistory(historyParams, jwt, signal) against the RewardHistoryParams interface

Fix: removed the duplicate import, the dead GetRewardHistoryParams interface, the shadowed parameter, and the incomplete code block — keeping the single working implementation that matches the real call site's argument order and the exported RewardHistoryParams type.

Closes #425
Closes #371
Closes #361
Closes #360

@drips-wave

drips-wave Bot commented Sep 27, 2026

Copy link
Copy Markdown

@joelpeace48-cell Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@netlify

netlify Bot commented Sep 27, 2026 •

Copy link
Copy Markdown

❌ Deploy Preview for chainlearn failed.

Name Link
🔨 Latest commit fd875c6
🔍 Latest deploy log https://app.netlify.com/projects/chainlearn/deploys/6ab8cd961607f3000830c3cd

@DeFiVC
DeFiVC merged commit dc72415 into ChainLearnOfficial:main Sep 27, 2026
0 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants