@0x/base-contract: Fix linter errors.

This commit is contained in:
Lawrence Forman 2019-09-19 03:21:34 -04:00 committed by Lawrence Forman
parent b43fa88606
commit d5bbbe802b

View File

@ -52,11 +52,13 @@ export const filterUtils = {
// Null is a wildcard topic in a JSON-RPC call
topics.push(null);
} else {
// tslint:disable: no-unnecessary-type-assertion
let value = indexFilterValues[eventInput.name] as any;
if (BigNumber.isBigNumber(value)) {
// tslint:disable-next-line custom-no-magic-numbers
value = ethUtil.fromSigned(value.toString(10) as any);
}
// tslint:enable: no-unnecessary-type-assertion
const buffer = ethUtil.toBuffer(value);
const paddedBuffer = ethUtil.setLengthLeft(buffer, TOPIC_LENGTH);
const topic = ethUtil.bufferToHex(paddedBuffer);