Browse Source

Merge pull request #31 from SuperNETorg/v0.25

V0.25
v0.25
pbca26 7 years ago
committed by GitHub
parent
commit
7c3c206fb4
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 11
      react/src/actions/actions/addCoin.js
  2. 2
      react/src/actions/actions/electrum.js
  3. 4
      react/src/actions/actions/prices.js
  4. BIN
      react/src/assets/images/cryptologo/ninja.png
  5. 0
      react/src/assets/images/cryptologo/vote2018.png
  6. 4
      react/src/components/addcoin/addcoinOptionsAC.js
  7. 4
      react/src/components/addcoin/addcoinOptionsCrypto.js
  8. 9
      react/src/components/addcoin/payload.js
  9. 27
      react/src/components/dashboard/coinTile/coinTileItem.render.js
  10. 5
      react/src/components/dashboard/notaryElectionsModal/notaryElectionsModal.js
  11. 2
      react/src/components/dashboard/notaryElectionsModal/notaryElectionsModal.scss
  12. 54
      react/src/components/dashboard/walletsData/walletsData.js
  13. 3
      react/src/components/login/login.js
  14. 12
      react/src/components/overrides.scss
  15. 3
      react/src/translate/en.js
  16. 10
      react/src/util/coinHelper.js
  17. 3
      react/src/util/explorerList.js

11
react/src/actions/actions/addCoin.js

@ -149,10 +149,19 @@ export function shepherdHerd(coin, mode, path, startupParams) {
'-daemon=0', '-daemon=0',
'-server', '-server',
`-ac_name=${coin}`, `-ac_name=${coin}`,
coin === 'BEER' || coin === 'PIZZA' ? '-addnode=24.54.206.138' : '-addnode=78.47.196.146', '-addnode=78.47.196.146',
], ],
}; };
if (coin === 'BEER' ||
coin === 'PIZZA') {
herdData['ac_options'].pop();
herdData['ac_options'].push('-addnode=24.54.206.138');
} else if (coin === 'NINJA') {
herdData['ac_options'].pop();
herdData['ac_options'].push('-addnode=192.241.134.19');
}
if (coin === 'ZEC') { if (coin === 'ZEC') {
herdData = { herdData = {
'ac_name': 'zcashd', 'ac_name': 'zcashd',

2
react/src/actions/actions/electrum.js

@ -14,7 +14,7 @@ import Store from '../../store';
// src: atomicexplorer // src: atomicexplorer
export function shepherdGetRemoteBTCFees() { export function shepherdGetRemoteBTCFees() {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
fetch(`http://atomicexplorer.com/api/btc/fees`, { fetch(`https://atomicexplorer.com/api/btc/fees`, {
method: 'GET', method: 'GET',
headers: { headers: {
'Content-Type': 'application/json', 'Content-Type': 'application/json',

4
react/src/actions/actions/prices.js

@ -4,7 +4,7 @@ import Config from '../../config';
function fiatRates(pricesJson) { function fiatRates(pricesJson) {
return dispatch => { return dispatch => {
return fetch(`http://atomicexplorer.com/api/rates/kmd`, { return fetch(`https://atomicexplorer.com/api/rates/kmd`, {
method: 'GET', method: 'GET',
}) })
.catch((error) => { .catch((error) => {
@ -29,7 +29,7 @@ function fiatRates(pricesJson) {
export function prices() { export function prices() {
return dispatch => { return dispatch => {
return fetch(`http://atomicexplorer.com/api/mm/prices`, { return fetch(`https://atomicexplorer.com/api/mm/prices`, {
method: 'GET', method: 'GET',
}) })
.catch((error) => { .catch((error) => {

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

0
react/src/assets/images/cryptologo/vote.png → react/src/assets/images/cryptologo/vote2018.png

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

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

@ -13,7 +13,6 @@ const addCoinOptionsAC = () => {
'jumblr', 'jumblr',
'kv', 'kv',
'mgw', 'mgw',
//'mvp',
'mnz', 'mnz',
'pangea', 'pangea',
'revs', 'revs',
@ -25,7 +24,8 @@ const addCoinOptionsAC = () => {
'btch', 'btch',
'beer', 'beer',
'pizza', 'pizza',
'vote' 'vote2018',
'ninja'
]; ];
let _items = []; let _items = [];

4
react/src/components/addcoin/addcoinOptionsCrypto.js

@ -36,11 +36,11 @@ const addCoinOptionsCrypto = () => {
label: 'Dash (DASH)', label: 'Dash (DASH)',
icon: 'DASH', icon: 'DASH',
value: `DASH|spv`, value: `DASH|spv`,
}, /*{ }, {
label: 'Denarius (DNR)', label: 'Denarius (DNR)',
icon: 'DNR', icon: 'DNR',
value: `DNR|spv`, value: `DNR|spv`,
},*/ { }, {
label: 'DigiByte (DGB)', label: 'DigiByte (DGB)',
icon: 'DGB', icon: 'DGB',
value: `DGB|spv`, value: `DGB|spv`,

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

@ -26,7 +26,7 @@ export function checkAC(coinVal) {
coinVal === 'BTCH' || coinVal === 'BTCH' ||
coinVal === 'BEER' || coinVal === 'BEER' ||
coinVal === 'PIZZA' || coinVal === 'PIZZA' ||
coinVal === 'VOTE') { coinVal === 'VOTE2018') {
return true; return true;
} else { } else {
return false; return false;
@ -112,8 +112,11 @@ export function startAssetChain(confpath, coin, mode, getSuppyOnly) {
PIZZA: { PIZZA: {
supply: 100000000, supply: 100000000,
}, },
VOTE: { VOTE2018: {
supply: 49999999999, supply: 600000000,
},
NINJA: {
supply: 100000000,
}, },
}; };

27
react/src/components/dashboard/coinTile/coinTileItem.render.js

@ -58,20 +58,27 @@ const CoinTileItemRender = function() {
this.props.Dashboard.electrumCoins[item.coin] && this.props.Dashboard.electrumCoins[item.coin] &&
this.props.Dashboard.electrumCoins[item.coin].serverList && this.props.Dashboard.electrumCoins[item.coin].serverList &&
this.props.Dashboard.electrumCoins[item.coin].serverList === 'none' && this.props.Dashboard.electrumCoins[item.coin].serverList === 'none' &&
<i <span>
data-tip={ translate('SETTINGS.SPV_SINGLE_SERVER_NOTICE') } <i
className="icon fa-info-circle icon-spv-connection-warning"></i> data-tip={ translate('SETTINGS.SPV_SINGLE_SERVER_NOTICE') }
className="icon fa-info-circle icon-spv-connection-warning"></i>
<ReactTooltip
effect="solid"
className="text-left" />
</span>
} }
{ this.renderCoinConError(item) && { this.renderCoinConError(item) &&
!this.props.ActiveCoin.rescanInProgress && !this.props.ActiveCoin.rescanInProgress &&
<i <span>
onClick={ this.openCoindDownModal } <i
data-tip={ `${translate('DASHBOARD.RPC_CONN_FAILURE')}: ${this.props.ActiveCoin.getinfoFetchFailures}.` } onClick={ this.openCoindDownModal }
className="icon fa-warning icon-native-connection-warning"></i> data-tip={ `${translate('DASHBOARD.RPC_CONN_FAILURE')}: ${this.props.ActiveCoin.getinfoFetchFailures}.` }
className="icon fa-warning icon-native-connection-warning"></i>
<ReactTooltip
effect="solid"
className="text-left" />
</span>
} }
<ReactTooltip
effect="solid"
className="text-left" />
</div> </div>
); );
}; };

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

@ -535,7 +535,7 @@ class NotaryElectionsModal extends React.Component {
<i className="fa fa-power-off margin-right-5"></i>Logout <i className="fa fa-power-off margin-right-5"></i>Logout
</button> </button>
} }
<div className="elections-user-type"> {/*<div className="elections-user-type">
<a <a
className={ this.state.userType === 'voter' ? 'active' : '' } className={ this.state.userType === 'voter' ? 'active' : '' }
onClick={ () => this.setUserType('voter') }><i className="fa fa-file margin-right-10"></i>I'm a voter</a> onClick={ () => this.setUserType('voter') }><i className="fa fa-file margin-right-10"></i>I'm a voter</a>
@ -543,7 +543,7 @@ class NotaryElectionsModal extends React.Component {
<a <a
className={ this.state.userType === 'candidate' ? 'active' : '' } className={ this.state.userType === 'candidate' ? 'active' : '' }
onClick={ () => this.setUserType('candidate') }><i className="fa fa-user-o margin-right-10"></i>I'm a candidate</a> onClick={ () => this.setUserType('candidate') }><i className="fa fa-user-o margin-right-10"></i>I'm a candidate</a>
</div> </div>*/}
{ !this.state.isAuth && { !this.state.isAuth &&
<div className="elections-login"> <div className="elections-login">
<label <label
@ -633,6 +633,7 @@ class NotaryElectionsModal extends React.Component {
} }
{ this.state.isAuth && { this.state.isAuth &&
this.state.userType === 'voter' && this.state.userType === 'voter' &&
this.state.balance > 0 &&
<div className={ 'elections-user-type' + (this.state.voteType === 'single' ? ' margin-bottom-30' : '') }> <div className={ 'elections-user-type' + (this.state.voteType === 'single' ? ' margin-bottom-30' : '') }>
<a <a
className={ this.state.voteType === 'multi' ? 'active' : '' } className={ this.state.voteType === 'multi' ? 'active' : '' }

2
react/src/components/dashboard/notaryElectionsModal/notaryElectionsModal.scss

@ -53,7 +53,7 @@
} }
.elections-login { .elections-login {
margin-top: 15px; margin-top: 35px;
} }
.elections-login-btn { .elections-login-btn {

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

@ -332,37 +332,39 @@ class WalletsData extends React.Component {
} }
spvAutoReconnect() { spvAutoReconnect() {
let _spvServers = this.props.Dashboard.electrumCoins[this.props.ActiveCoin.coin].serverList; if (this.props.Dashboard.electrumCoins[this.props.ActiveCoin.coin].serverList !== 'none') {
let _server = [ let _spvServers = this.props.Dashboard.electrumCoins[this.props.ActiveCoin.coin].serverList;
this.props.Dashboard.electrumCoins[this.props.ActiveCoin.coin].server.ip, let _server = [
this.props.Dashboard.electrumCoins[this.props.ActiveCoin.coin].server.port this.props.Dashboard.electrumCoins[this.props.ActiveCoin.coin].server.ip,
]; this.props.Dashboard.electrumCoins[this.props.ActiveCoin.coin].server.port
const _randomServer = getRandomElectrumServer(_spvServers, _server.join(':')); ];
const _randomServer = getRandomElectrumServer(_spvServers, _server.join(':'));
shepherdElectrumCheckServerConnection(_randomServer.ip, _randomServer.port)
.then((res) => { shepherdElectrumCheckServerConnection(_randomServer.ip, _randomServer.port)
if (res.result) { .then((res) => {
shepherdElectrumSetServer(this.props.ActiveCoin.coin, _randomServer.ip, _randomServer.port) if (res.result) {
.then((serverSetRes) => { shepherdElectrumSetServer(this.props.ActiveCoin.coin, _randomServer.ip, _randomServer.port)
.then((serverSetRes) => {
Store.dispatch(
triggerToaster(
`${this.props.ActiveCoin.coin} SPV ${translate('DASHBOARD.SERVER_SET_TO')} ${_randomServer.ip}:${_randomServer.port}`,
translate('TOASTR.WALLET_NOTIFICATION'),
'success'
)
);
Store.dispatch(electrumServerChanged(true));
});
} else {
Store.dispatch( Store.dispatch(
triggerToaster( triggerToaster(
`${this.props.ActiveCoin.coin} SPV ${translate('DASHBOARD.SERVER_SET_TO')} ${_randomServer.ip}:${_randomServer.port}`, `${this.props.ActiveCoin.coin} SPV ${translate('DASHBOARD.SERVER_SM')} ${_randomServer.ip}:${_randomServer.port} ${translate('DASHBOARD.IS_UNREACHABLE')}!`,
translate('TOASTR.WALLET_NOTIFICATION'), translate('TOASTR.WALLET_NOTIFICATION'),
'success' 'error'
) )
); );
Store.dispatch(electrumServerChanged(true)); }
}); });
} else { }
Store.dispatch(
triggerToaster(
`${this.props.ActiveCoin.coin} SPV ${translate('DASHBOARD.SERVER_SM')} ${_randomServer.ip}:${_randomServer.port} ${translate('DASHBOARD.IS_UNREACHABLE')}!`,
translate('TOASTR.WALLET_NOTIFICATION'),
'error'
)
);
}
});
} }
isFullySynced() { isFullySynced() {

3
react/src/components/login/login.js

@ -465,7 +465,8 @@ class Login extends React.Component {
handleKeydown(e) { handleKeydown(e) {
this.updateLoginPassPhraseInput(e); this.updateLoginPassPhraseInput(e);
if (e.key === 'Enter') { if (e.key === 'Enter' &&
this.state.loginPassphrase) {
this.loginSeed(); this.loginSeed();
} }
} }

12
react/src/components/overrides.scss

@ -75,10 +75,6 @@ body {
transition: height 0.3s ease-out; transition: height 0.3s ease-out;
} }
.page-aside {
position: fixed;
}
.page-aside-inner { .page-aside-inner {
.wallet-widgets-list { .wallet-widgets-list {
overflow-y: auto; overflow-y: auto;
@ -369,13 +365,15 @@ select{
bottom: -5px; bottom: -5px;
width: 12px; width: 12px;
height: 12px; height: 12px;
border-color: #dcdcdc;
} }
.rc-slider-dot-active { .rc-slider-dot-active {
border-color: #51c4f9 !important; border-color: #51c4f9 !important;
} }
}
.rc-slider-dot { .page-aside {
border-color: #dcdcdc; position: fixed;
} z-index: 99;
} }

3
react/src/translate/en.js

@ -847,7 +847,8 @@ export const LANG_EN = {
'BTCH': 'BTCH (BTCH)', 'BTCH': 'BTCH (BTCH)',
'BEER': 'BEER (Test coin)', 'BEER': 'BEER (Test coin)',
'PIZZA': 'PIZZA (Test coin)', 'PIZZA': 'PIZZA (Test coin)',
'VOTE': 'VOTE (Notary Elections)', 'VOTE2018': 'VOTE2018 (Notary Elections)',
'NINJA': 'NINJA (NINJA)',
}, },
'DEX': { 'DEX': {
'GEN_NEW_PASSPHRASE': 'Generate a new passphrase', 'GEN_NEW_PASSPHRASE': 'Generate a new passphrase',

10
react/src/util/coinHelper.js

@ -6,9 +6,13 @@ export function getCoinTitle(coin) {
let hideTitle = false; let hideTitle = false;
switch (coin) { switch (coin) {
case 'VOTE': case 'NINJA':
coinlogo = 'vote'; coinlogo = 'ninja';
coinname = 'VOTE (Notary Elections)'; coinname = 'NINJA';
break;
case 'VOTE2018':
coinlogo = 'vote2018';
coinname = 'VOTE2018';
break; break;
case 'GRS': case 'GRS':
coinlogo = 'grs'; coinlogo = 'grs';

3
react/src/util/explorerList.js

@ -23,7 +23,10 @@ const explorerList = {
HUSH: 'https://explorer.myhush.org', HUSH: 'https://explorer.myhush.org',
PIZZA: 'http://pizza.komodochainz.info', PIZZA: 'http://pizza.komodochainz.info',
BEER: 'http://beer.komodochainz.info', BEER: 'http://beer.komodochainz.info',
NINJA: 'https://explorer.fund.ninja',
VOTE2018: 'http://88.99.226.252',
QTUM: 'https://explorer.qtum.org', QTUM: 'https://explorer.qtum.org',
DNR: 'http://denarius.name',
LTC: 'https://live.blockcypher.com/ltc', LTC: 'https://live.blockcypher.com/ltc',
DOGE: 'https://live.blockcypher.com/doge', DOGE: 'https://live.blockcypher.com/doge',
DASH: 'https://live.blockcypher.com/dash', DASH: 'https://live.blockcypher.com/dash',

Loading…
Cancel
Save