consolidate DEFAULT_HOST logic

This commit is contained in:
Michael Bradley, Jr 2018-10-24 15:08:16 -05:00
parent 9533b57627
commit 10fa3fec9f
3 changed files with 4 additions and 4 deletions

View File

@ -5,5 +5,5 @@ export const LIGHT_THEME = 'light';
export const DEPLOYMENT_PIPELINES = {
injectedWeb3: 'injectedWeb3',
embark: 'embark'
}
export const DEFAULT_HOST = 'localhost:8000';
};
export const DEFAULT_HOST = process.env.NODE_ENV === 'development' ? 'localhost:8000' : window.location.host;

View File

@ -34,7 +34,7 @@ class AppContainer extends Component {
if (!token) {
return;
}
const host = process.env.NODE_ENV === 'development' ? DEFAULT_HOST : window.location.host;
const host = DEFAULT_HOST;
if (token === this.props.credentials.token && this.props.credentials.host === host) {
return;
}

View File

@ -201,7 +201,7 @@ function compilingContract(state = false, action) {
}
const DEFAULT_CREDENTIALS_STATE = {
host: process.env.NODE_ENV === 'development' ? DEFAULT_HOST : window.location.host,
host: DEFAULT_HOST,
token: '',
authenticated: false,
authenticating: false,