From 109b614015bbed6d08abb6bc0e5a14e380f2759a Mon Sep 17 00:00:00 2001 From: pbca26 Date: Wed, 25 Apr 2018 23:04:03 +0300 Subject: [PATCH] watchonly addr mode flag --- main.js | 1 + routes/shepherd.js | 1 + routes/shepherd/auth.js | 4 ++++ 3 files changed, 6 insertions(+) diff --git a/main.js b/main.js index 5702d29..8e197de 100644 --- a/main.js +++ b/main.js @@ -293,6 +293,7 @@ function createWindow(status, hideLoadingWindow) { mainWindow.checkStringEntropy = shepherd.checkStringEntropy; mainWindow.pinAccess = false; mainWindow.bip39 = bip39; + mainWindow.isWatchOnly = shepherd.isWatchOnly; for (let i = 0; i < process.argv.length; i++) { if (process.argv[i].indexOf('nvote') > -1) { diff --git a/routes/shepherd.js b/routes/shepherd.js index f6ec72d..c5dbd52 100644 --- a/routes/shepherd.js +++ b/routes/shepherd.js @@ -37,6 +37,7 @@ shepherd.rpcConf = {}; shepherd.appRuntimeLog = []; shepherd.appRuntimeSPVLog = []; shepherd.lockDownAddCoin = false; +shepherd.isWatchOnly = false; // dex cache shepherd.mmupass = null; diff --git a/routes/shepherd/auth.js b/routes/shepherd/auth.js index 44c7516..b889b85 100644 --- a/routes/shepherd/auth.js +++ b/routes/shepherd/auth.js @@ -59,5 +59,9 @@ module.exports = (shepherd) => { return passwdStrength(str) < 29 ? false : true; }; + shepherd.isWatchOnly = () => { + return shepherd.isWatchOnly; + }; + return shepherd; }; \ No newline at end of file