Browse Source

update

all-modes
Petr Balashov 8 years ago
parent
commit
adab3bd700
  1. 69
      react/src/actions/actionCreators.js

69
react/src/actions/actionCreators.js

@ -2408,36 +2408,53 @@ export function edexGetTransaction(data) {
}); });
} }
function EDEXgettransaction(coin,txid) { /*export function saveAppConfig() {
return new Promise((resolve) => { const payload = {
var tmpIguanaRPCAuth = 'tmpIgRPCUser@' + sessionStorage.getItem('IguanaRPCAuth'), 'herdname': target,
ajax_data = { 'lastLines': linesCount
'userpass': tmpIguanaRPCAuth, };
'symbol': coin,
'agent': 'dex',
'method': 'gettransaction',
'vout': 1,
'txid': txid
};
$.ajax({ return dispatch => {
type: 'POST', return fetch('http://127.0.0.1:' + Config.agamaPort + '/shepherd/debuglog', {
data: JSON.stringify(ajax_data), method: 'POST',
url: 'http://127.0.0.1:' + config.iguanaPort headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify(payload),
}) })
.then(function(data) { .catch(function(error) {
res_data = JSON.parse(data); console.log(error);
resolve(res_data); dispatch(triggerToaster(true, 'getDebugLog', 'Error', 'error'));
}) })
.fail(function(xhr, textStatus, error) { .then(response => response.json())
// handle request failures .then(json => dispatch(getDebugLogState(json)))
console.log(xhr.statusText); }
if ( xhr.readyState == 0 ) { }*/
}
console.log(textStatus); function getAppConfigState(json) {
return {
type: DASHBOARD_CONNECT_NOTARIES,
total: json.length - 1,
current: 0,
name: json[0],
}
}
export function getAppConfig() {
return dispatch => {
return fetch('http://127.0.0.1:' + Config.agamaPort + '/shepherd/appconf', {
method: 'GET',
headers: {
'Content-Type': 'application/json',
},
})
.catch(function(error) {
console.log(error); console.log(error);
}); dispatch(triggerToaster(true, 'getAppConfig', 'Error', 'error'));
}); })
.then(response => response.json())
.then(json => dispatch(getAppConfigState(json)))
}
} }
/*function Shepherd_SendPendValue() { /*function Shepherd_SendPendValue() {

Loading…
Cancel
Save