Skip to content

Commit

Permalink
v1.0.0-rc3 (#620)
Browse files Browse the repository at this point in the history
* [FEATURE] Use network specific storage for transaction cache.

* Move switching provider to TimeNodeStore

* [FIX] Mainnet DAY ABIs (#591)

* Set a proper ABI for the contract DAY token

* DAY token abi is same for all networks

* [BUGFIX] Transaction Cache wrong transactions. (#599)

* Enable provider change notification

* Stop timenode when swithcing providers

* Update snapshots

* chore(package): update style-loader to version 0.23.0 (#588)

* chore(package): update mobx to version 5.1.0 (#579)

* Start scanning after restart (#604)

* Disable faucet on the mainnet (#603)

* Disable faucet on the mainnet

* Use const netId

* chore(package): update eslint-config-standard to version 12.0.0 (#605)

* chore(package): update eslint-plugin-standard to version 4.0.0 (#602)

* chore(package): update concurrently to version 4.0.1 (#607)

Closes #571

* Update enzyme to the latest version 🚀 (#574)

* chore(package): update enzyme to version 3.5.0

* chore(package): update enzyme-adapter-react-16 to version 1.3.0

* chore(package): update eslint-plugin-promise to version 4.0.0 (#542)

* chore(package): update eslint-plugin-react to version 7.11.1 (#609)

Closes #514

* Include TimeNode-specific provider when checking for active timenodes counter

* [FIX] DAY token balance inconsistencies (#613)

* Fix wrong network being sent to worker

* Fix failing tests

* Update package.json version

* [FIX] DAY balance check (#619)

* Fix checking DAY balance

* Change stats and network info fetching logic

* Review changes

* Move wallet unlock logic from view to store

* Show info that analytics will be shown after the TimeNode has been unlocked

* [BUGFIX] Fix transactions not loading on Ropsten. (#621)

* Update README.md

* [FEATURE] Open external links in OS browser in Electron. (#622)

* Only send active timenode when scanning started (#623)

* chore(package): update enzyme-adapter-react-16 to version 1.3.1 (#625)

* [FEATURE] Store cache in IndexedDB instead of Local Storage. (#626)

* Electron: About (#627)

* Add about screen

* Override appName

* Add version to menu.
  • Loading branch information
adibas03 authored and josipbagaric committed Aug 31, 2018
1 parent 8ebd214 commit 7b7e73f
Show file tree
Hide file tree
Showing 47 changed files with 6,650 additions and 4,969 deletions.
1 change: 0 additions & 1 deletion .env.dev
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
HTTP_PROVIDER="https://rarely-suitable-shark.quiknode.io/87817da9-942d-4275-98c0-4176eee51e1a/aB5gwSfQdN4jmkS65F1HyA==/"
KEEN_PROJECT_ID="5b6d8594c9e77c0001e7c578"
KEEN_WRITE_KEY="07C0249B9640D2DD31A8BBB7281D319122C4A5AB37E7731EA6090C43526EC76CB79000C7CC2E5420B6AFB9B00444C21FE91C35932BAEA53DF02A84C1B0BA30E477192920F03DE51F116861313700BDF9323E0C16B3A74933A4B04D24A78EEBCA"
KEEN_READ_KEY="86A450B303F3E14661589C48EAD1D54997D0166F8B5F9D9774034BE6165FCB5FB69D6A62D739E1B5F57AAA42FC83E8832549C738268612C90A228124D31E5F406E0E8CF73B770ED120132D422031466F2AB25965A437D61D7275499C0EEA67A6"
1 change: 0 additions & 1 deletion .env.prod
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
HTTP_PROVIDER="https://rarely-suitable-shark.quiknode.io/87817da9-942d-4275-98c0-4176eee51e1a/aB5gwSfQdN4jmkS65F1HyA==/"
KEEN_PROJECT_ID="5b6d8594c9e77c0001e7c578"
KEEN_WRITE_KEY="07C0249B9640D2DD31A8BBB7281D319122C4A5AB37E7731EA6090C43526EC76CB79000C7CC2E5420B6AFB9B00444C21FE91C35932BAEA53DF02A84C1B0BA30E477192920F03DE51F116861313700BDF9323E0C16B3A74933A4B04D24A78EEBCA"
KEEN_READ_KEY="86A450B303F3E14661589C48EAD1D54997D0166F8B5F9D9774034BE6165FCB5FB69D6A62D739E1B5F57AAA42FC83E8832549C738268612C90A228124D31E5F406E0E8CF73B770ED120132D422031466F2AB25965A437D61D7275499C0EEA67A6"
23 changes: 14 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,30 @@

_Note: This DApp is operational on the Kovan and Ropsten testnets. Mainnet release coming soon._

[![Build Status](https://travis-ci.org/chronologic/eth-alarm-clock-dapp.svg?branch=master)](https://travis-ci.org/chronologic/eth-alarm-clock-dapp)

# Ethereum Alarm Clock DApp

[![Build Status](https://travis-ci.org/chronologic/eth-alarm-clock-dapp.svg?branch=master)](https://travis-ci.org/chronologic/eth-alarm-clock-dapp)
[![Greenkeeper badge](https://badges.greenkeeper.io/chronologic/eth-alarm-clock-dapp.svg)](https://greenkeeper.io/)

A DApp that interacts with the Ethereum Alarm Clock.
__Homepage:__ [Ethereum Alarm Clock](http://www.ethereum-alarm-clock.com/)

__Looking for the latest install?__: [Latest Releases](https://github.com/chronologic/eth-alarm-clock-dapp/releases)

__Want to run a TimeNode?__: [Guide](https://blog.chronologic.network/how-to-prove-day-ownership-to-be-a-timenode-3dc1333c74ef)

__Smart Contracts__: [Source](https://github.com/ethereum-alarm-clock/ethereum-alarm-clock)

# Development guide
## Development guide

## How to build and run locally
### How to build and run locally
0. Install NPM if not present on the system
1. Clone the repo
2. `npm install` - Install all NodeJS dependencies
3. `npm run dev` - Run the dev server
4. Open `localhost:8080` in your web browser
5. Make sure your MetaMask network is set to either Kovan to start using the DApp.

## Docker
### Docker
Useful in case a developer would like to test a feature in an isolated environment.
1. Build containers - `npm run docker-build`
2. Wait for the containers to finish building and starting.
Expand All @@ -30,18 +35,18 @@ Useful in case a developer would like to test a feature in an isolated environme
6. You are now running a fully dockerized environment!
7. _(Optional)_ If you need test DAY tokens, you can get some from the faucet.

## Debugging
### Debugging
Having issues with the project? Try these:
- Try cleaning the project `npm run clean` then running `npm run dev`
- Docker
- Status of the containers using `docker ps -a`
- Logs of a specific container `docker logs <container_name>`
- If all else fails, rebuild the Docker containers using `npm run docker-rebuild`

# Contributing
## Contributing

Pull requests are always welcome. If you found any issues while using our DAapp, please report using the `Issues` tab on Github.

# Questions or Concerns?
## Questions or Concerns?

Since this is beta software, we highly encourage you to test it, use it and try to break it. We would love your feedback if you get stuck somewhere or you think something is not working the way it should be. Please open an issue if you need to report a bug or would like to leave a suggestion. Pull requests are welcome.
3 changes: 2 additions & 1 deletion __tests__/Header.unit.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import createBrowserHistory from 'history/createBrowserHistory';
import { RouterStore, syncHistoryWithStore } from 'mobx-react-router';
import LocalStorageService from '../app/services/storage';
import LocalStorageMock from '../__mocks__/LocalStorageMock';
import TimeNodeStore from '../app/stores/TimeNodeStore';

const browserHistory = createBrowserHistory();
const routingStore = new RouterStore();
Expand All @@ -29,7 +30,6 @@ describe('Header', () => {
});

const keenStore = {};
const timeNodeStore = {};
const eacService = {
getActiveContracts: () => {
return {};
Expand All @@ -38,6 +38,7 @@ describe('Header', () => {
const featuresService = {};

const storageService = new LocalStorageService(new LocalStorageMock());
const timeNodeStore = new TimeNodeStore({}, web3Service, {}, storageService);

const injectables = {
featuresService,
Expand Down
13 changes: 9 additions & 4 deletions __tests__/TransactionScanner.unit.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import { RouterStore, syncHistoryWithStore } from 'mobx-react-router';
import { TRANSACTION_ROW_TEST_ATTRS } from '../app/components/TransactionScanner/TransactionRow';
import { TRANSACTIONS_TABLE_TEST_ATTRS } from '../app/components/TransactionScanner/TransactionsTable';
import { TRANSACTION_SCANNER_LIMIT } from '../app/components/TransactionScanner/TransactionScanner';
import TransactionHelper from '../app/services/transaction-helper';

momentDurationFormatSetup(moment);

Expand Down Expand Up @@ -106,7 +107,8 @@ describe('TransactionScanner', () => {
};

const storageService = {
load() {}
load() {},
waitForInitialization: () => Promise.resolve()
};

const TRANSACTIONS_LENGTH = 20;
Expand Down Expand Up @@ -155,16 +157,19 @@ describe('TransactionScanner', () => {
isCurrentNetworkSupported: true
};
const transactionCache = new TransactionCache(storageService);
const transactionHelper = new TransactionHelper(transactionCache);

transactionHelper.isTransactionMissed = () => false;

const transactionStore = new TransactionStore(
eacService,
web3Service,
fetcher,
transactionCache,
featuresService
featuresService,
transactionHelper
);

transactionStore.isTransactionMissed = () => false;

const injectables = {
eacService,
transactionStore,
Expand Down
2 changes: 1 addition & 1 deletion __tests__/__snapshots__/Header.unit.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ exports[`Header displays current block number 1`] = `
className="timenode-count"
>
<span>
Private
Mainnet
</span>
</span>
Expand Down
7 changes: 6 additions & 1 deletion __tests__/stores/TimeNodeStore.unit.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import { equal, ok } from 'assert';
import TimeNodeStore from '../../app/stores/TimeNodeStore';
import LocalStorageMock from '../../__mocks__/LocalStorageMock';
import LocalStorageService from '../../app/services/storage';
import Web3Service from '../../app/services/web3';
import { Networks, MAIN_NETWORK_ID } from '../../app/config/web3Config';

describe('Stores / TimeNode', () => {
describe('getWorkerOptions', () => {
Expand All @@ -11,7 +13,10 @@ describe('Stores / TimeNode', () => {

const localStorageMock = new LocalStorageMock();
const storageService = new LocalStorageService(localStorageMock);
const timeNodeStore = new TimeNodeStore({}, {}, {}, storageService);
const web3Service = new Web3Service({
network: Networks[MAIN_NETWORK_ID]
});
const timeNodeStore = new TimeNodeStore({}, web3Service, {}, storageService);

timeNodeStore.decrypt = encodedValue => {
if (encodedValue === KEYSTORE_PASSWORD) {
Expand Down
8 changes: 6 additions & 2 deletions __tests__/stores/TransactionStore.unit.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import FeaturesService from '../../app/services/features';
import { Networks, KOVAN_NETWORK_ID } from '../../app/config/web3Config';
import { TransactionStore, TEMPORAL_UNIT } from '../../app/stores/TransactionStore';
import TransactionHelper from '../../app/services/transaction-helper';

describe('Stores / TransactionStore', () => {
describe('getBountiesForBucket', () => {
Expand Down Expand Up @@ -151,7 +152,10 @@ describe('Stores / TransactionStore', () => {
}
};

const getInstance = () => new TransactionStore(eacService, web3, fetcher, {}, featuresService);
const transactionHelper = new TransactionHelper({});

const getInstance = () =>
new TransactionStore(eacService, web3, fetcher, {}, featuresService, transactionHelper);

it('sorts transactions by time when sortByTimestampAscending is true', async () => {
const store = getInstance();
Expand Down Expand Up @@ -196,7 +200,7 @@ describe('Stores / TransactionStore', () => {
const unresolved = false;
const sortByTimestampAscending = true;

store.isTransactionResolved = () => true;
transactionHelper.isTransactionResolved = () => true;

const { transactions, total } = await store._queryTransactions({
transactions: UNSORTED_TXS,
Expand Down
Loading

0 comments on commit 7b7e73f

Please sign in to comment.