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',
'-server',
`-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') {
herdData = {
'ac_name': 'zcashd',

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

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

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

@ -4,7 +4,7 @@ import Config from '../../config';
function fiatRates(pricesJson) {
return dispatch => {
return fetch(`http://atomicexplorer.com/api/rates/kmd`, {
return fetch(`https://atomicexplorer.com/api/rates/kmd`, {
method: 'GET',
})
.catch((error) => {
@ -29,7 +29,7 @@ function fiatRates(pricesJson) {
export function prices() {
return dispatch => {
return fetch(`http://atomicexplorer.com/api/mm/prices`, {
return fetch(`https://atomicexplorer.com/api/mm/prices`, {
method: 'GET',
})
.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',
'kv',
'mgw',
//'mvp',
'mnz',
'pangea',
'revs',
@ -25,7 +24,8 @@ const addCoinOptionsAC = () => {
'btch',
'beer',
'pizza',
'vote'
'vote2018',
'ninja'
];
let _items = [];

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

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

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

@ -26,7 +26,7 @@ export function checkAC(coinVal) {
coinVal === 'BTCH' ||
coinVal === 'BEER' ||
coinVal === 'PIZZA' ||
coinVal === 'VOTE') {
coinVal === 'VOTE2018') {
return true;
} else {
return false;
@ -112,8 +112,11 @@ export function startAssetChain(confpath, coin, mode, getSuppyOnly) {
PIZZA: {
supply: 100000000,
},
VOTE: {
supply: 49999999999,
VOTE2018: {
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].serverList &&
this.props.Dashboard.electrumCoins[item.coin].serverList === 'none' &&
<i
data-tip={ translate('SETTINGS.SPV_SINGLE_SERVER_NOTICE') }
className="icon fa-info-circle icon-spv-connection-warning"></i>
<span>
<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.props.ActiveCoin.rescanInProgress &&
<i
onClick={ this.openCoindDownModal }
data-tip={ `${translate('DASHBOARD.RPC_CONN_FAILURE')}: ${this.props.ActiveCoin.getinfoFetchFailures}.` }
className="icon fa-warning icon-native-connection-warning"></i>
<span>
<i
onClick={ this.openCoindDownModal }
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>
);
};

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
</button>
}
<div className="elections-user-type">
{/*<div className="elections-user-type">
<a
className={ this.state.userType === 'voter' ? 'active' : '' }
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
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>
</div>
</div>*/}
{ !this.state.isAuth &&
<div className="elections-login">
<label
@ -633,6 +633,7 @@ class NotaryElectionsModal extends React.Component {
}
{ this.state.isAuth &&
this.state.userType === 'voter' &&
this.state.balance > 0 &&
<div className={ 'elections-user-type' + (this.state.voteType === 'single' ? ' margin-bottom-30' : '') }>
<a
className={ this.state.voteType === 'multi' ? 'active' : '' }

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

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

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

@ -332,37 +332,39 @@ class WalletsData extends React.Component {
}
spvAutoReconnect() {
let _spvServers = this.props.Dashboard.electrumCoins[this.props.ActiveCoin.coin].serverList;
let _server = [
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(':'));
shepherdElectrumCheckServerConnection(_randomServer.ip, _randomServer.port)
.then((res) => {
if (res.result) {
shepherdElectrumSetServer(this.props.ActiveCoin.coin, _randomServer.ip, _randomServer.port)
.then((serverSetRes) => {
if (this.props.Dashboard.electrumCoins[this.props.ActiveCoin.coin].serverList !== 'none') {
let _spvServers = this.props.Dashboard.electrumCoins[this.props.ActiveCoin.coin].serverList;
let _server = [
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(':'));
shepherdElectrumCheckServerConnection(_randomServer.ip, _randomServer.port)
.then((res) => {
if (res.result) {
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(
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'),
'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() {

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

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

12
react/src/components/overrides.scss

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

3
react/src/translate/en.js

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

10
react/src/util/coinHelper.js

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

3
react/src/util/explorerList.js

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

Loading…
Cancel
Save