Untitled
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 ); } };
Leave a Comment