Skip to content

Commit

Permalink
fix event decoding
Browse files Browse the repository at this point in the history
  • Loading branch information
yann300 committed Jan 3, 2018
1 parent f7bd778 commit b4331ce
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/app/execution/eventsDecoder.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,9 @@ class EventsDecoder {
var encodedData = log.topics[indexed].replace('0x', '')
try {
decoded[index] = ethJSABI.rawDecode([item.type], new Buffer(encodedData, 'hex'))[0]
decoded[index] = ethJSABI.stringify([item.type], decoded[index])
if (typeof decoded[index] !== 'string') {
decoded[index] = ethJSABI.stringify([item.type], decoded[index])
}
} catch (e) {
decoded[index] = encodedData
}
Expand Down

0 comments on commit b4331ce

Please sign in to comment.