commit
3f34af546e
3 changed files with 4 additions and 2 deletions
3
dist/bundle.js
vendored
3
dist/bundle.js
vendored
|
@ -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) {
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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) => {
|
||||
|
|
Loading…
Reference in a new issue