Skip to content

Commit

Permalink
fix: L2 farming do not skip campaign 0
Browse files Browse the repository at this point in the history
  • Loading branch information
asyx21 committed Dec 6, 2023
1 parent 90689f8 commit 7620c04
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/adaptors/smardex/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ const getFarmsWithRewards = async (
abi: farmingRangeABI.find(({ name }) => name === 'campaignInfo'),
chain: chainString,
calls: [...Array.from(Array(parseInt(campaignInfoLen, 10)).keys())]
.slice(1)
.slice(STAKING_ADDRESS ? 1 : 0)
.map((campaignId) => ({
target: FARMING_RANGE_ADDRESS,
params: [campaignId],
Expand All @@ -134,7 +134,7 @@ const getFarmsWithRewards = async (
abi: farmingRangeABI.find(({ name }) => name === 'rewardInfoLen'),
chain: chainString,
calls: [...Array.from(Array(parseInt(campaignInfoLen, 10)).keys())]
.slice(1)
.slice(STAKING_ADDRESS ? 1 : 0)
.map((campaignId) => ({
target: FARMING_RANGE_ADDRESS,
params: [campaignId],
Expand Down

0 comments on commit 7620c04

Please sign in to comment.