Untitled
unknown
plain_text
a year ago
629 B
10
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