Browse Source

es6 string literals; fat arrows

all-modes
Petr Balashov 8 years ago
parent
commit
36f9aae3b6
  1. 3
      react/src/actions/addCoin.js
  2. 6
      react/src/components/dashboard/coinTileItem.js
  3. 5
      react/src/components/dashboard/settings.js
  4. 108
      react/src/components/dashboard/syncOnly.js
  5. 2
      react/src/components/dashboard/walletsBalance.js
  6. 4
      react/src/components/dashboard/walletsBasiliskConnection.js
  7. 10
      react/src/components/dashboard/walletsData.js
  8. 4
      react/src/components/dashboard/walletsHeader.js
  9. 4
      react/src/components/dashboard/walletsNative.js
  10. 56
      react/src/components/dashboard/walletsNativeSend.js
  11. 2
      react/src/components/dashboard/walletsNativeSyncProgress.js
  12. 8
      react/src/components/dashboard/walletsNativeTxHistory.js
  13. 35
      react/src/components/login/login.js
  14. 4
      react/src/components/main/main.js

3
react/src/actions/addCoin.js

@ -4,7 +4,8 @@ import {
triggerToaster,
Config,
toggleAddcoinModal,
getDexCoins
getDexCoins,
startIguanaInstance
} from './actionCreators';
import {
logGuiHttp,

6
react/src/components/dashboard/coinTileItem.js

@ -21,6 +21,8 @@ import {
} from '../../actions/actionCreators';
import Store from '../../store';
const BASILISK_CACHE_UPDATE_TIMEOUT = 240000;
class CoinTileItem extends React.Component {
constructor(props) {
super(props);
@ -115,7 +117,7 @@ class CoinTileItem extends React.Component {
this.dispatchCoinActions(coin, mode);
}.bind(this), 3000);
const _basiliskCache = setInterval(function() {
const _basiliskCache = setInterval(() => {
Store.dispatch(fetchNewCacheData({
'pubkey': this.props.Dashboard.activeHandle.pubkey,
'allcoins': false,
@ -123,7 +125,7 @@ class CoinTileItem extends React.Component {
'calls': 'listtransactions:getbalance',
'address': _basiliskMainAddress,
}));
}.bind(this), 240000);
}, BASILISK_CACHE_UPDATE_TIMEOUT);
Store.dispatch(startInterval('sync', _iguanaActiveHandle));
Store.dispatch(startInterval('basilisk', _basiliskCache));
// basilisk

5
react/src/components/dashboard/settings.js

@ -53,7 +53,8 @@ class Settings extends React.Component {
}
openTab(elemId, tab) {
const _height = document.querySelector('#' + elemId + ' .panel-collapse .panel-body').offsetHeight;
console.log(`#${elemId}.panel-collapse .panel-body`);
const _height = document.querySelector(`#${elemId} .panel-collapse .panel-body`).offsetHeight;
this.setState(Object.assign({}, this.state, {
activeTab: tab,
@ -217,8 +218,6 @@ class Settings extends React.Component {
this.setState({
appSettings: _appSettings,
});
console.log(this.state.appSettings);
}
_saveAppConfig() {

108
react/src/components/dashboard/syncOnly.js

@ -1,5 +1,6 @@
import React from 'react';
import { translate } from '../../translate/translate';
import { getCoinTitle } from '../../util/coinHelper';
import {
stopInterval,
addCoin,
@ -19,7 +20,8 @@ class SyncOnly extends React.Component {
}
isFullySynced(fork) {
if (fork.balances && ((Number(fork.balances) +
if (fork.balances &&
((Number(fork.balances) +
Number(fork.validated) +
Number(fork.bundles) +
Number(fork.utxo)) / 4 === 100)) {
@ -30,96 +32,15 @@ class SyncOnly extends React.Component {
}
renderCoinName(coin) {
let coinlogo;
let coinname;
switch (coin) {
case 'BTC':
coinlogo = 'bitcoin';
coinname = 'Bitcoin';
break;
case 'BTCD':
coinlogo = 'bitcoindark';
coinname = 'BitcoinDark';
break;
case 'LTC':
coinlogo = 'litecoin';
coinname = 'Litecoin';
break;
case 'VPN':
coinlogo = 'vpncoin';
coinname = 'VPNcoin';
break;
case 'SYS':
coinlogo = 'syscoin';
coinname = 'Syscoin';
break;
case 'ZEC':
coinlogo = 'zcash';
coinname = 'Zcash';
break;
case 'NMC':
coinlogo = 'namecoin';
coinname = 'Namecoin';
break;
case 'DEX':
coinlogo = 'dex';
coinname = 'InstantDEX';
break;
case 'DOGE':
coinlogo = 'dogecoin';
coinname = 'Dogecoin';
break;
case 'DGB':
coinlogo = 'digibyte';
coinname = 'Digibyte';
break;
case 'MZC':
coinlogo = 'mazacoin';
coinname = 'Mazacoin';
break;
case 'UNO':
coinlogo = 'unobtanium';
coinname = 'Unobtanium';
break;
case 'ZET':
coinlogo = 'zetacoin';
coinname = 'Zetacoin';
break;
case 'KMD':
coinlogo = 'komodo';
coinname = 'Komodo';
break;
case 'BTM':
coinlogo = 'bitmark';
coinname = 'Bitmark';
break;
case 'CARB':
coinlogo = 'carboncoin';
coinname = 'Carboncoin';
break;
case 'ANC':
coinlogo = 'anoncoin';
coinname = 'AnonCoin';
break;
case 'FRK':
coinlogo = 'franko';
coinname = 'Franko';
break;
case 'GAME':
coinlogo = 'GAME';
coinname = 'GameCredits';
break;
}
const _coinTitle = getCoinTitle(coin);
return {
'logo': coinlogo,
'name': coinname
'logo': _coinTitle.logo,
'name': _coinTitle.name
};
}
componentWillReceiveProps(props) {
// console.log('SyncOnly', props);
if (props.SyncOnly) {
for (let port in this.props.SyncOnly.forks) {
const forkInfo = this.props.SyncOnly.forks[port];
@ -130,7 +51,6 @@ class SyncOnly extends React.Component {
forkInfo.getinfo &&
forkInfo.getinfo.error &&
forkInfo.getinfo.error === 'bitcoinrpc needs coin that is active') {
console.log('fork add coin required');
let _autoRestartedForks = Object.assign({}, this.state.autoRestartedForks);
_autoRestartedForks[port] = true;
@ -138,14 +58,15 @@ class SyncOnly extends React.Component {
autoRestartedForks: _autoRestartedForks,
});
Store.dispatch(addCoin(forkInfo.registry.coin, '1', null, port));
setTimeout(function() {
setTimeout(() => {
let _autoRestartedForks = Object.assign({}, this.state.autoRestartedForks);
_autoRestartedForks[port] = false;
this.setState({
autoRestartedForks: _autoRestartedForks,
});
}.bind(this), 10000);
}, 10000);
}
}
}
@ -238,12 +159,14 @@ class SyncOnly extends React.Component {
<div className="avatar">
<img
className="img-responsive margin-bottom-5"
src={ 'assets/images/cryptologo/' + this.renderCoinName(forkInfo.registry.coin).logo + '.png' }
src={ `assets/images/cryptologo/${this.renderCoinName(forkInfo.registry.coin).logo}.png` }
alt={ forkInfo.registry.coin }/>
<span className="badge up badge-success margin-bottom-5">Full</span>
<div className="coin-name">{ this.renderCoinName(forkInfo.registry.coin).name } ({ forkInfo.registry.coin.toUpperCase() })</div>
<div className="margin-top-10">
<span className="btn btn-primary" onClick={ () => this._stopIguanaFork(forkInfo.registry.pmid) }>
<span
className="btn btn-primary"
onClick={ () => this._stopIguanaFork(forkInfo.registry.pmid) }>
<span className="fa fa-stop"></span> { translate('INDEX.STOP') }
</span>
<span
@ -282,7 +205,10 @@ class SyncOnly extends React.Component {
{ this.renderForksList() }
</div>
<div className="modal-footer">
<button type="button" className="btn btn-default" onClick={ this.closeSyncOnlyModal }>{ translate('INDEX.CLOSE') }</button>
<button
type="button"
className="btn btn-default"
onClick={ this.closeSyncOnlyModal }>{ translate('INDEX.CLOSE') }</button>
</div>
</div>
</div>

2
react/src/components/dashboard/walletsBalance.js

@ -30,7 +30,7 @@ class WalletsBalance extends React.Component {
this.props.ActiveCoin.mode === 'basilisk' &&
this.props.ActiveCoin.activeAddress &&
this.props.ActiveCoin.cache[this.props.ActiveCoin.coin] &&
this.props.ActiveCoin.cache[this.props.ActiveCoin.coin][this.props.ActiveCoin.activeAddress]&&
this.props.ActiveCoin.cache[this.props.ActiveCoin.coin][this.props.ActiveCoin.activeAddress] &&
this.props.ActiveCoin.cache[this.props.ActiveCoin.coin][this.props.ActiveCoin.activeAddress].getbalance &&
this.props.ActiveCoin.cache[this.props.ActiveCoin.coin][this.props.ActiveCoin.activeAddress].getbalance.data &&
this.props.ActiveCoin.cache[this.props.ActiveCoin.coin][this.props.ActiveCoin.activeAddress].getbalance.data.balance) {

4
react/src/components/dashboard/walletsBasiliskConnection.js

@ -76,13 +76,13 @@ class WalletsBasiliskConnection extends React.Component {
</div>
</div>
<h5 className="text-left">
{ translate('IAPI.CON_STATUS') + '... ' + this.props.Dashboard.connectedNotaries.current + '/' + this.props.Dashboard.connectedNotaries.total + ': ' + this.props.Dashboard.connectedNotaries.currentNodeName} <span className="pull-right" id="basilisk-connections-refresh-percent">{ Math.floor(this.props.Dashboard.connectedNotaries.current * 100 / this.props.Dashboard.connectedNotaries.total) }%</span>
{ `${translate('IAPI.CON_STATUS')}... ${this.props.Dashboard.connectedNotaries.current}/${this.props.Dashboard.connectedNotaries.total}:${this.props.Dashboard.connectedNotaries.currentNodeName}` } <span className="pull-right" id="basilisk-connections-refresh-percent">{ Math.floor(this.props.Dashboard.connectedNotaries.current * 100 / this.props.Dashboard.connectedNotaries.total) }%</span>
</h5>
<div className="progress progress-sm">
<div className="progress-bar progress-bar-info progress-bar-striped active" style={{ width: Math.floor(this.props.Dashboard.connectedNotaries.current * 100 / this.props.Dashboard.connectedNotaries.total) + '%', fontSize: '80%' }} role="progressbar" id="basilisk-connections-refresh-progress-bar"></div>
</div>
<pre id="basilisk-connections-refresh-status-output no-padding">
{ this.props.Dashboard.connectedNotaries.failedToConnectNodes ? 'Failed: ' + this.props.Dashboard.connectedNotaries.failedToConnectNodes : null }
{ this.props.Dashboard.connectedNotaries.failedToConnectNodes ? `Failed: ${this.props.Dashboard.connectedNotaries.failedToConnectNodes}` : null }
</pre>
</div>
</div>

10
react/src/components/dashboard/walletsData.js

@ -82,6 +82,7 @@ class WalletsData extends React.Component {
}
}
// deprecated
toggleCacheApi() {
const _useCache = !this.state.useCache;
@ -463,6 +464,7 @@ class WalletsData extends React.Component {
}
}*/
// deprecated
renderUseCacheToggle() {
if (this.props.ActiveCoin.mode === 'basilisk') {
return (
@ -548,11 +550,11 @@ class WalletsData extends React.Component {
this.props.Dashboard.activeHandle[this.props.ActiveCoin.coin] &&
this.props.ActiveCoin.mode === 'basilisk') {
return (
<div className={ 'btn-group bootstrap-select form-control form-material showkmdwalletaddrs show-tick ' + (this.state.addressSelectorOpen ? 'open' : '') }>
<div className={ `btn-group bootstrap-select form-control form-material showkmdwalletaddrs show-tick ${(this.state.addressSelectorOpen ? 'open' : '')}` }>
<button
type="button"
className="btn dropdown-toggle btn-info"
title={ '-' + translate('KMD_NATIVE.SELECT_ADDRESS') + '-' }
title={ `-${translate('KMD_NATIVE.SELECT_ADDRESS')}-` }
aria-expanded="true"
onClick={ this.openDropMenu }>
<span className="filter-option pull-left">{ this.renderSelectorCurrentLabel() } </span>&nbsp;
@ -606,7 +608,9 @@ class WalletsData extends React.Component {
{ translate('SEND.PROCESSING_REQ') }: { this.state.currentStackLength } / { this.state.totalStackLength }
</div>
</div>
<div className={ this.state.basiliskActionsMenu ? 'dropdown open' : 'dropdown' } onClick={ this.toggleBasiliskActionsMenu }>
<div
className={ this.state.basiliskActionsMenu ? 'dropdown open' : 'dropdown' }
onClick={ this.toggleBasiliskActionsMenu }>
<a
className="dropdown-toggle btn-xs btn-default"
id="btn_edexcoin_basilisk"

4
react/src/components/dashboard/walletsHeader.js

@ -1,7 +1,5 @@
import React from 'react';
import { translate } from '../../translate/translate';
// import { dashboardChangeSection, toggleAddcoinModal } from '../../actions/actionCreators';
// import Store from '../../store';
class WalletsHeader extends React.Component {
render() {
@ -11,7 +9,7 @@ class WalletsHeader extends React.Component {
<div
className="page-header page-header-bordered header-easydex margin-bottom-0"
id="easydex-header-div"
style={{ backgroundImage: 'url("assets/images/bg/' + this.props.activeSection + '_transparent_header_bg.png")', backgroundRepeat: 'no-repeat', backgroundPosition: '0%' }}>
style={{ backgroundImage: `url("assets/images/bg/${this.props.activeSection}_transparent_header_bg.png")`, backgroundRepeat: 'no-repeat', backgroundPosition: '0%' }}>
<h1 className={ this.props.activeSection === 'jumblr' ? 'hide' : 'page-title' }>EasyDEX</h1>
<ol className="breadcrumb">
<li className={ this.props.activeSection === 'jumblr' ? 'hide' : 'header-easydex-section' }>{ translate('INDEX.DASHBOARD') }</li>

4
react/src/components/dashboard/walletsNative.js

@ -29,10 +29,10 @@ class WalletsNative extends React.Component {
return (
<div className="page" style={{ marginLeft: '0' }}>
<div id="section-extcoin" style={{ paddingTop: '0' }}>
<div id="easydex-header-div" style={{ 'backgroundImage': 'url("assets/images/bg/' + this.defaultBG() + '_transparent_header_bg.png")', backgroundColor: '#fff' }}>
<div id="easydex-header-div" style={{ 'backgroundImage': `url("assets/images/bg/${this.defaultBG()}_transparent_header_bg.png")`, backgroundColor: '#fff' }}>
<ol className="breadcrumb">
<li className="header-easydex-section">
<img src={ 'assets/images/native/' + this.defaultBG() + '_header_title_logo.png' } /> <span style={{ fontSize: '35px', verticalAlign: 'middle' }} className={ this.props.ActiveCoin.coin === 'KMD' ? 'hide' : '' }>{ this.props.ActiveCoin.coin }</span>
<img src={ `assets/images/native/${this.defaultBG()}_header_title_logo.png` } /> <span style={{ fontSize: '35px', verticalAlign: 'middle' }} className={ this.props.ActiveCoin.coin === 'KMD' ? 'hide' : '' }>{ this.props.ActiveCoin.coin }</span>
</li>
</ol>
</div>

56
react/src/components/dashboard/walletsNativeSend.js

@ -80,7 +80,7 @@ class WalletsNativeSend extends React.Component {
renderAddressList() {
return (
<div className={ 'btn-group bootstrap-select form-control form-material showkmdwalletaddrs show-tick ' + (this.state.addressSelectorOpen ? 'open' : '') }>
<div className={ `btn-group bootstrap-select form-control form-material showkmdwalletaddrs show-tick ${(this.state.addressSelectorOpen ? 'open' : '')}` }>
<button
type="button"
className="btn dropdown-toggle btn-info"
@ -106,31 +106,29 @@ class WalletsNativeSend extends React.Component {
}
renderOPIDLabel(opid) {
const _satatusDef = {
queued: {
icon: 'warning',
label: 'QUEUED'
},
executing: {
icon: 'info',
label: 'EXECUTING'
},
failed: {
icon: 'danger',
label: 'FAILED'
},
success: {
icon: 'success',
label: 'SUCCESS'
}
};
if (opid.status === 'queued') {
return (
<span className="label label-warning">
<i className="icon fa-eye"></i> <span>{ translate('KMD_NATIVE.QUEUED') }</span>
</span>
);
}
if (opid.status === 'executing') {
return (
<span className="label label-info">
<i className="icon fa-eye"></i> <span>{ translate('KMD_NATIVE.EXECUTING') }</span>
</span>
);
}
if (opid.status === 'failed') {
return (
<span className="label label-danger">
<i className="icon fa-eye"></i> <span>{ translate('KMD_NATIVE.FAILED') }</span>
</span>
);
}
if (opid.status === 'success') {
return (
<span className="label label-success">
<i className="icon fa-eye"></i> <span>{ translate('KMD_NATIVE.SUCCESS') }</span>
<span className={`label label-${_satatusDef[opid.status].icon}`}>
<i className="icon fa-eye"></i> <span>{ translate(`KMD_NATIVE.${_satatusDef[opid.status].label}`) }</span>
</span>
);
}
@ -217,14 +215,14 @@ class WalletsNativeSend extends React.Component {
handleSubmit() {
Store.dispatch(sendNativeTx(this.props.ActiveCoin.coin, this.state));
setTimeout(function() {
setTimeout(() => {
Store.dispatch(getKMDOPID(null, this.props.ActiveCoin.coin));
}.bind(this), 1000);
}, 1000);
}
getOAdress() {
resolveOpenAliasAddress(this.state.sendToOA)
.then(function(json) {
.then((json) => {
const reply = json.Answer;
if (reply &&
@ -247,7 +245,7 @@ class WalletsNativeSend extends React.Component {
} else {
Store.dispatch(triggerToaster(true, 'Couldn\'t find any addresses', 'OpenAlias', 'error'));
}
}.bind(this));
});
}
renderOASendUI() {
@ -293,7 +291,7 @@ class WalletsNativeSend extends React.Component {
<div className="col-xlg-12 col-md-12 col-sm-12 col-xs-12">
<div className="panel" id="projects">
<div className="panel-heading">
<h3 data-extcoin="COIN" className="panel-title">
<h3 className="panel-title">
{ translate('INDEX.SEND') } { this.props.ActiveCoin.coin }
</h3>
</div>

2
react/src/components/dashboard/walletsNativeSyncProgress.js

@ -59,7 +59,7 @@ class WalletsNativeSyncProgress extends React.Component {
}
}
return(': ' + Math.floor(currentBestChain * 100 / this.props.Dashboard.progress.remoteKMDNode.blocks) + '% (blocks ' + currentBestChain + ' / ' + this.props.Dashboard.progress.remoteKMDNode.blocks + ')');
return(`: ${Math.floor(currentBestChain * 100 / this.props.Dashboard.progress.remoteKMDNode.blocks)}% (blocks ${currentBestChain} / ${this.props.Dashboard.progress.remoteKMDNode.blocks})`);
} else {
return (
<span id="activating-komodod-tridot">...</span>

8
react/src/components/dashboard/walletsNativeTxHistory.js

@ -121,12 +121,12 @@ class WalletsNativeTxHistory extends React.Component {
renderPaginationItems() {
let items = [];
for (let i=0; i < Math.floor(this.props.ActiveCoin.txhistory.length / this.state.itemsPerPage); i++) {
for (let i = 0; i < Math.floor(this.props.ActiveCoin.txhistory.length / this.state.itemsPerPage); i++) {
items.push(
<li className={ this.state.activePage === i + 1 ? 'paginate_button active' : 'paginate_button' }>
<a
aria-controls="kmd-tx-history-tbl"
tabIndex="0" key={i + '-pagination'}
tabIndex="0" key={ `${i}-pagination` }
onClick={ this.state.activePage !== (i + 1) ? () => this.updateCurrentPage(i + 1) : null }>{ i + 1 }</a>
</li>
);
@ -142,7 +142,7 @@ class WalletsNativeTxHistory extends React.Component {
return (
<div className="dataTables_length" id="kmd-tx-history-tbl_length">
<label>
{translate('INDEX.SHOW')}&nbsp;
{ translate('INDEX.SHOW') }&nbsp;
<select
name="itemsPerPage"
aria-controls="kmd-tx-history-tbl"
@ -153,7 +153,7 @@ class WalletsNativeTxHistory extends React.Component {
<option value="50">50</option>
<option value="100">100</option>
</select>&nbsp;
{translate('INDEX.ENTRIES_SM')}
{ translate('INDEX.ENTRIES_SM') }
</label>
</div>
);

35
react/src/components/login/login.js

@ -41,9 +41,9 @@ class Login extends React.Component {
openSyncOnlyModal() {
Store.dispatch(getSyncOnlyForks());
const _iguanaActiveHandle = setInterval(function() {
const _iguanaActiveHandle = setInterval(() => {
Store.dispatch(getSyncOnlyForks());
}.bind(this), 3000);
}, 3000);
Store.dispatch(startInterval('syncOnly', _iguanaActiveHandle));
Store.dispatch(toggleSyncOnlyModal(true));
@ -67,21 +67,25 @@ class Login extends React.Component {
}
componentWillReceiveProps(props) {
if (props && props.Main && props.Main.isLoggedIn) {
if (props &&
props.Main &&
props.Main.isLoggedIn) {
this.setState({
display: false,
});
}
if (props && props.Main && !props.Main.isLoggedIn) {
if (props &&
props.Main &&
!props.Main.isLoggedIn) {
this.setState({
display: true,
});
if (!this.props.Interval.interval.activeCoins) {
const _iguanaActiveCoins = setInterval(function() {
const _iguanaActiveCoins = setInterval(() => {
Store.dispatch(getDexCoins());
}.bind(this), 10000);
}, 10000);
Store.dispatch(startInterval('activeCoins', _iguanaActiveCoins));
}
@ -89,7 +93,9 @@ class Login extends React.Component {
}
if (this.state.activeLoginSection !== 'signup') {
if (props && props.Main && props.Main.activeCoins) {
if (props &&
props.Main &&
props.Main.activeCoins) {
this.setState({
activeLoginSection: 'login',
});
@ -159,13 +165,22 @@ class Login extends React.Component {
return (
<div className="swal2-container">
<div className="swal2-overlay" tabIndex="-1" style={{ opacity: 1, display: 'block' }}></div>
<div className="swal2-modal show-swal2 visible" style={{ display: 'block', width: '500px', padding: '20px', marginLeft: '-250px', background: 'rgb(255, 255, 255)', marginTop: '-230px' }} tabIndex="-1">
<div
className="swal2-modal show-swal2 visible"
style={{ display: 'block', width: '500px', padding: '20px', marginLeft: '-250px', background: 'rgb(255, 255, 255)', marginTop: '-230px' }}
tabIndex="-1">
<div className="swal2-icon swal2-warning pulse-warning" style={{ display: 'block' }}>!</div>
<h2>{ translate('LOGIN.SAVED_WALLET_SEED') }</h2>
<div className="swal2-content" style={{ display: 'block' }}>{ translate('LOGIN.SEED_MAKE_SURE_BACKUP') }</div>
<hr className="swal2-spacer" style={{ display: 'block' }} />
<button className="swal2-confirm styled" style={{ backgroundColor: 'rgb(48, 133, 214)', borderLeftColor: 'rgb(48, 133, 214)', borderRightColor: 'rgb(48, 133, 214)' }} onClick={ this.execWalletCreate }>{ translate('LOGIN.YES_I_BACKUP') }</button>
<button className="swal2-cancel styled" style={{ display: 'inline-block', backgroundColor: 'rgb(221, 51, 51)'}} onClick={ this.toggleSeedBackupModal }>{ translate('LOGIN.CANCEL') }</button>
<button
className="swal2-confirm styled"
style={{ backgroundColor: 'rgb(48, 133, 214)', borderLeftColor: 'rgb(48, 133, 214)', borderRightColor: 'rgb(48, 133, 214)' }}
onClick={ this.execWalletCreate }>{ translate('LOGIN.YES_I_BACKUP') }</button>
<button
className="swal2-cancel styled"
style={{ display: 'inline-block', backgroundColor: 'rgb(221, 51, 51)'}}
onClick={ this.toggleSeedBackupModal }>{ translate('LOGIN.CANCEL') }</button>
</div>
</div>
);

4
react/src/components/main/main.js

@ -8,6 +8,8 @@ import {
iguanaActiveHandle
} from '../../actions/actionCreators';
const IGUANA_ACTIVE_HANDLE_TIMEOUT = 30000;
class Main extends React.Component {
constructor(props) {
super(props);
@ -24,7 +26,7 @@ class Main extends React.Component {
Store.dispatch(iguanaActiveHandle());
const _iguanaActiveHandle = setInterval(function() {
Store.dispatch(iguanaActiveHandle());
}, 30000);
}, IGUANA_ACTIVE_HANDLE_TIMEOUT);
this.setState(Object.assign({}, this.state, {
activeHandleInterval: _iguanaActiveHandle,

Loading…
Cancel
Save