Skip to content
This repository was archived by the owner on Sep 5, 2020. It is now read-only.

Commit 369713b

Browse files
authored
Merge pull request #3156 from ethereum/develop
Updates master with develop changes
2 parents 94fadb9 + 491a877 commit 369713b

File tree

9 files changed

+68
-51
lines changed

9 files changed

+68
-51
lines changed

CONTRIBUTING.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,18 @@
22

33
## Issues / Bug reports
44

5-
**Read the existing issues first, and also search in the closed issues. You may find yours already.**
5+
**Prior to submitting, please search -and read- _both_ open and closed issues -as _it_ may already exist.**
66

7-
To help make Mist (Ethereum Wallet) better please file issue with the following basic descriptions:
7+
To help improve Mist (_Ethereum Wallet_), please include the following:
88

9-
- What do you run? binary from [releases](https://github.com/ethereum/mist/releases) or the development version from the [commandline](https://github.com/ethereum/mist#run-mist)
10-
- Which version do you used? You can find that in the `VERSION` file in the Mist folder
9+
- What do you run? (_Binary version from [releases](https://github.com/ethereum/mist/releases) or a development version from the [commandline](https://github.com/ethereum/mist#run-mist)_)
10+
- Which version do you use? (_Check the `VERSION` file in the Mist folder_)
1111
- What OS you're on?
12-
- Provide a log file if necessary, you can find that in the Mist data folder (Linux: `~/.config/Mist/*.log`, Windows: `%APPDATA%/Roaming/Mist/*.log`, MacOSX: `~/Library/Application Support/Mist/*.log`)
13-
- Ideally also a screenshot, if its an interface issue
12+
13+
If applicable:
14+
15+
- Log file (Linux: `~/.config/Mist/*.log`, Windows: `%APPDATA%/Roaming/Mist/*.log`, MacOSX: `~/Library/Application Support/Mist/*.log`)
16+
- Screenshot (for GUI related issues)
1417

1518

1619
## Pull Requests

MISTAPI.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ Asks the user to provide, or create a new account.
6464

6565
#### Parameters
6666

67-
1. `Function` The callback to be called with the new address as the second param
67+
1. `Function` The callback to be called with the new address as the second parameter.
6868

6969
#### Example
7070

@@ -78,7 +78,7 @@ mist.requestAccount(function(e, address){
7878

7979
### mist.menu
8080

81-
Provides functionality to control the sub menu of your dapp, when its add to the sidebar.
81+
Provides functionality to control the sub menu of your dapp, when its added to the sidebar.
8282

8383
***
8484

@@ -91,10 +91,10 @@ Adds/Updates a sub menu entry, which is placed below you dapp button in the side
9191
1. `String` **optional** and id string to identify your sub menu entry when updating.
9292
2. `Object` The menu options:
9393
- `name` (`String`): The name of the sub menu button.
94-
- `badge` (`String|null`) **optional**: The badge text for the sub menu button, e.g. `50`
94+
- `badge` (`String|null`) **optional**: The badge text for the sub menu button, e.g. `50`.
9595
- `position` (`Number`) **optional**: The position of the submenu button, `1` is on the top.
96-
- `selected` (`Boolean`) **optional**: whether or not this sub menu entry is currently selected.
97-
3. `Function` **optional**: The callback to be called when the sub menu entry is clicked
96+
- `selected` (`Boolean`) **optional**: Whether or not this sub menu entry is currently selected.
97+
3. `Function` **optional**: The callback to be called when the sub menu entry is clicked.
9898

9999
#### Minimal example
100100

@@ -125,7 +125,7 @@ mist.menu.add('tkrzU', {
125125
### mist.menu.clear()
126126

127127
Removes all sub menu entries. You can use this when you reload your app,
128-
to clear up wrong menu entries, which might got lost since the last session.
128+
to clear up incorrect menu entries, which might have been lost since the last session.
129129

130130
#### Parameters
131131

@@ -145,11 +145,11 @@ Removes a sub menu entry.
145145

146146
### mist.menu.select(id)
147147

148-
Selects the according sub menu entry.
148+
Selects the respective sub menu entry.
149149

150150
#### Parameters
151151

152-
1. `String` the sub menu entry identifier
152+
1. `String` the sub menu entry identifier.
153153

154154
***
155155

@@ -159,23 +159,23 @@ Sets the main badge of your dapp, right below your dapps menu button.
159159

160160
#### Parameters
161161

162-
1. `String` the string used as the badge text
162+
1. `String` the string used as the badge text.
163163

164164
***
165165

166166
### mist.menu.update(id, [, options] [, callback])
167167

168-
Works like `mist.menu.add()`, but all but the `id` parameters are optional.
168+
Works like `mist.menu.add()`, but only the `id` parameter is required.
169169

170170
#### Parameters
171171

172172
1. `String` and id string to identify your sub menu entry.
173173
2. `Object` The menu options:
174174
- `name` (`String`): (optional) The name of the sub menu button.
175-
- `badge` (`String|null`): (optional) The badge text for the sub menu button, e.g. `50`
175+
- `badge` (`String|null`): (optional) The badge text for the sub menu button, e.g. `50`.
176176
- `position` (`Number`): (optional) The position of the submenu button, `1` is on the top.
177-
- `selected` (`Boolean`): (optional) whether or not this sub menu entry is currently selected.
178-
3. `Function` (optional) The callback to be called when the sub menu entry is clicked
177+
- `selected` (`Boolean`): (optional) Whether or not this sub menu entry is currently selected.
178+
3. `Function` (optional) The callback to be called when the sub menu entry is clicked.
179179

180180
#### Example
181181

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,14 @@ To run mist in development you need:
4343
- [Node.js](https://nodejs.org) `v7.x` (use the prefered installation method for your OS)
4444
- [Meteor](https://www.meteor.com/install) javascript app framework
4545
- [Yarn](https://yarnpkg.com/) package manager
46-
- [Electron](http://electron.atom.io/) `v1.4.15` cross platform desktop app framework
46+
- [Electron](http://electron.atom.io/) `v1.7.9` cross platform desktop app framework
4747
- [Gulp](http://gulpjs.com/) build and automation system
4848

4949
Install the latter ones via:
5050

5151
$ curl https://install.meteor.com/ | sh
5252
$ curl -o- -L https://yarnpkg.com/install.sh | bash
53-
$ yarn global add electron@1.4.15
53+
$ yarn global add electron@1.7.9
5454
$ yarn global add gulp
5555

5656
### Initialisation

main.js

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -270,26 +270,25 @@ onReady = () => {
270270
});
271271
}
272272

273-
// check time sync
274-
// var ntpClient = require('ntp-client');
275-
// ntpClient.getNetworkTime("pool.ntp.org", 123, function(err, date) {
276-
timesync.checkEnabled((err, enabled) => {
277-
if (err) {
278-
log.error('Couldn\'t get time from NTP time sync server.', err);
279-
return;
280-
}
281-
282-
if (!enabled) {
283-
dialog.showMessageBox({
284-
type: 'warning',
285-
buttons: ['OK'],
286-
message: global.i18n.t('mist.errors.timeSync.title'),
287-
detail: `${global.i18n.t('mist.errors.timeSync.description')}\n\n${global.i18n.t(`mist.errors.timeSync.${process.platform}`)}`,
288-
}, () => {
289-
});
290-
}
291-
});
273+
// Checks time sync
274+
if (!Settings.skiptimesynccheck) {
275+
timesync.checkEnabled((err, enabled) => {
276+
if (err) {
277+
log.error('Couldn\'t infer if computer automatically syncs time.', err);
278+
return;
279+
}
292280

281+
if (!enabled) {
282+
dialog.showMessageBox({
283+
type: 'warning',
284+
buttons: ['OK'],
285+
message: global.i18n.t('mist.errors.timeSync.title'),
286+
detail: `${global.i18n.t('mist.errors.timeSync.description')}\n\n${global.i18n.t(`mist.errors.timeSync.${process.platform}`)}`,
287+
}, () => {
288+
});
289+
}
290+
});
291+
}
293292

294293
const kickStart = () => {
295294
// client binary stuff

modules/ethereumNode.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ class EthereumNode extends EventEmitter {
465465
error.tag = UNABLE_TO_BIND_PORT_ERROR;
466466
}
467467

468-
log.debug(err.message);
468+
log.debug(error);
469469

470470
return reject(error);
471471
}

modules/nodeSync.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,10 @@ class NodeSync extends EventEmitter {
147147
const blockResult = ret2.result;
148148
const now = Math.floor(new Date().getTime() / 1000);
149149

150+
if (!blockResult) {
151+
return this._sync();
152+
}
153+
150154
log.debug(`Last block: ${Number(blockResult.number)}; timestamp: ${blockResult.timestamp}`);
151155

152156
const diff = now - +blockResult.timestamp;

modules/settings.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,14 @@ const argv = require('yargs')
132132
group: 'Mist options:',
133133
type: 'boolean',
134134
},
135+
skiptimesynccheck: {
136+
demand: false,
137+
requiresArg: false,
138+
nargs: 0,
139+
describe: 'Disable checks for the presence of automatic time sync on your OS.',
140+
group: 'Mist options:',
141+
type: 'boolean',
142+
},
135143
'': {
136144
describe: 'To pass options to the underlying node (e.g. Geth) use the --node- prefix, e.g. --node-datadir',
137145
group: 'Node options:',
@@ -141,7 +149,6 @@ const argv = require('yargs')
141149
.alias('h', 'help')
142150
.parse(process.argv.slice(1));
143151

144-
145152
argv.nodeOptions = [];
146153

147154
for (const optIdx in argv) {
@@ -304,6 +311,10 @@ class Settings {
304311
this.saveConfig('ui.i18n', langCode);
305312
}
306313

314+
get skiptimesynccheck() {
315+
return argv.skiptimesynccheck;
316+
}
317+
307318
initConfig() {
308319
global.config.insert({
309320
ui: {

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "Mist",
3-
"version": "0.9.1",
3+
"version": "0.9.2",
44
"license": "GPL-3.0",
55
"author": "Ethereum Mist Team <[email protected]>",
66
"repository": {
@@ -32,7 +32,7 @@
3232
"minimongo-standalone": "^1.1.0-3",
3333
"numeral": "^2.0.6",
3434
"oboe": "^2.1.3",
35-
"os-timesync": "^1.0.7",
35+
"os-timesync": "^1.0.8",
3636
"semver": "^5.1.0",
3737
"solc": "^0.4.15",
3838
"swarm-js": "^0.1.21",
@@ -50,7 +50,7 @@
5050
"co-mocha": "^1.2.0",
5151
"del": "^2.2.2",
5252
"ecstatic": "^2.1.0",
53-
"electron": "1.7.8",
53+
"electron": "1.7.9",
5454
"electron-builder": "^12.2.2",
5555
"eslint": "^3.14.1",
5656
"eslint-config-airbnb-base": "^11.0.1",

yarn.lock

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1474,9 +1474,9 @@ electron-window-state@^4.0.1:
14741474
jsonfile "^2.2.3"
14751475
mkdirp "^0.5.1"
14761476

1477-
1478-
version "1.7.8"
1479-
resolved "https://registry.yarnpkg.com/electron/-/electron-1.7.8.tgz#27b791a6895171a7d52991b99442cdbd10a3539d"
1477+
1478+
version "1.7.9"
1479+
resolved "https://registry.yarnpkg.com/electron/-/electron-1.7.9.tgz#add54e9f8f83ed02f6519ec10135f698b19336cf"
14801480
dependencies:
14811481
"@types/node" "^7.0.18"
14821482
electron-download "^3.0.1"
@@ -3814,9 +3814,9 @@ os-locale@^1.4.0:
38143814
dependencies:
38153815
lcid "^1.0.0"
38163816

3817-
os-timesync@^1.0.7:
3818-
version "1.0.7"
3819-
resolved "https://registry.yarnpkg.com/os-timesync/-/os-timesync-1.0.7.tgz#fc7ea7e6de1fc88742880cd08ff284327678e20d"
3817+
os-timesync@^1.0.8:
3818+
version "1.0.8"
3819+
resolved "https://registry.yarnpkg.com/os-timesync/-/os-timesync-1.0.8.tgz#390ae8832e20183ea3fc1b97ea90bcbc97c0178f"
38203820

38213821
os-tmpdir@^1.0.0, os-tmpdir@^1.0.1, os-tmpdir@~1.0.1:
38223822
version "1.0.2"

0 commit comments

Comments
 (0)