Browse Source

Merge pull request #147 from SuperNETorg/cli

Cli
all-modes
pbca26 8 years ago
committed by GitHub
parent
commit
03a34e6000
  1. 91
      react/src/actions/actions/addCoin.js
  2. 22
      react/src/actions/actions/dexCoins.js
  3. 11
      react/src/actions/actions/nativeSyncInfo.js
  4. 22
      react/src/actions/actions/walletAuth.js
  5. 43
      react/src/assets/images/agama-icon.svg
  6. 60
      react/src/assets/images/agama-login-logo.svg
  7. 50
      react/src/assets/images/agama-logo-side.svg
  8. BIN
      react/src/assets/images/agama-wallet.png
  9. BIN
      react/src/assets/images/easydex-logo-big.png
  10. 47
      react/src/components/addcoin/addcoin.js
  11. 12
      react/src/components/addcoin/addcoin.render.js
  12. 32
      react/src/components/addcoin/addcoinOptionsCrypto.js
  13. 20
      react/src/components/addcoin/coin-selectors.render.js
  14. 9
      react/src/components/dashboard/coinTile/coinTileItem.js
  15. 1
      react/src/components/dashboard/loginModal/loginModal.render.js
  16. 2
      react/src/components/dashboard/main/dashboard.render.js
  17. 4
      react/src/components/dashboard/navbar/navbar.js
  18. 18
      react/src/components/dashboard/navbar/navbar.render.js
  19. 2
      react/src/components/dashboard/notifications/notifications.js
  20. 8
      react/src/components/dashboard/notifications/notifications.render.js
  21. 11
      react/src/components/dashboard/receiveCoin/receiveCoin.render.js
  22. 13
      react/src/components/dashboard/settings/settings.js
  23. 30
      react/src/components/dashboard/settings/settings.render.js
  24. 2
      react/src/components/dashboard/walletsData/walletsData.js
  25. 14
      react/src/components/dashboard/walletsData/walletsData.render.js
  26. 32
      react/src/components/dashboard/walletsNative/walletsNative.js
  27. 2
      react/src/components/dashboard/walletsNative/walletsNative.render.js
  28. 148
      react/src/components/dashboard/walletsNativeSyncProgress/walletsNativeSyncProgress.js
  29. 12
      react/src/components/dashboard/walletsNativeTxHistory/walletsNativeTxHistory.render.js
  30. 4
      react/src/components/dashboard/walletsNav/walletsNav.js
  31. 4
      react/src/components/dashboard/walletsNav/walletsNav.render.js
  32. 7
      react/src/components/dashboard/walletsProgress/walletsProgress.js
  33. 6
      react/src/components/login/login.js
  34. 11
      react/src/components/login/login.render.js
  35. 2
      react/src/components/main/main.js
  36. 15
      react/src/components/overrides.scss
  37. 3
      react/src/config.js
  38. 4
      react/src/translate/en.js

91
react/src/actions/actions/addCoin.js

@ -4,7 +4,8 @@ import {
Config,
toggleAddcoinModal,
getDexCoins,
startIguanaInstance
startIguanaInstance,
iguanaWalletPassphraseState,
} from '../actionCreators';
import {
logGuiHttp,
@ -18,10 +19,11 @@ import {
checkAC
} from '../../components/addcoin/payload';
export function addCoin(coin, mode, syncOnly, port) {
if (mode === '-1') {
export function addCoin(coin, mode, syncOnly, port, startupParams) {
if (mode === '-1' ||
mode === -1) {
return dispatch => {
dispatch(shepherdGetConfig(coin, mode));
dispatch(shepherdGetConfig(coin, '-1', startupParams));
}
} else {
if (checkCoinType(coin) === 'currency_ac') {
@ -151,7 +153,7 @@ export function iguanaAddCoin(coin, mode, acData, port) {
}
}
export function shepherdHerd(coin, mode, path) {
export function shepherdHerd(coin, mode, path, startupParams) {
let acData;
let herdData = {
'ac_name': coin,
@ -183,6 +185,15 @@ export function shepherdHerd(coin, mode, path) {
};
}
if (startupParams) {
herdData['ac_custom_param'] = startupParams.type;
if (startupParams.value) {
herdData['ac_custom_param_value'] = startupParams.value;
}
}
// TODO: switch statement
if (checkCoinType(coin) === 'crypto') {
acData = startCrypto(
path.result,
@ -190,6 +201,7 @@ export function shepherdHerd(coin, mode, path) {
mode
);
}
if (checkCoinType(coin) === 'currency_ac') {
acData = startCurrencyAssetChain(
path.result,
@ -234,15 +246,26 @@ export function shepherdHerd(coin, mode, path) {
);
})
.then(response => response.json())
.then(
json => dispatch(
iguanaAddCoin(
coin,
mode,
acData
)
)
);
.then(function(json) {
if (Config.iguanaLessMode) {
dispatch(
addCoinResult(coin, mode)
);
setTimeout(() => {
dispatch(
iguanaActiveHandleBypass()
);
}, 1000);
} else {
dispatch(
iguanaAddCoin(
coin,
mode,
acData
)
);
}
});
}
}
@ -266,7 +289,7 @@ export function addCoinResult(coin, mode) {
}
}
export function _shepherdGetConfig(coin, mode) {
export function _shepherdGetConfig(coin, mode, startupParams) {
return dispatch => {
return fetch(`http://127.0.0.1:${Config.agamaPort}/shepherd/getconf`, {
method: 'POST',
@ -291,14 +314,42 @@ export function _shepherdGetConfig(coin, mode) {
shepherdHerd(
coin,
mode,
json
json,
startupParams
)
)
);
}
}
export function shepherdGetConfig(coin, mode) {
export function iguanaActiveHandleBypass() {
return dispatch => {
return fetch(`http://127.0.0.1:${Config.agamaPort}/shepherd/SuperNET/activehandle`, {
method: 'GET',
headers: {
'Content-Type': 'application/json',
},
})
.catch(function(error) {
console.log(error);
dispatch(
triggerToaster(
'Failed to iguanaActiveHandleBypass',
'Error',
'error'
)
);
})
.then(response => response.json())
.then(
json => dispatch(
iguanaWalletPassphraseState(json, dispatch)
)
)
}
}
export function shepherdGetConfig(coin, mode, startupParams) {
if (coin === 'KMD' &&
mode === '-1') {
return dispatch => {
@ -325,7 +376,8 @@ export function shepherdGetConfig(coin, mode) {
shepherdHerd(
coin,
mode,
json
json,
startupParams
)
)
)
@ -355,7 +407,8 @@ export function shepherdGetConfig(coin, mode) {
shepherdHerd(
coin,
mode,
json
json,
startupParams
)
)
);

22
react/src/actions/actions/dexCoins.js

@ -21,15 +21,29 @@ export function getDexCoins() {
'timestamp': _timestamp,
'function': 'getDexCoins',
'type': 'post',
'url': `http://127.0.0.1:${Config.iguanaCorePort}`,
'url': Config.iguanaLessMode ? `http://127.0.0.1:${Config.agamaPort}/shepherd/InstantDEX/allcoins` : `http://127.0.0.1:${Config.iguanaCorePort}`,
'payload': _payload,
'status': 'pending',
}));
return fetch(`http://127.0.0.1:${Config.iguanaCorePort}`, {
let _fetchConfig = {
method: 'POST',
body: JSON.stringify(_payload)
})
body: JSON.stringify(_payload),
};
if (Config.iguanaLessMode) {
_fetchConfig = {
method: 'GET',
headers: {
'Content-Type': 'application/json',
},
};
}
return fetch(
Config.iguanaLessMode ? `http://127.0.0.1:${Config.agamaPort}/shepherd/InstantDEX/allcoins` : `http://127.0.0.1:${Config.iguanaCorePort}`,
_fetchConfig
)
.catch(function(error) {
console.log(error);
dispatch(logGuiHttp({

11
react/src/actions/actions/nativeSyncInfo.js

@ -19,12 +19,13 @@ export function getSyncInfoNativeKMD(skipDebug) {
'timestamp': _timestamp,
'function': 'getSyncInfoNativeKMD',
'type': 'post',
'url': `http://127.0.0.1:${Config.iguanaCorePort}/api/dex/getinfo?userpass=tmpIgRPCUser@${sessionStorage.getItem('IguanaRPCAuth')}&symbol=${coin}`,
'url': Config.iguanaLessMode ? 'http://kmd.explorer.supernet.org/api/status?q=getInfo' : `http://127.0.0.1:${Config.iguanaCorePort}/api/dex/getinfo?userpass=tmpIgRPCUser@${sessionStorage.getItem('IguanaRPCAuth')}&symbol=${coin}`,
'payload': '',
'status': 'pending',
}));
return fetch(`http://127.0.0.1:${Config.iguanaCorePort}/api/dex/getinfo?userpass=tmpIgRPCUser@${sessionStorage.getItem('IguanaRPCAuth')}&symbol=${coin}`, {
return fetch(
Config.iguanaLessMode ? 'http://kmd.explorer.supernet.org/api/status?q=getInfo' : `http://127.0.0.1:${Config.iguanaCorePort}/api/dex/getinfo?userpass=tmpIgRPCUser@${sessionStorage.getItem('IguanaRPCAuth')}&symbol=${coin}`, {
method: 'GET',
})
.catch(function(error) {
@ -47,9 +48,9 @@ export function getSyncInfoNativeKMD(skipDebug) {
dispatch(logGuiHttp({
'timestamp': _timestamp,
'status': 'success',
'response': json,
'response': Config.iguanaLessMode ? json.info : json,
}));
dispatch(getSyncInfoNativeState({ 'remoteKMDNode': json }));
dispatch(getSyncInfoNativeState({ 'remoteKMDNode': Config.iguanaLessMode ? json.info : json }));
})
.then(function() {
if (!skipDebug) {
@ -60,7 +61,6 @@ export function getSyncInfoNativeKMD(skipDebug) {
}
function getSyncInfoNativeState(json, coin, skipDebug) {
console.log('getSyncInfoNativeState', json);
if (coin === 'KMD' &&
json &&
json.error) {
@ -69,7 +69,6 @@ function getSyncInfoNativeState(json, coin, skipDebug) {
if (json &&
json.error &&
Config.cli.default) {
console.log('getSyncInfoNativeState', 'error');
return {
type: SYNCING_NATIVE_MODE,
progress: Config.cli.default ? json.error : json,

22
react/src/actions/actions/walletAuth.js

@ -185,15 +185,29 @@ export function iguanaActiveHandle(getMainAddress) {
'timestamp': _timestamp,
'function': 'iguanaActiveHandle',
'type': 'post',
'url': `http://127.0.0.1:${Config.iguanaCorePort}`,
'url': Config.iguanaLessMode ? `http://127.0.0.1:${Config.agamaPort}/shepherd/SuperNET/activehandle` : `http://127.0.0.1:${Config.iguanaCorePort}`,
'payload': _payload,
'status': 'pending',
}));
return fetch(`http://127.0.0.1:${Config.iguanaCorePort}`, {
let _fetchConfig = {
method: 'POST',
body: JSON.stringify(_payload),
})
};
if (Config.iguanaLessMode) {
_fetchConfig = {
method: 'GET',
headers: {
'Content-Type': 'application/json',
},
};
}
return fetch(
Config.iguanaLessMode ? `http://127.0.0.1:${Config.agamaPort}/shepherd/SuperNET/activehandle` : `http://127.0.0.1:${Config.iguanaCorePort}`,
_fetchConfig
)
.catch(function(error) {
console.log(error);
dispatch(logGuiHttp({
@ -222,7 +236,7 @@ export function iguanaActiveHandle(getMainAddress) {
}
}
function iguanaWalletPassphraseState(json, dispatch) {
export function iguanaWalletPassphraseState(json, dispatch) {
sessionStorage.setItem('IguanaActiveAccount', JSON.stringify(json));
dispatch(
triggerToaster(

43
react/src/assets/images/agama-icon.svg

@ -0,0 +1,43 @@
<svg width="62" height="62" xmlns="http://www.w3.org/2000/svg">
<g>
<title>background</title>
<rect fill="none" id="canvas_background" height="64" width="64" y="-1" x="-1"/>
</g>
<g>
<title>Layer 1</title>
<g id="svg_1">
<g id="svg_2">
<path id="svg_3" d="m-95.883,25.261" fill="#FFFFFF"/>
</g>
<g id="svg_4">
<g id="svg_5">
<g id="svg_6">
<polyline id="svg_7" points="5.016998291015625,16.1199951171875 5.016998291015625,16.1199951171875 5.016998291015625,16.1199951171875 5.016998291015625,16.1199951171875 5.016998291015625,16.1199951171875 5.016998291015625,16.1199951171875 5.016998291015625,16.1199951171875 5.016998291015625,16.1199951171875 5.016998291015625,16.1199951171875 5.016998291015625,16.1199951171875 " fill="none"/>
</g>
</g>
<g id="svg_8">
<g id="svg_9">
<polyline id="svg_10" points="5.016998291015625,16.1199951171875 5.016998291015625,16.1199951171875 5.016998291015625,16.1199951171875 5.016998291015625,16.1199951171875 5.016998291015625,16.1199951171875 5.016998291015625,16.1199951171875 5.016998291015625,16.1199951171875 5.016998291015625,16.1199951171875 " fill="none"/>
</g>
</g>
<g id="svg_11">
<g id="svg_12">
<polyline id="svg_13" points="5.016998291015625,16.1199951171875 5.016998291015625,16.1199951171875 5.016998291015625,16.1199951171875 5.016998291015625,16.1199951171875 " fill="none"/>
</g>
</g>
<g id="svg_14">
<g id="svg_15">
<path id="svg_16" d="m5.017,16.12"/>
</g>
</g>
</g>
<path id="svg_17" d="m25.98,50.215c-2.344,-0.536 -3.68,-2.914 -3.097,-4.579c-6.44,3.197 -12.483,2.971 -18.131,-0.678c0.041,0.104 0.082,0.208 0.124,0.312c6.681,10.741 16.851,15.481 30.51,14.221c3.236,-7.521 3.861,-13.971 1.874,-19.351c-1.248,-1.697 -3.004,-1.71 -5.268,-0.041c-0.961,0.561 -1.489,3.06 -1.584,7.499c-0.266,1.98 -1.743,2.853 -4.428,2.617" fill="#FCC414" clip-rule="evenodd" fill-rule="evenodd"/>
<path id="svg_18" d="m4.752,44.958c5.648,3.649 11.691,3.875 18.131,0.678c0.16,-0.457 0.464,-0.86 0.932,-1.157c2.521,-1.906 3.361,-3.856 2.521,-5.85c-0.85,-3.058 -4.675,-4.436 -11.473,-4.137c-3.756,0.08 -5.555,-1.439 -5.397,-4.557c0.498,-2.718 1.92,-4.086 4.266,-4.105c0.537,-0.086 1.049,-0.066 1.537,0.058c-3.75,-4.456 -5.289,-9.947 -4.617,-16.473c-0.159,0.142 -0.316,0.287 -0.473,0.433c-9.212,9.231 -11.02,20.934 -5.427,35.11" fill="#F59E1B" clip-rule="evenodd" fill-rule="evenodd"/>
<path id="svg_19" d="m15.267,25.888c0.896,0.229 1.709,0.813 2.438,1.752c2.473,1.993 4.859,2.661 7.159,2.004c1.945,-0.811 2.463,-2.33 1.552,-4.557c-1.062,-1.742 -2.796,-3.39 -5.204,-4.945c-1.717,-1.979 -1.544,-3.929 0.517,-5.85c1.455,-1.012 2.964,-1.12 4.525,-0.323c0.666,0.23 1.268,1.105 1.805,2.623c-0.693,-7.092 -0.405,-12.033 0.862,-14.824c-7.258,0.684 -13.349,3.233 -18.273,7.647c-0.67,6.526 0.869,12.017 4.619,16.473" fill="#EC6922" clip-rule="evenodd" fill-rule="evenodd"/>
<path id="svg_20" d="m28.06,16.592c0.302,0.852 0.583,1.906 0.845,3.162c0.582,2.774 1.498,4.595 2.747,5.462c1.194,0.532 1.899,0.15 2.117,-1.147c0.123,-1.364 -0.001,-3.055 -0.372,-5.074c-0.393,-3.504 0.857,-5.282 3.749,-5.333c2.727,0.436 3.794,1.923 3.2,4.46c1.971,-3.824 6.071,-6.31 12.301,-7.458c-5.227,-6.048 -13.135,-9.013 -23.724,-8.896c-1.268,2.791 -1.555,7.732 -0.863,14.824" fill="#383C8F" clip-rule="evenodd" fill-rule="evenodd"/>
<path id="svg_21" d="m40.346,18.122c-1.623,2.394 -2.765,4.452 -3.426,6.173c-0.578,1.829 -0.481,3.122 0.291,3.878c2.344,1.144 4.701,-2.734 7.004,-4.736c1.918,-1.668 4.619,-0.639 5.277,2.118c0.264,1.68 -0.316,2.863 -1.743,3.549c5.066,-0.177 8.928,2.53 11.585,8.121l-0.003,-0.301c0.798,-11.687 -1.249,-20.719 -6.399,-25.925c-0.094,-0.113 -0.189,-0.225 -0.285,-0.336c-6.23,1.149 -10.33,3.635 -12.301,7.459" fill="#0FA8E0" clip-rule="evenodd" fill-rule="evenodd"/>
<path id="svg_22" d="m46.195,29.595c-2.898,0.535 -4.848,1.182 -5.85,1.94c-1.47,1.845 -1.297,3.45 0.517,4.816c4.689,5.427 6.13,13.785 4.845,23.139l14.131,0.072l-0.505,-22.337c-2.657,-5.591 -6.519,-8.298 -11.585,-8.121c-0.437,0.211 -0.955,0.375 -1.553,0.491" fill="#61C1D2" clip-rule="evenodd" fill-rule="evenodd"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.1 KiB

60
react/src/assets/images/agama-login-logo.svg

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 36 KiB

50
react/src/assets/images/agama-logo-side.svg

@ -0,0 +1,50 @@
<svg width="210" height="60" xmlns="http://www.w3.org/2000/svg">
<g>
<title>background</title>
<rect fill="none" id="canvas_background" height="62" width="212" y="-1" x="-1"/>
</g>
<g>
<title>Layer 1</title>
<g id="svg_2">
<g id="svg_3">
<path id="svg_4" d="m-95.883,24.261" fill="#FFFFFF"/>
</g>
<g id="svg_5">
<g id="svg_6">
<g id="svg_7">
<polyline id="svg_8" points="5.016998291015625,15.1199951171875 5.016998291015625,15.1199951171875 5.016998291015625,15.1199951171875 5.016998291015625,15.1199951171875 5.016998291015625,15.1199951171875 5.016998291015625,15.1199951171875 5.016998291015625,15.1199951171875 5.016998291015625,15.1199951171875 5.016998291015625,15.1199951171875 5.016998291015625,15.1199951171875 " fill="none"/>
</g>
</g>
<g id="svg_9">
<g id="svg_10">
<polyline id="svg_11" points="5.016998291015625,15.1199951171875 5.016998291015625,15.1199951171875 5.016998291015625,15.1199951171875 5.016998291015625,15.1199951171875 5.016998291015625,15.1199951171875 5.016998291015625,15.1199951171875 5.016998291015625,15.1199951171875 5.016998291015625,15.1199951171875 " fill="none"/>
</g>
</g>
<g id="svg_12">
<g id="svg_13">
<polyline id="svg_14" points="5.016998291015625,15.1199951171875 5.016998291015625,15.1199951171875 5.016998291015625,15.1199951171875 5.016998291015625,15.1199951171875 " fill="none"/>
</g>
</g>
<g id="svg_15">
<g id="svg_16">
<path id="svg_17" d="m5.017,15.12"/>
</g>
</g>
</g>
<path id="svg_18" d="m25.98,49.215c-2.344,-0.536 -3.68,-2.914 -3.097,-4.579c-6.44,3.197 -12.483,2.971 -18.131,-0.678c0.041,0.104 0.082,0.208 0.124,0.312c6.681,10.741 16.851,15.481 30.51,14.221c3.236,-7.521 3.861,-13.971 1.874,-19.351c-1.248,-1.697 -3.004,-1.71 -5.268,-0.041c-0.961,0.561 -1.489,3.06 -1.584,7.499c-0.266,1.98 -1.743,2.853 -4.428,2.617" fill="#FCC414" clip-rule="evenodd" fill-rule="evenodd"/>
<path id="svg_19" d="m4.752,43.958c5.648,3.649 11.691,3.875 18.131,0.678c0.16,-0.457 0.464,-0.86 0.932,-1.157c2.521,-1.906 3.361,-3.856 2.521,-5.85c-0.85,-3.058 -4.675,-4.436 -11.473,-4.137c-3.756,0.08 -5.555,-1.439 -5.397,-4.557c0.498,-2.718 1.92,-4.086 4.266,-4.105c0.537,-0.086 1.049,-0.066 1.537,0.058c-3.75,-4.456 -5.289,-9.947 -4.617,-16.473c-0.159,0.142 -0.316,0.287 -0.473,0.433c-9.212,9.231 -11.02,20.934 -5.427,35.11" fill="#F59E1B" clip-rule="evenodd" fill-rule="evenodd"/>
<path id="svg_20" d="m15.267,24.888c0.896,0.229 1.709,0.813 2.438,1.752c2.473,1.993 4.859,2.661 7.159,2.004c1.945,-0.811 2.463,-2.33 1.552,-4.557c-1.062,-1.742 -2.796,-3.39 -5.204,-4.945c-1.717,-1.979 -1.544,-3.929 0.517,-5.85c1.455,-1.012 2.964,-1.12 4.525,-0.323c0.666,0.23 1.268,1.105 1.805,2.623c-0.693,-7.092 -0.405,-12.033 0.862,-14.824c-7.258,0.684 -13.349,3.233 -18.273,7.647c-0.67,6.526 0.869,12.017 4.619,16.473" fill="#EC6922" clip-rule="evenodd" fill-rule="evenodd"/>
<path id="svg_21" d="m28.06,15.592c0.302,0.852 0.583,1.906 0.845,3.162c0.582,2.774 1.498,4.595 2.747,5.462c1.194,0.532 1.899,0.15 2.117,-1.147c0.123,-1.364 -0.001,-3.055 -0.372,-5.074c-0.393,-3.504 0.857,-5.282 3.749,-5.333c2.727,0.436 3.794,1.923 3.2,4.46c1.971,-3.824 6.071,-6.31 12.301,-7.458c-5.227,-6.048 -13.135,-9.013 -23.724,-8.896c-1.268,2.791 -1.555,7.732 -0.863,14.824" fill="#383C8F" clip-rule="evenodd" fill-rule="evenodd"/>
<path id="svg_22" d="m40.346,17.122c-1.623,2.394 -2.765,4.452 -3.426,6.173c-0.578,1.829 -0.481,3.122 0.291,3.878c2.344,1.144 4.701,-2.734 7.004,-4.736c1.918,-1.668 4.619,-0.639 5.277,2.118c0.264,1.68 -0.316,2.863 -1.743,3.549c5.066,-0.177 8.928,2.53 11.585,8.121l-0.003,-0.301c0.798,-11.687 -1.249,-20.719 -6.399,-25.925c-0.094,-0.113 -0.189,-0.225 -0.285,-0.336c-6.23,1.149 -10.33,3.635 -12.301,7.459" fill="#0FA8E0" clip-rule="evenodd" fill-rule="evenodd"/>
<path id="svg_23" d="m46.195,28.595c-2.898,0.535 -4.848,1.182 -5.85,1.94c-1.47,1.845 -1.297,3.45 0.517,4.816c4.689,5.427 6.13,13.785 4.845,23.139l14.131,0.072l-0.505,-22.337c-2.657,-5.591 -6.519,-8.298 -11.585,-8.121c-0.437,0.211 -0.955,0.375 -1.553,0.491" fill="#61C1D2" clip-rule="evenodd" fill-rule="evenodd"/>
</g>
<g id="svg_24">
<path id="svg_25" d="m91.822,42.954l-3.324,-7.457l-10.701,0l-3.287,7.457l-3.141,0l10.555,-23.542l2.611,0l10.5,23.542l-3.213,0zm-4.292,-9.911l-3.104,-7.265c-0.402,-0.919 -0.815,-2.047 -1.242,-3.384c-0.268,1.026 -0.651,2.154 -1.15,3.384l-3.141,7.265l8.637,0z" fill="#1D1D1B"/>
<path id="svg_26" d="m110.448,30.67l9.076,0l0,11.402c-1.413,0.396 -2.849,0.695 -4.31,0.897c-1.461,0.203 -3.153,0.305 -5.077,0.305c-4.042,0 -7.189,-1.056 -9.441,-3.167c-2.252,-2.111 -3.378,-5.07 -3.378,-8.876c0,-2.438 0.557,-4.573 1.671,-6.407s2.718,-3.234 4.812,-4.202c2.094,-0.967 4.547,-1.451 7.359,-1.451c2.849,0 5.503,0.46 7.962,1.38l-1.205,2.405c-2.411,-0.898 -4.729,-1.348 -6.958,-1.348c-3.25,0 -5.789,0.851 -7.615,2.55c-1.826,1.7 -2.739,4.058 -2.739,7.073c0,3.164 0.879,5.564 2.639,7.2c1.759,1.636 4.343,2.454 7.752,2.454c1.85,0 3.658,-0.188 5.423,-0.562l0,-7.217l-5.971,0l0,-2.436z" fill="#1D1D1B"/>
<path id="svg_27" d="m145.146,42.954l-3.324,-7.457l-10.7,0l-3.287,7.457l-3.141,0l10.554,-23.542l2.611,0l10.502,23.542l-3.215,0zm-4.291,-9.911l-3.105,-7.265c-0.4,-0.919 -0.814,-2.047 -1.24,-3.384c-0.27,1.026 -0.652,2.154 -1.15,3.384l-3.142,7.265l8.637,0z" fill="#1D1D1B"/>
<path id="svg_28" d="m165.342,42.954l-9.058,-20.784l-0.146,0c0.17,1.646 0.255,3.604 0.255,5.87l0,14.914l-2.866,0l0,-23.446l4.675,0l8.455,19.341l0.146,0l8.528,-19.341l4.638,0l0,23.446l-3.104,0l0,-15.106c0,-1.732 0.085,-3.614 0.255,-5.646l-0.146,0l-9.131,20.752l-2.501,0z" fill="#1D1D1B"/>
<path id="svg_29" d="m205.569,42.954l-3.323,-7.457l-10.701,0l-3.287,7.457l-3.141,0l10.555,-23.542l2.611,0l10.501,23.542l-3.215,0zm-4.291,-9.911l-3.104,-7.265c-0.401,-0.919 -0.815,-2.047 -1.241,-3.384c-0.269,1.026 -0.651,2.154 -1.15,3.384l-3.142,7.265l8.637,0z" fill="#1D1D1B"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 5.8 KiB

BIN
react/src/assets/images/agama-wallet.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

BIN
react/src/assets/images/easydex-logo-big.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 15 KiB

47
react/src/components/addcoin/addcoin.js

@ -1,6 +1,7 @@
import React from 'react';
import { translate } from '../../translate/translate';
import {
Config,
addCoin,
toggleAddcoinModal,
triggerToaster,
@ -16,6 +17,7 @@ class AddCoin extends React.Component {
constructor(props) {
super(props);
this.state = {
nativeOnly: Config.iguanaLessMode,
coins: [],
defaultCoinState: {
selectedCoin: null,
@ -33,6 +35,7 @@ class AddCoin extends React.Component {
},
mode: -2,
syncOnly: false,
daemonParam: null,
},
display: false,
actionsMenu: false,
@ -57,7 +60,7 @@ class AddCoin extends React.Component {
loadCoinSelection() {
shepherdGetCoinList()
.then(function(json) {
.then((json) => {
if (json.msg !== 'error') {
this.setState(Object.assign({}, this.state, {
coins: json.result,
@ -72,7 +75,7 @@ class AddCoin extends React.Component {
)
);
}
}.bind(this));
});
}
toggleSyncOnlyMode(index) {
@ -87,6 +90,18 @@ class AddCoin extends React.Component {
}));
}
updateDaemonParam(e, index) {
let _coins = this.state.coins;
_coins[index] = Object.assign({}, _coins[index], {
[e.target.name]: e.target.value,
});
this.setState(Object.assign({}, this.state, {
coins: _coins,
}));
}
toggleActionsMenu() {
this.setState(Object.assign({}, this.state, {
actionsMenu: !this.state.actionsMenu,
@ -120,7 +135,7 @@ class AddCoin extends React.Component {
updateSelectedCoin(e, index) {
const coin = e.target.value.split('|');
const defaultMode = coin[1];
const defaultMode = Config.iguanaLessMode ? 'native' : coin[1];
const modeToValue = {
'full': 1,
'basilisk': 0,
@ -185,16 +200,27 @@ class AddCoin extends React.Component {
activateCoin() {
const coin = this.state.coins[0].selectedCoin.split('|')[0];
if (this.isCoinAlreadyAdded(coin)) {
this.dismiss();
return;
}
Store.dispatch(addCoin(
coin,
this.state.coins[0].mode,
this.state.coins[0].syncOnly
));
if (!this.state.coins[0].daemonParam) {
Store.dispatch(addCoin(
coin,
this.state.coins[0].mode,
this.state.coins[0].syncOnly,
));
} else {
Store.dispatch(addCoin(
coin,
this.state.coins[0].mode,
this.state.coins[0].syncOnly,
null,
{ type: this.state.coins[0].daemonParam }
));
}
this.removeCoin();
this.addNewItem();
@ -230,6 +256,7 @@ class AddCoin extends React.Component {
activateAllCoins() {
const coin = this.state.coins[0].selectedCoin.split('|')[0];
if (!this.isCoinAlreadyAdded(coin)) {
Store.dispatch(
addCoin(
@ -280,7 +307,7 @@ class AddCoin extends React.Component {
CoinSelectorsRender.call(
this,
_item,
_coin,
_coin,
i
)
);
@ -305,7 +332,7 @@ class AddCoin extends React.Component {
for (let mode of modes) {
if (this.existingCoins[mode].indexOf(coin) !== -1) {
const message = `${coin} ${translate('ADD_COIN.ALREADY_ADDED')} ${translate('ADD_COIN.IN')} ${mode} ${translate('ADD_COIN.MODE')}`;
Store.dispatch(
triggerToaster(
message,

12
react/src/components/addcoin/addcoin.render.js

@ -49,15 +49,15 @@ const AddCoinRender = function() {
</button>
</div>
<div className="col-sm-12">
<p>
<p className={ this.state.nativeOnly ? 'hide' : '' }>
<strong>{ translate('INDEX.FULL_MODE') }:</strong> { translate('INDEX.FULL_MODE_DESC') }
</p>
<p>
<p className={ this.state.nativeOnly ? 'hide' : '' }>
<strong>{ translate('INDEX.BASILISK_MODE') }:</strong> { translate('INDEX.BASILISK_MODE_DESC') }
</p>
<p>
<strong>{ translate('INDEX.NATIVE_MODE') }:</strong> { translate('INDEX.NATIVE_MODE_DESC1') }
<strong>Komodo Daemon</strong> { translate('INDEX.NATIVE_MODE_DESC2') }
<strong>{ translate('INDEX.NATIVE_MODE') }:</strong> { translate('INDEX.NATIVE_MODE_DESC1') }&nbsp;
<strong>Komodo Daemon</strong> { translate('INDEX.NATIVE_MODE_DESC2') }&nbsp;
<i>Iguana Daemon</i> { translate('INDEX.NATIVE_MODE_DESC3') }.
</p>
<div className="alert alert-icon alert-primary">
@ -67,8 +67,8 @@ const AddCoinRender = function() {
<span>×</span>
</button>
<i className="icon md-info-outline"></i>
<strong>{ translate('INDEX.NATIVE_MODE') }</strong> { translate('INDEX.NATIVE_MODE_DESC4') }
<strong>{ translate('INDEX.NATIVE_MODE_DESC5') }</strong>,
<strong>{ translate('INDEX.NATIVE_MODE') }</strong> { translate('INDEX.NATIVE_MODE_DESC4') }&nbsp;
<strong>{ translate('INDEX.NATIVE_MODE_DESC5') }</strong>,&nbsp;
<i>{ translate('INDEX.NATIVE_MODE_DESC5') }</i>.
</div>
</div>

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

@ -1,26 +1,34 @@
import React from 'react';
import { translate } from '../../translate/translate';
import { Config } from '../../actions/actionCreators';
class AddCoinOptionsCrypto extends React.Component {
constructor(props) {
super(props);
this.state = {
nativeOnly: Config.iguanaLessMode,
}
}
render() {
//<option value="ANC|full">AnonCoin (ANC)</option>
//<option value="MZC|full">MazaCoin (MZC)</option>
//<option value="SYS|full">SysCoin (SYS)</option>
return (
<optgroup label="Crypto Currencies">
<option value="BTCD|full">BitcoinDark (BTCD)</option>
<option value="BTC|full|basilisk">Bitcoin (BTC)</option>
<option value="BTM|full">Bitmark (BTM)</option>
<option value="CARB|full">Carboncoin (CARB)</option>
<option value="DGB|full">Digibyte (DGB)</option>
<option value="DOGE|full">Dogecoin (DOGE)</option>
<option value="FRK|full">Franko (FRK)</option>
<option value="GAME|full">Gamecredits (GAME)</option>
<option value="BTCD|full" className={ this.state.nativeOnly ? 'hide' : '' }>BitcoinDark (BTCD)</option>
<option value="BTC|full|basilisk" className={ this.state.nativeOnly ? 'hide' : '' }>Bitcoin (BTC)</option>
<option value="BTM|full" className={ this.state.nativeOnly ? 'hide' : '' }>Bitmark (BTM)</option>
<option value="CARB|full" className={ this.state.nativeOnly ? 'hide' : '' }>Carboncoin (CARB)</option>
<option value="DGB|full" className={ this.state.nativeOnly ? 'hide' : '' }>Digibyte (DGB)</option>
<option value="DOGE|full" className={ this.state.nativeOnly ? 'hide' : '' }>Dogecoin (DOGE)</option>
<option value="FRK|full" className={ this.state.nativeOnly ? 'hide' : '' }>Franko (FRK)</option>
<option value="GAME|full" className={ this.state.nativeOnly ? 'hide' : '' }>Gamecredits (GAME)</option>
<option value="KMD|basilisk|native">Komodo (KMD)</option>
<option value="LTC|full">Litecoin (LTC)</option>
<option value="UNO|full">Unobtanium (UNO)</option>
<option value="ZEC|full">Zcash (ZEC)</option>
<option value="ZET|full">Zetacoin (ZET)</option>
<option value="LTC|full" className={ this.state.nativeOnly ? 'hide' : '' }>Litecoin (LTC)</option>
<option value="UNO|full" className={ this.state.nativeOnly ? 'hide' : '' }>Unobtanium (UNO)</option>
<option value="ZEC|full" className={ this.state.nativeOnly ? 'hide' : '' }>Zcash (ZEC)</option>
<option value="ZET|full" className={ this.state.nativeOnly ? 'hide' : '' }>Zetacoin (ZET)</option>
</optgroup>
);
}

20
react/src/components/addcoin/coin-selectors.render.js

@ -34,7 +34,7 @@ const CoinSelectorsRender = function(item, coin, i) {
</button>
</div>
<div className="col-sm-12 text-center">
<div className="form-group col-lg-4 col-md-4 col-sm-6 col-xs-6 style-addcoin-lbl-mdl-login">
<div className={ this.state.nativeOnly ? 'hide' : 'form-group col-lg-4 col-md-4 col-sm-6 col-xs-6 style-addcoin-lbl-mdl-login' }>
<input
type="radio"
className="to-labelauty labelauty"
@ -64,7 +64,7 @@ const CoinSelectorsRender = function(item, coin, i) {
</span>
</label>
</div>
<div className="form-group col-lg-4 col-md-4 col-sm-6 col-xs-6 style-addcoin-lbl-mdl-login">
<div className={ this.state.nativeOnly ? 'hide' : 'form-group col-lg-4 col-md-4 col-sm-6 col-xs-6 style-addcoin-lbl-mdl-login' }>
<input
type="radio"
className="to-labelauty labelauty"
@ -94,7 +94,7 @@ const CoinSelectorsRender = function(item, coin, i) {
</span>
</label>
</div>
<div className="form-group col-lg-4 col-md-4 col-sm-12 col-xs-12 style-addcoin-lbl-mdl-login">
<div className="form-group col-lg-4 col-md-4 col-sm-6 col-xs-6" style={{ paddingLeft: this.state.nativeOnly ? '0' : 'inherit' }}>
<input
type="radio"
className="to-labelauty labelauty"
@ -133,6 +133,20 @@ const CoinSelectorsRender = function(item, coin, i) {
<i className="fa fa-trash-o"></i>
</button>
</div>
<div className={ item.mode === '-1' || item.mode === -1 ? 'col-sm-5' : 'hide' }>
<div className="toggle-box padding-top-3 padding-bottom-10">
<select
className="form-control form-material"
name="daemonParam"
onChange={ (event) => this.updateDaemonParam(event, i) }
autoFocus>
<option>Daemon param: none</option>
<option value="silent">Daemon param: background process</option>
<option value="reindex">Daemon param: reindex</option>
<option value="rescan">Daemon param: rescan</option>
</select>
</div>
</div>
<div className={ item.mode === '1' || item.mode === 1 ? 'col-sm-12' : 'hide' }>
<div className="toggle-box padding-top-3 padding-bottom-10">
<span className="pointer">

9
react/src/components/dashboard/coinTile/coinTileItem.js

@ -1,5 +1,6 @@
import React from 'react';
import {
Config,
dashboardChangeActiveCoin,
iguanaActiveHandle,
getAddressesByAccount,
@ -16,7 +17,8 @@ import {
getKMDOPID,
getNativeTxHistory,
getKMDBalanceTotal,
getSyncInfoNative
getSyncInfoNative,
getDebugLog
} from '../../../actions/actionCreators';
import Store from '../../../store';
@ -43,11 +45,14 @@ class CoinTileItem extends React.Component {
Store.dispatch(iguanaActiveHandle(true));
const syncPercentage = this.props.Dashboard && this.props.Dashboard.progress && (parseFloat(parseInt(this.props.Dashboard.progress.blocks, 10) * 100 / parseInt(this.props.Dashboard.progress.longestchain, 10)).toFixed(2)).replace('NaN', 0);
if (syncPercentage < 100) {
Store.dispatch(getDebugLog('komodo', 10));
}
if (this.props.Dashboard.progress &&
this.props.Dashboard.progress.blocks &&
this.props.Dashboard.progress.longestchain &&
syncPercentage &&
syncPercentage >= NATIVE_MIN_SYNC_PERCENTAGE_THRESHOLD) {
(Config.iguanaLessMode || syncPercentage >= NATIVE_MIN_SYNC_PERCENTAGE_THRESHOLD)) {
Store.dispatch(getSyncInfoNative(coin, true));
Store.dispatch(getKMDBalanceTotal(coin));
Store.dispatch(getNativeTxHistory(coin));

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

@ -30,7 +30,6 @@ const LoginModalRender = function () {
<div className="brand">
<img className="brand-img" src="assets/images/easydex-logo-big.png" alt="SuperNET Iguana" />
</div>
<div id="section-login" className={ this.state.activeLoginSection === 'login' ? 'show' : 'hide' }>
<h4 className="color-white" id="login-welcome">{ translate('INDEX.WELCOME_LOGIN') }</h4>
<div className="login-form">

2
react/src/components/dashboard/main/dashboard.render.js

@ -29,7 +29,7 @@ const DashboardRender = function() {
{ !this.isNativeMode() && <WalletsProgress {...this.props} /> }
{ !this.isNativeMode() && <WalletsBalance {...this.props} />}
<SendCoin {...this.props} />
<ReceiveCoin {...this.props.ActiveCoin} />
{ !this.isNativeMode() && <ReceiveCoin {...this.props.ActiveCoin} /> }
<WalletsData {...this.props} />
<WalletsTxInfo {...this.props} />
<WalletsNative {...this.props} />

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

@ -6,7 +6,8 @@ import {
startInterval,
toggleSyncOnlyModal,
getSyncOnlyForks,
logout
logout,
Config
} from '../../../actions/actionCreators';
import Store from '../../../store';
@ -17,6 +18,7 @@ class Navbar extends React.Component {
super(props);
this.state = {
openDropMenu: false,
nativeOnly: Config.iguanaLessMode,
};
this.openDropMenu = this.openDropMenu.bind(this);
this.logout = this.logout.bind(this);

18
react/src/components/dashboard/navbar/navbar.render.js

@ -19,12 +19,14 @@ const NavbarRender = function() {
<div className="navbar-brand navbar-brand-center site-gridmenu-toggle">
<img
className="navbar-brand-logo hidden-xs"
src="assets/images/easydex-logo-dashboard.png"
title="SuperNET Iguana" />
src="assets/images/agama-logo-side.svg"
height="100"
width="100"
title="Agama Wallet" />
<img
className="navbar-brand-logo hidden-md hidden-sm hidden-lg"
src="assets/images/easydex-logo-dashboard-white.png"
title="SuperNET Iguana white" />
src="assets/images/agama-icon.svg"
title="Agama Wallet white" />
<span className="navbar-brand-text hidden-xs"></span>
</div>
<button
@ -50,9 +52,9 @@ const NavbarRender = function() {
<i className="site-menu-icon"></i> { translate('INDEX.WALLETS') }
</a>
</li>
<li className={ this.isSectionActive('edex') ? 'active nav-top-menu' : 'nav-top-menu' }>
<li className={ 'hide ' + (this.isSectionActive('edex') ? 'active nav-top-menu' : 'nav-top-menu') }>
<a onClick={ () => this.dashboardChangeSection('edex') }>
<i className="site-menu-icon"></i> EasyDEX
<i className="site-menu-icon"></i> BarterDEX
</a>
</li>
<li className={ 'hide ' + (this.isSectionActive('jumblr') ? 'active nav-top-menu' : 'nav-top-menu') }>
@ -60,7 +62,7 @@ const NavbarRender = function() {
<i className="site-menu-icon"></i> Jumblr
</a>
</li>
<li className={ this.isSectionActive('atomic') ? 'active nav-top-menu' : 'nav-top-menu' }>
<li className={ this.state.nativeOnly ? 'hide' : (this.isSectionActive('atomic') ? 'active nav-top-menu' : 'nav-top-menu') }>
<a onClick={ () => this.dashboardChangeSection('atomic') }>
<i className="site-menu-icon"></i> Atomic Explorer
</a>
@ -95,7 +97,7 @@ const NavbarRender = function() {
<i className="icon md-settings"></i> { translate('INDEX.SETTINGS') }
</a>
</li>
<li>
<li className={ this.state.nativeOnly ? 'hide' : '' }>
<a onClick={ () => this.openSyncOnlyModal() }>
<i className="icon fa-cubes"></i> { translate('ADD_COIN.SYNC_ONLY') }
</a>

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

@ -1,5 +1,6 @@
import React from 'react';
import { sortByDate } from '../../../util/sort';
import { Config } from '../../../actions/actionCreators';
import {
NotificationsByTypeRender,
NotificationsModalRender,
@ -19,6 +20,7 @@ class Notifications extends React.Component {
},
activeTab: 2,
guiLog: null,
debug: Config.debug,
};
this.toggleNotificationsModal = this.toggleNotificationsModal.bind(this);
}

8
react/src/components/dashboard/notifications/notifications.render.js

@ -92,14 +92,14 @@ export const NotificationsRender = function() {
<div>
<div
className={ this.props.Dashboard.activeHandle && this.props.Dashboard.activeHandle.status === 'unlocked' ? 'notifications-badge stick-to-top' : 'notifications-badge' }
onClick={ this.toggleNotificationsModal }>
<span className="badge success">
onClick={ this.state.debug ? this.toggleNotificationsModal : null }>
<span className={ this.state.debug ? 'badge success' : 'hide' }>
{ this.state.calls.success }
</span>
<span className="badge error">
<span className={ this.state.debug ? 'badge error' : 'hide' }>
{ this.state.calls.error }
</span>
<span className="badge pending">
<span className={ this.state.debug ? 'badge pending' : 'hide' }>
{ this.state.calls.pending }
</span>
<div className={ this.state.calls.pending === 0 ? 'spinner spinner-hide' : 'spinner' }>

11
react/src/components/dashboard/receiveCoin/receiveCoin.render.js

@ -73,8 +73,7 @@ export const ReceiveCoinRender = function() {
onClick={ this.openDropMenu }>
<a className="dropdown-toggle white btn btn-warning">
<i className="icon md-arrows margin-right-10"></i> { translate('INDEX.GET_NEW_ADDRESS') }
<span
className="caret"></span>
<span className="caret"></span>
</a>
<ul
className="dropdown-menu dropdown-menu-right">
@ -97,7 +96,7 @@ export const ReceiveCoinRender = function() {
<div className="panel-body">
<table className="table table-hover dataTable table-striped">
<thead>
{this.isNativeMode() ?
{ this.isNativeMode() ?
<tr>
<th>{ translate('INDEX.TYPE') }</th>
<th>{ translate('INDEX.ADDRESS') }</th>
@ -113,11 +112,11 @@ export const ReceiveCoinRender = function() {
}
</thead>
<tbody>
{this.renderAddressList('public')}
{this.isNativeMode() && this.renderAddressList('private')}
{ this.renderAddressList('public') }
{ this.isNativeMode() && this.renderAddressList('private') }
</tbody>
<tfoot>
{this.isNativeMode() ?
{ this.isNativeMode() ?
<tr>
<th>{ translate('INDEX.TYPE') }</th>
<th>{ translate('INDEX.ADDRESS') }</th>

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

@ -1,6 +1,7 @@
import React from 'react';
import { translate } from '../../../translate/translate';
import {
Config,
iguanaActiveHandle,
encryptWallet,
settingsWifkeyState,
@ -42,6 +43,7 @@ class Settings extends React.Component {
cliResponse: null,
exportWifKeysRaw: false,
seedInputVisibility: false,
nativeOnly: Config.iguanaLessMode,
};
this.exportWifKeys = this.exportWifKeys.bind(this);
this.updateInput = this.updateInput.bind(this);
@ -320,12 +322,21 @@ class Settings extends React.Component {
_cliResponseParsed = _cliResponse.result;
}
const __cliResponseParsed = _cliResponseParsed.split('\r\n');
let _items = [];
for (let i = 0; i < __cliResponseParsed.length; i++) {
_items.push(
<div key={ `cli-response-${Math.random(0, 9) * 10}` }>{ __cliResponseParsed[i] }</div>
);
}
return (
<div>
<div>
<strong>CLI response:</strong>
</div>
{ JSON.stringify(_cliResponseParsed, null, '\t') }
{ _items }
</div>
);
} else {

30
react/src/components/dashboard/settings/settings.render.js

@ -106,9 +106,9 @@ export const SettingsRender = function() {
className="panel-group"
id="SettingsAccordion">
<div
className="panel"
id="WalletInfo"
onClick={ () => this.openTab('WalletInfo', 0) }>
onClick={ () => this.openTab('WalletInfo', 0) }
className={ this.state.nativeOnly ? 'hide' : 'panel' }>
<div className="panel-heading">
<a className={ this.state.activeTab === 0 ? 'panel-title' : 'panel-title collapsed' }>
<i className="icon md-balance-wallet"></i>{ translate('INDEX.WALLET_INFO') }
@ -157,9 +157,9 @@ export const SettingsRender = function() {
</div>
<div
className="panel"
id="AddNodeforCoin"
onClick={ () => this.openTab('AddNodeforCoin', 1) }>
onClick={ () => this.openTab('AddNodeforCoin', 1) }
className={ this.state.nativeOnly ? 'hide' : 'panel' }>
<div className="panel-heading">
<a className={ this.state.activeTab === 1 ? 'panel-title' : 'panel-title collapsed' }>
<i className="icon md-plus-square"></i>{ translate('INDEX.ADD_NODE') }
@ -243,9 +243,9 @@ export const SettingsRender = function() {
</div>
<div
className="panel"
id="DumpWallet"
onClick={ () => this.openTab('DumpWallet', 2) }>
onClick={ () => this.openTab('DumpWallet', 2) }
className={ this.state.nativeOnly ? 'hide' : 'panel' }>
<div className="panel-heading">
<a className={ this.state.activeTab === 2 ? 'panel-title' : 'panel-title collapsed' }>
<i className="icon wb-briefcase"></i>{ translate('INDEX.WALLET_BACKUP') }
@ -259,9 +259,9 @@ export const SettingsRender = function() {
</div>
<div
className="panel"
id="FiatCurrencySettings"
onClick={ () => this.openTab('FiatCurrencySettings', 3) }>
onClick={ () => this.openTab('FiatCurrencySettings', 3) }
className={ this.state.nativeOnly ? 'hide' : 'panel' }>
<div className="panel-heading">
<a className={ this.state.activeTab === 3 ? 'panel-title' : 'panel-title collapsed' }>
<i className="icon fa-money"></i>{ translate('INDEX.FIAT_CURRENCY') }
@ -275,9 +275,9 @@ export const SettingsRender = function() {
</div>
<div
className="panel"
id="ExportKeys"
onClick={ () => this.openTab('ExportKeys', 4) }>
onClick={ () => this.openTab('ExportKeys', 4) }
className={ this.state.nativeOnly ? 'hide' : 'panel' }>
<div className="panel-heading">
<a className={ this.state.activeTab === 4 ? 'panel-title' : 'panel-title collapsed' }>
<i className="icon md-key"></i>{ translate('INDEX.EXPORT_KEYS') }
@ -345,9 +345,9 @@ export const SettingsRender = function() {
</div>
<div
className="panel"
id="ImportKeys"
onClick={ () => this.openTab('ImportKeys', 5) }>
onClick={ () => this.openTab('ImportKeys', 5) }
className={ this.state.nativeOnly ? 'hide' : 'panel' }>
<div className="panel-heading">
<a className={ this.state.activeTab === 5 ? 'panel-title' : 'panel-title collapsed' }>
<i className="icon md-key"></i>{ translate('INDEX.IMPORT_KEYS') }
@ -431,7 +431,7 @@ export const SettingsRender = function() {
name="debugTarget"
id="settingsDelectDebugLogOptions"
onChange={ this.updateInput }>
<option value="iguana">Iguana</option>
<option value="iguana" className={ this.state.nativeOnly ? 'hide' : '' }>Iguana</option>
<option value="komodo">Komodo</option>
</select>
<label
@ -487,9 +487,9 @@ export const SettingsRender = function() {
{ this.renderAppInfoTab() }
<div
className="panel"
id="Cli"
onClick={ () => this.openTab('Cli', 9) }>
onClick={ () => this.openTab('Cli', 9) }
className={ !this.props.Main.coins.native.length ? 'hide' : 'panel' }>
<div className="panel-heading">
<a className={ this.state.activeTab === 9 ? 'panel-title' : 'panel-title collapsed' }>
<i className="icon fa-code"></i> CLI

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

@ -1,8 +1,8 @@
import React from 'react';
import Config from '../../../config';
import { translate } from '../../../translate/translate';
import { sortByDate } from '../../../util/sort';
import {
Config,
basiliskRefresh,
basiliskConnection,
toggleDashboardTxInfoModal,

14
react/src/components/dashboard/walletsData/walletsData.render.js

@ -43,12 +43,12 @@ export const PaginationRender = function(paginationFrom, paginationTo) {
<div className="row unselectable">
<div className="col-sm-5">
<div className="dataTables_info">
{ translate('INDEX.SHOWING') }
{ paginationFrom }
{ translate('INDEX.TO_ALT') }
{ paginationTo }
{ translate('INDEX.OF') }
{ this.props.ActiveCoin.txhistory.length }
{ translate('INDEX.SHOWING') }&nbsp;
{ paginationFrom }&nbsp;
{ translate('INDEX.TO_ALT') }&nbsp;
{ paginationTo }&nbsp;
{ translate('INDEX.OF') }&nbsp;
{ this.props.ActiveCoin.txhistory.length }&nbsp;
{ translate('INDEX.ENTRIES_SM') }
</div>
</div>
@ -143,7 +143,7 @@ export const WalletsDataRender = function() {
<div className={ 'margin-bottom-3 ' + (this.state.currentStackLength === 1 || (this.state.currentStackLength === 0 && this.state.totalStackLength === 0) ? 'hide' : 'progress progress-sm') }>
<div
className="progress-bar progress-bar-striped active progress-bar-indicating progress-bar-success font-size-80-percent"
style={{ width: 100 - (this.state.currentStackLength * 100 / this.state.totalStackLength) + '%'}}>
style={{ width: 100 - (this.state.currentStackLength * 100 / this.state.totalStackLength) + '%' }}>
{ translate('SEND.PROCESSING_REQ') }: { this.state.currentStackLength } / { this.state.totalStackLength }
</div>
</div>

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

@ -1,9 +1,41 @@
import React from 'react';
import WalletsNativeRender from './walletsNative.render';
import { translate } from '../../../translate/translate';
import {
Config,
triggerToaster
} from '../../../actions/actionCreators';
import Store from '../../../store';
import { SocketProvider } from 'socket.io-react';
import io from 'socket.io-client';
const socket = io.connect('http://127.0.0.1:' + Config.agamaPort);
class WalletsNative extends React.Component {
constructor(props) {
super(props);
socket.on('service', msg => this.updateSocketsData(msg));
}
updateSocketsData(data) {
if (data &&
data.komodod &&
data.komodod.error) {
switch (data.komodod.error) {
case 'run -reindex':
Store.dispatch(
triggerToaster(
'Restart Agama and run Komodo with -reindex param',
translate('TOASTR.WALLET_NOTIFICATION'),
'info',
false
)
);
break;
}
}
}
defaultBG() {

2
react/src/components/dashboard/walletsNative/walletsNative.render.js

@ -4,6 +4,7 @@ import WalletsNativeInfo from '../walletsNativeInfo/walletsNativeInfo';
import WalletsNativeSend from '../walletsNativeSend/walletsNativeSend';
import WalletsProgress from '../walletsProgress/walletsProgress';
import WalletsNativeTxHistory from '../walletsNativeTxHistory/walletsNativeTxHistory';
import ReceiveCoin from '../receiveCoin/receiveCoin';
const WalletsNativeRender = function() {
return (
@ -28,6 +29,7 @@ const WalletsNativeRender = function() {
<WalletsProgress {...this.props} />
<div className="row">
<WalletsBalance {...this.props} />
<ReceiveCoin {...this.props.ActiveCoin} />
<WalletsNativeTxHistory {...this.props} />
<WalletsNativeSend {...this.props} />
<WalletsNativeInfo {...this.props} />

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

@ -0,0 +1,148 @@
import React from 'react';
import { translate } from '../../../translate/translate';
import {
ChainActivationNotificationRender,
WalletsNativeSyncProgressRender
} from './walletsNativeSyncProgress.render';
class WalletsNativeSyncProgress extends React.Component {
renderSyncPercentagePlaceholder() {
if (this.props.Dashboard.progress &&
this.props.Dashboard.progress.blocks > 0 &&
this.props.Dashboard.progress.longestchain === 0) {
return (
<div className="progress-bar progress-bar-info progress-bar-striped active full-width font-size-80-percent">
<span className="full-width">{ translate('INDEX.SYNC_ERR_LONGESTCHAIN') }</span>
</div>
);
} else if (this.props.Dashboard.progress && this.props.Dashboard.progress.blocks === 0) {
return (
<div className="progress-bar progress-bar-info progress-bar-striped active full-width font-size-80-percent">
<span className="full-width">{ translate('INDEX.SYNC_ERR_BLOCKS') }</span>
</div>
);
} else {
if (this.props.Dashboard.progress &&
this.props.Dashboard.progress.blocks) {
const syncPercentage = (parseFloat(parseInt(this.props.Dashboard.progress.blocks, 10) * 100 / parseInt(this.props.Dashboard.progress.longestchain, 10)).toFixed(2) + '%').replace('NaN', 0);
return (
<div
className="progress-bar progress-bar-info progress-bar-striped active font-size-80-percent"
style={{ width: syncPercentage }}>
<span style={{ width: syncPercentage }}>{ syncPercentage }</span> | { this.props.Dashboard.progress.blocks } / { this.props.Dashboard.progress.longestchain } | { translate('INDEX.CONNECTIONS') }: { this.props.Dashboard.progress.connections }
</div>
);
} else {
return (
<div
className="progress-bar progress-bar-info progress-bar-striped active font-size-80-percent"
style={{ width: '100%' }}>
<span style={{ width: '100%' }}>Loading blocks...it can take up to 15 min to load blocks</span>
</div>
);
}
}
}
renderActivatingBestChainProgress() {
if (this.props.Settings &&
this.props.Settings.debugLog) {
console.log('debugLog');
if (this.props.Settings.debugLog.indexOf('UpdateTip') > -1 &&
!this.props.Dashboard.progress &&
!this.props.Dashboard.progress.blocks) {
const temp = this.props.Settings.debugLog.split(' ');
let currentBestChain;
let currentProgress;
for (let i = 0; i < temp.length; i++) {
if (temp[i].indexOf('height=') > -1) {
currentBestChain = temp[i].replace('height=', '');
}
if (temp[i].indexOf('progress=') > -1) {
currentProgress = Number(temp[i].replace('progress=', '')) * 100;
}
}
// fallback to local data if remote node is inaccessible
if (this.props.Dashboard.progress.remoteKMDNode &&
!this.props.Dashboard.progress.remoteKMDNode.blocks) {
return (
`: ${currentProgress}% (activating)`
);
} else {
if (this.props.Dashboard.progress.remoteKMDNode &&
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 if (
this.props.Settings.debugLog.indexOf('Still rescanning') > -1 &&
!this.props.Dashboard.progress ||
!this.props.Dashboard.progress.blocks
) {
const temp = this.props.Settings.debugLog.split(' ');
let currentProgress;
for (let i = 0; i < temp.length; i++) {
if (temp[i].indexOf('Progress=') > -1) {
currentProgress = (Number(temp[i].replace('Progress=', '')) * 100).toFixed(2);
}
}
return (
`: ${currentProgress}% (rescanning blocks)`
);
} else if (
this.props.Settings.debugLog.indexOf('LoadExternalBlockFile:') > -1 ||
this.props.Settings.debugLog.indexOf('Reindexing block file') > -1
) {
return (
`: (reindexing blocks from disk)`
);
} else {
return (
<span> (downloading blocks!)</span>
);
}
}
}
renderLB(_translationID) {
const _translationComponents = translate(_translationID).split('<br>');
return _translationComponents.map((_translation) =>
<span>
{ _translation }
<br />
</span>
);
}
renderChainActivationNotification() {
return ChainActivationNotificationRender.call(this);
/* if (this.props.Dashboard.progress) {
if ((!this.props.Dashboard.progress.blocks && !this.props.Dashboard.progress.longestchain) ||
(this.props.Dashboard.progress.blocks < this.props.Dashboard.progress.longestchain)) {
return ChainActivationNotificationRender.call(this);
}
} else {
return null;
} */
}
render() {
if (this.props &&
this.props.Dashboard) {
return WalletsNativeSyncProgressRender.call(this);
}
return null;
}
}
export default WalletsNativeSyncProgress;

12
react/src/components/dashboard/walletsNativeTxHistory/walletsNativeTxHistory.render.js

@ -27,12 +27,12 @@ export const PaginationRender = function(paginationStart, paginationEnd, paginat
<div className="row unselectable">
<div className="col-sm-5">
<div className="dataTables_info">
{ translate('INDEX.SHOWING') }
{ paginationStart }
{ translate('INDEX.TO') }
{ paginationEnd }
{ translate('INDEX.OF') }
{ this.props.ActiveCoin.txhistory.length }
{ translate('INDEX.SHOWING') }&nbsp;
{ paginationStart }&nbsp;
{ translate('INDEX.TO') }&nbsp;
{ paginationEnd }&nbsp;
{ translate('INDEX.OF') }&nbsp;
{ this.props.ActiveCoin.txhistory.length }&nbsp;
{ translate('INDEX.ENTRIES_SM') }
</div>
</div>

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

@ -1,5 +1,6 @@
import React from 'react';
import {
Config,
copyCoinAddress,
iguanaEdexBalance,
toggleSendCoinForm,
@ -16,6 +17,9 @@ import {
class WalletsNav extends React.Component {
constructor(props) {
super(props);
this.state = {
nativeOnly: Config.iguanaLessMode,
};
this.toggleSendReceiveCoinForms = this.toggleSendReceiveCoinForms.bind(this);
}

4
react/src/components/dashboard/walletsNav/walletsNav.render.js

@ -24,10 +24,10 @@ export const WalletsNavWithWalletRender = function () {
return (
<div>
<div
className="page-header page-header-bordered header-easydex padding-bottom-20"
className={ 'page-header page-header-bordered header-easydex ' + (this.state.nativeOnly ? 'padding-bottom-40' : 'padding-bottom-20') }
id="header-dashboard"
style={{ marginBottom: this.props.ActiveCoin.mode === 'basilisk' ? '30px' : '0' }}>
<ol className="breadcrumb">
<ol className={ this.state.nativeOnly ? 'hide' : 'breadcrumb' }>
<strong>{ translate('INDEX.MY') } { this.props && this.props.ActiveCoin ? this.props.ActiveCoin.coin : '-' } { translate('INDEX.ADDRESS') }: </strong>
{ this.props && this.props.Dashboard && this.props.Dashboard.activeHandle ? this.props.Dashboard.activeHandle[this.props.ActiveCoin.coin] : '-' }
<button

7
react/src/components/dashboard/walletsProgress/walletsProgress.js

@ -121,6 +121,13 @@ class WalletsProgress extends React.Component {
return (
`: ${currentProgress}% (rescanning blocks)`
);
} else if (
this.props.Settings.debugLog.indexOf('LoadExternalBlockFile:') > -1 ||
this.props.Settings.debugLog.indexOf('Reindexing block file') > -1
) {
return (
`: (reindexing blocks from disk)`
);
} else {
return (
<span> (downloading blocks)</span>

6
react/src/components/login/login.js

@ -1,5 +1,6 @@
import React from 'react';
import {
Config,
toggleAddcoinModal,
iguanaWalletPassphrase,
iguanaActiveHandle,
@ -36,6 +37,7 @@ class Login extends React.Component {
displaySeedBackupModal: false,
customWalletSeed: false,
isCustomSeedWeak: false,
nativeOnly: Config.iguanaLessMode,
};
this.toggleActivateCoinForm = this.toggleActivateCoinForm.bind(this);
this.updateRegisterConfirmPassPhraseInput = this.updateRegisterConfirmPassPhraseInput.bind(this);
@ -196,7 +198,7 @@ class Login extends React.Component {
return null;
}
const passPhraseWords = passPhrase.split(" ");
const passPhraseWords = passPhrase.split(' ');
if (!PassPhraseGenerator.arePassPhraseWordsValid(passPhraseWords))
return null;
@ -248,7 +250,7 @@ class Login extends React.Component {
});
}
// TODO:
// TODO:
// 1) disable register btn if seed or seed conf is incorrect
// 2) display explicit custom seed validation message
handleRegisterWallet() {

11
react/src/components/login/login.render.js

@ -10,11 +10,13 @@ const LoginRender = function () {
<div className="brand">
<img
className="brand-img"
src="assets/images/easydex-logo-big.png"
src="assets/images/agama-login-logo.svg"
width="200"
height="160"
alt="SuperNET Iguana" />
</div>
<div className="vertical-padding-20 horizontal-padding-0">
<div className={ this.state.nativeOnly ? 'hide' : 'vertical-padding-20 horizontal-padding-0' }>
<span
className="display-sync-only-coins-toggle"
onClick={ this.openSyncOnlyModal }>
@ -52,7 +54,7 @@ const LoginRender = function () {
</div>
</div>
<div className={ this.state.activeLoginSection === 'login' ? 'show' : 'hide' }>
<div className={ this.state.activeLoginSection === 'login' && !this.state.nativeOnly ? 'show' : 'hide' }>
<h4 className="color-white">
{translate('INDEX.WELCOME_LOGIN')}
</h4>
@ -82,8 +84,7 @@ const LoginRender = function () {
type="button"
className="btn btn-primary btn-block"
onClick={ this.loginSeed }
disabled={ !this.state.loginPassphrase
|| !this.state.loginPassphrase.length }>{ translate('INDEX.SIGN_IN') }</button>
disabled={ !this.state.loginPassphrase || !this.state.loginPassphrase.length }>{ translate('INDEX.SIGN_IN') }</button>
<div className="form-group form-material floating">
<button
className="btn btn-lg btn-flat btn-block waves-effect"

2
react/src/components/main/main.js

@ -1,9 +1,9 @@
import React from 'react';
import Config from '../../config';
import WalletMain from './walletMain';
import { iguanaSetRPCAuth } from '../../util/auth';
import Store from '../../store';
import {
Config,
getDexCoins,
iguanaActiveHandle
} from '../../actions/actionCreators';

15
react/src/components/overrides.scss

@ -417,7 +417,7 @@ input:checked + .slider:before {
.warning {
border-color: #FFDC00;
&:before {
content: '!';
background-color: #FFDC00;
@ -483,7 +483,7 @@ input:checked + .slider:before {
&.stick-to-top {
top: -3px;
left: 470px;
left: 400px;
z-index: 1500;
.spinner {
@ -581,4 +581,15 @@ select{
color: #757575;
}
}
}
.site-navbar {
.navbar-brand-logo {
height: 32px;
width: 110px;
}
}
.navbar-brand {
padding: 22px 15px;
}

3
react/src/config.js

@ -9,5 +9,6 @@ module.exports = {
cli: {
passthru: true,
default: true
}
},
iguanaLessMode: true,
};

4
react/src/translate/en.js

@ -32,7 +32,7 @@ export const _lang = {
'SYNC_ERR_BLOCKS': 'Unable to get current sync progress. Err: no blocks param in response',
'COIN_IS_BUSY': 'Coin is busy processing',
'REFRESHING_BASILISK_NET': 'Refreshing Basilisk Network Connections',
'SELECT_A_COIN': 'Select Coin to add to EasyDEX',
'SELECT_A_COIN': 'Select Coin to add to Agama Wallet',
'WALLETS': 'Wallets',
'ACTIVATE_COIN': 'Activate Coin',
'WELCOME_PLEASE_ADD': 'Welcome. Please add coin to start.',
@ -55,7 +55,7 @@ export const _lang = {
'NATIVE_MODE_DESC6': 'Private Transactions',
'UNSUPPORTED_BROWSER': 'Uh Oh! Unsupported Web Browser :-(',
'CLOSE': 'Close',
'IE_UNSUPPORTED': 'The current version of EasyDEX-GUI doesn\'t support Internet Explorer',
'IE_UNSUPPORTED': 'The current version of Agama Wallet doesn\'t support Internet Explorer',
'PLEASE_USE': 'Please use either',
'OR': 'or',
'TO_USE': 'to use',

Loading…
Cancel
Save