Skip to content

Commit

Permalink
Merge pull request #642 from hats-finance/fix/cap-without-fees
Browse files Browse the repository at this point in the history
Fix/cap without fees
  • Loading branch information
fonstack authored Jan 22, 2024
2 parents ec59bce + ed54229 commit 9170dda
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 2 additions & 1 deletion packages/web/src/hooks/severities/useSeverityRewardInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ export function useSeverityRewardInfo(vault: IVault | undefined, severityIndex:
: vault.amountsInfo.maxRewardAmount.tokens) *
(rewardPercentage / 100);
rewards.usd = rewards.tokens * vault.amountsInfo?.tokenPriceUsd;
rewardsCap.tokens = (severity.capAmount ?? 0) * vault.amountsInfo?.maxRewardFactor;
rewardsCap.tokens = severity.capAmount ?? 0; // Cap without maxRewardFactor
// rewardsCap.tokens = (severity.capAmount ?? 0) * vault.amountsInfo?.maxRewardFactor;
rewardsCap.usd = rewardsCap.tokens * vault.amountsInfo?.tokenPriceUsd;
}

Expand Down
2 changes: 0 additions & 2 deletions packages/web/src/hooks/subgraph/vaults/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,6 @@ const fixVaultsData = (vaults: IVault[]) => {

// Override description hash for AlephZero vault
const alephVault = newVaults.find((vault) => vault.id.toLowerCase() === "0x0d88a9ece90994ecb3ba704730819d71c139f60f");
if (alephVault && alephVault.descriptionHash === "QmY3vnuj9i1ephwYSjHzJ9bUx7t18hhQ1mWrUiXwEA32c3")
alephVault.descriptionHash = "Qmb8gadmtnvPHW7Xu3dnBNxLPYyS3371TATQBj1eFJr9tj";

return newVaults;
};
Expand Down

0 comments on commit 9170dda

Please sign in to comment.