Skip to content

Commit

Permalink
feat: mask Merit campaign when aprs are not found (#2270)
Browse files Browse the repository at this point in the history
  • Loading branch information
NandyBa authored Dec 9, 2024
1 parent 5643cad commit 3364b1a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/hooks/useMeritIncentives.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export enum MeritAction {
type MeritIncentives = {
totalAPR: number;
actionsAPR: {
[key in MeritAction]: number;
[key in MeritAction]: number | null | undefined;
};
};

Expand Down Expand Up @@ -179,6 +179,10 @@ export const useMeritIncentives = ({

const APR = data.actionsAPR[incentive.action];

if (!APR) {
return null;
}

return {
incentiveAPR: (APR / 100).toString(),
rewardTokenAddress: incentive.rewardTokenAddress,
Expand Down

1 comment on commit 3364b1a

@github-actions
Copy link

Choose a reason for hiding this comment

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

This commit was deployed on ipfs

Please sign in to comment.