aboutsummaryrefslogtreecommitdiffstats
path: root/packages/order-watcher
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-06-06 22:26:04 +0800
committerFabio Berger <me@fabioberger.com>2018-06-06 22:26:04 +0800
commitcf8fdd3a701f21bfc3b2ec8397fa65948f5cdc78 (patch)
tree1ab6a8d6b8588707286fc56a632dca9ceca7e7ac /packages/order-watcher
parentaf1d5fce6ea355b12bf5f63f51ea81ff596f7868 (diff)
downloaddexon-sol-tools-cf8fdd3a701f21bfc3b2ec8397fa65948f5cdc78.tar
dexon-sol-tools-cf8fdd3a701f21bfc3b2ec8397fa65948f5cdc78.tar.gz
dexon-sol-tools-cf8fdd3a701f21bfc3b2ec8397fa65948f5cdc78.tar.bz2
dexon-sol-tools-cf8fdd3a701f21bfc3b2ec8397fa65948f5cdc78.tar.lz
dexon-sol-tools-cf8fdd3a701f21bfc3b2ec8397fa65948f5cdc78.tar.xz
dexon-sol-tools-cf8fdd3a701f21bfc3b2ec8397fa65948f5cdc78.tar.zst
dexon-sol-tools-cf8fdd3a701f21bfc3b2ec8397fa65948f5cdc78.zip
Move spawnSwitchErr to @0xproject/utils
Diffstat (limited to 'packages/order-watcher')
-rw-r--r--packages/order-watcher/src/order_watcher/order_watcher.ts4
-rw-r--r--packages/order-watcher/src/utils/utils.ts3
2 files changed, 2 insertions, 5 deletions
diff --git a/packages/order-watcher/src/order_watcher/order_watcher.ts b/packages/order-watcher/src/order_watcher/order_watcher.ts
index 29936a066..498ec5357 100644
--- a/packages/order-watcher/src/order_watcher/order_watcher.ts
+++ b/packages/order-watcher/src/order_watcher/order_watcher.ts
@@ -14,7 +14,7 @@ import {
Provider,
SignedOrder,
} from '@0xproject/types';
-import { AbiDecoder, intervalUtils } from '@0xproject/utils';
+import { AbiDecoder, errorUtils, intervalUtils } from '@0xproject/utils';
import { Web3Wrapper } from '@0xproject/web3-wrapper';
import * as _ from 'lodash';
@@ -344,7 +344,7 @@ export class OrderWatcher {
return; // noop
default:
- throw utils.spawnSwitchErr('decodedLog.event', decodedLog.event);
+ throw errorUtils.spawnSwitchErr('decodedLog.event', decodedLog.event);
}
}
private async _emitRevalidateOrdersAsync(orderHashes: string[]): Promise<void> {
diff --git a/packages/order-watcher/src/utils/utils.ts b/packages/order-watcher/src/utils/utils.ts
index d34f6b99f..087fc635e 100644
--- a/packages/order-watcher/src/utils/utils.ts
+++ b/packages/order-watcher/src/utils/utils.ts
@@ -1,9 +1,6 @@
import { BigNumber } from '@0xproject/utils';
export const utils = {
- spawnSwitchErr(name: string, value: any): Error {
- return new Error(`Unexpected switch value: ${value} encountered for ${name}`);
- },
getCurrentUnixTimestampSec(): BigNumber {
const milisecondsInASecond = 1000;
return new BigNumber(Date.now() / milisecondsInASecond).round();