When a new reward is acquired, only close modals if the reward comes from reward_code
This commit is contained in:
parent
c09a7e8bbc
commit
b43593a996
2 changed files with 5 additions and 3 deletions
|
@ -135,8 +135,10 @@ rewards.setCallback('claimFirstRewardSuccess', () => {
|
||||||
app.store.dispatch(doOpenModal(MODALS.FIRST_REWARD));
|
app.store.dispatch(doOpenModal(MODALS.FIRST_REWARD));
|
||||||
});
|
});
|
||||||
|
|
||||||
rewards.setCallback('claimRewardSuccess', () => {
|
rewards.setCallback('claimRewardSuccess', reward => {
|
||||||
app.store.dispatch(doHideModal());
|
if (reward && reward.type === rewards.TYPE_REWARD_CODE) {
|
||||||
|
app.store.dispatch(doHideModal());
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// @if TARGET='app'
|
// @if TARGET='app'
|
||||||
|
|
|
@ -38,7 +38,7 @@ rewards.claimReward = (type, rewardParams) => {
|
||||||
window.store.dispatch(action);
|
window.store.dispatch(action);
|
||||||
|
|
||||||
if (rewards.callbacks.claimRewardSuccess) {
|
if (rewards.callbacks.claimRewardSuccess) {
|
||||||
rewards.callbacks.claimRewardSuccess();
|
rewards.callbacks.claimRewardSuccess(reward);
|
||||||
}
|
}
|
||||||
|
|
||||||
resolve(reward);
|
resolve(reward);
|
||||||
|
|
Loading…
Reference in a new issue