Skip to content

Commit

Permalink
Update master to 0.9.15 (#569)
Browse files Browse the repository at this point in the history
* Fix BN error

* toEth

* Electron Icon (#466)

* Add electron icons

* Remove leftovers

* Update version number

* Fix tests on new jest update

* Update version

* Package-json

* Remove win icon

* Win icon electron

* Wrong name

* chore(package): update autoprefixer to version 9.1.2

* fix(package): update mobx to version 5.0.4

* chore(package): update webpack to version 4.17.0

* [FEATURE] Automatic electron builds.

* Rename app to TimeNode.

* Adjust stats to the latest timenode-core changes (#550)

[FEATURE] Reset Stats

* DB name upgrade

* Allow the user to detach the wallet on password screen (#552)

* Add maxGasSubsidy option to TimeNode settings

* adjust to statsdb having init method for loading

* More logs.

* Fix Windows.

* Remove node_modules from electron-builds.

* fix(package): update @ethereum-alarm-clock/timenode-core to version 5.0.2

* Fix copy pasting.

* Enable web security.

* Fix claiming ON/OFF bug + add claiming notification (#559)

* [TimeNode Settings] Unsaved Changes warning (#560)

* Add Unsaved Changes warning to TimeNode Settings

* Add after-save callback

* Fix edge cases

* chore(package): update browserslist to version 4.1.0 (#558)

* chore(package): update react-hot-loader to version 4.3.5 (#557)

* chore(package): update enzyme to version 3.4.4 (#543)

* chore(package): update eac.js-lib to version 2.3.8

* Generate new OSX build.

* [FEATURE] Refactor networks and enable Ropsten (#564)

* Refactor networks and enable Ropsten

* Check if jquery exists on notification

* Fix tests

* [BUGIX] Fix web version routing. (#565)

* [FEATURE] Unsaved changes pop-up (#563)

* Add popup when switching away from unsaved settings

* Remove unnecessary

* Replace confirm() with a proper styled modal

* Typos

* Better name for state

* chore(package): update @ethereum-alarm-clock/timenode-core to version 5.1.0 (#568)

Closes #562

* chore(package): update eac.js-lib to version 2.4.0 (#567)

* [FEATURE] Upload installers to Bintray. (#566)

* 0.9.15
  • Loading branch information
josipbagaric authored Aug 24, 2018
1 parent 1ac2802 commit 5db5c0a
Show file tree
Hide file tree
Showing 36 changed files with 7,924 additions and 4,950 deletions.
6 changes: 4 additions & 2 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
out/
dist/
node_modules/
app/pages/
app/plugins/
abi
eth-alarm-clock-dapp**
eth-alarm-clock-dapp**
electron-builds
tools
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
node_modules
out/
dist
eth-alarm-clock-dapp**
.DS_Store
yarn-error.log
yarn-error.log
electron-builds
60 changes: 47 additions & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,70 @@
dist: trusty
sudo: required
group: beta
matrix:
include:
- os: osx
osx_image: xcode9.3
env:
- ELECTRON_CACHE=$HOME/.cache/electron
- ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder
- USE_HARD_LINKS=false
if: tag IS present
cache:
directories:
- node_modules
- $HOME/.cache/electron
- $HOME/.cache/electron-builder
- $HOME/.npm/_prebuilds

- os: linux
dist: trusty
sudo: required
services: docker
env:
- DEPLOY_RELEASE=true
cache:
directories:
- node_modules
- $HOME/.npm/_prebuilds

language: node_js
node_js:
- "8"
cache:
directories:
- node_modules
node_js: "8"

install: npm install

before_script:
- chmod +x ./tools/test-{linux,osx}.sh

script:
- npm run lint
- npm run build
- npm run test
- ./tools/test-linux.sh
- ./tools/test-osx.sh

before_cache:
- rm -rf $HOME/.cache/electron-builder/wine

branches:
except:
- "/^v\\d+\\.\\d+\\.\\d+$/"

deploy:
- provider: s3
access_key_id: $AWS_ACCESS_KEY
secret_access_key: $AWS_SECRET_KEY
bucket: $AWS_S3_BUCKET
local_dir: out
local_dir: dist
skip_cleanup: true
acl: public_read
on:
branch: develop
condition: $DEPLOY_RELEASE = true
- provider: s3
access_key_id: $AWS_ACCESS_KEY
secret_access_key: $AWS_SECRET_KEY
bucket: $AWS_S3_PROD_BUCKET
local_dir: out
local_dir: dist
skip_cleanup: true
acl: public_read
on:
branch: master
condition: $DEPLOY_RELEASE = true
notifications:
slack:
secure: $SLACK_NOTIFICATIONS
4 changes: 4 additions & 0 deletions __tests__/dependencies.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ const nonExactPrefixes = ['~', '^', '>', '>=', '<', '<='];

describe('package.json', () => {
it('dependencies should not contain any non-exact versions', () => {
if (!packageJSON.dependencies) {
return;
}

const deps = Object.values(packageJSON.dependencies);
deps.forEach(depVersion => {
nonExactPrefixes.forEach(badPrefix => {
Expand Down
6 changes: 2 additions & 4 deletions __tests__/stores/TransactionFetcher.unit.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import TransactionFetcher from '../../app/stores/TransactionFetcher';
import { equal } from 'assert';
import TransactionCache from '../../app/stores/TransactionCache';
import FeaturesService from '../../app/services/features';
import { KOVAN_NETWORK_ID } from '../../app/config/web3Config';
import { Networks, KOVAN_NETWORK_ID } from '../../app/config/web3Config';
import LocalStorageService from '../../app/services/storage';
import LocalStorageMock from '../../__mocks__/LocalStorageMock';

Expand Down Expand Up @@ -51,9 +51,7 @@ describe('Stores / TransactionFetcher', () => {
const transactionsCache = new TransactionCache(storageService);

const web3 = {
network: {
id: KOVAN_NETWORK_ID
},
network: Networks[KOVAN_NETWORK_ID],
filter() {
return {
get(callback) {
Expand Down
6 changes: 2 additions & 4 deletions __tests__/stores/TransactionStore.unit.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import FeaturesService from '../../app/services/features';
import { KOVAN_NETWORK_ID } from '../../app/config/web3Config';
import { Networks, KOVAN_NETWORK_ID } from '../../app/config/web3Config';
import { TransactionStore, TEMPORAL_UNIT } from '../../app/stores/TransactionStore';

describe('Stores / TransactionStore', () => {
Expand Down Expand Up @@ -44,9 +44,7 @@ describe('Stores / TransactionStore', () => {
};

const web3 = {
network: {
id: KOVAN_NETWORK_ID
},
network: Networks[KOVAN_NETWORK_ID],
filter() {
return {
get(callback) {
Expand Down
63 changes: 63 additions & 0 deletions app/components/Common/ConfirmModal.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';

class ConfirmModal extends Component {
render() {
return (
<div
className="modal fade stick-up"
id={`${this.props.modalName}Modal`}
tabIndex="-1"
role="dialog"
aria-labelledby={`${this.props.modalName}ModalLabel`}
aria-hidden="true"
>
<div className="modal-dialog">
<div className="modal-content">
<div className="modal-header clearfix text-left separator">
<button type="button" className="close" data-dismiss="modal" aria-hidden="true">
<i className="pg-close fs-14" />
</button>
<h3 className="timenode-modal-title m-0">{this.props.modalTitle}</h3>
</div>
<div className="modal-body">{this.props.modalBody}</div>
<div className="modal-footer">
<div className="row">
<div className="col-md-6">
<button
className="btn btn-light btn-block"
type="button"
data-dismiss="modal"
onClick={this.props.onCancel}
>
Cancel
</button>
</div>
<div className="col-md-6">
<button
className="btn btn-primary btn-block"
type="button"
data-dismiss="modal"
onClick={this.props.onConfirm}
>
<strong>Confirm</strong>
</button>
</div>
</div>
</div>
</div>
</div>
</div>
);
}
}

ConfirmModal.propTypes = {
modalName: PropTypes.string,
modalTitle: PropTypes.string,
modalBody: PropTypes.string,
onConfirm: PropTypes.func,
onCancel: PropTypes.func
};

export default ConfirmModal;
27 changes: 22 additions & 5 deletions app/components/TimeNode/Modals/ConfirmEconomicStrategyModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,27 @@ class ConfirmClaimingModal extends Component {

saveClaimingChange() {
const password = this.passwdRef.value;
const { maxDeposit, minBalance, minProfitability, timeNodeStore } = this.props;
const {
claiming,
maxDeposit,
minBalance,
minProfitability,
maxGasSubsidy,
timeNodeStore
} = this.props;

if (timeNodeStore.passwordMatchesKeystore(password)) {
timeNodeStore.saveClaimingStrategy({ maxDeposit, minBalance, minProfitability });
timeNodeStore.claiming = claiming;
timeNodeStore.saveClaimingStrategy({
maxDeposit,
minBalance,
minProfitability,
maxGasSubsidy
});
timeNodeStore.restart(password);
showNotification('Changes saved.', 'success');
this.passwdRef.value = '';
this.props.refreshParent();
}
}

Expand Down Expand Up @@ -83,9 +97,12 @@ class ConfirmClaimingModal extends Component {
ConfirmClaimingModal.propTypes = {
timeNodeStore: PropTypes.any,
updateWalletUnlocked: PropTypes.any,
maxDeposit: PropTypes.any,
minBalance: PropTypes.any,
minProfitability: PropTypes.any
claiming: PropTypes.bool,
maxDeposit: PropTypes.string,
minBalance: PropTypes.string,
minProfitability: PropTypes.string,
maxGasSubsidy: PropTypes.string,
refreshParent: PropTypes.any
};

export default ConfirmClaimingModal;
72 changes: 72 additions & 0 deletions app/components/TimeNode/Modals/TimeNodeResetStatsModal.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { inject } from 'mobx-react';

@inject('timeNodeStore')
class TimeNodeResetStatsModal extends Component {
constructor(props) {
super(props);
this.resetStats = this.resetStats.bind(this);
}

resetStats() {
this.props.timeNodeStore.clearStats();
}

render() {
return (
<div
className="modal fade stick-up"
id="timeNodeResetStatsModal"
tabIndex="-1"
role="dialog"
aria-labelledby="timeNodeResetStatsModalLabel"
aria-hidden="true"
>
<div className="modal-dialog">
<div className="modal-content">
<div className="modal-header clearfix text-left separator">
<button type="button" className="close" data-dismiss="modal" aria-hidden="true">
<i className="pg-close fs-14" />
</button>
<h3 className="timenode-modal-title m-0">
Reset stats for <span className="semi-bold">TimeNode</span>
</h3>
</div>
<div className="modal-body">
<hr />
<p>Are you sure you want to do this?</p>
<span className="semi-bold">This will erase your TimeNode statistics.</span>
</div>
<div className="modal-footer">
<div className="row">
<div className="col-md-6">
<button className="btn btn-light btn-block" type="button" data-dismiss="modal">
Cancel
</button>
</div>
<div className="col-md-6">
<button
className="btn btn-primary btn-block"
type="button"
data-dismiss="modal"
onClick={this.resetStats}
>
<strong>Reset</strong>
</button>
</div>
</div>
</div>
</div>
</div>
</div>
);
}
}

TimeNodeResetStatsModal.propTypes = {
timeNodeStore: PropTypes.any,
updateWalletUnlocked: PropTypes.any
};

export default TimeNodeResetStatsModal;
Loading

0 comments on commit 5db5c0a

Please sign in to comment.