diff --git a/src/background/api.js b/src/background/api.js index 510baec..0a91708 100644 --- a/src/background/api.js +++ b/src/background/api.js @@ -7,7 +7,10 @@ module.exports = ({ p2p, config, baseRowData, - torrentClient + torrentClient, + spider, + upnp, + crypto }) => { let torrentClientHashMap = {} diff --git a/src/background/spider.js b/src/background/spider.js index 2e96ed9..eb89c2f 100644 --- a/src/background/spider.js +++ b/src/background/spider.js @@ -293,19 +293,6 @@ if(config.p2pBootstrap) }); } -// setup api -console.log(API) -API({ - sphinx, - recive, - send, - p2p, - config, - baseRowData, - torrentClient -}) - - let undoneQueries = 0; let pushDatabaseBalance = () => { undoneQueries++; @@ -678,6 +665,20 @@ spider.on('peer', (IPs) => { IPs.forEach(ip => p2p.add(ip)) }) +// setup api +API({ + sphinx, + recive, + send, + p2p, + config, + baseRowData, + torrentClient, + spider, + upnp, + crypto +}) + let fakeTorrents = []; function showFakeTorrentsPage(page) {