From 07a8ab606b1d47bfb42d024b5424ea96a8813dc9 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Sun, 5 Jun 2016 00:40:00 +0100 Subject: [PATCH] Move web3 definition to where it is required in the encoder --- src/universal-dapp.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/universal-dapp.js b/src/universal-dapp.js index af5ce40b4b..33c5297508 100644 --- a/src/universal-dapp.js +++ b/src/universal-dapp.js @@ -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 = $('
'); @@ -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);