Merge pull request #190 from ethereum/fix-event-crashes

Do not crash if event is not found in the ABI
pull/1/head
chriseth 8 years ago committed by GitHub
commit 99b51f6dcb
  1. 5
      src/universal-dapp.js

@ -253,11 +253,12 @@ UniversalDApp.prototype.getInstanceInterface = function (contract, address, $tar
for (var i in response.vm.logs) { for (var i in response.vm.logs) {
// [address, topics, mem] // [address, topics, mem]
var log = response.vm.logs[i]; var log = response.vm.logs[i];
var abi = eventABI[log[1][0].toString('hex')]; var event;
var event = abi.event;
var decoded; var decoded;
try { try {
var abi = eventABI[log[1][0].toString('hex')];
event = abi.event;
var types = abi.inputs.map(function (item) { var types = abi.inputs.map(function (item) {
return item.type; return item.type;
}); });

Loading…
Cancel
Save