Skip to content

Commit 3364b1a

Browse files
authored
feat: mask Merit campaign when aprs are not found (#2270)
1 parent 5643cad commit 3364b1a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/hooks/useMeritIncentives.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export enum MeritAction {
2020
type MeritIncentives = {
2121
totalAPR: number;
2222
actionsAPR: {
23-
[key in MeritAction]: number;
23+
[key in MeritAction]: number | null | undefined;
2424
};
2525
};
2626

@@ -179,6 +179,10 @@ export const useMeritIncentives = ({
179179

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

182+
if (!APR) {
183+
return null;
184+
}
185+
182186
return {
183187
incentiveAPR: (APR / 100).toString(),
184188
rewardTokenAddress: incentive.rewardTokenAddress,

0 commit comments

Comments
 (0)