From 0a42c7f0dc16861c3a11ac3f69b8a60ffc7a802a Mon Sep 17 00:00:00 2001 From: Ezerous Date: Tue, 9 Apr 2019 14:22:20 +0300 Subject: [PATCH] Up dependencies --- app/package.json | 6 +++--- app/src/containers/LoadingContainer.js | 2 +- app/src/redux/actions/web3UtilsActions.js | 5 ++++- app/src/redux/sagas/web3UtilsSaga.js | 24 ++++++++++++++--------- 4 files changed, 23 insertions(+), 14 deletions(-) diff --git a/app/package.json b/app/package.json index 3fe27e7..26f5578 100644 --- a/app/package.json +++ b/app/package.json @@ -8,7 +8,7 @@ }, "dependencies": { "connected-react-router": "6.3.2", - "drizzle": "1.3.3", + "drizzle": "1.4.0", "history": "4.9.0", "ipfs": "github:ipfs/js-ipfs#e849dbcab4a313f7ffc1532a389097ee76344067", "lodash.isequal": "4.5.0", @@ -19,7 +19,7 @@ "react-content-loader": "4.2.1", "react-dom": "16.8.6", "react-markdown": "4.0.6", - "react-redux": "6.0.1", + "react-redux": "7.0.1", "react-router-dom": "5.0.0", "react-scripts": "2.1.8", "react-timeago": "4.4.0", @@ -28,7 +28,7 @@ "redux-saga": "0.16.2", "semantic-ui-react": "0.86.0", "uuid": "3.3.2", - "web3": "1.0.0-beta.51" + "web3": "1.0.0-beta.52" }, "devDependencies": { "libp2p-websocket-star-rendezvous": "0.3.0" diff --git a/app/src/containers/LoadingContainer.js b/app/src/containers/LoadingContainer.js index a8f006a..28b074c 100644 --- a/app/src/containers/LoadingContainer.js +++ b/app/src/containers/LoadingContainer.js @@ -17,7 +17,7 @@ class LoadingContainer extends Component {

This browser has no connection to the Ethereum network.

Please make sure that: diff --git a/app/src/redux/actions/web3UtilsActions.js b/app/src/redux/actions/web3UtilsActions.js index bebdd3c..784533e 100644 --- a/app/src/redux/actions/web3UtilsActions.js +++ b/app/src/redux/actions/web3UtilsActions.js @@ -1 +1,4 @@ -export const WEB3_UTILS_SAGA_INITIALIZED = 'WEB3_UTILS_SAGA_INITIALIZED'; +const WEB3_UTILS_SAGA_INITIALIZED = 'WEB3_UTILS_SAGA_INITIALIZED'; +const WEB3_UTILS_SAGA_ERROR = 'WEB3_UTILS_SAGA_ERROR'; + +export { WEB3_UTILS_SAGA_INITIALIZED, WEB3_UTILS_SAGA_ERROR } diff --git a/app/src/redux/sagas/web3UtilsSaga.js b/app/src/redux/sagas/web3UtilsSaga.js index caaea81..fc5c1ca 100644 --- a/app/src/redux/sagas/web3UtilsSaga.js +++ b/app/src/redux/sagas/web3UtilsSaga.js @@ -10,16 +10,22 @@ let initFlag, web3, forumContract; function* init() { if (!initFlag) { - web3 = yield call(getWeb3); - forumContract = yield call(getContractInstance, { - web3, artifact: Forum - }); - initFlag = true; - yield put({ - type: WEB3_UTILS_SAGA_INITIALIZED, ...[] - }); + try{ + web3 = yield call(getWeb3); + forumContract = yield call(getContractInstance, { + web3, artifact: Forum + }); + initFlag = true; + yield put({ + type: WEB3_UTILS_SAGA_INITIALIZED, ...[] + }); + } + catch (error) { + console.error(`Error while initializing web3UtilsSaga: ${error}`); + } } - else console.warn('Attempted to reinitialize web3UtilsSaga!'); + else + console.warn('Attempted to reinitialize web3UtilsSaga!'); } // If the method below proves to be problematic/ineffective (i.e. getting current account