aboutsummaryrefslogtreecommitdiffstats
path: root/test/stub
diff options
context:
space:
mode:
authorkumavis <aaron@kumavis.me>2018-01-18 11:44:11 +0800
committerkumavis <aaron@kumavis.me>2018-01-18 11:44:11 +0800
commit3cbf2b7e3e8608ec5f79ffd64cc15bc633ef2466 (patch)
tree87a759f48484c95f317cf617de6ae29920a2a0b3 /test/stub
parentb259c293745d94f257a0c309e331fea9f5ffaafe (diff)
downloadtangerine-wallet-browser-3cbf2b7e3e8608ec5f79ffd64cc15bc633ef2466.tar
tangerine-wallet-browser-3cbf2b7e3e8608ec5f79ffd64cc15bc633ef2466.tar.gz
tangerine-wallet-browser-3cbf2b7e3e8608ec5f79ffd64cc15bc633ef2466.tar.bz2
tangerine-wallet-browser-3cbf2b7e3e8608ec5f79ffd64cc15bc633ef2466.tar.lz
tangerine-wallet-browser-3cbf2b7e3e8608ec5f79ffd64cc15bc633ef2466.tar.xz
tangerine-wallet-browser-3cbf2b7e3e8608ec5f79ffd64cc15bc633ef2466.tar.zst
tangerine-wallet-browser-3cbf2b7e3e8608ec5f79ffd64cc15bc633ef2466.zip
test - remove createEthJsQueryStub
Diffstat (limited to 'test/stub')
-rw-r--r--test/stub/provider.js15
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
+}