aboutsummaryrefslogtreecommitdiffstats
path: root/packages/subproviders/src
diff options
context:
space:
mode:
authorJacob Evans <jacob@dekz.net>2018-01-31 13:23:51 +0800
committerJacob Evans <jacob@dekz.net>2018-02-02 08:06:22 +0800
commit58dd90b7b7408a04a39e2e643c77bbf86859df1d (patch)
tree1c15bb44b58bc13520606bd7d67ac531ef365130 /packages/subproviders/src
parentead990a734e0caf0ce0e5d0297c487756894acf2 (diff)
downloaddexon-sol-tools-58dd90b7b7408a04a39e2e643c77bbf86859df1d.tar
dexon-sol-tools-58dd90b7b7408a04a39e2e643c77bbf86859df1d.tar.gz
dexon-sol-tools-58dd90b7b7408a04a39e2e643c77bbf86859df1d.tar.bz2
dexon-sol-tools-58dd90b7b7408a04a39e2e643c77bbf86859df1d.tar.lz
dexon-sol-tools-58dd90b7b7408a04a39e2e643c77bbf86859df1d.tar.xz
dexon-sol-tools-58dd90b7b7408a04a39e2e643c77bbf86859df1d.tar.zst
dexon-sol-tools-58dd90b7b7408a04a39e2e643c77bbf86859df1d.zip
Prettify
Diffstat (limited to 'packages/subproviders/src')
-rw-r--r--packages/subproviders/src/globals.d.ts1
-rw-r--r--packages/subproviders/src/subproviders/nonce_tracker.ts11
2 files changed, 3 insertions, 9 deletions
diff --git a/packages/subproviders/src/globals.d.ts b/packages/subproviders/src/globals.d.ts
index 595bae89e..325dc27ed 100644
--- a/packages/subproviders/src/globals.d.ts
+++ b/packages/subproviders/src/globals.d.ts
@@ -1,4 +1,3 @@
-
declare module 'dirty-chai';
declare module 'es6-promisify';
diff --git a/packages/subproviders/src/subproviders/nonce_tracker.ts b/packages/subproviders/src/subproviders/nonce_tracker.ts
index 540a91771..560f2dd68 100644
--- a/packages/subproviders/src/subproviders/nonce_tracker.ts
+++ b/packages/subproviders/src/subproviders/nonce_tracker.ts
@@ -1,4 +1,3 @@
-import { promisify } from '@0xproject/utils';
import * as _ from 'lodash';
import EthereumTx = require('ethereumjs-tx');
@@ -46,21 +45,17 @@ export class NonceTrackerSubprovider extends Subprovider {
const address = NonceTrackerSubprovider._determineAddress(payload);
const cachedResult = this._nonceCache[address];
if (cachedResult) {
- end(null, cachedResult);
- return;
+ return end(null, cachedResult);
} else {
- next((requestError: Error | null, requestResult: any, cb: any) => {
+ return next((requestError: Error | null, requestResult: any, cb: any) => {
if (_.isNull(requestError)) {
this._nonceCache[address] = requestResult as string;
}
cb();
- return;
});
- return;
}
} else {
- next();
- return;
+ return next();
}
case 'eth_sendRawTransaction':
return next(async (sendTransactionError: Error | null, txResult: any, cb: any) => {