From 597ca492a64b8215f3a34203ffc77c8edf3bd09f Mon Sep 17 00:00:00 2001 From: Sean Yesmunt Date: Thu, 18 Oct 2018 13:28:01 -0400 Subject: [PATCH] fix reward typo --- dist/bundle.js | 3 ++- src/redux/actions/rewards.js | 2 +- src/rewards.js | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/dist/bundle.js b/dist/bundle.js index e27a65c..c892684 100644 --- a/dist/bundle.js +++ b/dist/bundle.js @@ -7267,7 +7267,7 @@ function doClaimRewardType(rewardType) { return ur.reward_type === rewardType; }); - if (!_rewards3.default.TYPE_REWARD_CODE) { + if (rewardType !== _rewards3.default.TYPE_REWARD_CODE) { if (!reward || reward.transaction_id) { // already claimed or doesn't exist, do nothing return; @@ -7773,6 +7773,7 @@ rewards.TYPE_FIRST_PUBLISH = 'first_publish'; rewards.TYPE_FEATURED_DOWNLOAD = 'featured_download'; rewards.TYPE_REFERRAL = 'referral'; rewards.TYPE_REWARD_CODE = 'reward_code'; +rewards.TYPE_SUBSCRIPTION = 'subscription'; rewards.YOUTUBE_CREATOR = 'youtube_creator'; rewards.claimReward = function (type, rewardParams) { diff --git a/src/redux/actions/rewards.js b/src/redux/actions/rewards.js index 4f7e4c0..ed833ce 100644 --- a/src/redux/actions/rewards.js +++ b/src/redux/actions/rewards.js @@ -36,7 +36,7 @@ export function doClaimRewardType(rewardType, options = {}) { ? { reward_type: rewards.TYPE_REWARD_CODE } : unclaimedRewards.find(ur => ur.reward_type === rewardType); - if (!rewards.TYPE_REWARD_CODE) { + if (rewardType !== rewards.TYPE_REWARD_CODE) { if (!reward || reward.transaction_id) { // already claimed or doesn't exist, do nothing return; diff --git a/src/rewards.js b/src/rewards.js index f37f1ce..0cbe7ab 100644 --- a/src/rewards.js +++ b/src/rewards.js @@ -13,6 +13,7 @@ rewards.TYPE_FIRST_PUBLISH = 'first_publish'; rewards.TYPE_FEATURED_DOWNLOAD = 'featured_download'; rewards.TYPE_REFERRAL = 'referral'; rewards.TYPE_REWARD_CODE = 'reward_code'; +rewards.TYPE_SUBSCRIPTION = 'subscription'; rewards.YOUTUBE_CREATOR = 'youtube_creator'; rewards.claimReward = (type, rewardParams) => {