Commit 4310a34e authored by Dominik Schiener's avatar Dominik Schiener

Merge branch 'dev'

parents 30c724dc c865b15a
......@@ -6,10 +6,14 @@ var ccurlProvider = function(ccurlPath) {
var fullPath = ccurlPath + '/libccurl';
// Define libccurl to be used for finding the nonce
return ffi.Library(fullPath, {
ccurl_pow : [ 'string', [ 'string', 'int'] ]
});
try {
// Define libccurl to be used for finding the nonce
return ffi.Library(fullPath, {
ccurl_pow : [ 'string', [ 'string', 'int'] ]
});
} catch (err) {
return false;
}
}
var ccurlHashing = function(libccurl, trunkTransaction, branchTransaction, minWeightMagnitude, trytes, callback) {
......
......@@ -53,7 +53,7 @@ var App = (function(App, undefined) {
var isClosed = false;
var didKillNode = false;
var settings = {};
var isDevelopment = process.env.NODE_ENV.trim() === "development";
var isDevelopment = String(process.env.NODE_ENV).trim() === "development";
var didCheckForUpdates = false;
var appVersion = require("../../package.json").version;
var isLookingAtServerLog = false;
......@@ -93,7 +93,7 @@ var App = (function(App, undefined) {
} else {
is64BitOS = process.arch == "x64";
}
 
App.loadSettings();
App.checkLaunchURL();
......@@ -107,6 +107,11 @@ var App = (function(App, undefined) {
electron.app.setAsDefaultProtocolClient("iota"); //not linux
}
if (process.platform == "win32" && !is64BitOS) {
App.showAlertAndQuit("Not Supported", "Windows 32-bit is not supported at the moment.");
return;
}
App.start();
}
......@@ -547,10 +552,12 @@ var App = (function(App, undefined) {
if (settings.lightWallet == 1) {
template[2].submenu[13].label = "Switch to Full Node";
// Remove "view neighbors and view server log" options.
template[2].submenu.splice(1, 2);
// Remove "open database folder" option.
template[2].submenu.splice(2, 1);
template[2].submenu.splice(6, 1);
if (process.platform == "darwin") {
template[2].submenu.splice(9, 2);
template[2].submenu.splice(7 , 2);
}
} else {
if (settings.lightWallet == -1) {
......@@ -1034,6 +1041,7 @@ var App = (function(App, undefined) {
App.showInitializationAlertWindow();
} else {
App.showAlertAndQuit("Server exited", "The Iota server process has exited.");
return;
}
} else if (!doNotQuit) {
remote.getCurrentWindow().close();
......@@ -1047,7 +1055,9 @@ var App = (function(App, undefined) {
}
App.killNode = function(fn) {
if (server && server.exitCode == null) {
var hasServer = server && server.exitCode == null;
if (hasServer) {
App.showKillAlert();
}
......@@ -1065,7 +1075,7 @@ var App = (function(App, undefined) {
// callback = null;
fn();
}
}, (settings.lightWallet == 1 ? 0 : 500));
}, (!hasServer ? 0 : 500));
}
App.openDatabaseFolder = function(file) {
......@@ -1568,7 +1578,6 @@ var App = (function(App, undefined) {
"resizable" : false});
//otherWin.toggleDevTools({mode: "undocked"});
otherWin.setFullScreenable(false);
var isClosing;
otherWin.on("close", function(e) {
......
......@@ -54,7 +54,7 @@ var UI = (function(UI, undefined) {
document.getElementById("title").style.display = "none";
}
if (params.message) {
document.getElementById("message").innerHTML = String(params.message).esapeHTML();
document.getElementById("message").innerHTML = String(params.message).escapeHTML();
document.getElementById("message").style.display = "block";
} else {
document.getElementById("message").style.display = "none";
......
......@@ -2,7 +2,7 @@
"name": "iota",
"productName": "IOTA Wallet",
"description": "IOTA Wallet",
"version": "2.0.3",
"version": "2.1.0",
"license": "GPL-3.0",
"main": "app/js/main.js",
"scripts": {
......@@ -36,8 +36,8 @@
"pidusage": "^1.1.0"
},
"devDependencies": {
"electron": "^1.4.13",
"electron-builder": "^10.11.0",
"electron": "^1.4.14",
"electron-builder": "^11.5.0",
"rimraf": "^2.5.4"
},
"build": {
......
......@@ -2,7 +2,7 @@
"name": "iota-testnet",
"productName": "IOTA Wallet Testnet",
"description": "IOTA Wallet Testnet",
"version": "2.0.2-testnet",
"version": "2.1.0",
"main": "app/js/main.js",
"scripts": {
"postinstall": "install-app-deps && cd app && bower install && cd ../ui && bower install",
......@@ -29,14 +29,14 @@
"url": "https://github.com/iotaledger/wallet"
},
"dependencies": {
"ccurl.interface.js": "0.0.4",
"ffi": "^2.2.0",
"fs-extra": "^1.0.0",
"glob": "^7.1.1",
"pidusage": "^1.1.0"
},
"devDependencies": {
"electron": "^1.4.13",
"electron-builder": "^10.11.0",
"electron": "^1.4.14",
"electron-builder": "^11.5.0",
"rimraf": "^2.5.4"
},
"build": {
......
......@@ -121,8 +121,8 @@ var UI = (function(UI, $, undefined) {
clearInterval(loginGradientInterval);
// After logging in, update state every 5 minutes
UI.createStateInterval(60000*5, false);
// After logging in, update state every minute
UI.createStateInterval(60000, false);
UI.update();
......
......@@ -44,6 +44,11 @@ var UI = (function(UI, $, undefined) {
UI.updateIntervalTime = ms;
// If connecting to a light wallet, minimum state interval is set to 1 minute.
if (connection.lightWallet && ms < 60000) {
ms = 60000;
}
if (updateInterval) {
clearInterval(updateInterval);
}
......@@ -67,6 +72,9 @@ var UI = (function(UI, $, undefined) {
stateExecution(function(error) {
if (!error) {
UI.update();
} else if (!connection.seed && connection.lightWallet) {
//Show error specifically for light nodes...
UI.notify("error", "Could not connect to remote node.");
}
isUpdatingState = false;
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment