Skip to content
This repository was archived by the owner on Feb 26, 2021. It is now read-only.

Commit 4310a34

Browse files
author
domschiener
committed
Merge branch 'dev'
2 parents 30c724d + c865b15 commit 4310a34

File tree

9 files changed

+42
-21
lines changed

9 files changed

+42
-21
lines changed

app/js/ccurl-interface.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,14 @@ var ccurlProvider = function(ccurlPath) {
66

77
var fullPath = ccurlPath + '/libccurl';
88

9-
// Define libccurl to be used for finding the nonce
10-
return ffi.Library(fullPath, {
11-
ccurl_pow : [ 'string', [ 'string', 'int'] ]
12-
});
9+
try {
10+
// Define libccurl to be used for finding the nonce
11+
return ffi.Library(fullPath, {
12+
ccurl_pow : [ 'string', [ 'string', 'int'] ]
13+
});
14+
} catch (err) {
15+
return false;
16+
}
1317
}
1418

1519
var ccurlHashing = function(libccurl, trunkTransaction, branchTransaction, minWeightMagnitude, trytes, callback) {

app/js/main.js

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ var App = (function(App, undefined) {
5353
var isClosed = false;
5454
var didKillNode = false;
5555
var settings = {};
56-
var isDevelopment = process.env.NODE_ENV.trim() === "development";
56+
var isDevelopment = String(process.env.NODE_ENV).trim() === "development";
5757
var didCheckForUpdates = false;
5858
var appVersion = require("../../package.json").version;
5959
var isLookingAtServerLog = false;
@@ -93,7 +93,7 @@ var App = (function(App, undefined) {
9393
} else {
9494
is64BitOS = process.arch == "x64";
9595
}
96-
96+
 
9797
App.loadSettings();
9898

9999
App.checkLaunchURL();
@@ -107,6 +107,11 @@ var App = (function(App, undefined) {
107107
electron.app.setAsDefaultProtocolClient("iota"); //not linux
108108
}
109109

110+
if (process.platform == "win32" && !is64BitOS) {
111+
App.showAlertAndQuit("Not Supported", "Windows 32-bit is not supported at the moment.");
112+
return;
113+
}
114+
110115
App.start();
111116
}
112117

@@ -547,10 +552,12 @@ var App = (function(App, undefined) {
547552

548553
if (settings.lightWallet == 1) {
549554
template[2].submenu[13].label = "Switch to Full Node";
555+
// Remove "view neighbors and view server log" options.
556+
template[2].submenu.splice(1, 2);
550557
// Remove "open database folder" option.
551-
template[2].submenu.splice(2, 1);
558+
template[2].submenu.splice(6, 1);
552559
if (process.platform == "darwin") {
553-
template[2].submenu.splice(9, 2);
560+
template[2].submenu.splice(7 , 2);
554561
}
555562
} else {
556563
if (settings.lightWallet == -1) {
@@ -1034,6 +1041,7 @@ var App = (function(App, undefined) {
10341041
App.showInitializationAlertWindow();
10351042
} else {
10361043
App.showAlertAndQuit("Server exited", "The Iota server process has exited.");
1044+
return;
10371045
}
10381046
} else if (!doNotQuit) {
10391047
remote.getCurrentWindow().close();
@@ -1047,7 +1055,9 @@ var App = (function(App, undefined) {
10471055
}
10481056

10491057
App.killNode = function(fn) {
1050-
if (server && server.exitCode == null) {
1058+
var hasServer = server && server.exitCode == null;
1059+
1060+
if (hasServer) {
10511061
App.showKillAlert();
10521062
}
10531063

@@ -1065,7 +1075,7 @@ var App = (function(App, undefined) {
10651075
// callback = null;
10661076
fn();
10671077
}
1068-
}, (settings.lightWallet == 1 ? 0 : 500));
1078+
}, (!hasServer ? 0 : 500));
10691079
}
10701080

10711081
App.openDatabaseFolder = function(file) {
@@ -1568,7 +1578,6 @@ var App = (function(App, undefined) {
15681578
"resizable" : false});
15691579
//otherWin.toggleDevTools({mode: "undocked"});
15701580
otherWin.setFullScreenable(false);
1571-
15721581
var isClosing;
15731582

15741583
otherWin.on("close", function(e) {

app/windows/js/quit.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ var UI = (function(UI, undefined) {
5454
document.getElementById("title").style.display = "none";
5555
}
5656
if (params.message) {
57-
document.getElementById("message").innerHTML = String(params.message).esapeHTML();
57+
document.getElementById("message").innerHTML = String(params.message).escapeHTML();
5858
document.getElementById("message").style.display = "block";
5959
} else {
6060
document.getElementById("message").style.display = "none";

ccurl/win64/msvcp140.dll

618 KB
Binary file not shown.

ccurl/win64/vcruntime140.dll

85.8 KB
Binary file not shown.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "iota",
33
"productName": "IOTA Wallet",
44
"description": "IOTA Wallet",
5-
"version": "2.0.3",
5+
"version": "2.1.0",
66
"license": "GPL-3.0",
77
"main": "app/js/main.js",
88
"scripts": {
@@ -36,8 +36,8 @@
3636
"pidusage": "^1.1.0"
3737
},
3838
"devDependencies": {
39-
"electron": "^1.4.13",
40-
"electron-builder": "^10.11.0",
39+
"electron": "^1.4.14",
40+
"electron-builder": "^11.5.0",
4141
"rimraf": "^2.5.4"
4242
},
4343
"build": {

package.testnet.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "iota-testnet",
33
"productName": "IOTA Wallet Testnet",
44
"description": "IOTA Wallet Testnet",
5-
"version": "2.0.2-testnet",
5+
"version": "2.1.0",
66
"main": "app/js/main.js",
77
"scripts": {
88
"postinstall": "install-app-deps && cd app && bower install && cd ../ui && bower install",
@@ -29,14 +29,14 @@
2929
"url": "https://github.com/iotaledger/wallet"
3030
},
3131
"dependencies": {
32-
"ccurl.interface.js": "0.0.4",
32+
"ffi": "^2.2.0",
3333
"fs-extra": "^1.0.0",
3434
"glob": "^7.1.1",
3535
"pidusage": "^1.1.0"
3636
},
3737
"devDependencies": {
38-
"electron": "^1.4.13",
39-
"electron-builder": "^10.11.0",
38+
"electron": "^1.4.14",
39+
"electron-builder": "^11.5.0",
4040
"rimraf": "^2.5.4"
4141
},
4242
"build": {

ui/js/ui.login.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,8 @@ var UI = (function(UI, $, undefined) {
121121

122122
clearInterval(loginGradientInterval);
123123

124-
// After logging in, update state every 5 minutes
125-
UI.createStateInterval(60000*5, false);
124+
// After logging in, update state every minute
125+
UI.createStateInterval(60000, false);
126126

127127
UI.update();
128128

ui/js/ui.update.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ var UI = (function(UI, $, undefined) {
4444

4545
UI.updateIntervalTime = ms;
4646

47+
// If connecting to a light wallet, minimum state interval is set to 1 minute.
48+
if (connection.lightWallet && ms < 60000) {
49+
ms = 60000;
50+
}
51+
4752
if (updateInterval) {
4853
clearInterval(updateInterval);
4954
}
@@ -67,6 +72,9 @@ var UI = (function(UI, $, undefined) {
6772
stateExecution(function(error) {
6873
if (!error) {
6974
UI.update();
75+
} else if (!connection.seed && connection.lightWallet) {
76+
//Show error specifically for light nodes...
77+
UI.notify("error", "Could not connect to remote node.");
7078
}
7179
isUpdatingState = false;
7280
});

0 commit comments

Comments
 (0)