diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-08-17 12:22:24 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-08-17 12:22:24 +0800 |
commit | b95d93a43b3020e1ebf4f319d78d918ea0fe8802 (patch) | |
tree | bc658d302a4877c99cb30de23875ed1d84a6ebe3 | |
parent | b5bfcc772acc2d7c538f3809e7ab1890b9f7b1a7 (diff) | |
download | dexon-0x-contracts-b95d93a43b3020e1ebf4f319d78d918ea0fe8802.tar dexon-0x-contracts-b95d93a43b3020e1ebf4f319d78d918ea0fe8802.tar.gz dexon-0x-contracts-b95d93a43b3020e1ebf4f319d78d918ea0fe8802.tar.bz2 dexon-0x-contracts-b95d93a43b3020e1ebf4f319d78d918ea0fe8802.tar.lz dexon-0x-contracts-b95d93a43b3020e1ebf4f319d78d918ea0fe8802.tar.xz dexon-0x-contracts-b95d93a43b3020e1ebf4f319d78d918ea0fe8802.tar.zst dexon-0x-contracts-b95d93a43b3020e1ebf4f319d78d918ea0fe8802.zip |
Add JSONRPCPayload type and remove unused import
-rw-r--r-- | src/subproviders/empty_wallet_subprovider.ts | 6 | ||||
-rw-r--r-- | src/types.ts | 5 |
2 files changed, 8 insertions, 3 deletions
diff --git a/src/subproviders/empty_wallet_subprovider.ts b/src/subproviders/empty_wallet_subprovider.ts index 40d3d418d..0d037042d 100644 --- a/src/subproviders/empty_wallet_subprovider.ts +++ b/src/subproviders/empty_wallet_subprovider.ts @@ -1,5 +1,5 @@ -import * as _ from 'lodash'; -import Web3 = require('web3'); +import * as Web3 from 'web3'; +import {JSONRPCPayload} from '../types'; /* * This class implements the web3-provider-engine subprovider interface and returns @@ -7,7 +7,7 @@ import Web3 = require('web3'); * Source: https://github.com/MetaMask/provider-engine/blob/master/subproviders/subprovider.js */ export class EmptyWalletSubProvider { - public handleRequest(payload: any, next: () => void, end: (err: Error|null, result: any) => void) { + public handleRequest(payload: JSONRPCPayload, next: () => void, end: (err: Error|null, result: any) => void) { switch (payload.method) { case 'eth_accounts': end(null, []); diff --git a/src/types.ts b/src/types.ts index ee45acf11..851995cf7 100644 --- a/src/types.ts +++ b/src/types.ts @@ -368,3 +368,8 @@ export interface ContractArtifact { }; }; } + +export interface JSONRPCPayload { + params: any[]; + method: string; +} |