update: pass claim_code to 'reward/new'

This commit is contained in:
Sean Yesmunt 2019-01-17 11:44:45 -05:00
parent cb47ccb925
commit dc67185a72
2 changed files with 10 additions and 2 deletions

6
dist/bundle.js vendored
View file

@ -8009,6 +8009,10 @@ function doClaimRewardType(rewardType) {
return; return;
} }
// Set `claim_code` so the api knows which reward to give if there are multiple of the same type
var params = options.params || {};
params.claim_code = reward.claim_code;
dispatch({ dispatch({
type: _lbryRedux.ACTIONS.CLAIM_REWARD_STARTED, type: _lbryRedux.ACTIONS.CLAIM_REWARD_STARTED,
data: { reward: reward } data: { reward: reward }
@ -8042,7 +8046,7 @@ function doClaimRewardType(rewardType) {
} }
}; };
_rewards3.default.claimReward(rewardType, options.params).then(success, failure); _rewards3.default.claimReward(rewardType, params).then(success, failure);
}; };
} }

View file

@ -51,6 +51,10 @@ export function doClaimRewardType(rewardType, options = {}) {
return; return;
} }
// Set `claim_code` so the api knows which reward to give if there are multiple of the same type
const params = options.params || {};
params.claim_code = reward.claim_code;
dispatch({ dispatch({
type: ACTIONS.CLAIM_REWARD_STARTED, type: ACTIONS.CLAIM_REWARD_STARTED,
data: { reward }, data: { reward },
@ -87,7 +91,7 @@ export function doClaimRewardType(rewardType, options = {}) {
} }
}; };
rewards.claimReward(rewardType, options.params).then(success, failure); rewards.claimReward(rewardType, params).then(success, failure);
}; };
} }