diff options
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) => { |