Merge pull request #10 from lbryio/typo

fix reward typo
This commit is contained in:
Sean Yesmunt 2018-10-18 13:28:45 -04:00 committed by GitHub
commit 3f34af546e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 2 deletions

3
dist/bundle.js vendored
View file

@ -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) {

View file

@ -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;

View file

@ -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) => {