Untitled
Anonymous
plain_text
08/20/2024 3:36 AM
840 B
18
Indexable
export const getTotalRewardLaunchPool = ({
paidType,
endTime,
startTime,
cycleReward,
}) => {
if (paidType === FARMING_PAID_TYPE.DAILY) {
console.log('remain ', Math.abs(endTime - startTime) / (24 * 3600));
return (
Math.floor(Math.abs(endTime - startTime) / (24 * 3600)) * cycleReward
);
}
if (paidType === FARMING_PAID_TYPE.WEEKLY) {
return (
Math.floor(Math.abs(endTime - startTime) / (7 * 24 * 3600)) * cycleReward
);
}
if (paidType === FARMING_PAID_TYPE.MONTHLY) {
return (
Math.floor(Math.abs(endTime - startTime) / (30 * 24 * 3600)) * cycleReward
);
}
};Editor is loading...
Leave a Comment