Browse Source

native wallet info; sync status

all-modes
pbca26 8 years ago
parent
commit
05fa0c24cd
  1. 117
      react/src/actions/actionCreators.js
  2. BIN
      react/src/assets/images/bg/wireless_transparent_header_bg.png
  3. BIN
      react/src/assets/images/cryptologo/WIRELESS.png
  4. BIN
      react/src/assets/images/native/wireless_header_title_logo.png
  5. 2
      react/src/components/addcoin/addcoinOptionsAC.js
  6. 58
      react/src/components/addcoin/payload.js
  7. 12
      react/src/components/dashboard/coinTileItem.js
  8. 1
      react/src/components/dashboard/dashboard.js
  9. 2
      react/src/components/dashboard/receiveCoin.js
  10. 2
      react/src/components/dashboard/sendCoin.js
  11. 2
      react/src/components/dashboard/walletsBalance.js
  12. 2
      react/src/components/dashboard/walletsData.js
  13. 569
      react/src/components/dashboard/walletsNative.js
  14. 12
      react/src/components/dashboard/walletsNav.js
  15. 1
      react/src/components/login/login.js
  16. 12
      react/src/reducers/activeCoin.js
  17. 3
      react/src/styles/index.scss

117
react/src/actions/actionCreators.js

@ -2,7 +2,13 @@ import 'whatwg-fetch';
import 'bluebird';
import Config from '../config';
import { startCurrencyAssetChain, startAssetChain, startCrypto, checkCoinType } from '../components/addcoin/payload';
import {
startCurrencyAssetChain,
startAssetChain,
startCrypto,
checkCoinType,
checkAC
} from '../components/addcoin/payload';
import { copyToClipboard } from '../util/copyToClipboard';
import { translate } from '../translate/translate';
@ -29,6 +35,22 @@ export const SYNCING_NATIVE_MODE = 'SYNCING_NATIVE_MODE';
export const ACTIVE_COIN_GET_ADDRESSES = 'ACTIVE_COIN_GET_ADDRESSES';
export const START_INTERVAL= 'START_INTERVAL';
export const STOP_INTERVAL= 'STOP_INTERVAL';
export const DASHBOARD_ACTIVE_SECTION = 'DASHBOARD_ACTIVE_SECTION';
export const DASHBOARD_ACTIVE_TXINFO_MODAL = 'DASHBOARD_ACTIVE_TXINFO_MODAL';
export function toggleDashboardActiveSection(name) {
return {
type: DASHBOARD_ACTIVE_SECTION,
section: name,
}
}
export function toggleDashboardTxInfoModal(display) {
return {
type: DASHBOARD_ACTIVE_TXINFO_MODAL,
showTransactionInfo: display,
}
}
function basiliskConnectionState(display, json) {
return {
@ -314,6 +336,17 @@ export function shepherdHerd(coin, mode, path) {
};
}
if (coin === 'KMD') {
herdData = {
'ac_name': 'komodod',
'ac_options': [
'-daemon=0',
'-server',
'-addnode=78.47.196.146'
]
};
}
if (checkCoinType(coin) === 'crypto') {
acData = startCrypto(path.result, coin, mode);
}
@ -539,6 +572,7 @@ export function walletPassphrase(_passphrase) {
export function getPeersListState(json) {
var peersList = {};
if (json && json.rawpeers && json.rawpeers.length) {
for (var i=0; i < json.rawpeers.length; i++) {
peersList[json.rawpeers[i].coin] = json.rawpeers[i].peers;
@ -619,15 +653,18 @@ export function addPeerNode(coin, ip) {
}
}
export function getAddressesByAccountState(json, coin) {
test(['123', '456']);
export function getAddressesByAccountState(json, coin, mode) {
if (mode === 'basilisk') {
getDexBalance(coin, mode, json.result);
}
return {
type: ACTIVE_COIN_GET_ADDRESSES,
addresses: json.result,
}
}
export function getAddressesByAccount(coin) {
export function getAddressesByAccount(coin, mode) {
const payload = {
'userpass': 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'),
'coin': coin,
@ -646,7 +683,7 @@ export function getAddressesByAccount(coin) {
dispatch(triggerToaster(true, 'getAddressesByAccount', 'Error', 'error'));
})
.then(response => response.json())
.then(json => dispatch(getAddressesByAccountState(json, dispatch)))
.then(json => dispatch(getAddressesByAccountState(json, coin, mode, dispatch)))
}
}
@ -821,7 +858,67 @@ export function shepherdGetSysInfo() {
}
}
/*export function test(coin, addr) {
export function getSyncInfoNativeKMD() {
const coin = 'KMD';
return dispatch => {
return fetch('http://127.0.0.1:' + Config.iguanaCorePort + '/api/dex/getinfo?userpass=tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth') + '&symbol=' + coin, {
method: 'GET',
})
.catch(function(error) {
console.log(error);
dispatch(triggerToaster(true, 'getSyncInfoNativeKMD', 'Error', 'error'));
})
.then(response => response.json())
.then(json => dispatch(getSyncInfoNativeState({ 'remoteKMDNode': json })))
.then(dispatch(getDebugLog('komodo', 1)))
}
}
function getSyncInfoNativeState(json) {
if (json && json.error && json.error === 'null return') {
return getSyncInfoNativeKMD();
} else {
return {
type: SYNCING_NATIVE_MODE,
progress: json,
}
}
}
export function getSyncInfoNative(coin) {
var payload = {},
passthru_agent;
if ( coin === 'KMD') { passthru_agent = 'komodo'; };
if ( coin === 'ZEC') { passthru_agent = 'zcash'; };
if (checkAC(coin)) { passthru_agent = 'iguana'; };
payload = {
'userpass': 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'),
'agent': passthru_agent,
'method': 'passthru',
'asset': coin,
'function': 'getinfo',
'hex': ''
};
return dispatch => {
return fetch('http://127.0.0.1:' + Config.iguanaCorePort, {
method: 'POST',
body: JSON.stringify(payload),
})
.catch(function(error) {
console.log(error);
dispatch(triggerToaster(true, 'getSyncInfo', 'Error', 'error'));
})
.then(response => response.json())
.then(json => dispatch(getSyncInfoNativeState(json, dispatch)))
}
}
export function getDexBalance(coin, addr) {
Promise.all(addr.map((_addr, index) => {
const payload = {
'userpass': 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'),
@ -829,7 +926,7 @@ export function shepherdGetSysInfo() {
'method': 'listunspent',
'address': _addr,
'symbol': coin
}
};
console.log('addr', _addr);
return new Promise((resolve, reject) => {
fetch('http://127.0.0.1:' + Config.iguanaCorePort, {
@ -838,10 +935,12 @@ export function shepherdGetSysInfo() {
})
.catch(function(error) {
console.log(error);
dispatch(triggerToaster(true, 'getSyncInfo', 'Error', 'error'));
dispatch(triggerToaster(true, 'getDexBalance', 'Error', 'error'));
})
.then(response => response.json())
.then(json => dispatch(getSyncInfoState(json, dispatch)))
.then(json => console.log(json))
//.then(json => dispatch(getSyncInfoState(json, dispatch)))
resolve(index);
});
}))

BIN
react/src/assets/images/bg/wireless_transparent_header_bg.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 131 KiB

BIN
react/src/assets/images/cryptologo/WIRELESS.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

BIN
react/src/assets/images/native/wireless_header_title_logo.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.9 KiB

2
react/src/components/addcoin/addcoinOptionsAC.js

@ -20,7 +20,7 @@ class AddCoinOptionsAC extends React.Component {
<option value="SHARK|basilisk|native">SHARK (SHARK)</option>
<option value="MESH|basilisk|native">SpaceMesh (MESH)</option>
<option value="SUPERNET|basilisk|native">SUPERNET (SUPERNET)</option>
<option value="WIRELESS|basilisk|native">WIRELESS (WIRELESS)</option>
<option value="WLC|basilisk|native">WIRELESS (WIRELESS)</option>
</optgroup>
);
}

58
react/src/components/addcoin/payload.js

@ -1,3 +1,59 @@
export function checkAC(coinVal) {
if (coinVal == 'SUPERNET' ||
coinVal == 'REVS' ||
coinVal == 'WLC' ||
coinVal == 'DEX' ||
coinVal == 'PANGEA' ||
coinVal == 'JUMBLR' ||
coinVal == 'BET' ||
coinVal == 'CRYPTO' ||
coinVal == 'HODL' ||
coinVal == 'SHARK' ||
coinVal == 'BOTS' ||
coinVal == 'MGW' ||
coinVal == 'MVP' ||
coinVal == 'KV' ||
coinVal == 'CEAL' ||
coinVal == 'MESH' ||
coinVal == 'BTC' ||
coinVal == 'USD' ||
coinVal == 'RON' ||
coinVal == 'EUR' ||
coinVal == 'JPY' ||
coinVal == 'GBP' ||
coinVal == 'AUD' ||
coinVal == 'CAD' ||
coinVal == 'CHF' ||
coinVal == 'NZD' ||
coinVal == 'CNY' ||
coinVal == 'RUB' ||
coinVal == 'MXN' ||
coinVal == 'BRL' ||
coinVal == 'INR' ||
coinVal == 'HKD' ||
coinVal == 'TRY' ||
coinVal == 'ZAR' ||
coinVal == 'PLN' ||
coinVal == 'NOK' ||
coinVal == 'SEK' ||
coinVal == 'DKK' ||
coinVal == 'CZK' ||
coinVal == 'HUF' ||
coinVal == 'ILS' ||
coinVal == 'KRW' ||
coinVal == 'MYR' ||
coinVal == 'PHP' ||
coinVal == 'SGD' ||
coinVal == 'THB' ||
coinVal == 'BGN' ||
coinVal == 'IDR' ||
coinVal == 'HRK') {
return true;
} else {
return false;
}
}
export function checkCoinType(coin) {
if (coin === 'USD' ||
coin === 'RON' ||
@ -49,7 +105,7 @@ export function checkCoinType(coin) {
coin === 'KV' ||
coin === 'CEAL' ||
coin === 'MESH' ||
coin === 'WIRELESS') {
coin === 'WLC') {
return 'ac';
}

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

@ -7,7 +7,8 @@ import {
getSyncInfo,
startInterval,
stopInterval,
iguanaEdexBalance
iguanaEdexBalance,
getSyncInfoNative
} from '../../actions/actionCreators';
import Store from '../../store';
@ -23,16 +24,23 @@ class CoinTileItem extends React.Component {
Store.dispatch(stopInterval('sync', this.props.Interval.interval));
var _iguanaActiveHandle = setInterval(function() {
Store.dispatch(getSyncInfo(coin));
Store.dispatch(iguanaEdexBalance(coin, mode));
}, 3000);
Store.dispatch(startInterval('sync', _iguanaActiveHandle));
} else if (mode === 'native' && coin !== this.props.ActiveCoin.coin) {
Store.dispatch(stopInterval('sync', this.props.Interval.interval));
var _iguanaActiveHandle = setInterval(function() {
Store.dispatch(getSyncInfoNative(coin));
}, 3000);
Store.dispatch(startInterval('sync', _iguanaActiveHandle));
} else {
Store.dispatch(stopInterval('sync', this.props.Interval.interval));
// basilisk
}
Store.dispatch(dashboardChangeActiveCoin(coin, mode));
Store.dispatch(iguanaActiveHandle(true));
Store.dispatch(getAddressesByAccount(coin));
Store.dispatch(iguanaEdexBalance(coin));
/*this.setState(Object.assign({}, this.state, {
activeHandleInterval: _iguanaActiveHandle,

1
react/src/components/dashboard/dashboard.js

@ -27,7 +27,6 @@ class Dashboard extends React.Component {
renderDashboard() {
document.body.className = '';
// <WalletsHeader {...this.props.ActiveCoin} />
return (
<div style={{height: '100%'}}>
<div className={this.props.Dashboard.activeSection === 'wallets' ? 'page-main' : ''} id="section-dashboard" data-edexcoin="COIN">

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

@ -22,7 +22,7 @@ class ReceiveCoin extends React.Component {
}
render() {
if (this.props && this.props.receive) {
if (this.props && this.props.receive && this.props.mode !== 'native') {
return (
<div data-edexcoin="COIN" id="edexcoin_recieve">
<div className="col-xs-12 margin-top-20">

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

@ -20,7 +20,7 @@ class SendCoin extends React.Component {
}
render() {
if (this.props && this.props.send) {
if (this.props && this.props.send && this.props.mode !== 'native') {
return (
<div className="col-sm-12 padding-top-10" data-edexcoin="COIN" id="edexcoin_send">
<div className="col-xlg-12 col-md-12 col-sm-12 col-xs-12">

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

@ -3,7 +3,7 @@ import { translate } from '../../translate/translate';
class WalletsBalance extends React.Component {
render() {
if (this.props && this.props.coin) {
if (this.props && this.props.coin && this.props.mode !== 'native') {
return (
<div id="wallet-widgets" data-plugin="masonry" data-edexcoin="COIN">
<div className="col-xs-12">

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

@ -38,7 +38,7 @@ class WalletsData extends React.Component {
}
render() {
if (this.props && this.props.ActiveCoin && this.props.ActiveCoin.coin) {
if (this.props && this.props.ActiveCoin && this.props.ActiveCoin.coin && this.props.ActiveCoin.mode !== 'native') {
return (
<div data-edexcoin="COIN" id="edexcoin_dashboardinfo">
<div className="col-xs-12 margin-top-20">

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

@ -1,549 +1,48 @@
import React from 'react';
import { translate } from '../../translate/translate';
import WalletsNativeAlert from './walletsNativeAlert';
import WalletsNativeBalance from './walletsNativeBalance';
import WalletsNativeInfo from './walletsNativeInfo';
import WalletsNativeReceive from './walletsNativeReceive';
import WalletsNativeSend from './walletsNativeSend';
import WalletsNativeSyncProgress from './walletsNativeSyncProgress';
import WalletsNativeTxHistory from './walletsNativeTxHistory';
import WalletsNativeTxInfo from './walletsNativeTxInfo';
class WalletsNative extends React.Component {
constructor(props) {
super(props);
}
/*$('.header-easydex-section')
.html('<img src="assets/images/native/' + imgSrcName + '_header_title_logo.png"> <span style="font-size: 35px; vertical-align: middle">' + _coin + '</span>');
$('#easydex-header-div').css('background-image', 'url("assets/images/bg/' + imgBgName + '_transparent_header_bg.png")');*/
render() {
if (this.props && this.props.ActiveCoin && this.props.ActiveCoin.mode === 'native') {
return (
<div className="page" data-animsition-in="fade-in" data-animsition-out="fade-out" style={{marginLeft: '0'}}>
<div className="page-content" data-extcoin="COIN" id="section-extcoin">
<div role="alert" className="alert alert-danger alert-dismissible" data-extcoin="COIN" id="extcoin-wallet-connection-alert">
<button aria-label="Close" data-dismiss="alert" className="close" type="button">
<span aria-hidden="true">×</span>
</button>
<h4>{translate('INDEX.OOPS_ERROR')}</h4>
<p data-extcoin="COIN" id="extcoin-wallet-connection-alert-text">
<span>{translate('INDEX.OOPS_ERROR_DESC')}</span>
<code>server=1</code><br/>
<code>rpcport=</code><br/>
<code>rpcuser=</code><br/>
<code>rpcpassword=</code>
</p>
<div data-extcoin="COIN" id="section-extcoin" style={{paddingTop: '0'}}>
<div id="easydex-header-div" style={{'backgroundImage': 'url("assets/images/bg/' + this.props.ActiveCoin.coin.toLowerCase() + '_transparent_header_bg.png")'}}>
<ol className="breadcrumb">
<li className="header-easydex-section">
<img src={'assets/images/native/' + this.props.ActiveCoin.coin.toLowerCase() + '_header_title_logo.png'} /> <span style={{fontSize: '35px', verticalAlign: 'middle'}} className={this.props.ActiveCoin.coin === 'KMD' ? 'hide' : 'show'}>{this.props.ActiveCoin.coin}</span>
</li>
</ol>
</div>
<div role="alert" className="alert alert-info alert-dismissible" data-extcoin="COIN" id="extcoin-wallet-activating-alert">
<button aria-label="Close" data-dismiss="alert" className="close" type="button">
<span aria-hidden="true">×</span>
</button>
<h4>
{translate('INDEX.ACTIVATING_CHAIN')}<span id="activating-komodod-tridot">...</span><span id="activating-komodod-progress"></span>
</h4>
<p data-extcoin="COIN" id="extcoin-wallet-connection-alert-text">{translate('INDEX.KMD_STARTED')}</p>
</div>
<div className="row" data-extcoin="COIN" style={{margin: '-20px 0px 10px 0px'}}>
<div className="col-xs-12" data-extcoin="COIN" id="extcoin-progressbars">
<div className="progress">
<div className="progress-bar progress-bar-info progress-bar-striped active" style={{width: '0%', fontSize: '80%'}} role="progressbar" data-extcoin="COIN" id="extcoin-sync">
<span data-extcoin="COIN" id="extcoin-sync-percent">-</span> | <span data-extcoin="COIN" id="extcoin-synced-blocks">-</span> / <span data-extcoin="COIN" id="extcoin-longestchain">-</span> | {translate('INDEX.CONNECTIONS')}: <span data-extcoin="COIN" id="extcoin-connections">-</span>
</div>
</div>
</div>
</div>
<div className="row" data-extcoin="COIN" id="extcoin-wallet" data-plugin="masonry">
<div className="col-xs-12">
<div className="col-lg-3 col-xs-12" data-extcoin="COIN" id="kmd_widget_get_total_balance_t">
<div className="widget widget-shadow" id="widgetLineareaOne">
<div className="widget-content white bg-yellow-800">
<div className="padding-20 padding-top-10">
<div className="clearfix">
<div className="pull-left padding-vertical-10">
<i className="icon fa-eye font-size-24 vertical-align-bottom margin-right-5"></i>{translate('INDEX.TRANSPARENT_BALANCE')}
</div>
<span className="pull-right padding-top-10" data-extcoin="COIN" id="kmd_transparent_balance" style={{fontSize: '22px'}}>-</span>
</div>
</div>
</div>
</div>
</div>
<div className="col-lg-3 col-xs-12" data-extcoin="COIN" id="kmd_widget_get_total_balance_z">
<div className="widget widget-shadow" id="widgetLineareaOne">
<div className="widget-content white bg-blue-grey-800">
<div className="padding-20 padding-top-10">
<div className="clearfix">
<div className="pull-left padding-vertical-10">
<i className="icon fa-eye-slash font-size-24 vertical-align-bottom margin-right-5"></i>{translate('INDEX.Z_BALANCE')}
</div>
<span className="pull-right padding-top-10" data-extcoin="COIN" id="kmd_private_balance" style={{fontSize: '22px'}}>-</span>
</div>
</div>
</div>
</div>
</div>
<div className="col-lg-3 col-xs-12" data-extcoin="COIN" id="kmd_widget_get_total_balance_i">
<div className="widget widget-shadow" id="widgetLineareaOne">
<div className="widget-content white bg-cyan-700">
<div className="padding-20 padding-top-10">
<div className="clearfix">
<div className="pull-left padding-vertical-10">
<i className="icon fa-money font-size-24 vertical-align-bottom margin-right-5"></i>{translate('INDEX.INTEREST_EARNED')}
</div>
<span className="pull-right padding-top-10" data-extcoin="COIN" id="kmd_total_interest_balance" style={{fontSize: '22px'}}>-</span>
</div>
</div>
</div>
</div>
</div>
<div className="col-lg-3 col-xs-12" data-extcoin="COIN" id="kmd_widget_get_total_balance_tzi">
<div className="widget widget-shadow" id="widgetLineareaOne">
<div className="widget-content white bg-green-600">
<div className="padding-20 padding-top-10">
<div className="clearfix">
<div className="pull-left padding-vertical-10">
<i className="icon fa-bullseye font-size-24 vertical-align-bottom margin-right-5"></i>{translate('INDEX.ZT_BALANCE')}
</div>
<span className="pull-right padding-top-10" data-extcoin="COIN" id="kmd_total_tz_balance" style={{fontSize: '22px'}}>-</span>
</div>
</div>
</div>
</div>
</div>
</div>
<div data-extcoin="COIN" id="kmd_wallet_dashboardinfo">
<div className="col-xs-12 margin-top-20">
<div className="panel nav-tabs-horizontal">
<div data-extcoin="COIN" id="kmd_wallet_dashoard_section">
<div className="col-xlg-12 col-lg-12 col-sm-12 col-xs-12">
<div className="panel">
<header className="panel-heading">
<h3 className="panel-title">{translate('INDEX.TRANSACTION_HISTORY')}</h3>
</header>
<div className="panel-body">
<table className="table table-hover dataTable table-striped" data-extcoin="COIN" id="kmd-tx-history-tbl" width="100%">
<thead>
<tr>
<th>{translate('INDEX.TYPE')}</th>
<th>{translate('INDEX.DIRECTION')}</th>
<th>{translate('INDEX.CONFIRMATIONS')}</th>
<th>{translate('INDEX.AMOUNT')}</th>
<th>{translate('INDEX.TIME')}</th>
<th>{translate('INDEX.DEST_ADDRESS')}</th>
<th>{translate('INDEX.TX_DETAIL')}</th>
</tr>
</thead>
<tfoot>
<tr>
<th>{translate('INDEX.TYPE')}</th>
<th>{translate('INDEX.DIRECTION')}</th>
<th>{translate('INDEX.CONFIRMATIONS')}</th>
<th>{translate('INDEX.AMOUNT')}</th>
<th>{translate('INDEX.TIME')}</th>
<th>{translate('INDEX.DEST_ADDRESS')}</th>
<th>{translate('INDEX.TX_DETAIL')}</th>
</tr>
</tfoot>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div data-extcoin="COIN" id="kmd_wallet_recieve">
<div className="col-xs-12 margin-top-20">
<div className="panel nav-tabs-horizontal">
<div data-extcoin="COIN" id="kmd_wallet_recieve_section">
<div className="col-xlg-12 col-lg-12 col-sm-12 col-xs-12">
<div className="panel">
<header className="panel-heading">
<div className="panel-actions">
<div className="dropdown">
<a className="dropdown-toggle white btn btn-warning" data-extcoin="COIN" id="GetNewRecievingAddress" data-toggle="dropdown" href="javascript:void(0)" aria-expanded="false" role="button">
<i className="icon md-arrows margin-right-10" aria-hidden="true"></i> {translate('INDEX.GET_NEW_ADDRESS')} <span className="caret"></span>
</a>
<ul className="dropdown-menu dropdown-menu-right" aria-labelledby="GetNewRecievingAddress" role="menu">
<li role="presentation">
<a href="javascript:void(0)" data-extcoin="COIN" id="kmd_get_new_taddr" role="menuitem">
<i className="icon fa-eye" aria-hidden="true"></i> {translate('INDEX.TRANSPARENT_ADDRESS')}
</a>
</li>
<li data-extcoin="COIN" role="presentation">
<a href="javascript:void(0)" data-extcoin="COIN" id="kmd_get_new_zaddr" role="menuitem">
<i className="icon fa-eye-slash" aria-hidden="true"></i> {translate('INDEX.PRIVATE_Z_ADDRESS')}
</a>
</li>
</ul>
</div>
</div>
<h3 className="panel-title">{translate('INDEX.RECEIVING_ADDRESS')}</h3>
</header>
<div className="panel-body">
<table className="table table-hover dataTable table-striped" data-extcoin="COIN" id="kmd-recieve-addr-tbl">
<thead>
<tr>
<th>{translate('INDEX.TYPE')}</th>
<th data-lang="INDEX.ADDRESS">{translate('INDEX.ADDRESS')}</th>
</tr>
</thead>
<tfoot>
<tr>
<th data-lang="INDEX.TYPE">{translate('INDEX.TYPE')}</th>
<th data-lang="INDEX.ADDRESS">{translate('INDEX.ADDRESS')}</th>
</tr>
</tfoot>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div data-extcoin="COIN" id="kmd_wallet_send">
<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">
{translate('INDEX.SEND')} <span data-extcoinname="COIN"></span>
</h3>
</div>
<div className="panel-body container-fluid">
<form className="extcoin-send-form" data-extcoin="COIN" method="post" role="form" autocomplete="off" onsubmit="return false">
<div className="row">
<div className="col-xlg-12 form-group form-material">
<label className="control-label" data-extcoin="COIN" for="kmd_wallet_send_from">{translate('INDEX.SEND_FROM')}</label>
<select className="form-control form-material showkmdwalletaddrs show-tick" data-extcoin="COIN" id="kmd_wallet_send_from" title="Select Transparent or Private Address" data-size="5"></select>
</div>
<div className="col-xlg-12 form-group form-material">
<label className="control-label" data-extcoin="COIN" for="kmd_wallet_sendto">{translate('INDEX.SEND_TO')}</label>
<input type="text" className="form-control" data-extcoin="COIN" id="kmd_wallet_sendto" name="kmd_wallet_sendto" placeholder="Enter Transparent or Private address" autocomplete="off" required />
</div>
<div className="col-lg-6 form-group form-material">
<label className="control-label" for="kmd_wallet_amount" data-extcoin="COIN" id="kmd_wallet_amount_label">
<span data-extcoinname="COIN"></span>
</label>
<input type="text" className="form-control" data-extcoin="COIN" id="kmd_wallet_amount" name="kmd_wallet_amount" placeholder="0.000" autocomplete="off" />
</div>
<div className="col-lg-6 form-group form-material">
<label className="control-label" data-extcoin="COIN" for="kmd_wallet_fee">{translate('INDEX.FEE')}</label>
<input type="text" className="form-control" data-extcoin="COIN" id="kmd_wallet_fee" name="kmd_wallet_fee" placeholder="0.000" value="0.0001" autocomplete="off" />
</div>
<div className="col-lg-12">
<span data-extcoin="KMD">
<b>{translate('INDEX.TOTAL')} (<span data-extcoinname="COIN"></span> - txfee):</b> <span data-extcoin="COIN" id="kmd_wallet_total_value">0.000</span> <span data-extcoin="COIN" id="kmd_wallet_total_coinname" data-extcoinname="COIN"></span>
</span>
</div>
<div className="col-lg-12">
<button type="submit" className="btn btn-primary waves-effect waves-light pull-right" data-toggle="modal" id="kmd_wallet_send_coins_btn">
{translate('INDEX.SEND')} <span data-extcoinname="COIN"></span>
</button>
</div>
</div>
</form>
</div>
</div>
</div>
<div className="col-xs-12">
<div className="row">
<div className="panel nav-tabs-horizontal">
<div data-extcoin="COIN" id="kmd_wallet_opids_status_section">
<div className="col-xlg-12 col-lg-12 col-sm-12 col-xs-12">
<div className="panel">
<header className="panel-heading">
<div className="panel-actions">
<button className="btn btn-info btn-block" id="kmd_opids_status_btn" type="button">
<i className="icon fa-repeat" aria-hidden="true"></i> {translate('INDEX.REFRESH')}
</button>
</div>
<h3 className="panel-title">{translate('INDEX.OPERATIONS_STATUSES')}</h3>
</header>
<div className="panel-body">
<table className="table table-hover dataTable table-striped" data-extcoin="COIN" id="kmd-opid-status-tbl" width="100%">
<thead>
<tr>
<th>{translate('INDEX.STATUS')}</th>
<th>ID</th>
<th>{translate('INDEX.TIME')}</th>
<th>{translate('INDEX.RESULT')}</th>
</tr>
</thead>
<tfoot>
<tr>
<th>{translate('INDEX.STATUS')}</th>
<th>ID</th>
<th>{translate('INDEX.TIME')}</th>
<th>{translate('INDEX.RESULT')}</th>
</tr>
</tfoot>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div data-extcoin="COIN" id="kmd_wallet_settings">
<div className="col-xlg-6 col-md-4">
<div className="panel" id="projects">
<div className="panel-heading">
<h3 className="panel-title">{translate('INDEX.WALLET_INFO')}</h3>
</div>
<div className="table-responsive">
<table className="table table-striped">
<tbody>
<tr>
<td>{translate('INDEX.WALLET_VERSION')}</td>
<td>
<span data-extcoin="COIN" id="kmd_walletversion"></span>
</td>
</tr>
<tr>
<td>{translate('INDEX.BALANCE')}</td>
<td>
<span data-extcoin="COIN" id="kmd_balance"></span>
</td>
</tr>
<tr>
<td>{translate('INDEX.UNCONFIRMED_BALANCE')}</td>
<td>
<span data-extcoin="COIN" id="kmd_unconfirmed_balance"></span>
</td>
</tr>
<tr>
<td>{translate('INDEX.IMMATURE_BALANCE')}</td>
<td>
<span data-extcoin="COIN" id="kmd_immature_balance"></span>
</td>
</tr>
<tr>
<td>{translate('INDEX.TOTAL_TX_COUNT')}</td>
<td>
<span data-extcoin="COIN" id="KMDTotalTransactionsCount"></span>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div className="col-xlg-6 col-md-8">
<div className="panel" id="projects">
<div className="panel-heading">
<h3 className="panel-title">
<span data-extcointitle="COIN">Komodo</span> {translate('INDEX.INFO')}
</h3>
</div>
<div className="table-responsive">
<table className="table table-striped">
<tbody>
<tr>
<td>{translate('INDEX.VERSION')}</td>
<td>
<span data-extcoin="COIN" id="kmd_version"></span>
</td>
</tr>
<tr>
<td>{translate('INDEX.PROTOCOL_VERSION')}</td>
<td>
<span data-extcoin="COIN" id="kmd_protocolversion"></span>
</td>
</tr>
<tr>
<td>{translate('INDEX.NOTARIZED')}</td>
<td>
<span data-extcoin="COIN" id="kmd_notarized"></span>
</td>
</tr>
<tr>
<td>
{translate('INDEX.NOTARIZED')} Hash
</td>
<td>
<span data-extcoin="COIN" id="kmd_notarizedhash"></span>
</td>
</tr>
<tr>
<td>
{translate('INDEX.NOTARIZED')} BTC
</td>
<td>
<span data-extcoin="COIN" id="kmd_notarizedbtc"></span>
</td>
</tr>
<tr>
<td>{translate('INDEX.BLOCKS')}</td>
<td>
<span data-extcoin="COIN" id="kmd_blocks"></span>
</td>
</tr>
<tr>
<td>{translate('INDEX.CONNECTIONS')}</td>
<td>
<span data-extcoin="COIN" id="kmd_connections"></span>
</td>
</tr>
<tr>
<td>{translate('INDEX.DIFFICULTY')}</td>
<td>
<span data-extcoin="COIN" id="kmd_difficulty"></span>
</td>
</tr>
<tr>
<td>Testnet</td>
<td>
<span data-extcoin="COIN" id="kmd_testnet"></span>
</td>
</tr>
<tr>
<td>{translate('INDEX.PAY_TX_FEE')}</td>
<td>
<span data-extcoin="COIN" id="kmd_paytxfee"></span>
</td>
</tr>
<tr>
<td>{translate('INDEX.RELAY_FEE')}</td>
<td>
<span data-extcoin="COIN" id="kmd_relayfee"></span>
</td>
</tr>
<tr>
<td>{translate('INDEX.ERRORS')}</td>
<td>
<span data-extcoin="COIN" id="kmd_errors"></span>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<div className="modal fade modal-3d-sign" data-extcoin="COIN" id="kmd_txid_info_mdl" aria-hidden="false" role="dialog">
<div className="modal-dialog modal-center modal-lg">
<div className="modal-content">
<div className="modal-body">
<div className="panel nav-tabs-horizontal">
<ul className="nav nav-tabs nav-tabs-line" data-plugin="nav-tabs" role="tablist">
<li className="active" role="presentation">
<a data-toggle="tab" href="#KmdTxIDInfotab1" data-extcoin="COIN" aria-controls="KmdTxIDInfotab1" role="tab">
<i className="icon md-balance-wallet" aria-hidden="true"></i>TxID Info
</a>
</li>
<li role="presentation">
<a data-toggle="tab" href="#KmdTxIDInfotab2" data-extcoin="COIN" aria-controls="KmdTxIDInfotab2" role="tab">
<i className="icon md-plus-square" aria-hidden="true"></i>vjointsplits, details
</a>
</li>
<li role="presentation">
<a data-toggle="tab" href="#KmdTxIDInfotab3" data-extcoin="COIN" aria-controls="KmdTxIDInfotab3" role="tab">
<i className="icon wb-briefcase" aria-hidden="true"></i>hex
</a>
</li>
</ul>
<div className="panel-body">
<div className="tab-content">
<div className="tab-pane active" id="KmdTxIDInfotab1" data-extcoin="COIN" role="tabpanel">
<table className="table table-striped">
<tbody>
<tr>
<td>amount</td>
<td>
<span data-extcoin="COIN" id="kmd_txid_info_amount"></span>
</td>
</tr>
<tr>
<td>fee</td>
<td>
<span data-extcoin="COIN" id="kmd_txid_info_fee"></span>
</td>
</tr>
<tr>
<td>confirmations</td>
<td>
<span data-extcoin="COIN" id="kmd_txid_info_confirmations"></span>
</td>
</tr>
<tr>
<td>blockhash</td>
<td>
<span data-extcoin="COIN" id="kmd_txid_info_blockhash"></span>
</td>
</tr>
<tr>
<td>blockindex</td>
<td>
<span data-extcoin="COIN" id="kmd_txid_info_blockindex"></span>
</td>
</tr>
<tr>
<td>blocktime</td>
<td>
<span data-extcoin="COIN" id="kmd_txid_info_blocktime"></span>
</td>
</tr>
<tr>
<td>txid</td>
<td>
<span data-extcoin="COIN" id="kmd_txid_info_txid"></span>
</td>
</tr>
<tr>
<td>walletconflicts</td>
<td>
<span data-extcoin="COIN" id="kmd_txid_info_walletconflicts"></span>
</td>
</tr>
<tr>
<td>time</td>
<td>
<span data-extcoin="COIN" id="kmd_txid_info_time"></span>
</td>
</tr>
<tr>
<td>timereceived</td>
<td>
<span data-extcoin="COIN" id="kmd_txid_info_timereceived"></span>
</td>
</tr>
</tbody>
</table>
</div>
<div className="tab-pane" id="KmdTxIDInfotab2" data-extcoin="COIN" role="tabpanel">
<table className="table table-striped">
<tbody>
<tr>
<td>vjoinsplit</td>
<td>
<span data-extcoin="COIN" id="kmd_txid_info_vjoinsplit"></span>
</td>
</tr>
<tr>
<td>details</td>
<td>
<span data-extcoin="COIN" id="kmd_txid_info_details"></span>
</td>
</tr>
</tbody>
</table>
</div>
<div className="tab-pane" id="KmdTxIDInfotab3" data-extcoin="COIN" role="tabpanel">
<textarea id="kmd_txid_info_hex" data-extcoin="COIN" style={{width: '100%', height: '170px'}} rows="10" cols="80" disabled></textarea>
</div>
</div>
</div>
</div>
</div>
<div className="modal-footer">
<button type="button" className="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
<div className="page-content">
<WalletsNativeAlert {...this.props} />
<WalletsNativeSyncProgress {...this.props} />
<div className="row" data-extcoin="COIN" id="extcoin-wallet" data-plugin="masonry">
<WalletsNativeBalance {...this.props} />
<WalletsNativeTxHistory {...this.props} />
<WalletsNativeReceive {...this.props} />
<WalletsNativeSend {...this.props} />
<WalletsNativeInfo {...this.props} />
</div>
</div>
<WalletsNativeTxInfo {...this.props} />
</div>
</div>
);

12
react/src/components/dashboard/walletsNav.js

@ -1,6 +1,12 @@
import React from 'react';
import { translate } from '../../translate/translate';
import { copyCoinAddress, iguanaEdexBalance, toggleSendCoinForm, toggleReceiveCoinForm, toggleSendReceiveCoinForms } from '../../actions/actionCreators';
import {
copyCoinAddress,
iguanaEdexBalance,
toggleSendCoinForm,
toggleReceiveCoinForm,
toggleSendReceiveCoinForms
} from '../../actions/actionCreators';
import Store from '../../store';
class WalletsNav extends React.Component {
@ -48,14 +54,14 @@ class WalletsNav extends React.Component {
} else {
return (
<div>
<div className="page-header page-header-bordered header-easydex" id="header-dashboard" data-edexcoin="COIN">
<div className="page-header page-header-bordered header-easydex" id="header-dashboard" data-edexcoin="COIN" style={{paddingBottom: '20px', marginBottom: this.props.ActiveCoin.mode === 'native' ? '0' : '30px'}}>
<ol className="breadcrumb" data-edexcoin="COIN">
<b>{translate('INDEX.MY')} <span data-edexcoin="COIN" id="edexcoin-active">{this.props && this.props.ActiveCoin ? this.props.ActiveCoin.coin : '-'}</span> {translate('INDEX.ADDRESS')}: </b> <span data-edexcoin="COIN" id="edexcoin_active_addr">{this.props && this.props.Dashboard && this.props.Dashboard.activeHandle ? this.props.Dashboard.activeHandle[this.props.ActiveCoin.coin] : '-'}</span> <button className="btn btn-default btn-xs clipboard-edexaddr" data-edexcoin="COIN" id="edexcoin_active_addr_clipboard" data-clipboard-text="" onClick={() => this.copyMyAddress(this.props.Dashboard.activeHandle[this.props.ActiveCoin.coin])}><i className="icon wb-copy" aria-hidden="true"></i> {translate('INDEX.COPY')}</button>
</ol>
<div className="page-header-actions" data-edexcoin="COIN" id="edexcoin-actions">
<div id="kmd_header_button">
<button type="button" className="btn btn-dark waves-effect waves-light" data-edexcoinmenu="COIN" id="btn_edexcoin_dashboard" onClick={this.toggleSendReceiveCoinForms}>
<i className="icon md-view-dashboard" aria-hidden="true"></i> {translate('INDEX.DASHBOARD')}
<i className="icon md-view-dashboard" aria-hidden="true"></i> {this.props.ActiveCoin.mode !== 'native' ? translate('INDEX.DASHBOARD') : 'Settings'}
</button>
<button type="button" className="btn btn-primary waves-effect waves-light" data-edexcoinmenu="COIN" id="btn_edexcoin_send" onClick={() => this.toggleSendCoinForm(!this.props.ActiveCoin.send)}>
<i className="icon fa-send" aria-hidden="true"></i> {translate('INDEX.SEND')}

1
react/src/components/login/login.js

@ -27,6 +27,7 @@ class Login extends React.Component {
this.setState({
display: true,
});
document.body.className = 'page-login layout-full page-dark';
}
if (props && props.Main && props.Main.activeCoins) {
this.setState({

12
react/src/reducers/activeCoin.js

@ -4,6 +4,8 @@ import {
DASHBOARD_ACTIVE_COIN_SEND_FORM,
DASHBOARD_ACTIVE_COIN_RECEIVE_FORM,
DASHBOARD_ACTIVE_COIN_RESET_FORMS,
DASHBOARD_ACTIVE_SECTION,
DASHBOARD_ACTIVE_TXINFO_MODAL,
ACTIVE_COIN_GET_ADDRESSES
} from '../actions/actionCreators';
@ -13,6 +15,8 @@ export function ActiveCoin(state = {
send: false,
receive: false,
balance: 0,
nativeActiveSection: 'default',
showTransactionInfo: false,
}, action) {
switch (action.type) {
case DASHBOARD_ACTIVE_COIN_CHANGE:
@ -43,6 +47,14 @@ export function ActiveCoin(state = {
return Object.assign({}, state, {
addresses: action.addresses,
});
case DASHBOARD_ACTIVE_SECTION:
return Object.assign({}, state, {
nativeActiveSection: action.section,
});
case DASHBOARD_ACTIVE_TXINFO_MODAL:
return Object.assign({}, state, {
showTransactionInfo: action.display,
});
default:
return state;
}

3
react/src/styles/index.scss

@ -76,7 +76,8 @@ body {
background: #f3f4f5;
}
#edexcoin_dashboardinfo a {
#edexcoin_dashboardinfo a,
.nav-top-menu {
cursor: pointer;
cursor: hand;
}

Loading…
Cancel
Save