aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2017-07-05 08:37:02 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2017-07-05 08:37:02 +0800
commit9c4f3b2cbae3c00b3189f3043e50c0caacfd9186 (patch)
tree151f1093cf55cb1f5c476b8405b48c05195dbb01 /src
parent4cb544f4f57c62ae40b8eb2dae1515c52f9a7ebf (diff)
downloaddexon-sol-tools-9c4f3b2cbae3c00b3189f3043e50c0caacfd9186.tar
dexon-sol-tools-9c4f3b2cbae3c00b3189f3043e50c0caacfd9186.tar.gz
dexon-sol-tools-9c4f3b2cbae3c00b3189f3043e50c0caacfd9186.tar.bz2
dexon-sol-tools-9c4f3b2cbae3c00b3189f3043e50c0caacfd9186.tar.lz
dexon-sol-tools-9c4f3b2cbae3c00b3189f3043e50c0caacfd9186.tar.xz
dexon-sol-tools-9c4f3b2cbae3c00b3189f3043e50c0caacfd9186.tar.zst
dexon-sol-tools-9c4f3b2cbae3c00b3189f3043e50c0caacfd9186.zip
Rearrange methods in event utils
Diffstat (limited to 'src')
-rw-r--r--src/utils/event_utils.ts26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/utils/event_utils.ts b/src/utils/event_utils.ts
index 5829ffe99..07418cbc4 100644
--- a/src/utils/event_utils.ts
+++ b/src/utils/event_utils.ts
@@ -5,6 +5,19 @@ import * as BigNumber from 'bignumber.js';
import promisify = require('es6-promisify');
export const eventUtils = {
+ wrapEventEmitter(event: ContractEventObj): ContractEventEmitter {
+ const watch = (eventCallback: EventCallback) => {
+ const bignumberWrappingEventCallback = eventUtils._getBigNumberWrappingEventCallback(eventCallback);
+ event.watch(bignumberWrappingEventCallback);
+ };
+ const zeroExEvent = {
+ watch,
+ stopWatchingAsync: async () => {
+ await promisify(event.stopWatching, event)();
+ },
+ };
+ return zeroExEvent;
+ },
/**
* Wraps eventCallback function so that all the BigNumber arguments are wrapped in a newer version of BigNumber.
* @param eventCallback Event callback function to be wrapped
@@ -28,17 +41,4 @@ export const eventUtils = {
};
return bignumberWrappingEventCallback;
},
- wrapEventEmitter(event: ContractEventObj): ContractEventEmitter {
- const watch = (eventCallback: EventCallback) => {
- const bignumberWrappingEventCallback = eventUtils._getBigNumberWrappingEventCallback(eventCallback);
- event.watch(bignumberWrappingEventCallback);
- };
- const zeroExEvent = {
- watch,
- stopWatchingAsync: async () => {
- await promisify(event.stopWatching, event)();
- },
- };
- return zeroExEvent;
- },
};