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

Commit

Permalink
Merge branch 'develop' into luclu-nsis-wallet
Browse files Browse the repository at this point in the history
  • Loading branch information
luclu authored Mar 27, 2017
2 parents 37a8e86 + ac37432 commit b3a495f
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 27 deletions.
27 changes: 13 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,36 +30,35 @@ Once a Mist version is released the Meteor frontend part is bundled using `meteo

### Dependencies

Requirements:
To run mist in development you need:

* Electron v1.3.13
* Node v6.0 or above
* [Yarn package manager](https://yarnpkg.com/)
- [Node.js](https://nodejs.org) `v6.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.3.13` cross platform desktop app framework
- [Gulp](http://gulpjs.com/) build and automation system

To run mist in development you need [Node.js NPM](https://nodejs.org) and [Meteor](https://www.meteor.com/install) and electron installed:
Install the later ones via:

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

### Installation
### Initialisation

Now you're ready to install Mist:
Now you're ready to initialise Mist for development:

$ git clone https://github.com/ethereum/mist.git
$ cd mist
$ git submodule update --init
$ yarn

To update Mist in the future, run:

$ cd mist
$ git pull && git submodule update
$ git pull
$ yarn

#### Options
It may be preferable to only download platform-specific nodes by passing the `--platform` flag, please refer to the [options section](#platform).

### Run Mist

For development we start the interface with a Meteor server for autoreload etc.
Expand Down
9 changes: 6 additions & 3 deletions interface/client/templates/popupWindows/onboardingScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -423,17 +423,20 @@ Template['popupWindows_onboardingScreen_password'].events({
content: TAPi18n.__('mist.popupWindows.requestAccount.errors.passwordMismatch'),
duration: 3
});
} else if (pw && pw.length > 1 && pw.length < 9) {
} else if (pw && pw.length < 8) {
GlobalNotification.warning({
content: TAPi18n.__('mist.popupWindows.requestAccount.errors.passwordTooShort'),
duration: 3
});
} else if (pw && pw.length >= 9) {
} else if (pw && pw.length >= 8) {
TemplateVar.set('creatingPassword', true);
web3.personal.newAccount(pw, function (e, res) {
TemplateVar.set(template, 'creatingPassword', false);

if (!e) {
// notifiy about backing up!
alert(TAPi18n.__('mist.popupWindows.requestAccount.backupHint'));

if(!e) {
TemplateVar.setTo('.onboarding-account', 'newAccount', web3.toChecksumAddress(res));
TemplateVar.setTo('.onboarding-screen', 'currentActive', 'account');

Expand Down
26 changes: 17 additions & 9 deletions interface/client/templates/popupWindows/requestAccount.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,20 @@ Template['popupWindows_requestAccount'].events({

// stop here so we dont set the password repeat to false
return;
}

// check passwords
} else if (pwRepeat === pw) {
if ( pw !== pwRepeat) {
GlobalNotification.warning({
content: TAPi18n.__('mist.popupWindows.requestAccount.errors.passwordMismatch'),
duration: 3
});
} else if (pw && pw.length < 8) {
GlobalNotification.warning({
content: TAPi18n.__('mist.popupWindows.requestAccount.errors.passwordTooShort'),
duration: 3
});
} else if (pw && pw.length >= 8) {

TemplateVar.set('creating', true);
web3.personal.newAccount(pwRepeat, function (e, res) {
Expand All @@ -54,21 +65,18 @@ Template['popupWindows_requestAccount'].events({
}

TemplateVar.set(template, 'creating', false);
ipc.send('backendAction_closePopupWindow');
});

} else {
template.$('.password').focus();
// notifiy about backing up!
alert(TAPi18n.__('mist.popupWindows.requestAccount.backupHint'));

GlobalNotification.warning({
content: TAPi18n.__('mist.popupWindows.requestAccount.errors.passwordMismatch'),
duration: 3
ipc.send('backendAction_closePopupWindow');
});

}

TemplateVar.set('password-repeat', false);
template.find('input.password-repeat').value = '';
template.find('input.password').value = '';
pw = pwRepeat = null;
}
}
});
1 change: 1 addition & 0 deletions interface/i18n/mist.en.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@
"enterPassword": "Enter password",
"repeatPassword": "Repeat password",
"creating": "Generating account...",
"backupHint": "Make sure you backup your keyfiles AND password!\n\nYou can find your keyfiles folder using the main menu -> Accounts -> Backup -> Accounts. Keep a copy of the \"keystore\" folder where you can't loose it!",
"errors": {
"passwordMismatch": "Your passwords don't match.",
"passwordTooShort": "Make a longer password"
Expand Down
3 changes: 2 additions & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,8 @@ onReady = () => {
return ethereumNode.send('eth_accounts', []);
})
.then(function onboarding(resultData) {
if (ethereumNode.isGeth && resultData.result && resultData.result.length === 0) {

if (ethereumNode.isGeth && (resultData.result === null || (_.isArray(resultData.result) && resultData.result.length === 0))) {
log.info('No accounts setup yet, lets do onboarding first.');

return new Q((resolve, reject) => {
Expand Down

0 comments on commit b3a495f

Please sign in to comment.