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

Commit

Permalink
Merge pull request #3156 from ethereum/develop
Browse files Browse the repository at this point in the history
Updates master with develop changes
  • Loading branch information
evertonfraga committed Oct 13, 2017
2 parents 94fadb9 + 491a877 commit 369713b
Show file tree
Hide file tree
Showing 9 changed files with 68 additions and 51 deletions.
15 changes: 9 additions & 6 deletions CONTRIBUTING.md
Expand Up @@ -2,15 +2,18 @@

## Issues / Bug reports

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

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

- 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)
- Which version do you used? You can find that in the `VERSION` file in the Mist folder
- 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)_)
- Which version do you use? (_Check the `VERSION` file in the Mist folder_)
- What OS you're on?
- 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`)
- Ideally also a screenshot, if its an interface issue

If applicable:

- Log file (Linux: `~/.config/Mist/*.log`, Windows: `%APPDATA%/Roaming/Mist/*.log`, MacOSX: `~/Library/Application Support/Mist/*.log`)
- Screenshot (for GUI related issues)


## Pull Requests
Expand Down
26 changes: 13 additions & 13 deletions MISTAPI.md
Expand Up @@ -64,7 +64,7 @@ Asks the user to provide, or create a new account.

#### Parameters

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

#### Example

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

### mist.menu

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

***

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

#### Minimal example

Expand Down Expand Up @@ -125,7 +125,7 @@ mist.menu.add('tkrzU', {
### mist.menu.clear()

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

#### Parameters

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

### mist.menu.select(id)

Selects the according sub menu entry.
Selects the respective sub menu entry.

#### Parameters

1. `String` the sub menu entry identifier
1. `String` the sub menu entry identifier.

***

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

#### Parameters

1. `String` the string used as the badge text
1. `String` the string used as the badge text.

***

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

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

#### Parameters

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

#### Example

Expand Down
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -43,14 +43,14 @@ To run mist in development you need:
- [Node.js](https://nodejs.org) `v7.x` (use the prefered installation method for your OS)
- [Meteor](https://www.meteor.com/install) javascript app framework
- [Yarn](https://yarnpkg.com/) package manager
- [Electron](http://electron.atom.io/) `v1.4.15` cross platform desktop app framework
- [Electron](http://electron.atom.io/) `v1.7.9` cross platform desktop app framework
- [Gulp](http://gulpjs.com/) build and automation system

Install the latter ones via:

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

### Initialisation
Expand Down
37 changes: 18 additions & 19 deletions main.js
Expand Up @@ -270,26 +270,25 @@ onReady = () => {
});
}

// check time sync
// var ntpClient = require('ntp-client');
// ntpClient.getNetworkTime("pool.ntp.org", 123, function(err, date) {
timesync.checkEnabled((err, enabled) => {
if (err) {
log.error('Couldn\'t get time from NTP time sync server.', err);
return;
}

if (!enabled) {
dialog.showMessageBox({
type: 'warning',
buttons: ['OK'],
message: global.i18n.t('mist.errors.timeSync.title'),
detail: `${global.i18n.t('mist.errors.timeSync.description')}\n\n${global.i18n.t(`mist.errors.timeSync.${process.platform}`)}`,
}, () => {
});
}
});
// Checks time sync
if (!Settings.skiptimesynccheck) {
timesync.checkEnabled((err, enabled) => {
if (err) {
log.error('Couldn\'t infer if computer automatically syncs time.', err);
return;
}

if (!enabled) {
dialog.showMessageBox({
type: 'warning',
buttons: ['OK'],
message: global.i18n.t('mist.errors.timeSync.title'),
detail: `${global.i18n.t('mist.errors.timeSync.description')}\n\n${global.i18n.t(`mist.errors.timeSync.${process.platform}`)}`,
}, () => {
});
}
});
}

const kickStart = () => {
// client binary stuff
Expand Down
2 changes: 1 addition & 1 deletion modules/ethereumNode.js
Expand Up @@ -465,7 +465,7 @@ class EthereumNode extends EventEmitter {
error.tag = UNABLE_TO_BIND_PORT_ERROR;
}

log.debug(err.message);
log.debug(error);

return reject(error);
}
Expand Down
4 changes: 4 additions & 0 deletions modules/nodeSync.js
Expand Up @@ -147,6 +147,10 @@ class NodeSync extends EventEmitter {
const blockResult = ret2.result;
const now = Math.floor(new Date().getTime() / 1000);

if (!blockResult) {
return this._sync();
}

log.debug(`Last block: ${Number(blockResult.number)}; timestamp: ${blockResult.timestamp}`);

const diff = now - +blockResult.timestamp;
Expand Down
13 changes: 12 additions & 1 deletion modules/settings.js
Expand Up @@ -132,6 +132,14 @@ const argv = require('yargs')
group: 'Mist options:',
type: 'boolean',
},
skiptimesynccheck: {
demand: false,
requiresArg: false,
nargs: 0,
describe: 'Disable checks for the presence of automatic time sync on your OS.',
group: 'Mist options:',
type: 'boolean',
},
'': {
describe: 'To pass options to the underlying node (e.g. Geth) use the --node- prefix, e.g. --node-datadir',
group: 'Node options:',
Expand All @@ -141,7 +149,6 @@ const argv = require('yargs')
.alias('h', 'help')
.parse(process.argv.slice(1));


argv.nodeOptions = [];

for (const optIdx in argv) {
Expand Down Expand Up @@ -304,6 +311,10 @@ class Settings {
this.saveConfig('ui.i18n', langCode);
}

get skiptimesynccheck() {
return argv.skiptimesynccheck;
}

initConfig() {
global.config.insert({
ui: {
Expand Down
6 changes: 3 additions & 3 deletions package.json
@@ -1,6 +1,6 @@
{
"name": "Mist",
"version": "0.9.1",
"version": "0.9.2",
"license": "GPL-3.0",
"author": "Ethereum Mist Team <mist@ethereum.org>",
"repository": {
Expand Down Expand Up @@ -32,7 +32,7 @@
"minimongo-standalone": "^1.1.0-3",
"numeral": "^2.0.6",
"oboe": "^2.1.3",
"os-timesync": "^1.0.7",
"os-timesync": "^1.0.8",
"semver": "^5.1.0",
"solc": "^0.4.15",
"swarm-js": "^0.1.21",
Expand All @@ -50,7 +50,7 @@
"co-mocha": "^1.2.0",
"del": "^2.2.2",
"ecstatic": "^2.1.0",
"electron": "1.7.8",
"electron": "1.7.9",
"electron-builder": "^12.2.2",
"eslint": "^3.14.1",
"eslint-config-airbnb-base": "^11.0.1",
Expand Down
12 changes: 6 additions & 6 deletions yarn.lock
Expand Up @@ -1474,9 +1474,9 @@ electron-window-state@^4.0.1:
jsonfile "^2.2.3"
mkdirp "^0.5.1"

electron@1.7.8:
version "1.7.8"
resolved "https://registry.yarnpkg.com/electron/-/electron-1.7.8.tgz#27b791a6895171a7d52991b99442cdbd10a3539d"
electron@1.7.9:
version "1.7.9"
resolved "https://registry.yarnpkg.com/electron/-/electron-1.7.9.tgz#add54e9f8f83ed02f6519ec10135f698b19336cf"
dependencies:
"@types/node" "^7.0.18"
electron-download "^3.0.1"
Expand Down Expand Up @@ -3814,9 +3814,9 @@ os-locale@^1.4.0:
dependencies:
lcid "^1.0.0"

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

os-tmpdir@^1.0.0, os-tmpdir@^1.0.1, os-tmpdir@~1.0.1:
version "1.0.2"
Expand Down

0 comments on commit 369713b

Please sign in to comment.