diff options
author | Jacob Evans <jacob@dekz.net> | 2018-01-31 13:23:51 +0800 |
---|---|---|
committer | Jacob Evans <jacob@dekz.net> | 2018-02-02 08:06:22 +0800 |
commit | 58dd90b7b7408a04a39e2e643c77bbf86859df1d (patch) | |
tree | 1c15bb44b58bc13520606bd7d67ac531ef365130 /packages/subproviders/src | |
parent | ead990a734e0caf0ce0e5d0297c487756894acf2 (diff) | |
download | dexon-0x-contracts-58dd90b7b7408a04a39e2e643c77bbf86859df1d.tar.gz dexon-0x-contracts-58dd90b7b7408a04a39e2e643c77bbf86859df1d.tar.zst dexon-0x-contracts-58dd90b7b7408a04a39e2e643c77bbf86859df1d.zip |
Prettify
Diffstat (limited to 'packages/subproviders/src')
-rw-r--r-- | packages/subproviders/src/globals.d.ts | 1 | ||||
-rw-r--r-- | packages/subproviders/src/subproviders/nonce_tracker.ts | 11 |
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) => { |