Commit a731bf5a authored by Alex Beregszaszi's avatar Alex Beregszaszi

Do not crash if event is not found in the ABI

parent 5aeb1365
...@@ -253,11 +253,12 @@ UniversalDApp.prototype.getInstanceInterface = function (contract, address, $tar ...@@ -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;
}); });
......
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