diff --git a/react/src/actions/actionCreators.js b/react/src/actions/actionCreators.js index d946d3c..a282c96 100644 --- a/react/src/actions/actionCreators.js +++ b/react/src/actions/actionCreators.js @@ -1,9 +1,42 @@ import 'whatwg-fetch'; import { startCurrencyAssetChain } from '../components/addcoin/payload'; +import { copyToClipboard } from '../util/copyToClipboard'; import { translate } from '../translate/translate'; export const TOASTER_MESSAGE = 'TOASTER_MESSAGE'; export const DISPLAY_ADDCOIN_MODAL = 'DISPLAY_ADDCOIN_MODAL'; +export const GET_ACTIVE_COINS = 'GET_ACTIVE_COINS'; +export const LOGIN = 'LOGIN'; +export const ACTIVE_HANDLE = 'ACTIVE_HANDLE'; +export const DASHBOARD_SECTION_CHANGE = 'DASHBOARD_SECTION_CHANGE'; +export const DASHBOARD_ACTIVE_COIN_CHANGE = 'DASHBOARD_ACTIVE_COIN_CHANGE'; +export const GET_MAIN_ADDRESS = 'GET_MAIN_ADDRESS'; +export const DASHBOARD_ACTIVE_COIN_BALANCE = 'DASHBOARD_ACTIVE_COIN_BALANCE'; +export const DASHBOARD_ACTIVE_COIN_SEND_FORM = 'DASHBOARD_ACTIVE_COIN_SEND_FORM'; +export const DASHBOARD_ACTIVE_COIN_RECEIVE_FORM = 'DASHBOARD_ACTIVE_COIN_RECEIVE_FORM'; +export const DASHBOARD_ACTIVE_COIN_RESET_FORMS = 'DASHBOARD_ACTIVE_COIN_RESET_FORMS'; + +function toggleSendCoinFormState(display) { + return { + type: DASHBOARD_ACTIVE_COIN_SEND_FORM, + send: display, + } +} + +function toggleReceiveCoinFormState(display) { + return { + type: DASHBOARD_ACTIVE_COIN_SEND_FORM, + send: display, + } +} + +function toggleSendReceiveCoinFormsState() { + return { + type: DASHBOARD_ACTIVE_COIN_RESET_FORMS, + send: false, + receive: false, + } +} function triggerToaster(display, message, title, _type) { return { @@ -23,12 +56,134 @@ function toggleAddcoinModalState(display, isLogin) { } } +function dashboardCoinsState(json) { + return { + type: GET_ACTIVE_COINS, + coins: json, + activeCoins: Object.keys(json.native).length || Object.keys(json.basilisk).length || Object.keys(json.full).length ? true : false + } +} + +function iguanaWalletPassphraseState(json, dispatch) { + console.log('passp', json); + sessionStorage.setItem('IguanaActiveAccount', JSON.stringify(json)); + dispatch(triggerToaster(true, translate('TOASTR.LOGIN_SUCCESSFULL'), translate('TOASTR.ACCOUNT_NOTIFICATION'), 'success')); + + return { + type: LOGIN, + isLoggedIn: json && json.pubkey ? true : false, + } +} + +function iguanaActiveHandleState(json) { + return { + type: ACTIVE_HANDLE, + isLoggedIn: sessionStorage.getItem('IguanaActiveAccount') && JSON.parse(sessionStorage.getItem('IguanaActiveAccount')).pubkey === json.pubkey && json.status === 'unlocked' ? true : false, + handle: json, + } +} + +function getMainAddressState(json) { + return { + type: GET_MAIN_ADDRESS, + activeHandle: json, + } +} + +export function toggleSendCoinForm(display) { + return dispatch => { + dispatch(toggleSendCoinFormState(display)); + } +} + +export function toggleReceiveCoinForm(display) { + return dispatch => { + dispatch(toggleReceiveCoinFormState(display)); + } +} + +export function toggleSendReceiveCoinForms() { + return dispatch => { + dispatch(toggleSendReceiveCoinFormsState()); + } +} + +function logoutState(json, dispatch) { + console.log('passp', json); + sessionStorage.removeItem('IguanaActiveAccount'); + + return { + type: LOGIN, + isLoggedIn: false, + } +} + +export function logout() { + return dispatch => { + dispatch(logoutState()); + } +} + +function dashboardChangeSectionState(sectionName) { + return { + type: DASHBOARD_SECTION_CHANGE, + activeSection: sectionName, + } +} + +export function dashboardChangeSection(sectionName) { + return dispatch => { + dispatch(dashboardChangeSectionState(sectionName)); + } +} + +function dashboardChangeActiveCoinState(coin, mode) { + return { + type: DASHBOARD_ACTIVE_COIN_CHANGE, + coin: coin, + mode: mode, + } +} + +function iguanaEdexBalanceState(json) { + return { + type: DASHBOARD_ACTIVE_COIN_BALANCE, + balance: json && json.result ? json.result : 0, + } +} + +export function dashboardChangeActiveCoin(coin, mode) { + return dispatch => { + dispatch(dashboardChangeActiveCoinState(coin, mode)); + } +} + export function toggleAddcoinModal(display, isLogin) { return dispatch => { dispatch(toggleAddcoinModalState(display, isLogin)); } } +export function copyCoinAddress(address) { + var _result = copyToClipboard(address); + + if (_result) { + return dispatch => { + dispatch(triggerToaster(true, translate('DASHBOARD.ADDR_COPIED'), translate('TOASTR.COIN_NOTIFICATION'), 'success')) + } + } else { + return dispatch => { + dispatch(triggerToaster(true, 'Couldn\'t copy address to clipboard', translate('TOASTR.COIN_NOTIFICATION'), 'error')) + } + } +} + +export function dismissToasterMessage() { + return dispatch => { + dispatch(triggerToaster(false)) + } +} + export function addCoin(coin, mode) { console.log('coin, mode', coin + ' ' + mode); return dispatch => { @@ -87,14 +242,15 @@ export function shepherdHerd(coin, mode, path) { export function addCoinResult(coin, mode) { const modeToValue = { - 'full': 1, - 'basilisk': 0, - 'native': -1, + '1': 'full', + '0': 'basilisk', + '-1': 'native' }; return dispatch => { - //dispatch(shepherdGetConfig(coin, mode)); - dispatch(triggerToaster(true, coin + ' ' + translate('TOASTR.COIN_STARTED') + modeToValue[defaultMode] + ' ' + translate('TOASTR.MODE'), translate('TOASTR.COIN_NOTIFICATION'), 'success')); + dispatch(triggerToaster(true, coin + ' ' + translate('TOASTR.STARTED_IN') + ' ' + modeToValue[mode] + ' ' + translate('TOASTR.MODE'), translate('TOASTR.COIN_NOTIFICATION'), 'success')); + dispatch(toggleAddcoinModal(false, false)); + dispatch(getDexCoins()); } } @@ -115,3 +271,121 @@ export function shepherdGetConfig(coin, mode) { .then(json => dispatch(shepherdHerd(coin, mode, json))); } } + +export function getDexCoins() { + return dispatch => { + return fetch('http://127.0.0.1:7778', { + method: 'POST', + //mode: 'no-cors' + body: JSON.stringify({ + 'userpass': 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'), + 'agent': 'InstantDEX', + 'method': 'allcoins', + }) + }) + .catch(function(error) { + console.log(error); + dispatch(triggerToaster(true, 'Error getDexCoins', 'Error', 'error')) + + }) + .then(response => response.json()) + .then(json => dispatch(dashboardCoinsState(json))); + } +} + +function rpcErrorHandler(json, dispatch) { + console.log('json', json); + if (json && json.error) { + if (json.error === 'bitcoinrpc needs coin that is active') { + dispatch(triggerToaster(true, 'No active coin', translate('TOASTR.SERVICE_NOTIFICATION'), 'error')); + } + } +} + +export function iguanaWalletPassphrase(_passphrase) { + return dispatch => { + return fetch('http://127.0.0.1:7778', { + method: 'POST', + body: JSON.stringify({ + 'userpass': 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'), + 'handle': '', + 'password': _passphrase, + 'timeout': '2592000', + 'agent': 'bitcoinrpc', + 'method': 'walletpassphrase' + }), + }) + .catch(function(error) { + console.log(error); + dispatch(triggerToaster(true, 'Error iguanaWalletPassphrase', 'Error', 'error')) + }) + .then(response => response.json()) + .then(json => dispatch(iguanaWalletPassphraseState(json, dispatch))); + } +} + +export function iguanaActiveHandle(getMainAddress) { + return dispatch => { + return fetch('http://127.0.0.1:7778', { + method: 'POST', + body: JSON.stringify({ + 'userpass': 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'), + 'agent': 'SuperNET', + 'method': 'activehandle' + }), + }) + .catch(function(error) { + console.log(error); + dispatch(triggerToaster(true, 'Error iguanaActiveHandle', 'Error', 'error')) + }) + .then(response => response.json()) + .then(json => dispatch(getMainAddress ? getMainAddressState(json) : iguanaActiveHandleState(json))); + } +} + +export function iguanaEdexBalance(coin) { + return dispatch => { + return fetch('http://127.0.0.1:7778', { + method: 'POST', + body: JSON.stringify({ + 'userpass': 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'), + 'agent': 'bitcoinrpc', + 'method': 'getbalance', + 'coin': coin + }), + }) + .catch(function(error) { + console.log(error); + dispatch(triggerToaster(true, 'Error iguanaEdexBalance', 'Error', 'error')) + }) + .then(response => response.json()) + .then(json => dispatch(iguanaEdexBalanceState(json))); + } +} + +/*function Shepherd_SysInfo() { + return new Promise((resolve) => { + $.ajax({ + type: 'GET', + url: 'http://127.0.0.1:17777/shepherd/sysinfo', + contentType: 'application/json' // send as JSON + }) + .done(function(data) { + resolve(data); + }); + }); +} + +function Shepherd_SendPendValue() { + Shepherd_SysInfo().then(function(result){ + var ram_data = formatBytes(result.totalmem_bytes) + var pend_val = null; + if (ram_data.size === 'GB') { + if (ram_data.ramsize >= '63' ) { pend_val = 16; } + if (ram_data.ramsize >= '31' ) { pend_val = 8; } + if (ram_data.ramsize >= '15' ) { pend_val = 4; } + if (ram_data.ramsize <= '15' ) { pend_val = 1; } + } else { pend_val = 1; } + sessionStorage.setItem('IguanaPendValue', pend_val); + }) +}*/ \ No newline at end of file diff --git a/react/src/components/addcoin/payload.js b/react/src/components/addcoin/payload.js index 07979d5..d79e676 100644 --- a/react/src/components/addcoin/payload.js +++ b/react/src/components/addcoin/payload.js @@ -1,4 +1,4 @@ -function checkCoinType(coin) { +export function checkCoinType(coin) { if (coin === 'USD' || coin === 'RON' || coin === 'RUB' || @@ -59,494 +59,456 @@ export function startCurrencyAssetChain(confpath, coin, mode) { var tmpPendValue = 4; var tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'); - if ( checkCoinType(coin) === 'currency_ac' ) { - var _payloadVar = { - 'userpass': tmpIguanaRPCAuth, - 'unitval': '20', - 'zcash': 1, - 'RELAY': mode, - 'VALIDATE': mode, - 'prefetchlag': -1, - 'poll': 100, - 'active': 1, - 'agent': 'iguana', - 'method': 'addcoin', - 'startpend': tmpPendValue, - 'endpend': tmpPendValue, - 'services': 129, - 'maxpeers': 8, - 'newcoin': coin, - 'name': coin, - 'hasheaders': 1, - 'useaddmultisig': 0, + var _payloadVar = { + 'userpass': tmpIguanaRPCAuth, + 'unitval': '20', + 'zcash': 1, + 'RELAY': mode, + 'VALIDATE': mode, + 'prefetchlag': -1, + 'poll': 100, + 'active': 1, + 'agent': 'iguana', + 'method': 'addcoin', + 'startpend': tmpPendValue, + 'endpend': tmpPendValue, + 'services': 129, + 'maxpeers': 8, + 'newcoin': coin, + 'name': coin, + 'hasheaders': 1, + 'useaddmultisig': 0, + 'netmagic': '2d8e7803', + 'p2p': 13966, + 'rpc': 13967, + 'pubval': 60, + 'p2shval': 85, + 'wifval': 188, + 'txfee_satoshis': '10000', + 'isPoS': 0, + 'minoutput': 10000, + 'minconfirms': 2, + 'genesishash': '027e3758c3a65b12aa1046462b486d0a63bfa1beae327897f56c5cfb7daaae71', + 'protover': 170002, + 'genesisblock': '0100000000000000000000000000000000000000000000000000000000000000000000003ba3edfd7a7b12b27ac72c3e67768f617fc81bc3888a51323a9fb8aa4b1e5e4a000000000000000000000000000000000000000000000000000000000000000029ab5f490f0f0f200b00000000000000000000000000000000000000000000000000000000000000fd4005000d5ba7cda5d473947263bf194285317179d2b0d307119c2e7cc4bd8ac456f0774bd52b0cd9249be9d40718b6397a4c7bbd8f2b3272fed2823cd2af4bd1632200ba4bf796727d6347b225f670f292343274cc35099466f5fb5f0cd1c105121b28213d15db2ed7bdba490b4cedc69742a57b7c25af24485e523aadbb77a0144fc76f79ef73bd8530d42b9f3b9bed1c135ad1fe152923fafe98f95f76f1615e64c4abb1137f4c31b218ba2782bc15534788dda2cc08a0ee2987c8b27ff41bd4e31cd5fb5643dfe862c9a02ca9f90c8c51a6671d681d04ad47e4b53b1518d4befafefe8cadfb912f3d03051b1efbf1dfe37b56e93a741d8dfd80d576ca250bee55fab1311fc7b3255977558cdda6f7d6f875306e43a14413facdaed2f46093e0ef1e8f8a963e1632dcbeebd8e49fd16b57d49b08f9762de89157c65233f60c8e38a1f503a48c555f8ec45dedecd574a37601323c27be597b956343107f8bd80f3a925afaf30811df83c402116bb9c1e5231c70fff899a7c82f73c902ba54da53cc459b7bf1113db65cc8f6914d3618560ea69abd13658fa7b6af92d374d6eca9529f8bd565166e4fcbf2a8dfb3c9b69539d4d2ee2e9321b85b331925df195915f2757637c2805e1d4131e1ad9ef9bc1bb1c732d8dba4738716d351ab30c996c8657bab39567ee3b29c6d054b711495c0d52e1cd5d8e55b4f0f0325b97369280755b46a02afd54be4ddd9f77c22272b8bbb17ff5118fedbae2564524e797bd28b5f74f7079d532ccc059807989f94d267f47e724b3f1ecfe00ec9e6541c961080d8891251b84b4480bc292f6a180bea089fef5bbda56e1e41390d7c0e85ba0ef530f7177413481a226465a36ef6afe1e2bca69d2078712b3912bba1a99b1fbff0d355d6ffe726d2bb6fbc103c4ac5756e5bee6e47e17424ebcbf1b63d8cb90ce2e40198b4f4198689daea254307e52a25562f4c1455340f0ffeb10f9d8e914775e37d0edca019fb1b9c6ef81255ed86bc51c5391e0591480f66e2d88c5f4fd7277697968656a9b113ab97f874fdd5f2465e5559533e01ba13ef4a8f7a21d02c30c8ded68e8c54603ab9c8084ef6d9eb4e92c75b078539e2ae786ebab6dab73a09e0aa9ac575bcefb29e930ae656e58bcb513f7e3c17e079dce4f05b5dbc18c2a872b22509740ebe6a3903e00ad1abc55076441862643f93606e3dc35e8d9f2caef3ee6be14d513b2e062b21d0061de3bd56881713a1a5c17f5ace05e1ec09da53f99442df175a49bd154aa96e4949decd52fed79ccf7ccbce32941419c314e374e4a396ac553e17b5340336a1a25c22f9e42a243ba5404450b650acfc826a6e432971ace776e15719515e1634ceb9a4a35061b668c74998d3dfb5827f6238ec015377e6f9c94f38108768cf6e5c8b132e0303fb5a200368f845ad9d46343035a6ff94031df8d8309415bb3f6cd5ede9c135fdabcc030599858d803c0f85be7661c88984d88faa3d26fb0e9aac0056a53f1b5d0baed713c853c4a2726869a0a124a8a5bbc0fc0ef80c8ae4cb53636aa02503b86a1eb9836fcc259823e2692d921d88e1ffc1e6cb2bde43939ceb3f32a611686f539f8f7c9f0bf00381f743607d40960f06d347d1cd8ac8a51969c25e37150efdf7aa4c2037a2fd0516fb444525ab157a0ed0a7412b2fa69b217fe397263153782c0f64351fbdf2678fa0dc8569912dcd8e3ccad38f34f23bbbce14c6a26ac24911b308b82c7e43062d180baeac4ba7153858365c72c63dcf5f6a5b08070b730adb017aeae925b7d0439979e2679f45ed2f25a7edcfd2fb77a8794630285ccb0a071f5cce410b46dbf9750b0354aae8b65574501cc69efb5b6a43444074fee116641bb29da56c2b4a7f456991fc92b2', + 'debug': 0, + 'seedipaddr': '78.47.196.146' + }; + + if (mode === '-1') { + var _payloadVarRegular = Object.assign({}, _payloadVar); + delete _payloadVarRegular.userpass; + _payloadVarRegular.RELAY = -1; + _payloadVarRegular.VALIDATE = 1; + _payloadVarRegular.startpend = 4; + _payloadVarRegular.endpend = 4; + _payloadVarRegular.path = confpath; + + const USDDiff = { + 'coin': 'USD', + 'conf': 'USD.conf' + }; + AddCoinDataPayload.USD = Object.assign({}, _payloadVarRegular, USDDiff); + + const RONDiff = { + 'coin': 'RON', + 'conf': 'RON.conf' + }; + AddCoinDataPayload.RON = Object.assign({}, _payloadVarRegular, RONDiff); + + const RUBDiff = { + 'coin': 'RUB', + 'conf': 'RUB.conf' + }; + AddCoinDataPayload.RUB = Object.assign({}, _payloadVarRegular, RUBDiff); + + const SEKDiff = { + 'coin': 'SEK', + 'conf': 'SEK.conf' + }; + AddCoinDataPayload.SEK = Object.assign({}, _payloadVarRegular, SEKDiff); + + const SGDDiff = { + 'coin': 'SGD', + 'conf': 'SGD.conf' + }; + AddCoinDataPayload.SGD = Object.assign({}, _payloadVarRegular, SGDDiff); + + const THBDiff = { + 'coin': 'THB', + 'conf': 'THB.conf' + }; + AddCoinDataPayload.THB = Object.assign({}, _payloadVarRegular, THBDiff); + + const TRYDiff = { + 'coin': 'TRY', + 'conf': 'TRY.conf' + }; + AddCoinDataPayload.TRY = Object.assign({}, _payloadVarRegular, TRYDiff); + + const ZARDiff = { + 'coin': 'ZAR', + 'conf': 'ZAR.conf' + }; + AddCoinDataPayload.ZAR = Object.assign({}, _payloadVarRegular, ZARDiff); + + const CNYDiff = { + 'coin': 'CNY', + 'conf': 'CNY.conf' + }; + AddCoinDataPayload.CNY = Object.assign({}, _payloadVarRegular, CNYDiff); + + const CZKDiff = { + 'coin': 'CZK', + 'conf': 'CZK.conf' + }; + AddCoinDataPayload.CZK = Object.assign({}, _payloadVarRegular, CZKDiff); + + const DKKDiff = { + 'coin': 'DKK', + 'conf': 'DKK.conf' + }; + AddCoinDataPayload.DKK = Object.assign({}, _payloadVarRegular, DKKDiff); + + const EURDiff = { + 'coin': 'EUR', + 'conf': 'EUR.conf' + }; + AddCoinDataPayload.EUR = Object.assign({}, _payloadVarRegular, EURDiff); + + const GBPDiff = { + 'coin': 'GBP', + 'conf': 'GBP.conf' + }; + AddCoinDataPayload.GBP = Object.assign({}, _payloadVarRegular, GBPDiff); + + const HKDDiff = { + 'coin': 'HKD', + 'conf': 'HKD.conf' + }; + AddCoinDataPayload.HKD = Object.assign({}, _payloadVarRegular, HKDDiff); + + const HUFDiff = { + 'coin': 'HUF', + 'conf': 'HUF.conf' + }; + AddCoinDataPayload.HUF = Object.assign({}, _payloadVarRegular, HUFDiff); + + const IDRDiff = { + 'coin': 'IDR', + 'conf': 'IDR.conf' + }; + AddCoinDataPayload.IDR = Object.assign({}, _payloadVarRegular, IDRDiff); + + const ILSDiff = { + 'coin': 'ILS', + 'conf': 'ILS.conf' + }; + AddCoinDataPayload.ILS = Object.assign({}, _payloadVarRegular, ILSDiff); + + const INRDiff = { + 'coin': 'INR', + 'conf': 'INR.conf' + }; + AddCoinDataPayload.INR = Object.assign({}, _payloadVarRegular, INRDiff); + + const JPYDiff = { + 'coin': 'JPY', + 'conf': 'JPY.conf' + }; + AddCoinDataPayload.JPY = Object.assign({}, _payloadVarRegular, JPYDiff); + + const KRWDiff = { + 'coin': 'KRW', + 'conf': 'KRW.conf' + }; + AddCoinDataPayload.KRW = Object.assign({}, _payloadVarRegular, KRWDiff); + + const MXNDiff = { + 'coin': 'MXN', + 'conf': 'MXN.conf' + }; + AddCoinDataPayload.MXN = Object.assign({}, _payloadVarRegular, MXNDiff); + + const MYRDiff = { + 'coin': 'MYR', + 'conf': 'MYR.conf' + }; + AddCoinDataPayload.MYR = Object.assign({}, _payloadVarRegular, MYRDiff); + + const NOKDiff = { + 'coin': 'NOK', + 'conf': 'NOK.conf' + }; + AddCoinDataPayload.NOK = Object.assign({}, _payloadVarRegular, NOKDiff); + + const NZDDiff = { + 'coin': 'NZD', + 'conf': 'NZD.conf' + }; + AddCoinDataPayload.NZD = Object.assign({}, _payloadVarRegular, NZDDiff); + + const PHPDiff = { + 'coin': 'PHP', + 'conf': 'PHP.conf' + }; + AddCoinDataPayload.PHP = Object.assign({}, _payloadVarRegular, PHPDiff); + + const PLNDiff = { + 'coin': 'PLN', + 'conf': 'PLN.conf' + }; + AddCoinDataPayload.PLN = Object.assign({}, _payloadVarRegular, PLNDiff); + + const AUDDiff = { + 'coin': 'AUD', + 'conf': 'AUD.conf' + }; + AddCoinDataPayload.AUD = Object.assign({}, _payloadVarRegular, AUDDiff); + + const BGNDiff = { + 'coin': 'BGN', + 'conf': 'BGN.conf' + }; + AddCoinDataPayload.BGN = Object.assign({}, _payloadVarRegular, BGNDiff); + + const BRLDiff = { + 'coin': 'BRL', + 'conf': 'BRL.conf' + }; + AddCoinDataPayload.BRL = Object.assign({}, _payloadVarRegular, BRLDiff); + + const CADDiff = { + 'coin': 'CAD', + 'conf': 'CAD.conf' + }; + AddCoinDataPayload.CAD = Object.assign({}, _payloadVarRegular, CADDiff); + + const CHFDiff = { + 'coin': 'CHF', + 'conf': 'CHF.conf' + }; + AddCoinDataPayload.CHF = Object.assign({}, _payloadVarRegular, CHFDiff); + + return AddCoinDataPayload[coin]; + } else { + const USDDiff = { 'netmagic': '2d8e7803', 'p2p': 13966, - 'rpc': 13967, - 'pubval': 60, - 'p2shval': 85, - 'wifval': 188, - 'txfee_satoshis': '10000', - 'isPoS': 0, - 'minoutput': 10000, - 'minconfirms': 2, - 'genesishash': '027e3758c3a65b12aa1046462b486d0a63bfa1beae327897f56c5cfb7daaae71', - 'protover': 170002, - 'genesisblock': '0100000000000000000000000000000000000000000000000000000000000000000000003ba3edfd7a7b12b27ac72c3e67768f617fc81bc3888a51323a9fb8aa4b1e5e4a000000000000000000000000000000000000000000000000000000000000000029ab5f490f0f0f200b00000000000000000000000000000000000000000000000000000000000000fd4005000d5ba7cda5d473947263bf194285317179d2b0d307119c2e7cc4bd8ac456f0774bd52b0cd9249be9d40718b6397a4c7bbd8f2b3272fed2823cd2af4bd1632200ba4bf796727d6347b225f670f292343274cc35099466f5fb5f0cd1c105121b28213d15db2ed7bdba490b4cedc69742a57b7c25af24485e523aadbb77a0144fc76f79ef73bd8530d42b9f3b9bed1c135ad1fe152923fafe98f95f76f1615e64c4abb1137f4c31b218ba2782bc15534788dda2cc08a0ee2987c8b27ff41bd4e31cd5fb5643dfe862c9a02ca9f90c8c51a6671d681d04ad47e4b53b1518d4befafefe8cadfb912f3d03051b1efbf1dfe37b56e93a741d8dfd80d576ca250bee55fab1311fc7b3255977558cdda6f7d6f875306e43a14413facdaed2f46093e0ef1e8f8a963e1632dcbeebd8e49fd16b57d49b08f9762de89157c65233f60c8e38a1f503a48c555f8ec45dedecd574a37601323c27be597b956343107f8bd80f3a925afaf30811df83c402116bb9c1e5231c70fff899a7c82f73c902ba54da53cc459b7bf1113db65cc8f6914d3618560ea69abd13658fa7b6af92d374d6eca9529f8bd565166e4fcbf2a8dfb3c9b69539d4d2ee2e9321b85b331925df195915f2757637c2805e1d4131e1ad9ef9bc1bb1c732d8dba4738716d351ab30c996c8657bab39567ee3b29c6d054b711495c0d52e1cd5d8e55b4f0f0325b97369280755b46a02afd54be4ddd9f77c22272b8bbb17ff5118fedbae2564524e797bd28b5f74f7079d532ccc059807989f94d267f47e724b3f1ecfe00ec9e6541c961080d8891251b84b4480bc292f6a180bea089fef5bbda56e1e41390d7c0e85ba0ef530f7177413481a226465a36ef6afe1e2bca69d2078712b3912bba1a99b1fbff0d355d6ffe726d2bb6fbc103c4ac5756e5bee6e47e17424ebcbf1b63d8cb90ce2e40198b4f4198689daea254307e52a25562f4c1455340f0ffeb10f9d8e914775e37d0edca019fb1b9c6ef81255ed86bc51c5391e0591480f66e2d88c5f4fd7277697968656a9b113ab97f874fdd5f2465e5559533e01ba13ef4a8f7a21d02c30c8ded68e8c54603ab9c8084ef6d9eb4e92c75b078539e2ae786ebab6dab73a09e0aa9ac575bcefb29e930ae656e58bcb513f7e3c17e079dce4f05b5dbc18c2a872b22509740ebe6a3903e00ad1abc55076441862643f93606e3dc35e8d9f2caef3ee6be14d513b2e062b21d0061de3bd56881713a1a5c17f5ace05e1ec09da53f99442df175a49bd154aa96e4949decd52fed79ccf7ccbce32941419c314e374e4a396ac553e17b5340336a1a25c22f9e42a243ba5404450b650acfc826a6e432971ace776e15719515e1634ceb9a4a35061b668c74998d3dfb5827f6238ec015377e6f9c94f38108768cf6e5c8b132e0303fb5a200368f845ad9d46343035a6ff94031df8d8309415bb3f6cd5ede9c135fdabcc030599858d803c0f85be7661c88984d88faa3d26fb0e9aac0056a53f1b5d0baed713c853c4a2726869a0a124a8a5bbc0fc0ef80c8ae4cb53636aa02503b86a1eb9836fcc259823e2692d921d88e1ffc1e6cb2bde43939ceb3f32a611686f539f8f7c9f0bf00381f743607d40960f06d347d1cd8ac8a51969c25e37150efdf7aa4c2037a2fd0516fb444525ab157a0ed0a7412b2fa69b217fe397263153782c0f64351fbdf2678fa0dc8569912dcd8e3ccad38f34f23bbbce14c6a26ac24911b308b82c7e43062d180baeac4ba7153858365c72c63dcf5f6a5b08070b730adb017aeae925b7d0439979e2679f45ed2f25a7edcfd2fb77a8794630285ccb0a071f5cce410b46dbf9750b0354aae8b65574501cc69efb5b6a43444074fee116641bb29da56c2b4a7f456991fc92b2', - 'debug': 0, - 'seedipaddr': '78.47.196.146' - }; - - /*if ( mode == '-1' ) { - console.log('native'); - logincoinmodeinfo = 'Native'; - var confpath = Shepherd_getConf(coin); - console.log(confpath[0].path); - - var setconfig = function() { - return new Promise(function(resolve, reject) { - Shepherd_setConf(coin); - var result = 'setconfig: DONE'; - console.log(result); - resolve(result); - }); - } - - var startcoin = function() { - return new Promise(function(resolve, reject) { - Shepherd_herd('komodod', { - 'ac_name': coin, - 'ac_options': [ - '-daemon=0', - '-server', - '-ac_name=' + coin, - '-addnode=78.47.196.146' - ] - }); - - var result = 'startcoin: DONE'; - console.log(result); - resolve(result); - }); - } - - startcoin();*/ - //var AddCoinData = AddCoinDataPayload[coin + 'Var']; - - if (mode === '-1') { - var _payloadVarRegular = Object.assign({}, _payloadVar); - delete _payloadVarRegular.userpass; - _payloadVarRegular.RELAY = -1; - _payloadVarRegular.VALIDATE = 1; - _payloadVarRegular.startpend = 4; - _payloadVarRegular.endpend = 4; - _payloadVarRegular.path = confpath; - - const USDDiff = { - 'coin': 'USD', - 'conf': 'USD.conf' - }; - AddCoinDataPayload.USD = Object.assign({}, _payloadVarRegular, USDDiff); - - const RONDiff = { - 'coin': 'RON', - 'conf': 'RON.conf' - }; - AddCoinDataPayload.RON = Object.assign({}, _payloadVarRegular, RONDiff); - - const RUBDiff = { - 'coin': 'RUB', - 'conf': 'RUB.conf' - }; - AddCoinDataPayload.RUB = Object.assign({}, _payloadVarRegular, RUBDiff); - - const SEKDiff = { - 'coin': 'SEK', - 'conf': 'SEK.conf' - }; - AddCoinDataPayload.SEK = Object.assign({}, _payloadVarRegular, SEKDiff); - - const SGDDiff = { - 'coin': 'SGD', - 'conf': 'SGD.conf' - }; - AddCoinDataPayload.SGD = Object.assign({}, _payloadVarRegular, SGDDiff); - - const THBDiff = { - 'coin': 'THB', - 'conf': 'THB.conf' - }; - AddCoinDataPayload.THB = Object.assign({}, _payloadVarRegular, THBDiff); - - const TRYDiff = { - 'coin': 'TRY', - 'conf': 'TRY.conf' - }; - AddCoinDataPayload.TRY = Object.assign({}, _payloadVarRegular, TRYDiff); - - const ZARDiff = { - 'coin': 'ZAR', - 'conf': 'ZAR.conf' - }; - AddCoinDataPayload.ZAR = Object.assign({}, _payloadVarRegular, ZARDiff); - - const CNYDiff = { - 'coin': 'CNY', - 'conf': 'CNY.conf' - }; - AddCoinDataPayload.CNY = Object.assign({}, _payloadVarRegular, CNYDiff); - - const CZKDiff = { - 'coin': 'CZK', - 'conf': 'CZK.conf' - }; - AddCoinDataPayload.CZK = Object.assign({}, _payloadVarRegular, CZKDiff); - - const DKKDiff = { - 'coin': 'DKK', - 'conf': 'DKK.conf' - }; - AddCoinDataPayload.DKK = Object.assign({}, _payloadVarRegular, DKKDiff); - - const EURDiff = { - 'coin': 'EUR', - 'conf': 'EUR.conf' - }; - AddCoinDataPayload.EUR = Object.assign({}, _payloadVarRegular, EURDiff); - - const GBPDiff = { - 'coin': 'GBP', - 'conf': 'GBP.conf' - }; - AddCoinDataPayload.GBP = Object.assign({}, _payloadVarRegular, GBPDiff); - - const HKDDiff = { - 'coin': 'HKD', - 'conf': 'HKD.conf' - }; - AddCoinDataPayload.HKD = Object.assign({}, _payloadVarRegular, HKDDiff); - - const HUFDiff = { - 'coin': 'HUF', - 'conf': 'HUF.conf' - }; - AddCoinDataPayload.HUF = Object.assign({}, _payloadVarRegular, HUFDiff); - - const IDRDiff = { - 'coin': 'IDR', - 'conf': 'IDR.conf' - }; - AddCoinDataPayload.IDR = Object.assign({}, _payloadVarRegular, IDRDiff); - - const ILSDiff = { - 'coin': 'ILS', - 'conf': 'ILS.conf' - }; - AddCoinDataPayload.ILS = Object.assign({}, _payloadVarRegular, ILSDiff); - - const INRDiff = { - 'coin': 'INR', - 'conf': 'INR.conf' - }; - AddCoinDataPayload.INR = Object.assign({}, _payloadVarRegular, INRDiff); - - const JPYDiff = { - 'coin': 'JPY', - 'conf': 'JPY.conf' - }; - AddCoinDataPayload.JPY = Object.assign({}, _payloadVarRegular, JPYDiff); - - const KRWDiff = { - 'coin': 'KRW', - 'conf': 'KRW.conf' - }; - AddCoinDataPayload.KRW = Object.assign({}, _payloadVarRegular, KRWDiff); - - const MXNDiff = { - 'coin': 'MXN', - 'conf': 'MXN.conf' - }; - AddCoinDataPayload.MXN = Object.assign({}, _payloadVarRegular, MXNDiff); - - const MYRDiff = { - 'coin': 'MYR', - 'conf': 'MYR.conf' - }; - AddCoinDataPayload.MYR = Object.assign({}, _payloadVarRegular, MYRDiff); - - const NOKDiff = { - 'coin': 'NOK', - 'conf': 'NOK.conf' - }; - AddCoinDataPayload.NOK = Object.assign({}, _payloadVarRegular, NOKDiff); - - const NZDDiff = { - 'coin': 'NZD', - 'conf': 'NZD.conf' - }; - AddCoinDataPayload.NZD = Object.assign({}, _payloadVarRegular, NZDDiff); - - const PHPDiff = { - 'coin': 'PHP', - 'conf': 'PHP.conf' - }; - AddCoinDataPayload.PHP = Object.assign({}, _payloadVarRegular, PHPDiff); - - const PLNDiff = { - 'coin': 'PLN', - 'conf': 'PLN.conf' - }; - AddCoinDataPayload.PLN = Object.assign({}, _payloadVarRegular, PLNDiff); - - const AUDDiff = { - 'coin': 'AUD', - 'conf': 'AUD.conf' - }; - AddCoinDataPayload.AUD = Object.assign({}, _payloadVarRegular, AUDDiff); - - const BGNDiff = { - 'coin': 'BGN', - 'conf': 'BGN.conf' - }; - AddCoinDataPayload.BGN = Object.assign({}, _payloadVarRegular, BGNDiff); - - const BRLDiff = { - 'coin': 'BRL', - 'conf': 'BRL.conf' - }; - AddCoinDataPayload.BRL = Object.assign({}, _payloadVarRegular, BRLDiff); - - const CADDiff = { - 'coin': 'CAD', - 'conf': 'CAD.conf' - }; - AddCoinDataPayload.CAD = Object.assign({}, _payloadVarRegular, CADDiff); - - const CHFDiff = { - 'coin': 'CHF', - 'conf': 'CHF.conf' - }; - AddCoinDataPayload.CHF = Object.assign({}, _payloadVarRegular, CHFDiff); - - return AddCoinDataPayload[coin]; - } else { - const USDDiff = { - 'netmagic': '2d8e7803', - 'p2p': 13966, - 'rpc': 13967 - }; - AddCoinDataPayload.USDVar = Object.assign({}, _payloadVar, USDDiff); - - const CHFDiff = { - 'netmagic': '59fbeb5c', - 'p2p': 15311, - 'rpc': 15312 - }; - AddCoinDataPayload.CHFVar = Object.assign({}, _payloadVar, CHFDiff); - - const CADDiff = { - 'netmagic': '3c212763', - 'p2p': 8719, - 'rpc': 8720 - }; - AddCoinDataPayload.CADVar = Object.assign({}, _payloadVar, CADDiff); - - const BRLDiff = { - 'netmagic': 'ab82d10d', - 'p2p': 9913, - 'rpc': 9914 - }; - AddCoinDataPayload.BRLVar = Object.assign({}, _payloadVar, BRLDiff); - - const BGNDiff = { - 'netmagic': '93056ad4', - 'p2p': 9109, - 'rpc': 9110 - }; - AddCoinDataPayload.BGNVar = Object.assign({}, _payloadVar, BGNDiff); - - const AUDDiff = { - 'netmagic': '07220d4e', - 'p2p': 8044, - 'rpc': 8045 - }; - AddCoinDataPayload.AUDVar = Object.assign({}, _payloadVar, AUDDiff); - - const PLNDiff = { - 'netmagic': '46ab3c28', - 'p2p': 13492, - 'rpc': 13493 - }; - AddCoinDataPayload.PLNVar = Object.assign({}, _payloadVar, PLNDiff); - - const PHPDiff = { - 'netmagic': '21535fb6', - 'p2p': 11180, - 'rpc': 11181 - }; - AddCoinDataPayload.PHPVar = Object.assign({}, _payloadVar, PHPDiff); - - const NZDDiff = { - 'netmagic': 'f579c9c2', - 'p2p': 10914, - 'rpc': 10915 - }; - AddCoinDataPayload.NZDVar = Object.assign({}, _payloadVar, NZDDiff); - - const NOKDiff = { - 'netmagic': '7082c365', - 'p2p': 11587, - 'rpc': 11588 - }; - AddCoinDataPayload.NOKVar = Object.assign({}, _payloadVar, NOKDiff); - - const MYRDiff = { - 'netmagic': '3e21761f', - 'p2p': 10687, - 'rpc': 10688 - }; - AddCoinDataPayload.MYRVar = Object.assign({}, _payloadVar, MYRDiff); - - const MXNDiff = { - 'netmagic': '304c6c12', - 'p2p': 13969, - 'rpc': 13970 - }; - AddCoinDataPayload.MXNVar = Object.assign({}, _payloadVar, MXNDiff); - - const KRWDiff = { - 'netmagic': 'c8706588', - 'p2p': 14019, - 'rpc': 14020 - }; - AddCoinDataPayload.KRWVar = Object.assign({}, _payloadVar, KRWDiff); - - const JPYDiff = { - 'netmagic': '7a55295c', - 'p2p': 13144, - 'rpc': 13145 - }; - AddCoinDataPayload.JPYVar = Object.assign({}, _payloadVar, JPYDiff); - - const INRDiff = { - 'netmagic': '740dfc1d', - 'p2p': 10535, - 'rpc': 10536 - }; - AddCoinDataPayload.INRVar = Object.assign({}, _payloadVar, INRDiff); - - const ILSDiff = { - 'netmagic': '605fcd58', - 'p2p': 14637, - 'rpc': 14638 - }; - AddCoinDataPayload.ILSVar = Object.assign({}, _payloadVar, ILSDiff); - - const IDRDiff = { - 'netmagic': 'fee513e7', - 'p2p': 14458, - 'rpc': 14459 - }; - AddCoinDataPayload.IDRVar = Object.assign({}, _payloadVar, IDRDiff); - - const HKDDiff = { - 'netmagic': '57269d95', - 'p2p': 15408, - 'rpc': 15409 - }; - AddCoinDataPayload.HKDVar = Object.assign({}, _payloadVar, HKDDiff); - - const HUFDiff = { - 'netmagic': 'a478d2af', - 'p2p': 13698, - 'rpc': 13699 - }; - AddCoinDataPayload.HUFVar = Object.assign({}, _payloadVar, HUFDiff); - - const GBPDiff = { - 'netmagic': '5e0ed955', - 'p2p': 11504, - 'rpc': 11505 - }; - AddCoinDataPayload.GBPVar = Object.assign({}, _payloadVar, GBPDiff); - - const EURDiff = { - 'netmagic': '8a3fd0bd', - 'p2p': 8064, - 'rpc': 8065 - }; - AddCoinDataPayload.EURVar = Object.assign({}, _payloadVar, EURDiff); - - const DKKDiff = { - 'netmagic': 'a2c2380c', - 'p2p': 13829, - 'rpc': 13830 - }; - AddCoinDataPayload.DKKVar = Object.assign({}, _payloadVar, DKKDiff); - - const CNYDiff = { - 'netmagic': '2a51b987', - 'p2p': 10383, - 'rpc': 10384 - }; - AddCoinDataPayload.CNYVar = Object.assign({}, _payloadVar, CNYDiff); - - const ZARDiff = { - 'netmagic': '920c0484', - 'p2p': 15159, - 'rpc': 15160 - }; - AddCoinDataPayload.ZARVar = Object.assign({}, _payloadVar, ZARDiff); - - const TRYDiff = { - 'netmagic': '82b9a778', - 'p2p': 13923, - 'rpc': 13924 - }; - AddCoinDataPayload.TRYVar = Object.assign({}, _payloadVar, TRYDiff); - - const THBDiff = { - 'netmagic': 'b58aef42', - 'p2p': 11846, - 'rpc': 11847 - }; - AddCoinDataPayload.THBVar = Object.assign({}, _payloadVar, THBDiff); - - const SGDDiff = { - 'netmagic': 'ca255b29', - 'p2p': 14474, - 'rpc': 14475 - }; - AddCoinDataPayload.SGDVar = Object.assign({}, _payloadVar, SGDDiff); - - const SEKDiff = { - 'netmagic': 'd95ad28b', - 'p2p': 11446, - 'rpc': 11447 - }; - AddCoinDataPayload.SEKVar = Object.assign({}, _payloadVar, SEKDiff); - - const RONDiff = { - 'netmagic': 'eb2c9500', - 'p2p': 8674, - 'rpc': 8675 - }; - AddCoinDataPayload.RONVar = Object.assign({}, _payloadVar, RONDiff); - - const RUBDiff = { - 'netmagic': '1b9a0eb9', - 'p2p': 8198, - 'rpc': 8199 - }; - AddCoinDataPayload.RUBVar = Object.assign({}, _payloadVar, RUBDiff); - - const CZKDiff = { - 'netmagic': '37f7ae5a', - 'p2p': 9481, - 'rpc': 9482 - }; - AddCoinDataPayload.CZKVar = Object.assign({}, _payloadVar, CZKDiff); - - return AddCoinDataPayload[coin + 'Var']; - } + 'rpc': 13967 + }; + AddCoinDataPayload.USDVar = Object.assign({}, _payloadVar, USDDiff); + + const CHFDiff = { + 'netmagic': '59fbeb5c', + 'p2p': 15311, + 'rpc': 15312 + }; + AddCoinDataPayload.CHFVar = Object.assign({}, _payloadVar, CHFDiff); + + const CADDiff = { + 'netmagic': '3c212763', + 'p2p': 8719, + 'rpc': 8720 + }; + AddCoinDataPayload.CADVar = Object.assign({}, _payloadVar, CADDiff); + + const BRLDiff = { + 'netmagic': 'ab82d10d', + 'p2p': 9913, + 'rpc': 9914 + }; + AddCoinDataPayload.BRLVar = Object.assign({}, _payloadVar, BRLDiff); + + const BGNDiff = { + 'netmagic': '93056ad4', + 'p2p': 9109, + 'rpc': 9110 + }; + AddCoinDataPayload.BGNVar = Object.assign({}, _payloadVar, BGNDiff); + + const AUDDiff = { + 'netmagic': '07220d4e', + 'p2p': 8044, + 'rpc': 8045 + }; + AddCoinDataPayload.AUDVar = Object.assign({}, _payloadVar, AUDDiff); + + const PLNDiff = { + 'netmagic': '46ab3c28', + 'p2p': 13492, + 'rpc': 13493 + }; + AddCoinDataPayload.PLNVar = Object.assign({}, _payloadVar, PLNDiff); + + const PHPDiff = { + 'netmagic': '21535fb6', + 'p2p': 11180, + 'rpc': 11181 + }; + AddCoinDataPayload.PHPVar = Object.assign({}, _payloadVar, PHPDiff); + + const NZDDiff = { + 'netmagic': 'f579c9c2', + 'p2p': 10914, + 'rpc': 10915 + }; + AddCoinDataPayload.NZDVar = Object.assign({}, _payloadVar, NZDDiff); + + const NOKDiff = { + 'netmagic': '7082c365', + 'p2p': 11587, + 'rpc': 11588 + }; + AddCoinDataPayload.NOKVar = Object.assign({}, _payloadVar, NOKDiff); + + const MYRDiff = { + 'netmagic': '3e21761f', + 'p2p': 10687, + 'rpc': 10688 + }; + AddCoinDataPayload.MYRVar = Object.assign({}, _payloadVar, MYRDiff); + + const MXNDiff = { + 'netmagic': '304c6c12', + 'p2p': 13969, + 'rpc': 13970 + }; + AddCoinDataPayload.MXNVar = Object.assign({}, _payloadVar, MXNDiff); + + const KRWDiff = { + 'netmagic': 'c8706588', + 'p2p': 14019, + 'rpc': 14020 + }; + AddCoinDataPayload.KRWVar = Object.assign({}, _payloadVar, KRWDiff); + + const JPYDiff = { + 'netmagic': '7a55295c', + 'p2p': 13144, + 'rpc': 13145 + }; + AddCoinDataPayload.JPYVar = Object.assign({}, _payloadVar, JPYDiff); + + const INRDiff = { + 'netmagic': '740dfc1d', + 'p2p': 10535, + 'rpc': 10536 + }; + AddCoinDataPayload.INRVar = Object.assign({}, _payloadVar, INRDiff); + + const ILSDiff = { + 'netmagic': '605fcd58', + 'p2p': 14637, + 'rpc': 14638 + }; + AddCoinDataPayload.ILSVar = Object.assign({}, _payloadVar, ILSDiff); + + const IDRDiff = { + 'netmagic': 'fee513e7', + 'p2p': 14458, + 'rpc': 14459 + }; + AddCoinDataPayload.IDRVar = Object.assign({}, _payloadVar, IDRDiff); + + const HKDDiff = { + 'netmagic': '57269d95', + 'p2p': 15408, + 'rpc': 15409 + }; + AddCoinDataPayload.HKDVar = Object.assign({}, _payloadVar, HKDDiff); + + const HUFDiff = { + 'netmagic': 'a478d2af', + 'p2p': 13698, + 'rpc': 13699 + }; + AddCoinDataPayload.HUFVar = Object.assign({}, _payloadVar, HUFDiff); + + const GBPDiff = { + 'netmagic': '5e0ed955', + 'p2p': 11504, + 'rpc': 11505 + }; + AddCoinDataPayload.GBPVar = Object.assign({}, _payloadVar, GBPDiff); + + const EURDiff = { + 'netmagic': '8a3fd0bd', + 'p2p': 8064, + 'rpc': 8065 + }; + AddCoinDataPayload.EURVar = Object.assign({}, _payloadVar, EURDiff); + + const DKKDiff = { + 'netmagic': 'a2c2380c', + 'p2p': 13829, + 'rpc': 13830 + }; + AddCoinDataPayload.DKKVar = Object.assign({}, _payloadVar, DKKDiff); + + const CNYDiff = { + 'netmagic': '2a51b987', + 'p2p': 10383, + 'rpc': 10384 + }; + AddCoinDataPayload.CNYVar = Object.assign({}, _payloadVar, CNYDiff); + + const ZARDiff = { + 'netmagic': '920c0484', + 'p2p': 15159, + 'rpc': 15160 + }; + AddCoinDataPayload.ZARVar = Object.assign({}, _payloadVar, ZARDiff); + + const TRYDiff = { + 'netmagic': '82b9a778', + 'p2p': 13923, + 'rpc': 13924 + }; + AddCoinDataPayload.TRYVar = Object.assign({}, _payloadVar, TRYDiff); + + const THBDiff = { + 'netmagic': 'b58aef42', + 'p2p': 11846, + 'rpc': 11847 + }; + AddCoinDataPayload.THBVar = Object.assign({}, _payloadVar, THBDiff); + + const SGDDiff = { + 'netmagic': 'ca255b29', + 'p2p': 14474, + 'rpc': 14475 + }; + AddCoinDataPayload.SGDVar = Object.assign({}, _payloadVar, SGDDiff); + + const SEKDiff = { + 'netmagic': 'd95ad28b', + 'p2p': 11446, + 'rpc': 11447 + }; + AddCoinDataPayload.SEKVar = Object.assign({}, _payloadVar, SEKDiff); + + const RONDiff = { + 'netmagic': 'eb2c9500', + 'p2p': 8674, + 'rpc': 8675 + }; + AddCoinDataPayload.RONVar = Object.assign({}, _payloadVar, RONDiff); + + const RUBDiff = { + 'netmagic': '1b9a0eb9', + 'p2p': 8198, + 'rpc': 8199 + }; + AddCoinDataPayload.RUBVar = Object.assign({}, _payloadVar, RUBDiff); + + const CZKDiff = { + 'netmagic': '37f7ae5a', + 'p2p': 9481, + 'rpc': 9482 + }; + AddCoinDataPayload.CZKVar = Object.assign({}, _payloadVar, CZKDiff); + + return AddCoinDataPayload[coin + 'Var']; } } \ No newline at end of file diff --git a/react/src/components/app/app.js b/react/src/components/app/app.js index 1df4370..27dff68 100644 --- a/react/src/components/app/app.js +++ b/react/src/components/app/app.js @@ -7,6 +7,9 @@ function mapStateToProps(state) { return { toaster: state.toaster, AddCoin: state.AddCoin, + Main: state.Main, + Dashboard: state.Dashboard, + ActiveCoin: state.ActiveCoin, }; } diff --git a/react/src/components/dashboard/atomic.js b/react/src/components/dashboard/atomic.js new file mode 100644 index 0000000..7ecceeb --- /dev/null +++ b/react/src/components/dashboard/atomic.js @@ -0,0 +1,162 @@ +import React from 'react'; +import { translate } from '../../translate/translate'; +/*import { dashboardChangeSection, toggleAddcoinModal, logout } from '../../actions/actionCreators'; +import Store from '../../store';*/ + +class Atomic extends React.Component { + constructor(props) { + super(props); + this.state = { + }; + } + + render() { + return ( +
{translate('INDEX.FILL_SEND_DETAILS')}
+{translate('INDEX.CONFIRM_DETAILS')}
+{translate('INDEX.PROCESSING_DETAILS')}
+{translate('INDEX.KEY')} | +{translate('INDEX.INFO')} | +
---|
{translate('INDEX.IGUANA_FULL_MODE_SYNC_P1')}
+{translate('INDEX.IGUANA_FULL_MODE_SYNC_P2')}
+{translate('INDEX.IGUANA_FULL_MODE_SYNC_P3')}
+{translate('INDEX.IGUANA_FULL_MODE_SYNC_P1')}
+{translate('INDEX.IGUANA_FULL_MODE_SYNC_P2')}
+{translate('INDEX.IGUANA_FULL_MODE_SYNC_P3')}
+{translate('INDEX.ADDRESS')} | +{translate('INDEX.LIST_UNSPENT')} | +{translate('INDEX.LIST_TRANSACTIONS')} | +{translate('INDEX.GET_BALANCE')} | +{translate('INDEX.REFRESH')} | +
---|
{translate('INDEX.DIRECTION')} | +{translate('INDEX.CONFIRMATIONS')} | +{translate('INDEX.AMOUNT')} | +{translate('INDEX.TIME')} | +{translate('INDEX.DEST_ADDRESS')} | +{translate('INDEX.TX_DETAIL')} | +
---|---|---|---|---|---|
{translate('INDEX.DIRECTION')} | +{translate('INDEX.CONFIRMATIONS')} | +{translate('INDEX.AMOUNT')} | +{translate('INDEX.TIME')} | +{translate('INDEX.DEST_ADDRESS')} | +{translate('INDEX.TX_DETAIL')} | +
- {translate('INDEX.PLEASE_USE')} Google Chrome {translate('INDEX.OR')} Mozilla FireFox {translate('INDEX.TO_USE')} EasyDEX-GUI. {translate('INDEX.PLEASE_CLICK_ON')}. -
-+ {translate('INDEX.PLEASE_USE')} Google Chrome {translate('INDEX.OR')} Mozilla FireFox {translate('INDEX.TO_USE')} EasyDEX-GUI. {translate('INDEX.PLEASE_CLICK_ON')}. +
+ +