diff --git a/dapps/tests/contracts/contracts.json b/dapps/tests/contracts/contracts.json index 8d0a0c49c..12da84b9b 100644 --- a/dapps/tests/contracts/contracts.json +++ b/dapps/tests/contracts/contracts.json @@ -4,6 +4,7 @@ "solc": "0.4.24" }, "dappConnection": [ + "$EMBARK", "$WEB3", "ws://localhost:8546", "http://localhost:8550", diff --git a/packages/embarkjs/ens/src/index.js b/packages/embarkjs/ens/src/index.js index 78fc83156..48b93a230 100644 --- a/packages/embarkjs/ens/src/index.js +++ b/packages/embarkjs/ens/src/index.js @@ -228,9 +228,9 @@ __embarkENS.setProvider = function(config) { if (!result.connected || result.error) { console.error(result.error); } - const accounts = await self.web3.eth.getAccounts(); - self.web3.eth.defaultAccount = accounts[0]; try { + const accounts = await self.web3.eth.getAccounts(); + self.web3.eth.defaultAccount = accounts[0]; const id = await self.web3.eth.net.getId() const registryAddress = self.registryAddresses[id] || config.registryAddress; self._isAvailable = true;