Browse Source

Merge pull request #12 from SuperNETorg/v0.25

V0.25
v0.25
pbca26 7 years ago
committed by GitHub
parent
commit
99d9fd5e64
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 20
      react/package.json
  2. 23
      react/src/actions/actions/addCoin.js
  3. 1
      react/src/actions/actions/atomic.js
  4. 2
      react/src/actions/actions/cli.js
  5. 17
      react/src/actions/actions/coinList.js
  6. 2
      react/src/actions/actions/dexCoins.js
  7. 20
      react/src/actions/actions/electrum.js
  8. 32
      react/src/actions/actions/fiatRates.js
  9. 4
      react/src/actions/actions/getTxDetails.js
  10. 4
      react/src/actions/actions/interest.js
  11. 18
      react/src/actions/actions/jumblr.js
  12. 1
      react/src/actions/actions/nativeDashboardUpdate.js
  13. 6
      react/src/actions/actions/nativeNetwork.js
  14. 1
      react/src/actions/actions/nativeNewAddress.js
  15. 12
      react/src/actions/actions/nativeSend.js
  16. 9
      react/src/actions/actions/nativeSyncInfo.js
  17. 4
      react/src/actions/actions/pin.js
  18. 187
      react/src/actions/actions/settings.js
  19. 2
      react/src/actions/actions/sysInfo.js
  20. 6
      react/src/actions/actions/update.js
  21. 2
      react/src/actions/actions/walletAuth.js
  22. 1
      react/src/actions/storeType.js
  23. BIN
      react/src/assets/images/20.jpg
  24. BIN
      react/src/assets/images/android-chrome-192x192.png
  25. BIN
      react/src/assets/images/cryptologo/axo.png
  26. BIN
      react/src/assets/images/cryptologo/btch.png
  27. BIN
      react/src/assets/images/cryptologo/chips (copy).png
  28. BIN
      react/src/assets/images/cryptologo/etomic.png
  29. BIN
      react/src/assets/images/cryptologo/kmd.png
  30. BIN
      react/src/assets/images/easydex-logo-dashboard-white.png
  31. BIN
      react/src/assets/images/easydex-logo-dashboard.png
  32. BIN
      react/src/assets/images/favicon-16x16.png
  33. BIN
      react/src/assets/images/favicon-194x194.png
  34. BIN
      react/src/assets/images/favicon-32x32.png
  35. BIN
      react/src/assets/images/favicon-96x96.png
  36. BIN
      react/src/assets/images/iguana_profile_02.jpg
  37. BIN
      react/src/assets/images/native/kmd_header_title_logo.png
  38. BIN
      react/src/assets/images/supernet-iguana-logo-big.png
  39. BIN
      react/src/assets/images/supernet-iguana-logo-white.png
  40. BIN
      react/src/assets/images/supernet-iguana-logo.png
  41. 5
      react/src/components/addcoin/addcoinOptionsAC.js
  42. 8
      react/src/components/addcoin/addcoinOptionsCrypto.js
  43. 39
      react/src/components/addcoin/payload.js
  44. 45
      react/src/components/contextMenu.scss
  45. 12
      react/src/components/dashboard/about/about.js
  46. 4
      react/src/components/dashboard/claimInterestModal/claimInterestModal.js
  47. 6
      react/src/components/dashboard/claimInterestModal/claimInterestModal.render.js
  48. 59
      react/src/components/dashboard/coinTile/coinTile.scss
  49. 9
      react/src/components/dashboard/coinTile/coinTileItem.js
  50. 21
      react/src/components/dashboard/coinTile/coinTileItem.render.js
  51. 49
      react/src/components/dashboard/jumblr/jumblr.render.js
  52. 1
      react/src/components/dashboard/navbar/navbar.js
  53. 9
      react/src/components/dashboard/navbar/navbar.render.js
  54. 60
      react/src/components/dashboard/navbar/navbar.scss
  55. 11
      react/src/components/dashboard/qrModal/qrModal.js
  56. 10
      react/src/components/dashboard/qrModal/qrModal.scss
  57. 6
      react/src/components/dashboard/sendCoin/sendCoin.js
  58. 43
      react/src/components/dashboard/sendCoin/sendCoin.render.js
  59. 9
      react/src/components/dashboard/sendCoin/sendCoin.scss
  60. 179
      react/src/components/dashboard/settings/settings.addNodePanel.js
  61. 2
      react/src/components/dashboard/settings/settings.appInfoPanel.js
  62. 33
      react/src/components/dashboard/settings/settings.appUpdatePanel.js
  63. 13
      react/src/components/dashboard/settings/settings.debugLogPanel.js
  64. 1
      react/src/components/dashboard/settings/settings.render.js
  65. 26
      react/src/components/dashboard/settings/settings.scss
  66. 14
      react/src/components/dashboard/spinner/spinner.scss
  67. 21
      react/src/components/dashboard/walletsBalance/walletsBalance.scss
  68. 21
      react/src/components/dashboard/walletsData/walletsData.scss
  69. 4
      react/src/components/dashboard/walletsHeader/walletsHeader.render.js
  70. 4
      react/src/components/dashboard/walletsHeader/walletsHeader.scss
  71. 13
      react/src/components/dashboard/walletsInfo/walletsInfo.render.js
  72. 3
      react/src/components/dashboard/walletsInfo/walletsInfo.scss
  73. 4
      react/src/components/dashboard/walletsMain/walletsMain.render.js
  74. 62
      react/src/components/dashboard/walletsNav/walletsNav.scss
  75. 13
      react/src/components/dashboard/zcparamsFetchModal/zcparamsFetchModal.js
  76. 6
      react/src/components/dashboard/zcparamsFetchModal/zcparamsFetchModal.scss
  77. 5
      react/src/components/dex/table/table.scss
  78. 14
      react/src/components/login/login.render.js
  79. 15
      react/src/components/login/login.scss
  80. 448
      react/src/components/overrides.scss
  81. 21
      react/src/components/responsive.scss
  82. 65
      react/src/components/switch.scss
  83. 1
      react/src/config.js
  84. 6
      react/src/reducers/dashboard.js
  85. 7
      react/src/reducers/settings.js
  86. 10
      react/src/styles/index.scss
  87. 10
      react/src/translate/en.js
  88. 28
      react/src/util/coinHelper.js

20
react/package.json

@ -1,6 +1,6 @@
{
"name": "AgamaGUI",
"version": "0.0.1",
"version": "0.0.26",
"description": "Agama Wallet GUI",
"main": "src/index.js",
"scripts": {
@ -17,19 +17,18 @@
"e2e": "protractor",
"e2e-live": "protractor --elementExplorer"
},
"repository": "https://github.com/KomodoPlatform/EasyDEX-GUI",
"homepage": "http://supernet.org",
"keywords": [
"react",
"webpack",
"babel",
"minimal",
"starter"
"agama",
"SuperNET",
"komodo",
"multicoin",
"wallet",
"spv"
],
"author": "SuperNET Team",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/SuperNETorg/EasyDEX-GUI.git"
},
"dependencies": {
"babel-core": "^6.14.0",
"babel-loader": "^6.2.5",
@ -39,7 +38,6 @@
"express": "^4.14.0",
"file-loader": "^0.10.0",
"qrcode.react": "^0.7.1",
"rc-tree": "^1.4.6",
"react": "^15.3.1",
"react-dom": "^15.3.1",
"react-hot-loader": "^1.3.0",

23
react/src/actions/actions/addCoin.js

@ -25,7 +25,7 @@ function iguanaActiveHandleState(json) {
export function activeHandle() {
return dispatch => {
return fetch(`http://127.0.0.1:${Config.agamaPort}/shepherd/auth/status`, {
return fetch(`http://127.0.0.1:${Config.agamaPort}/shepherd/auth/status?token=${Config.token}`, {
method: 'GET',
headers: {
'Content-Type': 'application/json',
@ -60,6 +60,7 @@ export function shepherdElectrumAuth(seed) {
body: JSON.stringify({
seed,
iguana: true,
token: Config.token,
}),
})
.catch((error) => {
@ -80,7 +81,7 @@ export function shepherdElectrumAuth(seed) {
} else {
dispatch(
triggerToaster(
'Icorrect WIF key format',
translate('TOASTR.INCORRECT_WIF'),
'Error',
'error'
)
@ -92,7 +93,7 @@ export function shepherdElectrumAuth(seed) {
export function shepherdElectrumAddCoin(coin) {
return dispatch => {
return fetch(`http://127.0.0.1:${Config.agamaPort}/shepherd/electrum/coins/add?coin=${coin}`, {
return fetch(`http://127.0.0.1:${Config.agamaPort}/shepherd/electrum/coins/add?coin=${coin}&token=${Config.token}`, {
method: 'GET',
headers: {
'Content-Type': 'application/json',
@ -231,6 +232,7 @@ export function shepherdHerd(coin, mode, path, startupParams) {
body: JSON.stringify({
herd: _herd,
options: herdData,
token: Config.token,
}),
})
.catch((error) => {
@ -326,7 +328,10 @@ export function _shepherdGetConfig(coin, mode, startupParams) {
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({ chain: 'komodod' })
body: JSON.stringify({
chain: 'komodod',
token: Config.token,
}),
})
.catch((error) => {
console.log(error);
@ -361,7 +366,10 @@ export function shepherdGetConfig(coin, mode, startupParams) {
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({ chain: 'komodod' })
body: JSON.stringify({
chain: 'komodod',
token: Config.token,
}),
})
.catch((error) => {
console.log(error);
@ -392,7 +400,10 @@ export function shepherdGetConfig(coin, mode, startupParams) {
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({ 'chain': coin })
body: JSON.stringify({
chain: coin,
token: Config.token,
}),
})
.catch((error) => {
console.log(error);

1
react/src/actions/actions/atomic.js

@ -9,6 +9,7 @@ export function atomic(payload) {
return fetch(`http://127.0.0.1:${Config.iguanaCorePort}`, {
method: 'POST',
body: JSON.stringify(payload),
token: Config.token,
})
.catch((error) => {
console.log(error);

2
react/src/actions/actions/cli.js

@ -8,6 +8,7 @@ export function shepherdCliPromise(mode, chain, cmd) {
mode,
chain,
cmd,
token: Config.token,
};
return new Promise((resolve, reject) => {
@ -38,6 +39,7 @@ export function shepherdCli(mode, chain, cmd) {
mode,
chain,
cmd,
token: Config.token,
};
return dispatch => {

17
react/src/actions/actions/coinList.js

@ -10,7 +10,7 @@ export function shepherdElectrumLock() {
headers: {
'Content-Type': 'application/json',
},
body: '',
body: JSON.stringify({ token: Config.token }),
})
.catch((error) => {
console.log(error);
@ -34,7 +34,7 @@ export function shepherdElectrumLogout() {
headers: {
'Content-Type': 'application/json',
},
body: '',
body: JSON.stringify({ token: Config.token }),
})
.catch((error) => {
console.log(error);
@ -58,7 +58,7 @@ export function shepherdStopCoind(coin) {
headers: {
'Content-Type': 'application/json',
},
body: coin === 'KMD' ? '' : JSON.stringify({ chain: coin }),
body: coin === 'KMD' ? JSON.stringify({ token: Config.token }) : JSON.stringify({ chain: coin, token: Config.token }),
})
.catch((error) => {
console.log(error);
@ -84,9 +84,11 @@ export function shepherdRemoveCoin(coin, mode) {
},
body: JSON.stringify(coin === 'KMD' && mode === 'native' ? {
mode,
token: Config.token,
} : {
mode,
chain: coin,
token: Config.token,
}),
})
.catch((error) => {
@ -117,7 +119,7 @@ export function shepherdRemoveCoin(coin, mode) {
export function shepherdGetCoinList() {
return new Promise((resolve, reject) => {
fetch(`http://127.0.0.1:${Config.agamaPort}/shepherd/coinslist`, {
fetch(`http://127.0.0.1:${Config.agamaPort}/shepherd/coinslist?token=${Config.token}`, {
method: 'GET',
headers: {
'Content-Type': 'application/json',
@ -145,7 +147,10 @@ export function shepherdPostCoinList(data) {
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({ 'payload': data }),
body: JSON.stringify({
payload: data,
token: Config.token,
}),
})
.catch((error) => {
console.log(error);
@ -164,7 +169,7 @@ export function shepherdPostCoinList(data) {
export function shepherdClearCoindFolder(coin, keepWalletDat) {
return new Promise((resolve, reject) => {
fetch(keepWalletDat ? `http://127.0.0.1:${Config.agamaPort}/shepherd/kick?coin=${coin}&keepwallet=true` : `http://127.0.0.1:${Config.agamaPort}/shepherd/kick?coin=${coin}`, {
fetch(keepWalletDat ? `http://127.0.0.1:${Config.agamaPort}/shepherd/kick?coin=${coin}&keepwallet=true&token=${Config.token}` : `http://127.0.0.1:${Config.agamaPort}/shepherd/kick?coin=${coin}&token=${Config.token}`, {
method: 'GET',
headers: {
'Content-Type': 'application/json',

2
react/src/actions/actions/dexCoins.js

@ -8,7 +8,7 @@ import Config from '../../config';
export function getDexCoins() {
return dispatch => {
return fetch(
`http://127.0.0.1:${Config.agamaPort}/shepherd/InstantDEX/allcoins`, {
`http://127.0.0.1:${Config.agamaPort}/shepherd/InstantDEX/allcoins?token=${Config.token}`, {
method: 'GET',
headers: {
'Content-Type': 'application/json',

20
react/src/actions/actions/electrum.js

@ -13,7 +13,7 @@ import Store from '../../store';
export function shepherdElectrumSetServer(coin, address, port) {
return new Promise((resolve, reject) => {
fetch(`http://127.0.0.1:${Config.agamaPort}/shepherd/electrum/coins/server/set?address=${address}&port=${port}&coin=${coin}`, {
fetch(`http://127.0.0.1:${Config.agamaPort}/shepherd/electrum/coins/server/set?address=${address}&port=${port}&coin=${coin}&token=${Config.token}`, {
method: 'GET',
headers: {
'Content-Type': 'application/json',
@ -38,7 +38,7 @@ export function shepherdElectrumSetServer(coin, address, port) {
export function shepherdElectrumCheckServerConnection(address, port) {
return new Promise((resolve, reject) => {
fetch(`http://127.0.0.1:${Config.agamaPort}/shepherd/electrum/servers/test?address=${address}&port=${port}`, {
fetch(`http://127.0.0.1:${Config.agamaPort}/shepherd/electrum/servers/test?address=${address}&port=${port}&token=${Config.token}`, {
method: 'GET',
headers: {
'Content-Type': 'application/json',
@ -72,6 +72,7 @@ export function shepherdElectrumKeys(seed) {
seed,
active: true,
iguana: true,
token: Config.token,
}),
})
.catch((error) => {
@ -93,7 +94,7 @@ export function shepherdElectrumKeys(seed) {
export function shepherdElectrumBalance(coin, address) {
return dispatch => {
return fetch(`http://127.0.0.1:${Config.agamaPort}/shepherd/electrum/getbalance?coin=${coin}&address=${address}`, {
return fetch(`http://127.0.0.1:${Config.agamaPort}/shepherd/electrum/getbalance?coin=${coin}&address=${address}&token=${Config.token}`, {
method: 'GET',
headers: {
'Content-Type': 'application/json',
@ -125,7 +126,7 @@ export function shepherdElectrumBalanceState(json) {
export function shepherdElectrumTransactions(coin, address) {
return dispatch => {
return fetch(`http://127.0.0.1:${Config.agamaPort}/shepherd/electrum/listtransactions?coin=${coin}&address=${address}&full=true&maxlength=20`, {
return fetch(`http://127.0.0.1:${Config.agamaPort}/shepherd/electrum/listtransactions?coin=${coin}&address=${address}&full=true&maxlength=20&token=${Config.token}`, {
method: 'GET',
headers: {
'Content-Type': 'application/json',
@ -166,7 +167,7 @@ export function shepherdElectrumTransactionsState(json) {
export function shepherdElectrumCoins() {
return dispatch => {
return fetch(`http://127.0.0.1:${Config.agamaPort}/shepherd/electrum/coins`, {
return fetch(`http://127.0.0.1:${Config.agamaPort}/shepherd/electrum/coins?token=${Config.token}`, {
method: 'GET',
headers: {
'Content-Type': 'application/json',
@ -199,7 +200,7 @@ export function shepherdElectrumCoinsState(json) {
// value in sats
export function shepherdElectrumSend(coin, value, sendToAddress, changeAddress) {
return dispatch => {
return fetch(`http://127.0.0.1:${Config.agamaPort}/shepherd/electrum/createrawtx?coin=${coin}&address=${sendToAddress}&value=${value}&change=${changeAddress}&gui=true&push=true&verify=true`, {
return fetch(`http://127.0.0.1:${Config.agamaPort}/shepherd/electrum/createrawtx?coin=${coin}&address=${sendToAddress}&value=${value}&change=${changeAddress}&gui=true&push=true&verify=true&token=${Config.token}`, {
method: 'GET',
headers: {
'Content-Type': 'application/json',
@ -224,7 +225,7 @@ export function shepherdElectrumSend(coin, value, sendToAddress, changeAddress)
export function shepherdElectrumSendPromise(coin, value, sendToAddress, changeAddress) {
return new Promise((resolve, reject) => {
return fetch(`http://127.0.0.1:${Config.agamaPort}/shepherd/electrum/createrawtx?coin=${coin}&address=${sendToAddress}&value=${value}&change=${changeAddress}&gui=true&push=true&verify=true`, {
return fetch(`http://127.0.0.1:${Config.agamaPort}/shepherd/electrum/createrawtx?coin=${coin}&address=${sendToAddress}&value=${value}&change=${changeAddress}&gui=true&push=true&verify=true&token=${Config.token}`, {
method: 'GET',
headers: {
'Content-Type': 'application/json',
@ -249,7 +250,7 @@ export function shepherdElectrumSendPromise(coin, value, sendToAddress, changeAd
export function shepherdElectrumSendPreflight(coin, value, sendToAddress, changeAddress) {
return new Promise((resolve, reject) => {
fetch(`http://127.0.0.1:${Config.agamaPort}/shepherd/electrum/createrawtx?coin=${coin}&address=${sendToAddress}&value=${value}&change=${changeAddress}&gui=true&push=false&verify=true`, {
fetch(`http://127.0.0.1:${Config.agamaPort}/shepherd/electrum/createrawtx?coin=${coin}&address=${sendToAddress}&value=${value}&change=${changeAddress}&gui=true&push=false&verify=true&token=${Config.token}`, {
method: 'GET',
headers: {
'Content-Type': 'application/json',
@ -274,7 +275,7 @@ export function shepherdElectrumSendPreflight(coin, value, sendToAddress, change
export function shepherdElectrumListunspent(coin, address) {
return new Promise((resolve, reject) => {
fetch(`http://127.0.0.1:${Config.agamaPort}/shepherd/electrum/listunspent?coin=${coin}&address=${address}&full=true`, {
fetch(`http://127.0.0.1:${Config.agamaPort}/shepherd/electrum/listunspent?coin=${coin}&address=${address}&full=true&token=${Config.token}`, {
method: 'GET',
headers: {
'Content-Type': 'application/json',
@ -309,6 +310,7 @@ export function shepherdElectrumBip39Keys(seed, match, addressdepth, accounts) {
match,
addressdepth,
accounts,
token: Config.token,
}),
})
.catch((error) => {

32
react/src/actions/actions/fiatRates.js

@ -0,0 +1,32 @@
import { FIAT_RATES } from '../storeType';
import { triggerToaster } from '../actionCreators';
import Config from '../../config';
export function fiatRates() {
return dispatch => {
return fetch(`http://46.20.235.46:8111/api/rates/kmd`, {
method: 'GET',
})
.catch((error) => {
console.log(error);
dispatch(
triggerToaster(
'fiatRates',
'Error',
'error'
)
);
})
.then(response => response.json())
.then(json => {
dispatch(fiatRates(json));
});
}
}
function fiatRates(json) {
return {
type: FIAT_RATES,
response: json,
}
}

4
react/src/actions/actions/getTxDetails.js

@ -12,6 +12,7 @@ export function getTxDetails(coin, txid, type) {
txid
],
rpc2cli: Config.rpc2cli,
token: Config.token,
};
if (type === 'raw') {
@ -24,6 +25,7 @@ export function getTxDetails(coin, txid, type) {
1
],
rpc2cli: Config.rpc2cli,
token: Config.token,
};
}
@ -33,7 +35,7 @@ export function getTxDetails(coin, txid, type) {
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({ payload: payload }),
body: JSON.stringify({ payload }),
},
)
.catch((error) => {

4
react/src/actions/actions/interest.js

@ -9,6 +9,7 @@ export function getListUnspent(coin) {
chain: coin,
cmd: 'listunspent',
rpc2cli: Config.rpc2cli,
token: Config.token,
};
const _fetchConfig = {
@ -16,7 +17,7 @@ export function getListUnspent(coin) {
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({ 'payload': payload }),
body: JSON.stringify({ payload }),
};
fetch(
@ -65,6 +66,7 @@ export function getRawTransaction(coin, txid) {
1
],
rpc2cli: Config.rpc2cli,
token: Config.token,
};
const _fetchConfig = {

18
react/src/actions/actions/jumblr.js

@ -12,6 +12,7 @@ function getNewAddress(coin) {
chain: coin,
cmd: 'getnewaddress',
rpc2cli: Config.rpc2cli,
token: Config.token,
};
const _fetchConfig = {
@ -19,7 +20,7 @@ function getNewAddress(coin) {
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({ payload: payload }),
body: JSON.stringify({ payload }),
};
fetch(
@ -51,6 +52,7 @@ export function setJumblrAddress(coin, type, address) {
cmd: type === 'deposit' ? 'jumblr_deposit' : 'jumblr_secret',
params: [address],
rpc2cli: Config.rpc2cli,
token: Config.token,
};
const _fetchConfig = {
@ -58,7 +60,7 @@ export function setJumblrAddress(coin, type, address) {
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({ payload: payload }),
body: JSON.stringify({ payload }),
};
fetch(
@ -90,6 +92,7 @@ export function pauseJumblr(coin) {
cmd: 'jumblr_pause',
params: [],
rpc2cli: Config.rpc2cli,
token: Config.token,
};
const _fetchConfig = {
@ -97,7 +100,7 @@ export function pauseJumblr(coin) {
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({ payload: payload }),
body: JSON.stringify({ payload }),
};
fetch(
@ -129,6 +132,7 @@ export function resumeJumblr(coin) {
cmd: 'jumblr_resume',
params: [],
rpc2cli: Config.rpc2cli,
token: Config.token,
};
const _fetchConfig = {
@ -136,7 +140,7 @@ export function resumeJumblr(coin) {
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({ payload: payload }),
body: JSON.stringify({ payload }),
};
fetch(
@ -168,6 +172,7 @@ function dumpPrivkey(coin, key) {
cmd: 'dumpprivkey',
params: [key],
rpc2cli: Config.rpc2cli,
token: Config.token,
};
const _fetchConfig = {
@ -175,7 +180,7 @@ function dumpPrivkey(coin, key) {
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({ payload: payload }),
body: JSON.stringify({ payload }),
};
fetch(
@ -211,6 +216,7 @@ export function importPrivkey(coin, key, rescan = false) {
rescan
],
rpc2cli: Config.rpc2cli,
token: Config.token,
};
const _fetchConfig = {
@ -218,7 +224,7 @@ export function importPrivkey(coin, key, rescan = false) {
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({ payload: payload }),
body: JSON.stringify({ payload }),
};
fetch(

1
react/src/actions/actions/nativeDashboardUpdate.js

@ -12,6 +12,7 @@ export function getDashboardUpdate(coin, activeCoinProps) {
body: JSON.stringify({
coin: coin,
rpc2cli: Config.rpc2cli,
token: Config.token,
}),
};

6
react/src/actions/actions/nativeNetwork.js

@ -13,6 +13,7 @@ export function getNativePeers(coin) {
chain: coin,
cmd: 'getpeerinfo',
rpc2cli: Config.rpc2cli,
token: Config.token,
};
const _fetchConfig = {
@ -20,7 +21,7 @@ export function getNativePeers(coin) {
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({ payload: payload }),
body: JSON.stringify({ payload }),
};
fetch(
@ -52,6 +53,7 @@ export function getNativeNettotals(coin) {
chain: coin,
cmd: 'getnettotals',
rpc2cli: Config.rpc2cli,
token: Config.token,
};
const _fetchConfig = {
@ -59,7 +61,7 @@ export function getNativeNettotals(coin) {
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({ payload: payload }),
body: JSON.stringify({ payload }),
};
fetch(

1
react/src/actions/actions/nativeNewAddress.js

@ -12,6 +12,7 @@ export function getNewKMDAddresses(coin, pubpriv, mode) {
chain: coin,
cmd: pubpriv === 'public' ? 'getnewaddress' : 'z_getnewaddress',
rpc2cli: Config.rpc2cli,
token: Config.token,
};
const _fetchConfig = {

12
react/src/actions/actions/nativeSend.js

@ -24,6 +24,7 @@ export function sendNativeTx(coin, _payload) {
chain: coin,
cmd: _apiMethod,
rpc2cli: Config.rpc2cli,
token: Config.token,
params:
(_payload.addressType === 'public' && _payload.sendTo.length !== 95) || !_payload.sendFrom ?
(_payload.substractFee ?
@ -55,7 +56,7 @@ export function sendNativeTx(coin, _payload) {
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({ payload: payload }),
body: JSON.stringify({ payload }),
};
fetch(
@ -142,6 +143,7 @@ export function getKMDOPID(opid, coin) {
chain: coin,
cmd: 'z_getoperationstatus',
rpc2cli: Config.rpc2cli,
token: Config.token,
};
const _fetchConfig = {
@ -149,7 +151,7 @@ export function getKMDOPID(opid, coin) {
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({ payload: payload }),
body: JSON.stringify({ payload }),
};
fetch(
@ -181,6 +183,7 @@ export function sendToAddressPromise(coin, address, amount) {
chain: coin,
cmd: 'sendtoaddress',
rpc2cli: Config.rpc2cli,
token: Config.token,
params: [
address,
amount,
@ -195,7 +198,7 @@ export function sendToAddressPromise(coin, address, amount) {
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({ payload: payload }),
body: JSON.stringify({ payload }),
};
fetch(
@ -241,6 +244,7 @@ export function validateAddressPromise(coin, address) {
cmd: 'validateaddress',
params: [ address ],
rpc2cli: Config.rpc2cli,
token: Config.token,
};
const _fetchConfig = {
@ -248,7 +252,7 @@ export function validateAddressPromise(coin, address) {
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({ payload: payload }),
body: JSON.stringify({ payload }),
};
fetch(

9
react/src/actions/actions/nativeSyncInfo.js

@ -98,13 +98,14 @@ export function getSyncInfoNative(coin, skipDebug, skipRemote, suppressErrors) {
chain: coin,
cmd: 'getinfo',
rpc2cli: Config.rpc2cli,
token: Config.token,
};
const _fetchConfig = {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({ payload: payload }),
body: JSON.stringify({ payload }),
};
return fetch(
@ -208,6 +209,7 @@ export function getBlockTemplate(_json, coin) {
chain: coin,
cmd: 'getblocktemplate',
rpc2cli: Config.rpc2cli,
token: Config.token,
};
return dispatch => {
@ -216,7 +218,7 @@ export function getBlockTemplate(_json, coin) {
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({ 'payload': payload }),
body: JSON.stringify({ payload }),
};
return fetch(
@ -273,6 +275,7 @@ export function getDebugLogProgress(_json, coin) {
mode: null,
chain: coin,
cmd: 'debug',
token: Config.token,
};
return dispatch => {
@ -281,7 +284,7 @@ export function getDebugLogProgress(_json, coin) {
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({ 'payload': payload }),
body: JSON.stringify({ payload }),
};
return fetch(

4
react/src/actions/actions/pin.js

@ -11,6 +11,7 @@ export function encryptPassphrase(passphrase, key, pubKey) {
string: passphrase,
key: key,
pubkey: pubKey,
token: Config.token,
};
return dispatch => {
@ -48,6 +49,7 @@ export function loginWithPin(key, pubKey) {
const payload = {
key: key,
pubkey: pubKey,
token: Config.token,
};
return dispatch => {
@ -77,7 +79,7 @@ export function loginWithPin(key, pubKey) {
export function loadPinList() {
return dispatch => {
return fetch(`http://127.0.0.1:${Config.agamaPort}/shepherd/getpinlist`, {
return fetch(`http://127.0.0.1:${Config.agamaPort}/shepherd/getpinlist?token=${Config.token}`, {
method: 'GET',
headers: {
'Content-Type': 'application/json',

187
react/src/actions/actions/settings.js

@ -19,7 +19,7 @@ function getAppInfoState(json) {
export function getAppInfo() {
return dispatch => {
return fetch(`http://127.0.0.1:${Config.agamaPort}/shepherd/appinfo`, {
return fetch(`http://127.0.0.1:${Config.agamaPort}/shepherd/appinfo?token=${Config.token}`, {
method: 'GET',
headers: {
'Content-Type': 'application/json',
@ -86,49 +86,6 @@ function parseImportPrivKeyResponse(json, dispatch) {
}
}
export function importPrivKey(wifKey) {
const payload = {
userpass: `tmpIgRPCUser@${sessionStorage.getItem('IguanaRPCAuth')}`,
method: 'importprivkey',
params: [
wifKey,
'imported'
],
};
return dispatch => {
return fetch(`http://127.0.0.1:${Config.iguanaCorePort}`, {
method: 'POST',
body: JSON.stringify(payload),
})
.catch((error) => {
console.log(error);
dispatch(
triggerToaster(
'importPrivKey',
'Error',
'error'
)
);
})
.then(response => response.json())
.then(json => {
dispatch(
parseImportPrivKeyResponse(
json,
dispatch
)
);
})
.catch((ex) => {
dispatch(parseImportPrivKeyResponse({
error: 'privkey already in wallet',
}, dispatch));
console.log('parsing failed', ex);
});
}
}
function getDebugLogState(json) {
const _data = json.result.replace('\n', '\r\n');
@ -142,6 +99,7 @@ export function getDebugLog(target, linesCount, acName) {
const payload = {
herdname: target,
lastLines: linesCount,
token: Config.token,
};
if (acName) {
@ -171,129 +129,6 @@ export function getDebugLog(target, linesCount, acName) {
}
}
export function getPeersList(coin) {
const payload = {
userpass: `tmpIgRPCUser@${sessionStorage.getItem('IguanaRPCAuth')}`,
agent: 'SuperNET',
method: 'getpeers',
activecoin: coin,
};
return dispatch => {
return fetch(`http://127.0.0.1:${Config.iguanaCorePort}`, {
method: 'POST',
body: JSON.stringify(payload),
})
.catch((error) => {
console.log(error);
dispatch(
triggerToaster(
'getPeersList',
'Error',
'error'
)
);
})
.then(response => response.json())
.then(json => {
dispatch(getPeersListState(json, dispatch));
});
}
}
export function getPeersListState(json) {
let peersList = {};
if (json &&
json.rawpeers &&
json.rawpeers.length) {
for (let i = 0; i < json.rawpeers.length; i++) {
peersList[json.rawpeers[i].coin] = json.rawpeers[i].peers;
}
}
return {
type: GET_PEERS_LIST,
supernetPeers: json && json.supernet[0] ? json.supernet : null,
rawPeers: peersList,
}
}
function addPeerNodeState(json, dispatch) {
if (json.error === 'addnode needs active coin, do an addcoin first') {
return dispatch => {
dispatch(
triggerToaster(
translate('API.ADDNODE_NEEDS_COIN'),
translate('TOASTR.SETTINGS_NOTIFICATION'),
'error'
)
);
}
} else if (json.result === 'peer was already connected') {
return dispatch => {
dispatch(
triggerToaster(
translate('API.PEER_ALREADY_CONN'),
translate('TOASTR.SETTINGS_NOTIFICATION'),
'warning'
)
);
}
} else if (json.result === 'addnode connection was already pending') {
return dispatch => {
dispatch(
triggerToaster(
translate('API.ADDNODE_ALREADY_PENDING'),
translate('TOASTR.SETTINGS_NOTIFICATION'),
'warning'
)
);
}
} else if (json.result === 'addnode submitted') {
return dispatch => {
dispatch(
triggerToaster(
translate('API.PEER_ADDED'),
translate('TOASTR.SETTINGS_NOTIFICATION'),
'success'
)
);
}
}
}
export function addPeerNode(coin, ip) {
const payload = {
userpass: `tmpIgRPCUser@${sessionStorage.getItem('IguanaRPCAuth')}`,
agent: 'iguana',
method: 'addnode',
activecoin: coin,
ipaddr: ip,
};
return dispatch => {
return fetch(`http://127.0.0.1:${Config.iguanaCorePort}`, {
method: 'POST',
body: JSON.stringify(payload),
})
.catch((error) => {
console.log(error);
dispatch(
triggerToaster(
'addPeerNode',
'Error',
'error'
)
);
})
.then(response => response.json())
.then(json => {
dispatch(addPeerNodeState(json, dispatch));
});
}
}
export function saveAppConfig(_payload) {
return dispatch => {
return fetch(`http://127.0.0.1:${Config.agamaPort}/shepherd/appconf`, {
@ -301,7 +136,10 @@ export function saveAppConfig(_payload) {
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({ payload: _payload }),
body: JSON.stringify({
payload: _payload,
token: Config.token,
}),
})
.catch((error) => {
console.log(error);
@ -336,7 +174,7 @@ function getAppConfigState(json) {
export function getAppConfig() {
return dispatch => {
return fetch(`http://127.0.0.1:${Config.agamaPort}/shepherd/appconf`, {
return fetch(`http://127.0.0.1:${Config.agamaPort}/shepherd/appconf?token=${Config.token}`, {
method: 'GET',
headers: {
'Content-Type': 'application/json',
@ -364,6 +202,7 @@ export function resetAppConfig() {
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({ token: Config.token })
})
.catch((error) => {
console.log(error);
@ -393,7 +232,7 @@ export function coindGetStdout(chain) {
const _chain = chain === 'KMD' ? 'komodod' : chain;
return new Promise((resolve, reject) => {
fetch(`http://127.0.0.1:${Config.agamaPort}/shepherd/coind/stdout?chain=${chain}`, {
fetch(`http://127.0.0.1:${Config.agamaPort}/shepherd/coind/stdout?chain=${chain}&token=${Config.token}`, {
method: 'GET',
headers: {
'Content-Type': 'application/json',
@ -420,7 +259,7 @@ export function getWalletDatKeys(chain, keyMatchPattern) {
const _chain = chain === 'KMD' ? null : chain;
return new Promise((resolve, reject) => {
fetch(keyMatchPattern ? `http://127.0.0.1:${Config.agamaPort}/shepherd/coindwalletkeys?chain=${_chain}&search=${keyMatchPattern}` : `http://127.0.0.1:${Config.agamaPort}/shepherd/coindwalletkeys?chain=${_chain}`, {
fetch(keyMatchPattern ? `http://127.0.0.1:${Config.agamaPort}/shepherd/coindwalletkeys?chain=${_chain}&search=${keyMatchPattern}&token=${Config.token}` : `http://127.0.0.1:${Config.agamaPort}/shepherd/coindwalletkeys?chain=${_chain}&token=${Config.token}`, {
method: 'GET',
headers: {
'Content-Type': 'application/json',
@ -451,6 +290,7 @@ export function dumpPrivKey(coin, address, isZaddr) {
cmd: isZaddr ? 'z_exportkey' : 'dumpprivkey',
params: [ address ],
rpc2cli: Config.rpc2cli,
token: Config.token,
};
const _fetchConfig = {
@ -458,7 +298,7 @@ export function dumpPrivKey(coin, address, isZaddr) {
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({ 'payload': payload }),
body: JSON.stringify({ payload }),
};
fetch(
@ -490,6 +330,7 @@ export function validateAddress(coin, address, isZaddr) {
cmd: isZaddr ? 'z_validateaddress' : 'validateaddress',
params: [ address ],
rpc2cli: Config.rpc2cli,
token: Config.token,
};
const _fetchConfig = {
@ -497,7 +338,7 @@ export function validateAddress(coin, address, isZaddr) {
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({ 'payload': payload }),
body: JSON.stringify({ payload }),
};
fetch(

2
react/src/actions/actions/sysInfo.js

@ -3,7 +3,7 @@ import Config from '../../config';
export function shepherdGetSysInfo() {
return dispatch => {
return fetch(`http://127.0.0.1:${Config.agamaPort}/shepherd/sysinfo`, {
return fetch(`http://127.0.0.1:${Config.agamaPort}/shepherd/sysinfo?token=${Config.token}`, {
method: 'GET',
headers: {
'Content-Type': 'application/json',

6
react/src/actions/actions/update.js

@ -4,7 +4,7 @@ import Store from '../../store';
export function checkForUpdateUIPromise() {
return new Promise((resolve, reject) => {
fetch(`http://127.0.0.1:${Config.agamaPort}/shepherd/update/patch/check`, {
fetch(`http://127.0.0.1:${Config.agamaPort}/shepherd/update/patch/check?token=${Config.token}`, {
method: 'GET',
headers: {
'Content-Type': 'application/json',
@ -27,7 +27,7 @@ export function checkForUpdateUIPromise() {
export function updateUIPromise() {
return new Promise((resolve, reject) => {
fetch(`http://127.0.0.1:${Config.agamaPort}/shepherd/update/patch`, {
fetch(`http://127.0.0.1:${Config.agamaPort}/shepherd/update/patch?token=${Config.token}`, {
method: 'GET',
headers: {
'Content-Type': 'application/json',
@ -50,7 +50,7 @@ export function updateUIPromise() {
export function downloadZCashParamsPromise(dloption) {
return new Promise((resolve, reject) => {
fetch(`http://127.0.0.1:${Config.agamaPort}/shepherd/zcparamsdl?dloption=${dloption}`, {
fetch(`http://127.0.0.1:${Config.agamaPort}/shepherd/zcparamsdl?dloption=${dloption}&token=${Config.token}`, {
method: 'GET',
headers: {
'Content-Type': 'application/json',

2
react/src/actions/actions/walletAuth.js

@ -1,3 +1,5 @@
// obsolete(?)
import {
LOGIN,
ACTIVE_HANDLE,

1
react/src/actions/storeType.js

@ -50,6 +50,7 @@ export const DISPLAY_ZCASH_PARAMS_FETCH = 'DISPLAY_ZCASH_PARAMS_FETCH';
export const DASHBOARD_REMOVE_COIN = 'DASHBOARD_REMOVE_COIN';
export const DASHBOARD_ACTIVE_COIN_NET_PEERS = 'DASHBOARD_ACTIVE_COIN_NET_PEERS';
export const DASHBOARD_ACTIVE_COIN_NET_TOTALS = 'DASHBOARD_ACTIVE_COIN_NET_TOTALS';
export const FIAT_RATES = 'FIAT_RATES';
/* dex */
export const DEX_LOGIN = 'DEX_LOGIN';

BIN
react/src/assets/images/20.jpg

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

BIN
react/src/assets/images/android-chrome-192x192.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

BIN
react/src/assets/images/cryptologo/chips (copy).png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.2 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 19 KiB

BIN
react/src/assets/images/easydex-logo-dashboard-white.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

BIN
react/src/assets/images/favicon-16x16.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 548 B

BIN
react/src/assets/images/favicon-194x194.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

BIN
react/src/assets/images/favicon-32x32.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

BIN
react/src/assets/images/favicon-96x96.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

BIN
react/src/assets/images/iguana_profile_02.jpg

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 20 KiB

BIN
react/src/assets/images/supernet-iguana-logo-big.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.0 KiB

BIN
react/src/assets/images/supernet-iguana-logo-white.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

BIN
react/src/assets/images/supernet-iguana-logo.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

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

@ -20,11 +20,14 @@ const addCoinOptionsAC = () => {
'mshark',
'supernet',
'wlc',
'axo',
'etomic',
'btch'
];
let _items = [];
for (let i = 0; i < _assetChains.length; i++) {
let availableModes = _assetChains[i] !== 'kv' && _assetChains[i] !== 'mgw' ? 'spv|native' : 'native';
let availableModes = _assetChains[i] !== 'kv' && _assetChains[i] !== 'mgw' && _assetChains[i] !== 'axo' && _assetChains[i] !== 'etomic' && _assetChains[i] !== 'btch' ? 'spv|native' : 'native';
if (mainWindow.arch !== 'x64') {
availableModes = 'spv';

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

@ -88,6 +88,14 @@ const addCoinOptionsCrypto = () => {
label: 'Hush (HUSH)',
icon: 'HUSH',
value: `HUSH|spv`,
}, {
label: 'Zclassic (ZCL)',
icon: 'ZCL',
value: `ZCL|spv`,
}, {
label: 'Myriad (XMY)',
icon: 'XMY',
value: `XMY|spv`,
});
}

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

@ -20,6 +20,10 @@ export function checkAC(coinVal) {
coinVal === 'KV' ||
coinVal === 'CEAL' ||
coinVal === 'MESH' ||
coinVal === 'MNZ' ||
coinVal === 'AXO' ||
coinVal === 'ETOMIC' ||
coinVal === 'BTCH' ||
coinVal === 'USD' ||
coinVal === 'RON' ||
coinVal === 'EUR' ||
@ -51,7 +55,6 @@ export function checkAC(coinVal) {
coinVal === 'THB' ||
coinVal === 'BGN' ||
coinVal === 'IDR' ||
coinVal === 'MNZ' ||
coinVal === 'HRK') {
return true;
} else {
@ -112,26 +115,15 @@ export function checkCoinType(coin) {
coin === 'CEAL' ||
coin === 'MESH' ||
coin === 'WLC' ||
coin === 'MNZ') {
coin === 'MNZ' ||
coin === 'AXO' ||
coin === 'ETOMIC' ||
coin === 'BTCH') {
return 'ac';
}
if (coin === 'BTC' ||
coin === 'BTCD' ||
coin === 'LTC' ||
coin === 'DOGE' ||
coin === 'DGB' ||
coin === 'MZC' ||
coin === 'SYS' ||
coin === 'UNO' ||
coin === 'BTM' ||
coin === 'CARB' ||
coin === 'ANC' ||
coin === 'FRK' ||
coin === 'GAME' ||
coin === 'ZEC' ||
coin === 'KMD' ||
coin === 'ZET') {
if (coin === 'ZEC' ||
coin === 'KMD') {
return 'crypto';
}
}
@ -143,7 +135,7 @@ export function startCurrencyAssetChain(confpath, coin, mode) {
}
export function startAssetChain(confpath, coin, mode, getSuppyOnly) {
let assetChainPorts = window.require('electron').remote.getCurrentWindow().assetChainPorts;
const assetChainPorts = window.require('electron').remote.getCurrentWindow().assetChainPorts;
const acConfig = {
SUPERNET: {
@ -200,6 +192,15 @@ export function startAssetChain(confpath, coin, mode, getSuppyOnly) {
MNZ: {
supply: 257142858,
},
AXO: {
supply: 200000000,
},
ETOMIC: {
supply: 100000000,
},
BTCH: {
supply: 20998641,
},
};
if (mode === '-1') {

45
react/src/components/contextMenu.scss

@ -0,0 +1,45 @@
.receive-address-context-menu,
.coin-tile-context-menu {
box-shadow: 0 1px 2px 1px rgba(0, 0, 0, 0.4);
background: #fff;
position: absolute;
z-index: 100;
margin-left: 65px;
margin-top: 5px;
ul {
margin: 0;
list-style: none;
-webkit-margin-before: 0;
-webkit-margin-after: 0;
-webkit-margin-start: 0;
-webkit-margin-end: 0;
-webkit-padding-start: 0;
li {
padding: 5px 15px;
&:first-child {
margin-top: 5px;
}
&:last-child {
margin-bottom: 5px;
}
&:hover {
background: #f9f9f9;
cursor: pointer;
}
}
}
&.closed {
z-index: 1700;
position: absolute;
top: -100%;
left: -100%;
}
.receive-address-context-menu-get-qr {
.modal {
cursor: default;
}
}
}

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

@ -36,18 +36,12 @@ class About extends React.Component {
<span className="font-weight-600">{ translate('INDEX.NATIVE_MODE') }</span>:&nbsp;
{ translate('ABOUT.NATIVE_MODE_DESC') }
</li>
</ul>
{ translate('ABOUT.AGAMA_CAPABILITIES') }
<ul>
<li>
<span className="font-weight-600">BarterDEX</span>:&nbsp;
{ translate('ABOUT.BARTER_DEX_DESC') }&nbsp;
<a className="link" onClick={ () => this.openExternalWindow('https://supernet.org/en/technology/whitepapers/easydex-a-practical-native-dex') }>
(BarterDEX A Practical Native DEX)
</a>
<span className="font-weight-600">{ translate('INDEX.SPV_MODE') }</span>:&nbsp;
{ translate('ADD_COIN.LITE_MODE_DESC') }
</li>
</ul>
<br />
<span className="font-weight-600">{ translate('ABOUT.AGAMA_NOTE') }</span>

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

@ -363,9 +363,7 @@ class ClaimInterestModal extends React.Component {
className={ 'btn dropdown-toggle btn-info' + (this.props.ActiveCoin.mode === 'spv' ? ' disabled' : '') }
onClick={ this.openDropMenu }>
<span className="filter-option pull-left">{ this.state.selectedAddress }</span>
<span
className="bs-caret"
style={{ display: 'inline-block' }}>
<span className="bs-caret inline">
<span className="caret"></span>
</span>
</button>

6
react/src/components/dashboard/claimInterestModal/claimInterestModal.render.js

@ -92,9 +92,7 @@ export const _ClaimInterestTableRender = function() {
</button>
}
{ this.state.spvVerificationWarning &&
<div
className="padding-top-10 padding-bottom-10"
style={{ fontSize: '15px' }}>
<div className="padding-top-10 padding-bottom-10 fs-15">
<strong className="color-warning">{ translate('SEND.WARNING') }:</strong> { translate('SEND.WARNING_SPV_P1') } { translate('SEND.WARNING_SPV_P2') }
<div className="margin-top-15">
<button
@ -120,7 +118,7 @@ export const _ClaimInterestTableRender = function() {
{ this.addressDropdownRender() }
</div>
}
{ !this.isFullySynced() &&
{ (!this.isFullySynced() || !navigator.onLine) &&
this.props.ActiveCoin &&
this.props.ActiveCoin.mode === 'native' &&
<div className="col-lg-12 padding-top-5 padding-bottom-35 send-coin-sync-warning">

59
react/src/components/dashboard/coinTile/coinTile.scss

@ -0,0 +1,59 @@
.coind-stop-icon,
.coind-remove-icon {
font-size: 20px;
position: absolute;
top: 19px;
right: 12px;
color: #ccc !important;
&:hover {
color: #e9595b !important;
}
}
.coind-remove-icon {
transform: rotate(45deg);
top: 45px;
}
.coind-remove-icon-spv {
top: 19px;
}
.icon-spv-connection-warning,
.icon-native-connection-warning {
position: absolute;
bottom: 20px;
right: 15px;
&:before {
color: #f2a654;
font-size: 18px;
}
}
.icon-native-connection-warning {
&:before {
color: #e9595b;
}
}
.badge.up {
position: relative;
z-index: 10;
top: 0;
left: 0;
margin: 0;
border-radius: 0;
}
.list-group-item {
.widget,
.widget-content {
height: 150px;
.avatar {
margin-top: 10px;
}
}
}

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

@ -116,7 +116,7 @@ class CoinTileItem extends React.Component {
}
}
renderStopCoinButton() {
renderStopCoinButton(item) {
if (this.props.Main &&
this.props.Main.coins &&
this.props.Main.coins.native &&
@ -239,7 +239,6 @@ class CoinTileItem extends React.Component {
if (this.props.Dashboard &&
this.props.Dashboard.activeSection === 'wallets') {
if (mode === 'native') {
// Store.dispatch(iguanaActiveHandle(true));
const _propsDashboard = this.props.ActiveCoin;
const syncPercentage = _propsDashboard && _propsDashboard.progress && (parseFloat(parseInt(_propsDashboard.progress.blocks, 10) * 100 / parseInt(_propsDashboard.progress.longestchain, 10)).toFixed(2)).replace('NaN', 0);
@ -267,7 +266,8 @@ class CoinTileItem extends React.Component {
)
);
if (!this.props.Dashboard.skipFullDashboardUpdate) {
if (!this.props.Dashboard.skipFullDashboardUpdate &&
this.props.ActiveCoin.activeSection === 'default') {
Store.dispatch(getDashboardUpdate(coin, _propsDashboard));
}
} else {
@ -280,7 +280,7 @@ class CoinTileItem extends React.Component {
)
);
}
} else if (mode === 'spv' && this.props.Dashboard.electrumCoins[coin].pub) {
} else if (mode === 'spv' && this.props.Dashboard.electrumCoins[coin].pub && this.props.ActiveCoin.activeSection === 'default') {
Store.dispatch(shepherdElectrumBalance(coin, this.props.Dashboard.electrumCoins[coin].pub));
Store.dispatch(shepherdElectrumTransactions(coin, this.props.Dashboard.electrumCoins[coin].pub));
}
@ -365,6 +365,7 @@ const mapStateToProps = (state) => {
progress: state.ActiveCoin.progress,
rescanInProgress: state.ActiveCoin.rescanInProgress,
getinfoFetchFailures: state.ActiveCoin.getinfoFetchFailures,
activeSection: state.ActiveCoin.activeSection,
},
Dashboard: state.Dashboard,
Interval: {

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

@ -6,6 +6,9 @@ const CoinTileItemRender = function() {
return (
<div className="list-group-item col-xlg-6 col-lg-12 wallet-widgets-info pointer">
<span className={ `badge up badge-${item.modecolor}` }>
{ item.modecode }
</span>
<div className={ 'widget widget-shadow' + (this.props.ActiveCoin.coin === item.coin ? ' active' : '') }>
<div
className="widget-content text-center bg-white padding-20"
@ -15,9 +18,6 @@ const CoinTileItemRender = function() {
className="img-responsive"
src={ `assets/images/cryptologo/${item.coinlogo.toLowerCase()}.png` }
alt={ item.coinname }/>
<span className={ `badge up badge-${item.modecolor}` }>
{ item.modecode }
</span>
</a>
<div className="coin-name">
{ item.coinname } ({ item.coinlogo.toUpperCase() })
@ -28,7 +28,7 @@ const CoinTileItemRender = function() {
onClick={ () => this.toggleCoinMenu(item.coin) }
className="btn btn-default btn-xs clipboard-edexaddr coin-tile-context-menu-trigger coind-actions-menu">
<i
title="Toggle coin context menu"
title={ translate('INDEX.TOGGLE_COIN_CONTEXT_MENU') }
className="fa fa-ellipsis-v coin-tile-context-menu-trigger"></i>
</button>
{ this.state.toggledCoinMenu &&
@ -36,6 +36,7 @@ const CoinTileItemRender = function() {
<div className="coin-tile-context-menu">
<ul>
{ this.renderStopCoinButton() &&
item.mode === 'native' &&
<li onClick={ () => this.stopCoind(item.coin, item.mode) }>
<i className="icon fa-stop-circle margin-right-5"></i> { translate('DASHBOARD.STOP') }
</li>
@ -48,18 +49,6 @@ const CoinTileItemRender = function() {
</ul>
</div>
}
{ /*this.renderStopCoinButton() &&
<i
onClick={ () => this.stopCoind(item.coin, item.mode) }
title={ translate('DASHBOARD.STOP') }
className="icon fa-stop-circle coind-stop-icon"></i>*/
}
{ /*this.renderRemoveCoinButton() &&
<i
onClick={ () => this.removeCoin(item.coin, item.mode) }
title={ translate('DASHBOARD.REMOVE') }
className={ 'icon fa-plus-circle coind-remove-icon' + (item.mode === 'spv' ? ' coind-remove-icon-spv' : '') }></i>*/
}
{ this.props.Dashboard &&
this.props.Dashboard.electrumCoins &&
this.props.Dashboard.electrumCoins[item.coin] &&

49
react/src/components/dashboard/jumblr/jumblr.render.js

@ -36,7 +36,6 @@ export const JumblrRender = function() {
<button
type="button"
className="close">
<span>×</span>
</button>
<span className="jumblr-header">
<i className="icon fa-paw"></i> { translate('JUMBLR.NOTICE') }
@ -65,9 +64,7 @@ export const JumblrRender = function() {
</div>
<div className="col-xlg-12 col-md-12 padding-top-20 padding-bottom-30">
<div
className="form-group col-lg-2 col-md-2 col-sm-2 col-xs-2"
style={{ padding: 0 }}>
<div className="form-group col-lg-2 col-md-2 col-sm-2 col-xs-2 no-padding">
<input
type="radio"
className="to-labelauty labelauty"
@ -76,7 +73,7 @@ export const JumblrRender = function() {
checked={ this.state.jumblrMode === 'public' ? true : false } />
<label
htmlFor={ `mode-public` }
style={{ margin: 0 }}
className="no-margin"
onClick={ () => this.switchJumblrMode('public') }>
<span
className="labelauty-unchecked-image"
@ -97,9 +94,7 @@ export const JumblrRender = function() {
</label>
</div>
<div
className="form-group col-lg-2 col-md-2 col-sm-2 col-xs-2"
style={{ padding: 0 }}>
<div className="form-group col-lg-2 col-md-2 col-sm-2 col-xs-2 no-padding">
<input
type="radio"
className="to-labelauty labelauty"
@ -108,7 +103,7 @@ export const JumblrRender = function() {
checked={ this.state.jumblrMode === 'private' ? true : false } />
<label
htmlFor={ `mode-private` }
style={{ margin: 0 }}
className="no-margin"
onClick={ () => this.switchJumblrMode('private') }>
<span
className="labelauty-unchecked-image"
@ -129,9 +124,7 @@ export const JumblrRender = function() {
</label>
</div>
<div
className="form-group col-lg-3 col-md-3 col-sm-3 col-xs-3"
style={{ padding: 0 }}>
<div className="form-group col-lg-3 col-md-3 col-sm-3 col-xs-3 no-padding">
<button
type="button"
className="btn btn-jumblr-warning waves-effect waves-light"
@ -186,7 +179,9 @@ export const JumblrRender = function() {
<button
type="button"
className="btn btn-success waves-effect waves-light margin-top-20 btn-next"
onClick={ () => this.openTab(1) }>{ translate('INDEX.NEXT') }</button>
onClick={ () => this.openTab(1) }>
{ translate('INDEX.NEXT') }
</button>
<h5>{ translate('JUMBLR.HOW_TO_USE') }</h5>
<ul>
<li>{ translate('JUMBLR.CREATE_DEPOSIT_ADDRESS') }</li>
@ -246,7 +241,9 @@ export const JumblrRender = function() {
<button
type="button"
className="btn btn-info waves-effect waves-light"
onClick={ this.generateJumblrDepositAddress }>{ translate('JUMBLR.CREATE_JUMBLR_DEPOSIT_ADDRESS') }</button>
onClick={ this.generateJumblrDepositAddress }>
{ translate('JUMBLR.CREATE_JUMBLR_DEPOSIT_ADDRESS') }
</button>
{ this.state.jumblrDepositAddress &&
this.state.jumblrDepositAddress.address &&
<div className="padding-top-40">
@ -276,7 +273,9 @@ export const JumblrRender = function() {
<button
type="button"
className="btn btn-success waves-effect waves-light margin-top-20 btn-next"
onClick={ () => this.openTab(3) }>{ translate('INDEX.NEXT') }</button>
onClick={ () => this.openTab(3) }>
{ translate('INDEX.NEXT') }
</button>
<p>{ translate('JUMBLR.JUMBLR_SECRET_DESC_P1') }</p>
<p>{ translate('JUMBLR.JUMBLR_SECRET_DESC_P2') }</p>
<p>{ translate('JUMBLR.JUMBLR_SECRET_DESC_P3') }</p>
@ -304,7 +303,9 @@ export const JumblrRender = function() {
</button>
</div>
}
<div className="col-xs-2 nofloat padding-top-30">{ translate('JUMBLR.NUMBER_OF_SECRET_ADDR') }</div>
<div className="col-xs-2 nofloat padding-top-30">
{ translate('JUMBLR.NUMBER_OF_SECRET_ADDR') }
</div>
<div className="col-xs-2 nofloat padding-left-10">
<input
type="text"
@ -320,7 +321,9 @@ export const JumblrRender = function() {
<button
type="button"
className="btn btn-info waves-effect waves-light"
onClick={ this.generateJumblrSecretAddress }>{ translate('JUMBLR.CREATE_JUMBLR_SECRET_ADDR') }</button>
onClick={ this.generateJumblrSecretAddress }>
{ translate('JUMBLR.CREATE_JUMBLR_SECRET_ADDR') }
</button>
</div>
<div className="toggle-box padding-top-20">
<span className="pointer">
@ -389,7 +392,9 @@ export const JumblrRender = function() {
<button
type="button"
className="btn btn-success waves-effect waves-light margin-top-20 btn-next"
onClick={ () => this.openTab(1) }>{ translate('INDEX.NEXT') }</button>
onClick={ () => this.openTab(1) }>
{ translate('INDEX.NEXT') }
</button>
<div className="col-xlg-12 col-md-12 nofloat">
<p>{ translate('JUMBLR.SECRET_REGEN_DESC_P1') }</p>
<p>
@ -409,7 +414,9 @@ export const JumblrRender = function() {
value={ this.state.jumblrPassphraseImport } />
</div>
}
<div className="col-xs-2 nofloat padding-top-30">{ translate('JUMBLR.NUMBER_OF_SECRET_ADDR') }</div>
<div className="col-xs-2 nofloat padding-top-30">
{ translate('JUMBLR.NUMBER_OF_SECRET_ADDR') }
</div>
<div className="col-xs-2 nofloat padding-left-10">
<input
type="text"
@ -425,7 +432,9 @@ export const JumblrRender = function() {
<button
type="button"
className="btn btn-info waves-effect waves-light"
onClick={ this.importJumblrSecretAddress }>{ translate('JUMBLR.IMPORT_JUMLR_SECRET_ADDRESSES') }</button>
onClick={ this.importJumblrSecretAddress }>
{ translate('JUMBLR.IMPORT_JUMLR_SECRET_ADDRESSES') }
</button>
</div>
<div className="toggle-box padding-top-20">
<span className="pointer">

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

@ -101,6 +101,7 @@ class Navbar extends React.Component {
handleClickOutside(e) {
if (e.srcElement.className !== 'dropdown-menu' &&
e.srcElement.className !== 'icon fa-bars' &&
e.srcElement.title !== 'top menu' &&
(e.srcElement.offsetParent && e.srcElement.offsetParent.className !== 'navbar-avatar-inner') &&
e.srcElement.className.indexOf('navbar-avatar') === -1 &&

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

@ -80,6 +80,13 @@ const NavbarRender = function() {
<i className="site-menu-icon"></i> Explorer
</a>
</li>*/ }
{ !navigator.onLine &&
<li
className="nav-top-menu offline"
title={ translate('INDEX.WALLET_OFFLINE') }>
<span className="offline-icon"></span> { translate('INDEX.OFFLINE') }
</li>
}
</ul>
<ul className="nav navbar-toolbar navbar-right navbar-toolbar-right">
<li>
@ -99,7 +106,7 @@ const NavbarRender = function() {
<a className="navbar-avatar dropdown-toggle">
<span className="navbar-avatar-inner">
<i
title="top menu"
title={ translate('INDEX.TOP_MENU') }
className="icon fa-bars"></i>
</span>
</a>

60
react/src/components/dashboard/navbar/navbar.scss

@ -0,0 +1,60 @@
.navbar-fixed-bottom,
.navbar-fixed-top {
z-index: 100;
}
.navbar {
&.navbar-fixed-top {
.dropdown {
&.open {
.dropdown-menu {
right: 0;
}
}
.dropdown-menu {
display: block;
right: -165px;
}
}
}
.offline {
margin-top: 22px;
.offline-icon {
display: inline-block;
width: 10px;
height: 10px;
background: #f96868;
border-radius: 50%;
margin-left: 20px;
}
}
}
.navbar-nav > li > a.navbar-avatar,
.navbar-toolbar > li > a.navbar-avatar {
&.dropdown-toggle {
font-size: 24px;
padding-top: 24px;
i {
position: relative;
top: -2px;
}
}
}
.coind-actions-menu {
position: absolute;
top: 22px;
left: 20px;
}
.coin-tile-context-menu {
top: 45px;
left: -34px;
li {
color: #757575;
}
}

11
react/src/components/dashboard/qrModal/qrModal.js

@ -5,7 +5,7 @@ import { translate } from '../../../translate/translate';
import QrReader from 'react-qr-reader'
import {
QRModalRender,
QRModalReaderRender
QRModalReaderRender,
} from './qrModal.render';
class QRModal extends React.Component {
@ -47,12 +47,8 @@ class QRModal extends React.Component {
if (this.props.mode === 'scan') {
ReactDOM.render(
<QrReader
delay={50}
style={{
height: 281,
width: 500,
transform: 'scaleX(-1)'
}}
delay={ 50 }
className="qr-reader-comp"
onError={ this.handleError }
onScan={ this.handleScan } />, document.getElementById('webcam'));
}
@ -74,6 +70,7 @@ class QRModal extends React.Component {
const canvas = qrCanvas.getElementsByTagName('canvas');
const dataURL = canvas[0].toDataURL();
const a = document.getElementById('saveModalImage' + this.props.content);
a.href = dataURL;
a.download = this.props.content;
}

10
react/src/components/dashboard/qrModal/qrModal.scss

@ -11,4 +11,14 @@
}
.table a.save-image-button {
text-decoration: none;
}
.qr-reader-comp {
height: 281;
width: 500;
transform: scaleX(-1);
}
.overflow-hidden {
overflow: hidden;
}

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

@ -210,8 +210,8 @@ class SendCoin extends React.Component {
}
renderAddressByType(type) {
let _items = [];
const _coinAddresses = this.props.ActiveCoin.addresses;
let _items = [];
if (_coinAddresses &&
_coinAddresses[type] &&
@ -265,7 +265,9 @@ class SendCoin extends React.Component {
);
} else {
return (
<span>{ this.props.ActiveCoin.mode === 'spv' ? `[ ${this.props.ActiveCoin.balance.balance} ${this.props.ActiveCoin.coin} ] ${this.props.Dashboard.electrumCoins[this.props.ActiveCoin.coin].pub}` : translate('INDEX.T_FUNDS') }</span>
<span>
{ this.props.ActiveCoin.mode === 'spv' ? `[ ${this.props.ActiveCoin.balance.balance} ${this.props.ActiveCoin.coin} ] ${this.props.Dashboard.electrumCoins[this.props.ActiveCoin.coin].pub}` : translate('INDEX.T_FUNDS') }
</span>
);
}
}

43
react/src/components/dashboard/sendCoin/sendCoin.render.js

@ -10,7 +10,7 @@ export const AddressListRender = function() {
type="button"
className={ 'btn dropdown-toggle btn-info' + (this.props.ActiveCoin.mode === 'spv' ? ' disabled' : '') }
onClick={ this.openDropMenu }>
<span className="filter-option pull-left">{ this.renderSelectorCurrentLabel() } </span>
<span className="filter-option pull-left">{ this.renderSelectorCurrentLabel() }&nbsp;</span>
<span className="bs-caret">
<span className="caret"></span>
</span>
@ -21,7 +21,9 @@ export const AddressListRender = function() {
className="selected"
onClick={ () => this.updateAddressSelection(null, 'public', null) }>
<a>
<span className="text">{ this.props.ActiveCoin.mode === 'spv' ? `[ ${this.props.ActiveCoin.balance.balance} ${this.props.ActiveCoin.coin} ] ${this.props.Dashboard.electrumCoins[this.props.ActiveCoin.coin].pub}` : translate('INDEX.T_FUNDS') }</span>
<span className="text">
{ this.props.ActiveCoin.mode === 'spv' ? `[ ${this.props.ActiveCoin.balance.balance} ${this.props.ActiveCoin.coin} ] ${this.props.Dashboard.electrumCoins[this.props.ActiveCoin.coin].pub}` : translate('INDEX.T_FUNDS') }
</span>
<span
className="glyphicon glyphicon-ok check-mark pull-right"
style={{ display: this.state.sendFrom === null ? 'inline-block' : 'none' }}></span>
@ -41,7 +43,9 @@ export const _SendFormRender = function() {
{ this.state.renderAddressDropdown &&
<div className="row">
<div className="col-xlg-12 form-group form-material">
<label className="control-label padding-bottom-10">{ translate('INDEX.SEND_FROM') }</label>
<label className="control-label padding-bottom-10">
{ translate('INDEX.SEND_FROM') }
</label>
{ this.renderAddressList() }
</div>
</div>
@ -58,7 +62,7 @@ export const _SendFormRender = function() {
onChange={ this.updateInput }
value={ this.state.sendTo }
id="kmdWalletSendTo"
placeholder={ this.props.ActiveCoin.coin === 'CHIPS' ? translate('SEND.ENTER_ADDRESS') : translate('SEND.ENTER_T_OR_Z_ADDR') }
placeholder={ this.props.ActiveCoin.mode === 'spv' ? translate('SEND.ENTER_ADDRESS') : translate('SEND.ENTER_T_OR_Z_ADDR') }
autoComplete="off"
required />
</div>
@ -120,11 +124,12 @@ export const _SendFormRender = function() {
{ this.props.ActiveCoin.coin }
</span>
</div>
{ !this.isFullySynced() &&
{ (!this.isFullySynced() || !navigator.onLine) &&
this.props.ActiveCoin &&
this.props.ActiveCoin.mode === 'native' &&
<div className="col-lg-12 padding-top-20 padding-bottom-20 send-coin-sync-warning">
<i className="icon fa-warning color-warning margin-right-5"></i> <span className="desc">{ translate('SEND.SEND_NATIVE_SYNC_WARNING') }</span>
<i className="icon fa-warning color-warning margin-right-5"></i>&nbsp;
<span className="desc">{ translate('SEND.SEND_NATIVE_SYNC_WARNING') }</span>
</div>
}
<div className="col-lg-12">
@ -200,13 +205,13 @@ export const SendRender = function() {
<div className="col-xs-12">
<strong>{ translate('INDEX.TO') }</strong>
</div>
<div
className="col-lg-6 col-sm-6 col-xs-12"
style={{ overflow: 'hidden' }}>{ this.state.sendTo }</div>
<div className="col-lg-6 col-sm-6 col-xs-12 overflow-hidden">{ this.state.sendTo }</div>
<div className="col-lg-6 col-sm-6 col-xs-6">
{ this.state.amount } { this.props.ActiveCoin.coin }
</div>
<div className={ this.state.subtractFee ? 'col-lg-6 col-sm-6 col-xs-12 padding-top-10 bold' : 'hide' }>{ translate('DASHBOARD.SUBTRACT_FEE') }</div>
<div className={ this.state.subtractFee ? 'col-lg-6 col-sm-6 col-xs-12 padding-top-10 bold' : 'hide' }>
{ translate('DASHBOARD.SUBTRACT_FEE') }
</div>
</div>
{ this.state.sendFrom &&
@ -214,9 +219,7 @@ export const SendRender = function() {
<div className="col-xs-12">
<strong>{ translate('INDEX.FROM') }</strong>
</div>
<div
className="col-lg-6 col-sm-6 col-xs-12"
style={{ overflow: 'hidden' }}>{ this.state.sendFrom }</div>
<div className="col-lg-6 col-sm-6 col-xs-12 overflow-hidden">{ this.state.sendFrom }</div>
<div className="col-lg-6 col-sm-6 col-xs-6 confirm-currency-send-container">
{ Number(this.state.amount) } { this.props.ActiveCoin.coin }
</div>
@ -226,10 +229,9 @@ export const SendRender = function() {
<div className="padding-top-20">{ translate('SEND.SPV_VERIFYING') }...</div>
}
{ this.state.spvVerificationWarning &&
<div
className="padding-top-20"
style={{ fontSize: '15px' }}>
<strong className="color-warning">{ translate('SEND.WARNING') }:</strong> { translate('SEND.WARNING_SPV_P1') }<br />
<div className="padding-top-20 fs-15">
<strong className="color-warning">{ translate('SEND.WARNING') }:</strong>&nbsp;
{ translate('SEND.WARNING_SPV_P1') }<br />
{ translate('SEND.WARNING_SPV_P2') }
</div>
}
@ -275,7 +277,7 @@ export const SendRender = function() {
<span className="label label-success">{ translate('SEND.SUCCESS_SM') }</span>
</td>
</tr>
{ this.state.sendFrom &&
{ ((this.state.sendFrom && this.props.ActiveCoin.mode === 'native') || this.props.ActiveCoin.mode === 'spv') &&
<tr>
<td className="padding-left-30">
{ translate('INDEX.SEND_FROM') }
@ -346,6 +348,11 @@ export const SendRender = function() {
<strong className="text-capitalize">{ translate('API.ERROR_SM') }</strong>
</div>
<div>{ this.state.lastSendToResponse.result }</div>
{ this.props.ActiveCoin.mode === 'spv' &&
this.state.lastSendToResponse.raw &&
this.state.lastSendToResponse.raw.txid &&
<div>{ this.state.lastSendToResponse.raw.txid.replace(/\[.*\]/, '') }</div>
}
</div>
}
</div>

9
react/src/components/dashboard/sendCoin/sendCoin.scss

@ -0,0 +1,9 @@
.send-coin-sync-warning {
.icon {
font-size: 18px;
}
.desc {
position: relative;
top: -2px;
}
}

179
react/src/components/dashboard/settings/settings.addNodePanel.js

@ -1,179 +0,0 @@
import React from 'react';
import { translate } from '../../../translate/translate';
import { connect } from 'react-redux';
import {
addPeerNode,
getPeersList,
getPeersListState,
} from '../../../actions/actionCreators';
import Store from '../../../store';
import AddCoinOptionsCrypto from '../../addcoin/addcoinOptionsCrypto';
import AddCoinOptionsAC from '../../addcoin/addcoinOptionsAC';
import AddCoinOptionsACFiat from '../../addcoin/addcoinOptionsACFiat';
class AddNodePanel extends React.Component {
constructor() {
super();
this.state = {
addNodeCoin: null,
addPeerIP: null,
getPeersCoin: null,
trimPassphraseTimer: null,
wifkeysPassphrase:'',
};
this.renderSNPeersList = this.renderSNPeersList.bind(this);
this.renderPeersList = this.renderPeersList.bind(this);
this.checkNodes = this.checkNodes.bind(this);
this.addNode = this.addNode.bind(this);
this.updateInput = this.updateInput.bind(this);
}
renderSNPeersList() {
if (this.state.getPeersCoin) {
const _getPeersCoin = this.state.getPeersCoin;
const _supernetPeers = this.props.Settings.supernetPeers;
const coin = _getPeersCoin.split('|')[0];
if (_supernetPeers &&
_getPeersCoin &&
_supernetPeers[coin]) {
return _supernetPeers[coin].map((ip) =>
<div key={ ip }>{ ip }</div>
);
} else {
return null;
}
} else {
return null;
}
}
renderPeersList() {
if (this.state.getPeersCoin) {
const _getPeersCoin = this.state.getPeersCoin;
const _rawPeers = this.props.Settings.rawPeers;
const coin = _getPeersCoin.split('|')[0];
if (_rawPeers &&
_getPeersCoin &&
_rawPeers[coin]) {
return _rawPeers[coin].map((ip) =>
<div key={ ip }>{ ip }</div>
);
} else {
return null;
}
} else {
return null;
}
}
checkNodes() {
if (this.state.getPeersCoin) {
console.warn(this.state.getPeersCoin.split('|')[0]);
Store.dispatch(getPeersList(this.state.getPeersCoin.split('|')[0]));
}
}
addNode() {
if (this.state.addNodeCoin &&
this.state.addPeerIP) {
Store.dispatch(
addPeerNode(
this.state.addNodeCoin.split('|')[0],
this.state.addPeerIP
)
);
}
}
updateInput(e) {
this.setState({
[e.target.name]: e.target.value,
});
}
render() {
return (
<div className="row">
<div className="col-sm-6">
<div className="col-sm-12">
<p>{ translate('INDEX.USE_THIS_SECTION') }</p>
</div>
<div className="col-sm-8 col-xs-12">
<div className="form-group">
<select
className="form-control form-material"
name="getPeersCoin"
onChange={ this.updateInput }>
<option>{ translate('INDEX.SELECT_COIN') }</option>
<AddCoinOptionsCrypto />
<AddCoinOptionsAC />
<AddCoinOptionsACFiat />
</select>
</div>
</div>
<div className="col-sm-4 col-xs-12 text-align-center">
<button
type="button"
className="btn btn-primary waves-effect waves-light"
onClick={ this.checkNodes }>{ translate('INDEX.CHECK_NODES') }</button>
</div>
<div className="col-sm-12">
<h5>
SuperNET Peers:
</h5>
<div>{ this.renderSNPeersList() }</div>
<h5>
Raw Peers:
</h5>
<div>{ this.renderPeersList() }</div>
</div>
</div>
<div className="col-sm-6">
<div className="col-sm-12">
<p>{ translate('INDEX.USE_THIS_SECTION_PEER') }</p>
</div>
<div className="col-sm-8 col-xs-12">
<div className="form-group">
<select
className="form-control form-material"
name="addNodeCoin"
onChange={ this.updateInput }>
<option>{ translate('INDEX.SELECT_COIN') }</option>
<AddCoinOptionsCrypto />
<AddCoinOptionsAC />
<AddCoinOptionsACFiat />
</select>
</div>
<div className="form-group">
<input
type="text"
className="form-control"
name="addPeerIP"
placeholder={ translate('SETTINGS.ADD_PEER_IP') }
onChange={ this.updateInput } />
</div>
</div>
<div className="col-sm-4 col-xs-12 text-align-center">
<button
type="button"
className="btn btn-primary waves-effect waves-light"
onClick={ this.addNode }>{ translate('INDEX.ADD_NODE') }</button>
</div>
</div>
</div>
);
};
}
const mapStateToProps = (state) => {
return {
Settings: state.Settings,
};
};
export default connect(mapStateToProps)(AddNodePanel);

2
react/src/components/dashboard/settings/settings.appInfoPanel.js

@ -33,8 +33,6 @@ class AppInfoPanel extends React.Component {
{ translate('SETTINGS.NAME') }: { this.props.Settings.appInfo.releaseInfo.name }
<br />
{ translate('SETTINGS.VERSION') }: { `${this.props.Settings.appInfo.releaseInfo.version.replace('version=', '')}${mainWindow.arch === 'x64' ? '' : '-32bit'}-beta` }
<br />
{ translate('SETTINGS.APP_SESSION') }: { this.props.Settings.appInfo.appSession }
</p>
<h5>{ translate('SETTINGS.SYS_INFO') }</h5>
<p>

33
react/src/components/dashboard/settings/settings.appUpdatePanel.js

@ -3,7 +3,6 @@ import { translate } from '../../../translate/translate';
import { connect } from 'react-redux';
import Config from '../../../config';
import {
getPeersList,
checkForUpdateUIPromise,
updateUIPromise,
} from '../../../actions/actionCreators';
@ -29,14 +28,12 @@ class AppUpdatePanel extends React.Component {
};
this._checkForUpdateUIPromise = this._checkForUpdateUIPromise.bind(this);
this._updateUIPromise = this._updateUIPromise.bind(this);
this.checkNodes = this.checkNodes.bind(this);
}
updateSocketsData(data) {
if (data &&
data.msg &&
data.msg.type === 'ui') {
if (data.msg.status === 'progress' &&
data.msg.progress &&
data.msg.progress < 100) {
@ -95,15 +92,9 @@ class AppUpdatePanel extends React.Component {
socket.removeAllListeners('patch', msg => this.updateSocketsData(msg));
}
checkNodes() {
if (this.state.getPeersCoin) {
Store.dispatch(getPeersList(this.state.getPeersCoin.split('|')[0]));
}
}
_updateUIPromise() {
updateProgressBar.patch = 0;
let _updateLog = [];
updateProgressBar.patch = 0;
_updateLog.push(`${translate('INDEX.DOWNLOADING_UI_UPDATE')}...`);
this.setState(Object.assign({}, this.state, {
updateLog: _updateLog,
@ -131,9 +122,9 @@ class AppUpdatePanel extends React.Component {
}
renderUpdateStatus() {
const _updateLogLength = this.state.updateLog.length;
let items = [];
let patchProgressBar = null;
const _updateLogLength = this.state.updateLog.length;
for (let i = 0; i < _updateLogLength; i++) {
items.push(
@ -143,9 +134,9 @@ class AppUpdatePanel extends React.Component {
if (_updateLogLength) {
return (
<div style={{ minHeight: '200px' }}>
<div className="app-update-progress">
<hr />
<h5>{ translate('SETTINGS.PROGRESS') }:</h5>
<h5>{ translate('SETTINGS.PROGRESS') }</h5>
<div className="padding-bottom-15">{ items }</div>
<div className={ updateProgressBar.patch > -1 ? 'progress progress-sm' : 'hide' }>
<div
@ -169,12 +160,16 @@ class AppUpdatePanel extends React.Component {
<button
type="button"
className="btn btn-info waves-effect waves-light"
onClick={ this._checkForUpdateUIPromise }>{ translate('INDEX.CHECK_FOR_UPDATE') }</button>
onClick={ this._checkForUpdateUIPromise }>
{ translate('INDEX.CHECK_FOR_UPDATE') }
</button>
<button
type="button"
className="btn btn-primary waves-effect waves-light margin-left-20"
onClick={ this._updateUIPromise }
disabled={ !this.state.updatePatch }>{ translate('INDEX.UPDATE_UI_NOW') }</button>
disabled={ !this.state.updatePatch }>
{ translate('INDEX.UPDATE_UI_NOW') }
</button>
</div>
</div>
<div className="col-sm-4 padding-top-15 hide">
@ -183,11 +178,15 @@ class AppUpdatePanel extends React.Component {
<button
type="button"
className="btn btn-info waves-effect waves-light"
onClick={ this._checkForUpdateUIPromise }>{ translate('INDEX.CHECK_FOR_UPDATE') }</button>
onClick={ this._checkForUpdateUIPromise }>
{ translate('INDEX.CHECK_FOR_UPDATE') }
</button>
<button
type="button"
className="btn btn-primary waves-effect waves-light margin-left-20"
onClick={ this.checkNodes }>{ translate('INDEX.UPDATE_BINS_NOW') }</button>
onClick={ this.checkNodes }>
{ translate('INDEX.UPDATE_BINS_NOW') }
</button>
</div>
</div>
<div className="col-sm-12 padding-top-15">

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

@ -29,6 +29,17 @@ class DebugLogPanel extends React.Component {
this.checkInputVals = this.checkInputVals.bind(this);
}
componentWillMount() {
if (this.props.Main.coins &&
this.props.Main.coins.native &&
Object.keys(this.props.Main.coins.native).length === 0) {
this.setState({
toggleAppRuntimeLog: true,
});
this.getAppRuntimeLog();
}
}
readDebugLog() {
let _target = this.state.debugTarget;
@ -57,7 +68,7 @@ class DebugLogPanel extends React.Component {
_items.push(
<p key={ `app-runtime-log-entry-${i}` }>
<span>{ secondsToString(_appRuntimeLog[i].time, true) }</span>
<span className="padding-left-30">{ JSON.stringify(_appRuntimeLog[i].msg, null, '') }</span>
<span className="padding-left-30">{ _appRuntimeLog[i].msg.indexOf('{') === -1 ? _appRuntimeLog[i].msg : JSON.stringify(_appRuntimeLog[i].msg, null, '') }</span>
</p>
);
}

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

@ -5,7 +5,6 @@ import Panel from './settings.panel';
import AppUpdatePanel from './settings.appUpdatePanel';
import AppInfoPanel from './settings.appInfoPanel';
// import AddNodePanel from './settings.addNodePanel';
import AppSettingsPanel from './settings.appSettingsPanel';
import CliPanel from './settings.cliPanel';
import DebugLogPanel from './settings.debugLogPanel';

26
react/src/components/dashboard/settings/settings.scss

@ -93,7 +93,6 @@
#SettingsAccordion {
.panel {
.panel-collapse {
&.collapse {
max-height: 0;
overflow: hidden;
@ -153,4 +152,29 @@
.select-settings {
max-width: 200px;
}
.manual-debuglog-refresh {
position: absolute;
top: 40px;
right: 40px;
font-size: 20px;
}
.coind-stdout-refresh-icon {
font-size: 20px;
margin-top: 7px;
}
.settings-coind-stdout-textarea {
border: none;
background-image: none !important;
}
.app-update-progress {
min-height: 200px;
}
.zcparams-progress {
min-height: 140px;
}

14
react/src/components/dashboard/spinner/spinner.scss

@ -118,4 +118,18 @@
80%, 90% {
stroke: #FF7D56;
}
}
.spinner--small {
position: absolute;
right: 18px;
top: -15px;
transform: scale(0.4);
}
.spinner--medium {
position: absolute;
right: 38px;
top: 0;
transform: scale(0.5);
}

21
react/src/components/dashboard/walletsBalance/walletsBalance.scss

@ -0,0 +1,21 @@
.col-lg-12 {
&.col-xs-12 {
&.balance-placeholder--bold {
.icon {
&.fa-eye {
position: relative;
top: -2px;
padding-right: 5px;
}
}
}
}
}
.balance-placeholder--bold {
.pull-left {
font-weight: 500;
font-size: 16px;
padding-top: 16px !important;
}
}

21
react/src/components/dashboard/walletsData/walletsData.scss

@ -2,11 +2,6 @@
float: right;
padding-right: 0;
}
.basilisk-progress-bar {
position: absolute;
width: 100%;
}
.breadcrumb--basilisk,
.breadcrumb--native {
top: 0;
}
@ -89,4 +84,20 @@
}
.table-cell-offset-16 {
padding-left: 16px;
}
.dashboard-claim-interest-btn {
padding: 4px 14px 4px 7px;
margin-left: 20px;
}
.win-sync-workaround-btn {
padding: 4px 7px;
}
.manual-balance-refresh,
.manual-txhistory-refresh {
position: absolute;
right: 4px;
top: 3px;
}

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

@ -7,9 +7,7 @@ const WalletsHeaderRender = function() {
className="page-header page-header-bordered header-easydex margin-bottom-0"
id="easydex-header-div"
style={{
backgroundImage: `url("assets/images/bg/${this.props.activeSection}_transparent_header_bg.png")`,
backgroundRepeat: 'no-repeat',
backgroundPosition: '0%'
backgroundImage: `url("assets/images/bg/${this.props.activeSection}_transparent_header_bg.png")`
}}>
<ol className="breadcrumb">
<li className={ this.isActiveSectionJumblr() ? 'hide' : 'header-easydex-section' }>

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

@ -0,0 +1,4 @@
.header-easydex {
background-repeat: no-repeat;
background-position: 0;
}

13
react/src/components/dashboard/walletsInfo/walletsInfo.render.js

@ -130,8 +130,8 @@ const WalletsInfoRender = function() {
</td>
</tr>
<tr>
<td style={{ background: '#fff' }}>&nbsp;</td>
<td style={{ background: '#fff' }}>&nbsp;</td>
<td className="bg--white">&nbsp;</td>
<td className="bg--white">&nbsp;</td>
</tr>
</tbody>
</table>
@ -185,7 +185,7 @@ const WalletsInfoRender = function() {
className="btn btn-success waves-effect waves-light margin-top-20 btn-next"
onClick={ () => this.openClaimInterestModal() }>
<i className="icon fa-dollar"></i> { translate('CLAIM_INTEREST.CLAIM_INTEREST', ' ') }
</button>
</button>
</div>
}
<div className="panel">
@ -227,7 +227,8 @@ const WalletsInfoRender = function() {
<div className="panel">
<div className="panel-heading">
<h3 className="panel-title">
{ this.props.ActiveCoin.coin === 'KMD' ? 'Komodo' : `${this.props.ActiveCoin.coin}` } { translate('INDEX.INFO') }
{ this.props.ActiveCoin.coin === 'KMD' ? 'Komodo' : `${this.props.ActiveCoin.coin}` }&nbsp;
{ translate('INDEX.INFO') }
</h3>
</div>
<div className="table-responsive">
@ -402,7 +403,9 @@ const WalletsInfoRender = function() {
<button
type="button"
className="btn btn-success waves-effect waves-light margin-top-20 btn-next"
onClick={ () => this.openClaimInterestModal() }>{ translate('CLAIM_INTEREST.CLAIM_INTEREST', ' ') }</button>
onClick={ () => this.openClaimInterestModal() }>
{ translate('CLAIM_INTEREST.CLAIM_INTEREST', ' ') }
</button>
<ClaimInterestModal />
</div>
}

3
react/src/components/dashboard/walletsInfo/walletsInfo.scss

@ -0,0 +1,3 @@
.bg--white {
background: #fff;
}

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

@ -20,9 +20,7 @@ const WalletsMainRender = function() {
{ this.getCoinStyle('title') &&
<img src={ this.getCoinStyle('title') } />
}
<span
className={ `easydex-section-image ${(this.props.ActiveCoin.coin === 'KMD' || this.props.ActiveCoin.coin === 'JUMBLR' || this.props.ActiveCoin.coin === 'MESH' || this.props.ActiveCoin.coin === 'MVP' ? 'hide' : '')}` }
style={{ marginLeft: '20px' }}>
<span className={ `margin-left-20 easydex-section-image ${(this.props.ActiveCoin.coin === 'KMD' || this.props.ActiveCoin.coin === 'JUMBLR' || this.props.ActiveCoin.coin === 'MESH' || this.props.ActiveCoin.coin === 'MVP' ? 'hide' : '')}` }>
{ getCoinTitle(this.props.ActiveCoin.coin).name }
</span>
</li>

62
react/src/components/dashboard/walletsNav/walletsNav.scss

@ -0,0 +1,62 @@
.breadcrumb {
padding: 8px 30px 0;
position: relative;
top: -10px;
}
.header-easydex-section {
img {
max-width: 60px;
}
}
.coin-logo-wide {
padding: 8px 30px 0;
position: relative;
top: 0;
.header-easydex-section {
img {
width: inherit;
max-width: inherit;
position: relative;
top: -5px;
}
}
&.native-coin-logo {
top: -93px;
.header-easydex-section {
img {
width: inherit;
}
}
}
}
.native-coin-logo {
float: left;
position: absolute;
top: -105px;
z-index: 100;
.header-easydex-section {
img {
width: 60px;
max-height: 60px;
}
}
}
.page-header--native {
height: 75px;
}
.page-header--spv {
height: 120px;
.page-header-actions {
top: 73%;
}
}

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

@ -103,15 +103,16 @@ class ZcparamsFetchModal extends React.Component {
if (data.msg.file === 'proving') {
_updateLog = [];
_updateLog.push(translate('ZCPARAMS_FETCH.BOTH_KEYS_VERIFIED'));
_updateLog.push(translate('ZCPARAMS_FETCH.CLOSE_THE_MODAL'));
this.setState(Object.assign({}, this.state, {
updateLog: _updateLog,
done: true,
}));
window.require('electron').remote.getCurrentWindow().zcashParamsExistPromise()
mainWindow.zcashParamsExistPromise()
.then((res) => {
const _errors = zcashParamsCheckErrors(res);
window.require('electron').remote.getCurrentWindow().zcashParamsExist = res;
const _errors = mainWindow.zcashParamsCheckErrors(res);
mainWindow.zcashParamsExist = res;
});
} else {
this.setState(Object.assign({}, this.state, {
@ -149,10 +150,8 @@ class ZcparamsFetchModal extends React.Component {
if (_updateLogLength) {
return (
<div
className="padding-top-20"
style={{ minHeight: '140px' }}>
<h5>{ translate('SETTINGS.PROGRESS') }:</h5>
<div className="padding-top-20 zcparams-progress">
<h5>{ translate('SETTINGS.PROGRESS') }</h5>
<div className="padding-bottom-15">{ items }</div>
<div className={ updateProgressBar.zcparams.proving > -1 && !this.state.done ? 'progress progress-sm' : 'hide' }>
<div

6
react/src/components/dashboard/zcparamsFetchModal/zcparamsFetchModal.scss

@ -16,4 +16,10 @@
}
}
}
}
.page-login {
.zcparams-fetch-modal {
color: #757575;
}
}

5
react/src/components/dex/table/table.scss

@ -2,11 +2,6 @@
float: right;
padding-right: 0;
}
.basilisk-progress-bar {
position: absolute;
width: 100%;
}
.breadcrumb--basilisk,
.breadcrumb--native {
top: 0;
}

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

@ -138,20 +138,12 @@ const LoginRender = function() {
{ this.props.Login.pinList.length > 0 &&
<div className="row margin-top-30">
<div className="col-xs-12">
<div style={{
width: '10%',
float: 'left',
marginLeft: '38%'}}>
<div className="pin-block-one">
<hr/>
</div>
<div style={{
width: '4%',
float: 'left',
marginTop: '10px'}}>
<div className="pin-block-two">
<span>{ translate('INDEX.OR') }</span></div>
<div style={{
width: '10%',
float: 'left'}}>
<div className="pin-block-three">
<hr/>
</div>
</div>

15
react/src/components/login/login.scss

@ -169,4 +169,19 @@ option.login-option {
.form-material .form-control:focus~.floating-label,
.form-material .form-control:not(.empty)~.floating-label {
top: -14px;
}
.pin-block-one {
width: 10%;
float: left;
margin-left: 38%;
}
.pin-block-two {
width: 4%;
float: left;
margin-top: 10px;
}
.pin-block-three {
width: 10%;
float: left;
}

448
react/src/components/overrides.scss

@ -1,5 +1,3 @@
/* TODO: nesting, separate */
#app {
height: 100%;
@ -77,43 +75,6 @@ body {
transition: height 0.3s ease-out;
}
.rc-tree {
height: 450px;
overflow-y: scroll;
margin-top: 20px;
a {
pointer-events: none;
}
li {
span {
&.rc-tree-iconEle {
display: none;
}
}
}
}
.rc-tree-node-content-wrapper-close + ul {
height: 0;
}
.rc-tree-node-content-wrapper {
user-select: none;
}
.rc-tree-node-content-wrapper-normal {
color: inherit;
pointer-events: all;
user-select: all;
}
#RefreshBasiliskConnectionsMdl {
.btn-close {
position: absolute;
top: 15px;
right: 15px;
}
}
.page-aside {
position: fixed;
}
@ -135,88 +96,6 @@ body {
text-align: center;
}
.navbar {
&.navbar-fixed-top {
.dropdown {
&.open {
.dropdown-menu {
right: 0;
}
}
.dropdown-menu {
display: block;
right: -165px;
}
}
}
}
.switch {
position: relative;
display: inline-block;
width: 40px;
height: 24px;
input {
display: none;
}
}
.slider {
border-radius: 20px;
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: #ccc;
-webkit-transition: .4s;
transition: .4s;
&.round {
border-radius: 34px;
&:before {
border-radius: 50%;
}
}
&:before {
border-radius: 50%;
position: absolute;
content: '';
height: 20px;
width: 20px;
left: 2px;
bottom: 2px;
background-color: white;
-webkit-transition: .4s;
transition: .4s;
}
}
.toggle-label {
color: #757575;
display: inline-block;
position: relative;
top: -12px;
left: 8px;
}
input:checked + .slider {
background-color: rgb(57, 73, 171);
}
input:focus + .slider {
box-shadow: 0 0 1px rgb(57, 73, 171);
}
input:checked + .slider:before {
-webkit-transform: translateX(16px);
-ms-transform: translateX(16px);
transform: translateX(16px);
}
.dropdown-menu {
li {
cursor: pointer;
@ -277,13 +156,6 @@ select{
}
}
.basilisk-actions {
.caret {
margin-left: 10px;
margin-top: -2px;
}
}
.clipboard-edexaddr {
margin-left: 10px;
}
@ -292,13 +164,6 @@ select{
background: #f3f4f5;
}
.manual-balance-refresh,
.manual-txhistory-refresh {
position: absolute;
right: 4px;
top: 3px;
}
.table-striped {
> tbody {
> tr.hover--none {
@ -307,91 +172,6 @@ select{
}
}
@media only screen and (min-width : 1201px) {
.wallet-widgets {
.flex {
display: flex;
flex-wrap: wrap;
}
> div {
display: flex;
.widget,
.widget-content {
height: 100%;
> div,
.clearfix {
height: 100%;
}
}
}
}
}
.breadcrumb {
padding: 8px 30px 0;
position: relative;
top: -10px;
}
.header-easydex-section {
img {
max-width: 60px;
}
}
.coin-logo-wide {
padding: 8px 30px 0;
position: relative;
top: 0;
.header-easydex-section {
img {
width: inherit;
max-width: inherit;
position: relative;
top: -5px;
}
}
&.native-coin-logo {
top: -93px;
.header-easydex-section {
img {
width: inherit;
}
}
}
}
.native-coin-logo {
float: left;
position: absolute;
top: -105px;
z-index: 100;
.header-easydex-section {
img {
width: 60px;
max-height: 60px;
}
}
}
.page-header--native {
height: 75px;
}
.page-header--spv {
height: 120px;
.page-header-actions {
top: 73%;
}
}
.toggle-filters:hover {
background-color: #f3f1f1;
}
@ -433,14 +213,6 @@ select{
}
}
.balance-placeholder--bold {
.pull-left {
font-weight: 500;
font-size: 16px;
padding-top: 16px !important;
}
}
.tx-interest {
display: block;
color: #4caf50;
@ -448,24 +220,6 @@ select{
padding-top: 5px;
}
.icon-spv-connection-warning,
.icon-native-connection-warning {
position: absolute;
bottom: 20px;
right: 15px;
&:before {
color: #f2a654;
font-size: 18px;
}
}
.icon-native-connection-warning {
&:before {
color: #e9595b;
}
}
.color-warning {
color: #FF6600;
}
@ -475,25 +229,6 @@ select{
cursor: pointer;
}
.dashboard-claim-interest-btn {
padding: 4px 14px 4px 7px;
margin-left: 20px;
}
.win-sync-workaround-btn {
padding: 4px 7px;
}
.send-coin-sync-warning {
.icon {
font-size: 18px;
}
.desc {
position: relative;
top: -2px;
}
}
.dropdown-toggle {
&.disabled {
opacity: 1;
@ -504,97 +239,12 @@ select{
}
}
.coind-stop-icon,
.coind-remove-icon {
font-size: 20px;
position: absolute;
top: 19px;
right: 12px;
color: #ccc !important;
&:hover {
color: #e9595b !important;
}
}
.coind-remove-icon {
transform: rotate(45deg);
top: 45px;
}
.coind-remove-icon-spv {
top: 19px;
}
.no-borders {
tbody > tr > td {
border: none;
}
}
.manual-debuglog-refresh {
position: absolute;
top: 40px;
right: 40px;
font-size: 20px;
}
.coind-stdout-refresh-icon {
font-size: 20px;
margin-top: 7px;
}
.settings-coind-stdout-textarea {
border: none;
background-image: none !important;
}
.receive-address-context-menu,
.coin-tile-context-menu {
box-shadow: 0 1px 2px 1px rgba(0, 0, 0, 0.4);
background: #fff;
position: absolute;
z-index: 100;
margin-left: 65px;
margin-top: 5px;
ul {
margin: 0;
list-style: none;
-webkit-margin-before: 0;
-webkit-margin-after: 0;
-webkit-margin-start: 0;
-webkit-margin-end: 0;
-webkit-padding-start: 0;
li {
padding: 5px 15px;
&:first-child {
margin-top: 5px;
}
&:last-child {
margin-bottom: 5px;
}
&:hover {
background: #f9f9f9;
cursor: pointer;
}
}
}
&.closed {
z-index: 1700;
position: absolute;
top: -100%;
left: -100%;
}
.receive-address-context-menu-get-qr {
.modal {
cursor: default;
}
}
}
.push-right {
float: right;
}
@ -602,114 +252,34 @@ select{
float: left;
}
.col-lg-12 {
&.col-xs-12 {
&.balance-placeholder--bold {
.icon {
&.fa-eye {
position: relative;
top: -2px;
padding-right: 5px;
}
}
}
}
}
.col-red {
color: #f96868;
}
.spinner--small {
position: absolute;
right: 18px;
top: -15px;
transform: scale(0.4);
}
.spinner--medium {
position: absolute;
right: 38px;
top: 0;
transform: scale(0.5);
}
.Select {
cursor: pointer;
* { color: #757575 !important; }
.Select-clear {
display: none;
}
.Select-control {
height: 40px !important;
.Select-placeholder,
.Select-value {
line-height: 36px !important;
}
}
}
.Select-menu-outer {
max-height: 253px !important;
}
.Select-menu {
max-height: 250px !important;
}
.Select.is-open,
.Select.is-focused {
.Select-control {
border-color: #FF6600 !important;
box-shadow: none !important;
}
.Select-menu-outer {
border-color: #FF6600 !important;
border-top-color: #d9d9d9 !important;
}
}
.modal-close-overlay {
width: 100%;
height: 100%;
position: absolute;
}
.navbar-fixed-bottom,
.navbar-fixed-top {
z-index: 100;
}
#section-iguana-wallet-settings {
> .row {
background: #f3f4f5;
}
}
.navbar-nav > li > a.navbar-avatar,
.navbar-toolbar > li > a.navbar-avatar {
&.dropdown-toggle {
font-size: 24px;
padding-top: 24px;
i {
position: relative;
top: -2px;
}
}
.inline {
display: inline-block;
}
.coind-actions-menu {
position: absolute;
top: 22px;
left: 20px;
.fs-15 {
font-size: 15px;
}
.coin-tile-context-menu {
top: 45px;
left: -34px;
.no-padding {
padding: 0 !important;
}
li {
color: #757575;
}
.no-margin {
margin: 0 !important;
}

21
react/src/components/responsive.scss

@ -0,0 +1,21 @@
@media only screen and (min-width : 1201px) {
.wallet-widgets {
.flex {
display: flex;
flex-wrap: wrap;
}
> div {
display: flex;
.widget,
.widget-content {
height: 100%;
> div,
.clearfix {
height: 100%;
}
}
}
}
}

65
react/src/components/switch.scss

@ -0,0 +1,65 @@
.switch {
position: relative;
display: inline-block;
width: 40px;
height: 24px;
input {
display: none;
}
}
.slider {
border-radius: 20px;
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: #ccc;
-webkit-transition: .4s;
transition: .4s;
&.round {
border-radius: 34px;
&:before {
border-radius: 50%;
}
}
&:before {
border-radius: 50%;
position: absolute;
content: '';
height: 20px;
width: 20px;
left: 2px;
bottom: 2px;
background-color: white;
-webkit-transition: .4s;
transition: .4s;
}
}
.toggle-label {
color: #757575;
display: inline-block;
position: relative;
top: -12px;
left: 8px;
}
input:checked + .slider {
background-color: rgb(57, 73, 171);
}
input:focus + .slider {
box-shadow: 0 0 1px rgb(57, 73, 171);
}
input:checked + .slider:before {
-webkit-transform: translateX(16px);
-ms-transform: translateX(16px);
transform: translateX(16px);
}

1
react/src/config.js

@ -18,6 +18,7 @@ let _config = {
try {
Config = window.require('electron').remote.getCurrentWindow().appConfig;
Config.token = window.require('electron').remote.getCurrentWindow().appSessionHash;
} catch (e) {
Config = _config;
}

6
react/src/reducers/dashboard.js

@ -8,6 +8,7 @@ import {
DASHBOARD_ELECTRUM_COINS,
ELECTRUM_SERVER_CHANGED,
DISPLAY_ZCASH_PARAMS_FETCH,
FIAT_RATES,
} from '../actions/storeType';
export function Dashboard(state = {
@ -71,6 +72,11 @@ export function Dashboard(state = {
...state,
eletrumServerChanged: action.eletrumServerChanged,
};
case FIAT_RATES:
return {
...state,
fiatRates: action.fiatRates,
};
default:
return state;
}

7
react/src/reducers/settings.js

@ -1,6 +1,5 @@
import {
GET_WIF_KEY,
GET_PEERS_LIST,
GET_DEBUG_LOG,
LOAD_APP_CONFIG,
LOAD_APP_INFO,
@ -22,12 +21,6 @@ export function Settings(state = {
wifkey: action.wifkey,
address: action.address,
};
case GET_PEERS_LIST:
return {
...state,
supernetPeers: action.supernetPeers,
rawPeers: action.rawPeers,
};
case GET_DEBUG_LOG:
return {
...state,

10
react/src/styles/index.scss

@ -29,11 +29,19 @@
@import '../assets/global/fonts/web-icons/web-icons.css';
@import '../assets/global/fonts/brand-icons/brand-icons.min.css';
@import '../assets/skins/orange.min.css';
@import '../../node_modules/rc-tree/assets/index.css';
@import '../components/addcoin/addcoin.scss';
@import '../components/dashboard/main/dashboard.scss';
@import '../components/login/login.scss';
@import '../components/overrides.scss';
@import '../components/switch.scss';
@import '../components/contextMenu.scss';
@import '../components/responsive.scss';
@import '../components/dashboard/walletsHeader/walletsHeader.scss';
@import '../components/dashboard/walletsInfo/walletsInfo.scss';
@import '../components/dashboard/sendCoin/sendCoin.scss';
@import '../components/dashboard/walletsNav/walletsNav.scss';
@import '../components/dashboard/coinTile/coinTile.scss';
@import '../components/dashboard/navbar/navbar.scss';
@import '../components/dashboard/settings/settings.scss';
@import '../components/dashboard/walletsData/walletsData.scss';
@import '../components/dashboard/claimInterestModal/claimInterestModal.scss';

10
react/src/translate/en.js

@ -96,6 +96,10 @@ export const LANG_EN = {
'NO_ACTIVE_COIN': 'No active coin',
},
'INDEX': {
'WALLET_OFFLINE': 'Agama is currently unable to connect to the Internet.',
'OFFLINE': 'Offline',
'TOGGLE_COIN_CONTEXT_MENU': 'Toggle coin context menu',
'TOP_MENU': 'Top menu',
'ERROR_READING': 'Error reading',
'SHOW': 'Show',
'SPV_SERVER_IP': 'Server IP',
@ -512,6 +516,7 @@ export const LANG_EN = {
'CURRENT_BLOCK_SM': 'current block',
},
'TOASTR': {
'INCORRECT_WIF': 'Icorrect WIF key format',
'ERROR': 'Error',
'FAILED_TO_VERIFY_ADDR': 'Failed to verify address',
'COIN_UNABLE_TO_STOP': 'Unable to stop @template@. Try again.',
@ -728,7 +733,7 @@ export const LANG_EN = {
'ZCPARAMS_FETCH': {
'DOWNLOADING_ZCASH_KEYS': 'Downloading Zcash keys',
'BOTH_KEYS_VERIFIED': 'Both Zcash param keys are downloaded and verified!',
'PLEASE_RESTART': 'Please restart the app.',
'CLOSE_THE_MODAL': 'Close the modal and try to add a coin again.',
'ZCPARAMS_VERIFICATION_ERROR_P1': 'Zcash param',
'ZCPARAMS_VERIFICATION_ERROR_P2': 'verification error!',
'ZCPARAMS_FETCH': 'ZCash Params Fetch',
@ -828,6 +833,9 @@ export const LANG_EN = {
'MESH': 'SpaceMesh (MESH)',
'SUPERNET': 'SUPERNET (SUPERNET)',
'WLC': 'WIRELESS (WIRELESS)',
'AXO': 'AXO (AXO)',
'ETOMIC': 'ETOMIC (ETOMIC)',
'BTCH': 'BTCH (BTCH)',
},
'DEX': {
'GEN_NEW_PASSPHRASE': 'Generate a new passphrase',

28
react/src/util/coinHelper.js

@ -6,6 +6,14 @@ export function getCoinTitle(coin) {
let hideTitle = false;
switch (coin) {
case 'XMY':
coinlogo = 'xmy';
coinname = 'Myriad';
break;
case 'ZCL':
coinlogo = 'zcl';
coinname = 'Zclassic';
break;
case 'HUSH':
coinlogo = 'hush';
coinname = 'Hush';
@ -220,6 +228,18 @@ export function getCoinTitle(coin) {
coinlogo = 'MESH';
coinname = 'SpaceMesh';
break;
case 'AXO':
coinlogo = 'AXO';
coinname = 'AXO';
break;
case 'ETOMIC':
coinlogo = 'ETOMIC';
coinname = 'ETOMIC';
break;
case 'BTCH':
coinlogo = 'BTCH';
coinname = 'BTCH';
break;
case 'USD':
titleBG = true;
transparentBG = true;
@ -470,6 +490,9 @@ export function coindList() {
'MESH',
'SUPERNET',
'WLC',
'AXO',
'ETOMIC',
'BTCH'
];
return _coins;
@ -495,7 +518,10 @@ export const isKomodoCoin = (coin) => {
coin === 'WLC' ||
coin === 'MNZ' ||
coin === 'CHIPS' ||
coin === 'KMD') {
coin === 'KMD' ||
coin === 'AXO',
coin === 'ETOMIC',
coin === 'BTCH') {
return true;
}
}
Loading…
Cancel
Save