Do not crash if event is not found in the ABI

pull/1/head
Alex Beregszaszi 8 years ago
parent 5aeb13657d
commit a731bf5ae6
  1. 5
      src/universal-dapp.js

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

Loading…
Cancel
Save