aboutsummaryrefslogtreecommitdiffstats
path: root/packages/utils/src
diff options
context:
space:
mode:
Diffstat (limited to 'packages/utils/src')
-rw-r--r--packages/utils/src/abi_decoder.ts2
-rw-r--r--packages/utils/src/interval_utils.ts8
2 files changed, 7 insertions, 3 deletions
diff --git a/packages/utils/src/abi_decoder.ts b/packages/utils/src/abi_decoder.ts
index 150f74a15..d329f917a 100644
--- a/packages/utils/src/abi_decoder.ts
+++ b/packages/utils/src/abi_decoder.ts
@@ -17,7 +17,7 @@ import { BigNumber } from './configured_bignumber';
export class AbiDecoder {
private _savedABIs: AbiDefinition[] = [];
private _methodIds: { [signatureHash: string]: EventAbi } = {};
- private static _padZeros(address: string) {
+ private static _padZeros(address: string): string {
let formatted = address;
if (_.startsWith(formatted, '0x')) {
formatted = formatted.slice(2);
diff --git a/packages/utils/src/interval_utils.ts b/packages/utils/src/interval_utils.ts
index ebecc7015..6984bf42d 100644
--- a/packages/utils/src/interval_utils.ts
+++ b/packages/utils/src/interval_utils.ts
@@ -1,7 +1,11 @@
import * as _ from 'lodash';
export const intervalUtils = {
- setAsyncExcludingInterval(fn: () => Promise<void>, intervalMs: number, onError: (err: Error) => void) {
+ setAsyncExcludingInterval(
+ fn: () => Promise<void>,
+ intervalMs: number,
+ onError: (err: Error) => void,
+ ): NodeJS.Timer {
let locked = false;
const intervalId = setInterval(async () => {
if (locked) {
@@ -21,7 +25,7 @@ export const intervalUtils = {
clearAsyncExcludingInterval(intervalId: NodeJS.Timer): void {
clearInterval(intervalId);
},
- setInterval(fn: () => void, intervalMs: number, onError: (err: Error) => void) {
+ setInterval(fn: () => void, intervalMs: number, onError: (err: Error) => void): NodeJS.Timer {
const intervalId = setInterval(() => {
try {
fn();