diff --git a/react/src/actions/actionCreators.js b/react/src/actions/actionCreators.js
index af58301..e721fdb 100644
--- a/react/src/actions/actionCreators.js
+++ b/react/src/actions/actionCreators.js
@@ -53,6 +53,7 @@ export const LOAD_APP_CONFIG = 'LOAD_APP_CONFIG';
export const SAVE_APP_CONFIG = 'SAVE_APP_CONFIG';
export const SERVICE_ERROR = 'SERVICE_ERROR';
export const DASHBOARD_ACTIVE_ADDRESS = 'DASHBOARD_ACTIVE_ADDRESS';
+export const LOAD_APP_INFO = 'LOAD_APP_INFO';
var iguanaForks = {}; // forks in mem array
@@ -2493,28 +2494,23 @@ export function edexGetTransaction(data) {
});
}
-/*export function saveAppConfig() {
- const payload = {
- 'herdname': target,
- 'lastLines': linesCount
- };
-
+export function saveAppConfig(_payload) {
return dispatch => {
- return fetch('http://127.0.0.1:' + Config.agamaPort + '/shepherd/debuglog', {
+ return fetch('http://127.0.0.1:' + Config.agamaPort + '/shepherd/appconf', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
- body: JSON.stringify(payload),
+ body: JSON.stringify(_payload),
})
.catch(function(error) {
console.log(error);
- dispatch(triggerToaster(true, 'getDebugLog', 'Error', 'error'));
+ dispatch(triggerToaster(true, 'saveAppConfig', 'Error', 'error'));
})
.then(response => response.json())
- .then(json => dispatch(getDebugLogState(json)))
+ .then(json => dispatch(getAppConfigState(json)))
}
-}*/
+}
function getAppConfigState(json) {
return {
@@ -2622,16 +2618,26 @@ export function shepherdPostCoinList(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
+function getAppInfoState(json) {
+ return {
+ type: LOAD_APP_INFO,
+ info: json,
+ }
+}
+
+export function getAppInfo() {
+ return dispatch => {
+ return fetch('http://127.0.0.1:' + Config.agamaPort + '/shepherd/appinfo', {
+ method: 'GET',
+ headers: {
+ 'Content-Type': 'application/json',
+ },
+ })
+ .catch(function(error) {
+ console.log(error);
+ dispatch(triggerToaster(true, 'getAppInfo', 'Error', 'error'));
+ })
+ .then(response => response.json())
+ .then(json => dispatch(getAppInfoState(json)))
+ }
+}
\ No newline at end of file
diff --git a/react/src/components/dashboard/navbar.js b/react/src/components/dashboard/navbar.js
index d817180..42e7dea 100644
--- a/react/src/components/dashboard/navbar.js
+++ b/react/src/components/dashboard/navbar.js
@@ -76,7 +76,7 @@ class Navbar extends React.Component {
EasyDEX
-
+
this.dashboardChangeSection('jumblr')}>
Jumblr
diff --git a/react/src/components/dashboard/sendCoin.js b/react/src/components/dashboard/sendCoin.js
index 7cbbbc0..d4c5e22 100644
--- a/react/src/components/dashboard/sendCoin.js
+++ b/react/src/components/dashboard/sendCoin.js
@@ -288,6 +288,7 @@ class SendCoin extends React.Component {
const utxoSet = (refreshData && refreshData.data) || (listunspentData && listunspentData.data);
const _pubkey = this.props.Dashboard.activeHandle.pubkey;
const forceUpdateCache = this._fetchNewUTXOData;
+ const _sendFrom = this.state.sendFrom;
const sendData = {
'coin': this.props.ActiveCoin.coin,
'sendfrom': this.state.sendFrom,
@@ -356,7 +357,7 @@ class SendCoin extends React.Component {
getCacheFile(_pubkey)
.then(function(result) {
console.log('got cache file', result);
- let saveThisData = edexRemoveTXID(result.result, txidListToRemove);
+ let saveThisData = edexRemoveTXID(result.result, _sendFrom, txidListToRemove);
console.log('saveThisData', saveThisData);
resolve(saveThisData);
});
diff --git a/react/src/components/dashboard/settings.js b/react/src/components/dashboard/settings.js
index 5ff81a1..0c9c7fb 100644
--- a/react/src/components/dashboard/settings.js
+++ b/react/src/components/dashboard/settings.js
@@ -8,7 +8,9 @@ import {
getDebugLog,
getPeersList,
addPeerNode,
- getAppConfig
+ getAppConfig,
+ saveAppConfig,
+ getAppInfo
} from '../../actions/actionCreators';
import Store from '../../store';
import AddCoinOptionsCrypto from '../addcoin/addcoinOptionsCrypto';
@@ -30,6 +32,7 @@ class Settings extends React.Component {
debugLinesCount: 10,
debugTarget: 'iguana',
activeTabHeight: '10px',
+ appSettings: [],
};
this.exportWifKeys = this.exportWifKeys.bind(this);
this.updateInput = this.updateInput.bind(this);
@@ -44,12 +47,16 @@ class Settings extends React.Component {
componentDidMount() {
Store.dispatch(iguanaActiveHandle());
Store.dispatch(getAppConfig());
+ Store.dispatch(getAppInfo());
+ }
+
+ _saveAppConfig() {
+ Store.dispatch(saveAppConfig);
}
openTab(elemId, tab) {
- console.log(elemId);
const _height = document.querySelector('#' + elemId + ' .panel-collapse .panel-body').clientHeight;
- console.log(_height);
+
this.setState(Object.assign({}, this.state, {
activeTab: tab,
activeTabHeight: _height,
@@ -112,6 +119,51 @@ class Settings extends React.Component {
}
}
+ renderConfigEditForm() {
+ console.log(this.props.Settings.appSettings);
+ let items = [];
+ const _appConfig = this.props.Settings.appSettings;
+
+ for (let key in this.props.Settings.appSettings) {
+ if (Object.keys(this.props.Settings.appSettings[key]).length && key !== 'host') {
+ items.push(
+
+
+ {key}
+ |
+ |
+
+ );
+
+ for (let _key in this.props.Settings.appSettings[key]) {
+ items.push(
+
+
+ {_key}
+ |
+
+
+ |
+
+ );
+ }
+ } else {
+ items.push(
+
+
+ {key}
+ |
+
+
+ |
+
+ );
+ }
+ }
+
+ return items;
+ }
+
updateInput(e) {
this.setState({
[e.target.name]: e.target.value,
@@ -393,13 +445,45 @@ class Settings extends React.Component {
-
Manage app settings
+
Manage app config
+
+ Most changes to app config require wallet restart!
+
+
+
+
+
+
+
+
+
+
+
+
{translate('INDEX.DEBUG_LOG_DESC')}