Skip to content

Commit

Permalink
add npmignore and fallback to mainNet api if on unknown network
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Garnett committed Oct 23, 2018
1 parent c323053 commit cb47f44
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 7 deletions.
3 changes: 3 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
src
.gitignore
.babelrc
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bounties-network/modules",
"version": "0.0.1",
"version": "0.0.2",
"description": "Produce universal library with webpack and es6",
"main": "lib/main.js",
"scripts": {
Expand Down
1 change: 1 addition & 0 deletions src/Authentication/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ function AuthenticationReducer(state = initialState, action) {
getCurrentUserState: {
...state.getCurrentUserState,
loading: false,
loaded: true,
error: true
}
};
Expand Down
5 changes: 1 addition & 4 deletions src/Authentication/sagas.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,7 @@ import { get } from 'lodash';

const { SET_INITIALIZED } = clientActionTypes;
const { LOGIN, LOGOUT } = actionTypes;
// const {
// SAVE_SETTINGS_SUCCESS,
// SAVE_EMAIL_PREFERENCES_SUCCESS
// } = settingsActionTypes;

const {
getCurrentUserSuccess,
getCurrentUserFail,
Expand Down
5 changes: 3 additions & 2 deletions src/Client/sagas.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,11 @@ export function* getNetwork() {
if (networkID === 1) {
network = 'mainNet';
apiEndpoint.set(config.settings.url.mainNet);
}
if (networkID === 4) {
} else if (networkID === 4) {
network = 'rinkeby';
apiEndpoint.set(config.settings.url.rinkeby);
} else {
apiEndpoint.set(config.settings.url.mainNet);
}

return network;
Expand Down

0 comments on commit cb47f44

Please sign in to comment.