aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/subproviders/empty_wallet_subprovider.ts6
-rw-r--r--src/types.ts5
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;
+}