diff options
test - remove createEthJsQueryStub
Diffstat (limited to 'test/stub')
-rw-r--r-- | test/stub/provider.js | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/test/stub/provider.js b/test/stub/provider.js index 85e1da707..9f1405c9e 100644 --- a/test/stub/provider.js +++ b/test/stub/provider.js @@ -5,7 +5,6 @@ module.exports = { createEngineForTestData, providerFromEngine, scaffoldMiddleware, - createEthJsQueryStub, createStubedProvider, } @@ -19,20 +18,8 @@ function providerFromEngine (engine) { return provider } -function createEthJsQueryStub (stubProvider) { - return new Proxy({}, { - get: (obj, method) => { - return (...params) => { - return new Promise((resolve, reject) => { - stubProvider.sendAsync({ method: `eth_${method}`, params }, (err, ress) => resolve(ress.result)) - }) - } - }, - }) -} - function createStubedProvider (resultStub) { const engine = createEngineForTestData() engine.push(scaffoldMiddleware(resultStub)) return providerFromEngine(engine) -}
\ No newline at end of file +} |