mirror of https://github.com/embarklabs/embark.git
Name available in console
This commit is contained in:
parent
a8c5205b67
commit
0a261b050d
|
@ -36,9 +36,6 @@ class CodeRunner {
|
||||||
this.runCode.registerVar('Web3', Web3);
|
this.runCode.registerVar('Web3', Web3);
|
||||||
this.runCode.registerVar('EmbarkJS', EmbarkJS);
|
this.runCode.registerVar('EmbarkJS', EmbarkJS);
|
||||||
this.events.on('code-generator-ready', () => {
|
this.events.on('code-generator-ready', () => {
|
||||||
this.events.request('code-generator:web3js', ((_err, code) => {
|
|
||||||
this.runCode.doEval(code);
|
|
||||||
}));
|
|
||||||
this.events.request('code-generator:embarkjs:provider-code', (code) => {
|
this.events.request('code-generator:embarkjs:provider-code', (code) => {
|
||||||
this.runCode.doEval(code);
|
this.runCode.doEval(code);
|
||||||
const codeTypes = {
|
const codeTypes = {
|
||||||
|
|
|
@ -157,9 +157,9 @@ __embarkENS.setProvider = function (config) {
|
||||||
.then((id) => {
|
.then((id) => {
|
||||||
const registryAddress = self.registryAddresses[id] || config.registryAddress;
|
const registryAddress = self.registryAddresses[id] || config.registryAddress;
|
||||||
self._isAvailable = true;
|
self._isAvailable = true;
|
||||||
self.ens = new EmbarkJS.Contract({abi: config.registryAbi, address: registryAddress});
|
self.ens = new EmbarkJS.Contract({abi: config.registryAbi, address: registryAddress, web3: web3});
|
||||||
self.registrar = new EmbarkJS.Contract({abi: config.registrarAbi, address: config.registrarAddress});
|
self.registrar = new EmbarkJS.Contract({abi: config.registrarAbi, address: config.registrarAddress, web3: web3});
|
||||||
self.resolver = new EmbarkJS.Contract({abi: config.resolverAbi, address: config.resolverAddress});
|
self.resolver = new EmbarkJS.Contract({abi: config.resolverAbi, address: config.resolverAddress, web3: web3});
|
||||||
})
|
})
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
if (err.message.indexOf('Provider not set or invalid') > -1) {
|
if (err.message.indexOf('Provider not set or invalid') > -1) {
|
||||||
|
|
Loading…
Reference in New Issue