fixes from code review
This commit is contained in:
parent
1b87dd24fd
commit
7cd24c850a
6 changed files with 10 additions and 8 deletions
|
@ -72,10 +72,7 @@ export function doClaimRewardType(rewardType) {
|
||||||
const failure = error => {
|
const failure = error => {
|
||||||
dispatch({
|
dispatch({
|
||||||
type: types.CLAIM_REWARD_FAILURE,
|
type: types.CLAIM_REWARD_FAILURE,
|
||||||
data: {
|
data: { reward, error },
|
||||||
reward,
|
|
||||||
error: error ? error : null,
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -16,6 +16,7 @@ class PublishForm extends React.PureComponent {
|
||||||
this._requiredFields = ["name", "bid", "meta_title", "tosAgree"];
|
this._requiredFields = ["name", "bid", "meta_title", "tosAgree"];
|
||||||
|
|
||||||
this._defaultCopyrightNotice = "All rights reserved.";
|
this._defaultCopyrightNotice = "All rights reserved.";
|
||||||
|
this._defaultPaidPrice = 0.01;
|
||||||
|
|
||||||
this.state = {
|
this.state = {
|
||||||
rawName: "",
|
rawName: "",
|
||||||
|
@ -318,7 +319,9 @@ class PublishForm extends React.PureComponent {
|
||||||
handleFeePrefChange(feeEnabled) {
|
handleFeePrefChange(feeEnabled) {
|
||||||
this.setState({
|
this.setState({
|
||||||
isFee: feeEnabled,
|
isFee: feeEnabled,
|
||||||
feeAmount: this.state.feeAmount == "" ? "0.01" : this.state.feeAmount,
|
feeAmount: this.state.feeAmount == ""
|
||||||
|
? this._defaultPaidPrice
|
||||||
|
: this.state.feeAmount,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,5 +7,5 @@ export const UPGRADE = "upgrade";
|
||||||
export const WELCOME = "welcome";
|
export const WELCOME = "welcome";
|
||||||
export const FIRST_REWARD = "first_reward";
|
export const FIRST_REWARD = "first_reward";
|
||||||
export const AUTHENTICATION_FAILURE = "auth_failure";
|
export const AUTHENTICATION_FAILURE = "auth_failure";
|
||||||
export const REWARD_APPROVAL_REQUIRED = "REWARD_APPROVAL_REQUIRED";
|
export const REWARD_APPROVAL_REQUIRED = "reward_approval_required";
|
||||||
export const CREDIT_INTRO = "credit_intro";
|
export const CREDIT_INTRO = "credit_intro";
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
/*hardcoded names still exist for these in reducers/settings.js - only discovered when debugging*/
|
/*hardcoded names still exist for these in reducers/settings.js - only discovered when debugging*/
|
||||||
|
/*Many settings are stored in the localStorage by their name -
|
||||||
|
be careful about changing the value of a settings constant, as doing so can invalidate existing settings*/
|
||||||
export const CREDIT_INTRO_ACKNOWLEDGED = "credit_intro_acknowledged";
|
export const CREDIT_INTRO_ACKNOWLEDGED = "credit_intro_acknowledged";
|
||||||
export const NEW_USER_ACKNOWLEDGED = "welcome_acknowledged";
|
export const NEW_USER_ACKNOWLEDGED = "welcome_acknowledged";
|
||||||
export const LANGUAGE = "language";
|
export const LANGUAGE = "language";
|
||||||
|
|
|
@ -13,7 +13,7 @@ class ModalRewardApprovalRequired extends React.PureComponent {
|
||||||
onAborted={closeModal}
|
onAborted={closeModal}
|
||||||
type="confirm"
|
type="confirm"
|
||||||
confirmButtonLabel={__("I'm Totally Real")}
|
confirmButtonLabel={__("I'm Totally Real")}
|
||||||
abortButtonLabel={__("Nevermind")}
|
abortButtonLabel={__("Never Mind")}
|
||||||
>
|
>
|
||||||
<section>
|
<section>
|
||||||
<h3 className="modal__header">
|
<h3 className="modal__header">
|
||||||
|
|
|
@ -5,7 +5,7 @@ export const _selectState = state => state.wallet || {};
|
||||||
|
|
||||||
export const selectBalance = createSelector(
|
export const selectBalance = createSelector(
|
||||||
_selectState,
|
_selectState,
|
||||||
state => 0 //state.balance || 0
|
state => state.balance || 0
|
||||||
);
|
);
|
||||||
|
|
||||||
export const selectTransactions = createSelector(
|
export const selectTransactions = createSelector(
|
||||||
|
|
Loading…
Reference in a new issue