|
|
@ -49,10 +49,10 @@ export function addCoin(coin, mode, syncOnly, port) { |
|
|
|
}; |
|
|
|
|
|
|
|
return dispatch => { |
|
|
|
startIguanaInstance(modeToValue[mode] + '/sync', coin) |
|
|
|
startIguanaInstance(`${modeToValue[mode]}/sync`, coin) |
|
|
|
.then(function(json) { |
|
|
|
setTimeout(function() { |
|
|
|
console.log('started ' + coin + ' / ' + modeToValue[mode] + ' fork', json); |
|
|
|
console.log(`started ${coin} / ${modeToValue[mode]} fork`, json); |
|
|
|
dispatch(iguanaAddCoin(coin, mode, _acData, json.result)); |
|
|
|
}, 2000); |
|
|
|
}); |
|
|
@ -79,12 +79,12 @@ export function iguanaAddCoin(coin, mode, acData, port) { |
|
|
|
'timestamp': _timestamp, |
|
|
|
'function': 'iguanaAddCoin', |
|
|
|
'type': 'post', |
|
|
|
'url': 'http://127.0.0.1:' + (port ? port : Config.iguanaCorePort), |
|
|
|
'url': `http://127.0.0.1:${(port ? port : Config.iguanaCorePort)}`, |
|
|
|
'payload': acData, |
|
|
|
'status': 'pending', |
|
|
|
})); |
|
|
|
|
|
|
|
return fetch('http://127.0.0.1:' + (port ? port : Config.iguanaCorePort), { |
|
|
|
return fetch(`http://127.0.0.1:${(port ? port : Config.iguanaCorePort)}`, { |
|
|
|
method: 'POST', |
|
|
|
body: JSON.stringify(acData), |
|
|
|
}) |
|
|
@ -160,12 +160,12 @@ export function shepherdHerd(coin, mode, path) { |
|
|
|
if (checkCoinType(coin) === 'ac') { |
|
|
|
acData = startAssetChain(path.result, coin, mode); |
|
|
|
const supply = startAssetChain(path.result, coin, mode, true); |
|
|
|
herdData.ac_options.push('-ac_supply=' + supply); |
|
|
|
herdData.ac_options.push(`-ac_supply=${supply}`); |
|
|
|
} |
|
|
|
|
|
|
|
console.log('herdData', herdData); |
|
|
|
return dispatch => { |
|
|
|
return fetch('http://127.0.0.1:' + Config.agamaPort + '/shepherd/herd', { |
|
|
|
return fetch(`http://127.0.0.1:${Config.agamaPort}/shepherd/herd`, { |
|
|
|
method: 'POST', |
|
|
|
headers: { |
|
|
|
'Content-Type': 'application/json', |
|
|
@ -192,7 +192,7 @@ export function addCoinResult(coin, mode) { |
|
|
|
}; |
|
|
|
|
|
|
|
return dispatch => { |
|
|
|
dispatch(triggerToaster(true, coin + ' ' + translate('TOASTR.STARTED_IN') + ' ' + modeToValue[mode] + ' ' + 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()); |
|
|
|
} |
|
|
@ -200,7 +200,7 @@ export function addCoinResult(coin, mode) { |
|
|
|
|
|
|
|
export function _shepherdGetConfig(coin, mode) { |
|
|
|
return dispatch => { |
|
|
|
return fetch('http://127.0.0.1:' + Config.agamaPort + '/shepherd/getconf', { |
|
|
|
return fetch(`http://127.0.0.1:${Config.agamaPort}/shepherd/getconf`, { |
|
|
|
method: 'POST', |
|
|
|
headers: { |
|
|
|
'Content-Type': 'application/json', |
|
|
|