aboutsummaryrefslogtreecommitdiffstats
path: root/lib/event.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/event.js')
-rw-r--r--lib/event.js10
1 files changed, 3 insertions, 7 deletions
diff --git a/lib/event.js b/lib/event.js
index 43ea96d12..812ef9115 100644
--- a/lib/event.js
+++ b/lib/event.js
@@ -38,19 +38,15 @@ var inputWithName = function (inputs, name) {
var indexedParamsToTopics = function (event, indexed) {
// sort keys?
return Object.keys(indexed).map(function (key) {
- // TODO: simplify this!
- var parser = abi.inputParser([{
- name: 'test',
- inputs: [inputWithName(event.inputs, key)]
- }]);
+ var inputs = [inputWithName(event.inputs, key)];
var value = indexed[key];
if (value instanceof Array) {
return value.map(function (v) {
- return parser.test(v);
+ return abi.formatInput(inputs, [v]);
});
}
- return parser.test(value);
+ return abi.formatInput(inputs, [value]);
});
};