Commit 07a8ab60 authored by Alex Beregszaszi's avatar Alex Beregszaszi

Move web3 definition to where it is required in the encoder

parent 23821153
......@@ -180,7 +180,6 @@ UniversalDApp.prototype.getInstanceInterface = function (contract, address, $tar
return 1;
}
});
var web3contract = this.web3.eth.contract(abi);
var funABI = this.getConstructorInterface(abi);
var $createInterface = $('<div class="createContract"/>');
......@@ -252,7 +251,7 @@ UniversalDApp.prototype.getInstanceInterface = function (contract, address, $tar
}
});
} else {
var eventFilter = web3contract.at(address).allEvents();
var eventFilter = this.web3.eth.contract(abi).at(address).allEvents();
eventFilter.watch(parseLogs);
}
$instance.append($title);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment