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

Commit

Permalink
Merge from develop
Browse files Browse the repository at this point in the history
  • Loading branch information
evertonfraga committed Feb 1, 2017
2 parents 9959e7f + 0c7ade6 commit c535631
Show file tree
Hide file tree
Showing 15 changed files with 1,095 additions and 403 deletions.
3 changes: 2 additions & 1 deletion .eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ rules:
import/no-extraneous-dependencies: ## checks if required modules are missing in packages.json
- error
- devDependencies: ## declares files, whose imports belong to devDependencies
- "**/scripts/*.js"
- "**/scripts/build-dist.js"
- "**/tests/_base.js"
- "**/*.test.js"

globals: # don't warn about missing declarations
Expand Down
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ script:
- if [[ $TRAVIS_BRANCH != "master" ]]; then unset CSC_LINK CSC_KEY_PASSWORD; fi # disable macOS code-signing (production certificate) on develop branch
- travis_wait 60 gulp mist --platform $GULP_PLATFORM
- if [[ $TRAVIS_BRANCH == "master" ]]; then travis_wait 60 gulp wallet --platform $GULP_PLATFORM; fi # also build wallet if on master branch
- if [[ $TRAVIS_OS_NAME == "linux" ]]; then export DISPLAY=:99.0; sh -e /etc/init.d/xvfb start; sleep 3; fi
- if [[ $GULP_PLATFORM != "win" ]]; then gulp test-mist; fi

after_success:
- gulp mist-checksums --platform $GULP_PLATFORM
Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -225,3 +225,11 @@ It expects installer/zip files to be in the generated folders e.g. `dist_mist/re
### Code signing for production

**As of [#972](https://github.com/ethereum/mist/pull/972) we've updated the build process and thus need to redo code-signing.**


## Testing

First make sure to build Mist with:
`gulp mist --platform [mac,linux]` or `gulp wallet --platform [mac,linux]`.

Then run `gulp test-mist` or `gulp test-wallet`, accordingly.
17 changes: 11 additions & 6 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -329,11 +329,9 @@ gulp.task('release-dist', ['build-dist'], (done) => {
if (platformIsActive(osArch)) {
switch (osArch) { // eslint-disable-line default-case
case 'win-ia32':
// cp(path.join('win-ia32', `${applicationName} Setup ${version}-ia32.exe`), `${appNameHypen}-win32-${versionDashed}.exe`);
cp(`${applicationName}-${version}-ia32-win.zip`, `${appNameHypen}-win32-${versionDashed}.zip`);
break;
case 'win-x64':
// cp(path.join('win', `${applicationName} Setup ${version}.exe`), `${appNameHypen}-win64-${versionDashed}.exe`);
cp(`${applicationName}-${version}-win.zip`, `${appNameHypen}-win64-${versionDashed}.zip`);
break;
case 'mac-x64':
Expand Down Expand Up @@ -472,15 +470,22 @@ gulp.task('build-nsis', (cb) => {
});


gulp.task('test-wallet', () => {
const testApp = (app) => {
return gulp.src([
'./tests/wallet/*.test.js',
])
.pipe(mocha({
`./tests/${app}/*.test.js`,
]).pipe(mocha({
timeout: 60000,
ui: 'exports',
reporter: 'spec',
}));
};

gulp.task('test-wallet', () => {
testApp('wallet');
});

gulp.task('test-mist', () => {
testApp('mist');
});


Expand Down
3 changes: 1 addition & 2 deletions modules/db.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
const fs = require('fs');
const path = require('path');
const Q = require('bluebird');
const Loki = require('lokijs');
const Settings = require('./settings');
Expand All @@ -10,7 +9,7 @@ let db;


exports.init = () => {
const filePath = path.join(Settings.userDataPath, 'mist.lokidb');
const filePath = Settings.dbFilePath;

return Q.try(() => {
// if db file doesn't exist then create it
Expand Down
2 changes: 1 addition & 1 deletion modules/ipc/methods/eth_sendTransaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ module.exports = class extends BaseProcessor {
if (_.isString(val)) {

// make sure all data is lowercase and has 0x
val = '0x'+ val.toLowerCase().replace('0x','');
if (val) val = `0x${val.toLowerCase().replace('0x', '')}`;

if (val.match(/[^0-9a-fx]/igm)) {
throw this.ERRORS.INVALID_PAYLOAD;
Expand Down
5 changes: 5 additions & 0 deletions modules/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,11 @@ class Settings {
return app.getPath('userData');
}

get dbFilePath() {
const dbFileName = (this.inAutoTestMode) ? 'mist.test.lokidb' : 'mist.lokidb';
return path.join(this.userDataPath, dbFileName);
}

get appDataPath() {
// Application Support/
return app.getPath('appData');
Expand Down
36 changes: 21 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,34 +12,38 @@
},
"main": "main.js",
"dependencies": {
"babel-runtime": "^6.18.0",
"bignumber.js": "^2.1.4",
"bluebird": "^3.3.5",
"babel-runtime": "^6.22.0",
"bignumber.js": "^4.0.0",
"bluebird": "^3.4.7",
"chai-as-promised": "^6.0.0",
"chai-string": "^1.3.0",
"electron-squirrel-startup": "^1.0.0",
"ethereum-client-binaries": "^1.6.1",
"ethereum-keyfile-recognizer": "^1.0.2",
"ethereumjs-abi": "^0.6.3",
"got": "^6.3.0",
"i18next": "^2.3.4",
"got": "^6.7.1",
"i18next": "^6.0.3",
"log-rotate": "^0.2.7",
"log4js": "^0.6.35",
"lokijs": "^1.4.1",
"minimongo-standalone": "0.0.9",
"numeral": "^1.5.3",
"os-timesync": "^1.0.7",
"log4js": "^1.1.0",
"lokijs": "^1.4.2",
"minimongo-standalone": "^1.1.0-3",
"numeral": "^2.0.4",
"os-timesync": "^1.0.6",
"semver": "^5.1.0",
"solc": "0.4.6",
"typescript": "^1.7.3",
"solc": "^0.4.8",
"typescript": "^2.1.5",
"underscore": "^1.8.3",
"underscore-deep-extend": "^1.1.5",
"uuid": "^2.0.2",
"uuid": "^3.0.1",
"web3": "^0.17.0-alpha",
"yargs": "^4.3.1"
"yargs": "^6.6.0"
},
"devDependencies": {
"chai": "^3.5.0",
"co-mocha": "^1.2.0",
"del": "^2.2.2",
"chai-as-promised": "^6.0.0",
"ecstatic": "^2.1.0",
"electron": "1.3.13",
"electron-builder": "^12.0.3",
"eslint": "^3.14.1",
Expand All @@ -53,9 +57,11 @@
"gulp-spawn-mocha": "^3.1.0",
"merge-stream": "^1.0.0",
"minimist": "^1.2.0",
"mocha": "^3.2.0",
"optimist": "^0.6.1",
"run-sequence": "^1.2.1",
"shelljs": "^0.7.6",
"spectron": "^3.2.2"
"spectron": "3.3.0",
"sync-request": "^3.0.1"
}
}
Loading

0 comments on commit c535631

Please sign in to comment.