Skip to content

Commit

Permalink
fix: rename asset for rewardedAsset
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinGbz committed Jan 6, 2025
1 parent e6a1350 commit f2dad18
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/components/incentives/IncentivesButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export const MeritIncentivesButton = (params: {

export const ZkIgniteIncentivesButton = (params: {
market: string;
asset?: string;
rewardedAsset?: string;
protocolAction?: ProtocolAction;
}) => {
const [open, setOpen] = useState(false);
Expand Down
6 changes: 5 additions & 1 deletion src/components/incentives/IncentivesCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,11 @@ export const IncentivesCard = ({
>
<IncentivesButton incentives={incentives} symbol={symbol} />
<MeritIncentivesButton symbol={symbol} market={market} protocolAction={protocolAction} />
<ZkIgniteIncentivesButton market={market} asset={address} protocolAction={protocolAction} />
<ZkIgniteIncentivesButton
market={market}
rewardedAsset={address}
protocolAction={protocolAction}
/>
</Box>
</Box>
);
Expand Down
8 changes: 4 additions & 4 deletions src/hooks/useZkSyncIgniteIncentives.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@ const checkOpportunityAction = (

export const useZkSyncIgniteIncentives = ({
market,
asset,
rewardedAsset,
protocolAction,
}: {
market: string;
asset?: string;
rewardedAsset?: string;
protocolAction?: ProtocolAction;
}) => {
return useQuery({
Expand All @@ -92,8 +92,8 @@ export const useZkSyncIgniteIncentives = ({
select: (merklOpportunities) => {
const opportunities = merklOpportunities.filter(
(opportunitiy) =>
asset &&
opportunitiy.identifier.toLowerCase() === asset.toLowerCase() &&
rewardedAsset &&
opportunitiy.identifier.toLowerCase() === rewardedAsset.toLowerCase() &&
protocolAction &&
checkOpportunityAction(opportunitiy.action, protocolAction)
);
Expand Down

0 comments on commit f2dad18

Please sign in to comment.