From 5ef159edb76a535f648aa3f1bb577b8e34b34d78 Mon Sep 17 00:00:00 2001 From: yann300 Date: Thu, 5 Jul 2018 09:59:54 +0200 Subject: [PATCH] add detect network --- src/app/plugin/pluginAPI.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/app/plugin/pluginAPI.js b/src/app/plugin/pluginAPI.js index ebd9b694e4..4298db9624 100644 --- a/src/app/plugin/pluginAPI.js +++ b/src/app/plugin/pluginAPI.js @@ -12,6 +12,12 @@ module.exports = (fileProviders, compiler, udapp, tabbedMenu) => { }, updateTitle: (mod, title, cb) => { tabbedMenu.updateTabTitle(mod, title) + if (cb) cb() + }, + detectNetWork: (mod, cb) => { + executionContext.detectNetwork((error, network) => { + cb(error, network) + }) } }, config: {