2017-12-21 22:08:54 +01:00
|
|
|
import { connect } from 'react-redux';
|
2018-10-29 18:23:53 +01:00
|
|
|
import { selectDaemonVersionMatched, selectModal } from 'redux/selectors/app';
|
2019-01-10 02:38:26 +01:00
|
|
|
import { doCheckDaemonVersion, doNotifyUnlockWallet, doHideModal } from 'redux/actions/app';
|
2019-08-08 22:30:03 +02:00
|
|
|
import { doSetClientSetting } from 'redux/actions/settings';
|
|
|
|
import * as settings from 'constants/settings';
|
2017-12-21 22:08:54 +01:00
|
|
|
import SplashScreen from './view';
|
2017-07-19 23:05:08 +02:00
|
|
|
|
2019-08-08 22:30:03 +02:00
|
|
|
import { makeSelectClientSetting } from 'redux/selectors/settings';
|
|
|
|
|
2017-12-13 22:36:30 +01:00
|
|
|
const select = state => ({
|
2018-10-29 18:23:53 +01:00
|
|
|
modal: selectModal(state),
|
2017-12-13 22:36:30 +01:00
|
|
|
daemonVersionMatched: selectDaemonVersionMatched(state),
|
2019-08-08 22:30:03 +02:00
|
|
|
animationHidden: makeSelectClientSetting(settings.HIDE_SPLASH_ANIMATION)(state),
|
2017-12-13 22:36:30 +01:00
|
|
|
});
|
2017-07-19 23:05:08 +02:00
|
|
|
|
|
|
|
const perform = dispatch => ({
|
|
|
|
checkDaemonVersion: () => dispatch(doCheckDaemonVersion()),
|
2018-07-18 21:48:30 +02:00
|
|
|
notifyUnlockWallet: () => dispatch(doNotifyUnlockWallet()),
|
2019-01-10 02:38:26 +01:00
|
|
|
hideModal: () => dispatch(doHideModal()),
|
2019-08-08 22:30:03 +02:00
|
|
|
setClientSetting: (key, value) => dispatch(doSetClientSetting(key, value)),
|
2017-07-19 23:05:08 +02:00
|
|
|
});
|
|
|
|
|
2018-07-18 21:48:30 +02:00
|
|
|
export default connect(
|
|
|
|
select,
|
|
|
|
perform
|
|
|
|
)(SplashScreen);
|