Merge pull request #17 from lbryio/rewards
Add callback for claimRewardSuccess
This commit is contained in:
commit
64068e13f9
2 changed files with 8 additions and 9 deletions
9
dist/bundle.js
vendored
9
dist/bundle.js
vendored
|
@ -2353,7 +2353,6 @@ var USER_EMAIL_VERIFY_SET = exports.USER_EMAIL_VERIFY_SET = 'USER_EMAIL_VERIFY_S
|
|||
var USER_EMAIL_VERIFY_STARTED = exports.USER_EMAIL_VERIFY_STARTED = 'USER_EMAIL_VERIFY_STARTED';
|
||||
var USER_EMAIL_VERIFY_SUCCESS = exports.USER_EMAIL_VERIFY_SUCCESS = 'USER_EMAIL_VERIFY_SUCCESS';
|
||||
var USER_EMAIL_VERIFY_FAILURE = exports.USER_EMAIL_VERIFY_FAILURE = 'USER_EMAIL_VERIFY_FAILURE';
|
||||
var USER_EMAIL_VERIFY_RETRY = exports.USER_EMAIL_VERIFY_RETRY = 'USER_EMAIL_VERIFY_RETRY';
|
||||
var USER_PHONE_RESET = exports.USER_PHONE_RESET = 'USER_PHONE_RESET';
|
||||
var USER_PHONE_NEW_STARTED = exports.USER_PHONE_NEW_STARTED = 'USER_PHONE_NEW_STARTED';
|
||||
var USER_PHONE_NEW_SUCCESS = exports.USER_PHONE_NEW_SUCCESS = 'USER_PHONE_NEW_SUCCESS';
|
||||
|
@ -8507,7 +8506,9 @@ rewards.claimReward = function (type, rewardParams) {
|
|||
});
|
||||
window.store.dispatch(action);
|
||||
|
||||
// Add more events here to display other places
|
||||
if (rewards.callbacks.claimRewardSuccess) {
|
||||
rewards.callbacks.claimRewardSuccess();
|
||||
}
|
||||
|
||||
resolve(reward);
|
||||
}, reject);
|
||||
|
@ -8557,11 +8558,9 @@ rewards.claimReward = function (type, rewardParams) {
|
|||
});
|
||||
});
|
||||
};
|
||||
|
||||
rewards.callbacks = {
|
||||
// Set any callbacks that require code not found in this project
|
||||
// claimRewardSuccess: null,
|
||||
// claimRewardError: null,
|
||||
claimRewardSuccess: null,
|
||||
claimFirstRewardSuccess: null,
|
||||
rewardApprovalRequired: null
|
||||
};
|
||||
|
|
|
@ -35,7 +35,9 @@ rewards.claimReward = (type, rewardParams) => {
|
|||
});
|
||||
window.store.dispatch(action);
|
||||
|
||||
// Add more events here to display other places
|
||||
if (rewards.callbacks.claimRewardSuccess) {
|
||||
rewards.callbacks.claimRewardSuccess();
|
||||
}
|
||||
|
||||
resolve(reward);
|
||||
}, reject);
|
||||
|
@ -106,11 +108,9 @@ rewards.claimReward = (type, rewardParams) => {
|
|||
});
|
||||
});
|
||||
};
|
||||
|
||||
rewards.callbacks = {
|
||||
// Set any callbacks that require code not found in this project
|
||||
// claimRewardSuccess: null,
|
||||
// claimRewardError: null,
|
||||
claimRewardSuccess: null,
|
||||
claimFirstRewardSuccess: null,
|
||||
rewardApprovalRequired: null,
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue