From de8450d5c93c5b46d227325ca225eadce9610af0 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Thu, 22 Mar 2018 15:54:13 +0000 Subject: Make handleRequest public and add comment for it --- packages/sol-cov/src/coverage_subprovider.ts | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'packages/sol-cov/src/coverage_subprovider.ts') diff --git a/packages/sol-cov/src/coverage_subprovider.ts b/packages/sol-cov/src/coverage_subprovider.ts index fc06720de..37682c45f 100644 --- a/packages/sol-cov/src/coverage_subprovider.ts +++ b/packages/sol-cov/src/coverage_subprovider.ts @@ -49,9 +49,16 @@ export class CoverageSubprovider extends Subprovider { public async writeCoverageAsync(): Promise { await this._coverageManager.writeCoverageAsync(); } - // This method must conform to the web3-provider-engine interface - // tslint:disable-next-line:prefer-function-over-method underscore-private-and-protected - private handleRequest(payload: Web3.JSONRPCRequestPayload, next: NextCallback, end: ErrorCallback) { + /** + * This method conforms to the web3-provider-engine interface. + * It is called internally by the ProviderEngine when it is this subproviders + * turn to handle a JSON RPC request. + * @param payload JSON RPC payload + * @param next Callback to call if this subprovider decides not to handle the request + * @param end Callback to call if subprovider handled the request and wants to pass back the request. + */ + // tslint:disable-next-line:prefer-function-over-method + public handleRequest(payload: Web3.JSONRPCRequestPayload, next: NextCallback, end: ErrorCallback) { switch (payload.method) { case 'eth_sendTransaction': const txData = payload.params[0]; -- cgit