From 4c05bb23b8247904a7b9a8b3d835995bf3d5655d Mon Sep 17 00:00:00 2001 From: Kamen Stoykov Date: Tue, 4 Jun 2019 12:31:45 +0300 Subject: [PATCH] embark --- package.json | 3 ++- src/common/blockchain/index.js | 12 ++++-------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index d6e70df..2cec6e8 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,8 @@ "reselect": "^4.0.0", "web3-utils": "^1.0.0-beta.35", "webpack": "4.28.3", - "idb": "4.0.3" + "idb": "4.0.3", + "web3":"1.0.0-beta.34" }, "scripts": { "start": "react-scripts start", diff --git a/src/common/blockchain/index.js b/src/common/blockchain/index.js index b17dfc5..2f952b3 100644 --- a/src/common/blockchain/index.js +++ b/src/common/blockchain/index.js @@ -31,15 +31,11 @@ const getInstance = async () => { } } - if (web3.currentProvider) { - returnInstance() - } else { - EmbarkJS.onReady(err => { - if (err) reject(err) + EmbarkJS.onReady(err => { + if (err) reject(err) - returnInstance() - }) - } + returnInstance() + }) }) }