Skip to content

Commit

Permalink
fix: #12090, dont award disabled rewards
Browse files Browse the repository at this point in the history
  • Loading branch information
barisusakli committed Oct 16, 2023
1 parent 347a43f commit c1ae879
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/rewards/index.js
Expand Up @@ -15,8 +15,9 @@ rewards.checkConditionAndRewardUser = async function (params) {
}
const ids = await getIDsByCondition(condition);
let rewardData = await getRewardDataByIDs(ids);
// filter disabled
rewardData = rewardData.filter(r => r && !(r.disabled === 'true' || r.disabled === true));
rewardData = await filterCompletedRewards(uid, rewardData);
rewardData = rewardData.filter(Boolean);
if (!rewardData || !rewardData.length) {
return;
}
Expand Down

0 comments on commit c1ae879

Please sign in to comment.