Fix event params decoding when no names for parameters #5409 (#5567)

This commit is contained in:
Nicolas Gotchac
2017-05-09 12:56:08 +02:00
committed by Jaco Greeff
parent 1288b4b28f
commit c5116e5049
3 changed files with 12 additions and 6 deletions

View File

@@ -182,10 +182,11 @@ export default class Contract {
log.params = {};
log.event = event.name;
decoded.params.forEach((param) => {
decoded.params.forEach((param, index) => {
const { type, value } = param.token;
const key = param.name || index;
log.params[param.name] = { type, value };
log.params[key] = { type, value };
});
return log;