Don't fail on wrong log decoding (#5813)

This commit is contained in:
Nicolas Gotchac 2017-06-13 17:36:51 +02:00 committed by Gav Wood
parent 57479dac27
commit e4c7a7f30a

View File

@ -177,6 +177,7 @@ export default class Contract {
return null;
}
try {
const decoded = event.decodeLog(log.topics, log.data);
log.params = {};
@ -190,6 +191,12 @@ export default class Contract {
});
return log;
} catch (error) {
console.warn('Error decoding log', log);
console.warn(error);
return null;
}
})
.filter((log) => log);
}