Skip to content

Commit

Permalink
Merge pull request #47 from dexlab-io/feature/pwa
Browse files Browse the repository at this point in the history
Enabled PWA
  • Loading branch information
perminder-klair authored Feb 5, 2019
2 parents b511515 + 41f40ff commit 1d9d6ad
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 10 deletions.
Binary file removed public/favicon.ico
Binary file not shown.
Binary file added public/images/logo-64x64.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico" />
<link rel="shortcut icon" href="%PUBLIC_URL%/images/logo-64x64.png" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, shrink-to-fit=no"
Expand Down
2 changes: 1 addition & 1 deletion public/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "Daypay POS",
"icons": [
{
"src": "favicon.ico",
"src": "/images/logo-64x64.png",
"sizes": "64x64 32x32 24x24 16x16",
"type": "image/x-icon"
}
Expand Down
5 changes: 2 additions & 3 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,17 @@ import './theme/bulma.css'; // load bulma
import './localization'; // load i18n
import apolloClient from './utils/apolloClient';
import theme, { GlobalStyle } from './theme'; // load custom theme
import config from './config';
import EthereumHDWallet from './class/ethereum/EthereumHDWallet';
import { Error404, Dashboard, Test } from './pages';

const posAddress = '0xd18a54f89603Fe4301b29EF6a8ab11b9Ba24f139';

class App extends Component {
componentDidMount() {
this.init();
}

async init() {
this.wallet = new EthereumHDWallet(false, posAddress);
this.wallet = new EthereumHDWallet(false, config.posAddress);
await this.wallet.setWeb3();
await this.wallet.fetchBalance();
await this.wallet.getNetworkID();
Expand Down
4 changes: 2 additions & 2 deletions src/config/index.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
export default {
DEV_MOVE: true,
debug: process.env.NODE_ENV === 'development',
ENABLE_LOGS: true,
APP_VERSION: '0.2.12-b2',
siteName: 'Dexpay',
siteUrl: '',
logo: '',
fbAppID: '',
twitter: '',
posAddress: '0xB599Ac9d4892f44fEAc6bec3314Ef58432Ae3c79',
posAddress: '0xd18a54f89603Fe4301b29EF6a8ab11b9Ba24f139',

currency: {
symbol: '€',
Expand Down
9 changes: 6 additions & 3 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@ import React from 'react';
import ReactDOM from 'react-dom';

import App from './App';
import config from './config';
import * as serviceWorker from './utils/serviceWorker';

ReactDOM.render(<App />, document.getElementById('root'));

// If you want your app to work offline and load faster, you can change
// unregister() to register() below. Note this comes with some pitfalls.
// Learn more about service workers: http://bit.ly/CRA-PWA
serviceWorker.unregister();
if (config.debug) {
serviceWorker.unregister();
} else {
serviceWorker.register();
}

0 comments on commit 1d9d6ad

Please sign in to comment.