This commit is contained in:
chaosBreaking
2019-10-01 23:57:56 +08:00
parent 52e3f48736
commit d7aae190f0
2 changed files with 7 additions and 2 deletions

6
cn.js
View File

@@ -10,6 +10,7 @@ const { createAction } = require('./src/modules/action/action.handler');
const tokenReleaseRate = 0.01;
const inviteReward = 2.5;
async function awardMine(user, fund) {
if (!user || !fund || fund.fundList.length === 0) return 0;
let sum = 0;
@@ -42,8 +43,9 @@ const doReward = async (user, fund) => {
// 2.对于社团成员进行人头数目按照10vic/人进行奖励累加到asset.vic添加action类型为2
if (!user || !fund) return 0;
const rewardMine = await awardMine(user, fund);
const rewardInvite = awardInvite(user, fund);
const reward = rewardMine + rewardInvite;
// const rewardInvite = awardInvite(user, fund);
const rewardInvite = 0;
const reward = +rewardMine + rewardInvite;
console.log('挖矿奖励: ', rewardMine);
console.log('社群奖励: ', rewardInvite);
reward && await Fund.findByIdAndUpdate(fund.id, {

View File

@@ -0,0 +1,3 @@
module.exports = {
USDT2VIC_RATE: 50
};