Skip to content

Commit

Permalink
handle NaN in reward amount calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
ae2079 committed Oct 20, 2024
1 parent 143bada commit 3044e66
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/scripts/syncDataWithJsonReport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ async function processReportForDonations(
// Calculate the reward proportionally based on the valid contribution
rewardAmount = issuanceAllocation * contributionPercentage;
}
donation.rewardTokenAmount = rewardAmount;
donation.rewardTokenAmount = rewardAmount || 0;

// Fetch the cliff, reward start, and end dates from the InverterAdapter
const vestingInfo = rewardInfo[0]?.vestings.find(
Expand Down

0 comments on commit 3044e66

Please sign in to comment.