2022-02-08 23:16:22 +01:00
|
|
|
import { connect } from 'react-redux';
|
|
|
|
import { doSetDaemonSetting, doGetDaemonStatus, doCleanBlobs } from 'redux/actions/settings';
|
2022-06-02 21:24:11 +02:00
|
|
|
import { selectDaemonStatus, selectDaemonSettings, selectSettingDaemonSettings } from 'redux/selectors/settings';
|
2022-02-08 23:16:22 +01:00
|
|
|
import SettingWalletServer from './view';
|
2022-02-25 21:01:14 +01:00
|
|
|
import { selectDiskSpace } from 'redux/selectors/app';
|
2022-02-08 23:16:22 +01:00
|
|
|
|
|
|
|
const select = (state) => ({
|
|
|
|
daemonSettings: selectDaemonSettings(state),
|
|
|
|
daemonStatus: selectDaemonStatus(state),
|
2022-02-25 21:01:14 +01:00
|
|
|
diskSpace: selectDiskSpace(state),
|
2022-06-02 21:24:11 +02:00
|
|
|
isSetting: selectSettingDaemonSettings(state),
|
2022-02-08 23:16:22 +01:00
|
|
|
});
|
|
|
|
|
|
|
|
const perform = (dispatch) => ({
|
|
|
|
getDaemonStatus: () => dispatch(doGetDaemonStatus()),
|
|
|
|
setDaemonSetting: (key, value) => dispatch(doSetDaemonSetting(key, value)),
|
2022-06-03 22:09:34 +02:00
|
|
|
cleanBlobs: () => dispatch(doCleanBlobs(false)),
|
2022-02-08 23:16:22 +01:00
|
|
|
});
|
|
|
|
|
|
|
|
export default connect(select, perform)(SettingWalletServer);
|