From dc67185a72bdb56de34ee8a2321a7bfd881bd596 Mon Sep 17 00:00:00 2001 From: Sean Yesmunt Date: Thu, 17 Jan 2019 11:44:45 -0500 Subject: [PATCH] update: pass claim_code to 'reward/new' --- dist/bundle.js | 6 +++++- src/redux/actions/rewards.js | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/dist/bundle.js b/dist/bundle.js index 82e0e73..8f2aeac 100644 --- a/dist/bundle.js +++ b/dist/bundle.js @@ -8009,6 +8009,10 @@ function doClaimRewardType(rewardType) { 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({ type: _lbryRedux.ACTIONS.CLAIM_REWARD_STARTED, 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); }; } diff --git a/src/redux/actions/rewards.js b/src/redux/actions/rewards.js index a33b052..d9f6369 100644 --- a/src/redux/actions/rewards.js +++ b/src/redux/actions/rewards.js @@ -51,6 +51,10 @@ export function doClaimRewardType(rewardType, options = {}) { 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({ type: ACTIONS.CLAIM_REWARD_STARTED, 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); }; }