Move web3 definition to where it is required in the encoder

pull/1/head
Alex Beregszaszi 9 years ago
parent 23821153c3
commit 07a8ab606b
  1. 3
      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 = $('<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);

Loading…
Cancel
Save