Remove unused current view related things (#7843)
* Remove unused functions from `mapDispatchToProps` The actions import was also updated to import only the two actions used, rather than all actions. * Remove unused container component Well, technically it was the props injected by this container that were unused. The container served no purpose, so the component it surrounded is now used directly instead. * Remove both unused `getCurrentViewContext` selectors * Remove unused SHOW_CONFIG_PAGE action * Remove checks for `currentView` with name `config` Now that the SHOW_CONFIG_PAGE action has been removed, it's no longer possible for `currentView.name` to be set to that value. * Remove unused `wallet-view` container props * Delete unused SHOW_SEND_PAGE and SHOW_ADD_TOKEN_PAGE actions * Remove unused `account-menu.container` props * Remove unused SHOW_INFO_PAGE action * Remove unused SET_NEW_ACCOUNT_FORM actionfeature/default_network_editable
parent
4257858fb5
commit
8225bbe126
@ -1,19 +0,0 @@ |
|||||||
import assert from 'assert' |
|
||||||
import freeze from 'deep-freeze-strict' |
|
||||||
import * as actions from '../../../ui/app/store/actions' |
|
||||||
import reducers from '../../../ui/app/ducks' |
|
||||||
|
|
||||||
describe('SHOW_INFO_PAGE', function () { |
|
||||||
it('sets the state.appState.currentView.name property to info', function () { |
|
||||||
const initialState = { |
|
||||||
appState: { |
|
||||||
activeAddress: 'foo', |
|
||||||
}, |
|
||||||
} |
|
||||||
freeze(initialState) |
|
||||||
|
|
||||||
const action = actions.showInfoPage() |
|
||||||
const resultingState = reducers(initialState, action) |
|
||||||
assert.equal(resultingState.appState.currentView.name, 'info') |
|
||||||
}) |
|
||||||
}) |
|
@ -1,20 +0,0 @@ |
|||||||
import { connect } from 'react-redux' |
|
||||||
import * as actions from '../../store/actions' |
|
||||||
import { getCurrentViewContext } from '../../selectors/selectors' |
|
||||||
import CreateAccountPage from './create-account.component' |
|
||||||
|
|
||||||
const mapStateToProps = state => ({ |
|
||||||
displayedForm: getCurrentViewContext(state), |
|
||||||
}) |
|
||||||
|
|
||||||
const mapDispatchToProps = dispatch => ({ |
|
||||||
displayForm: form => dispatch(actions.setNewAccountForm(form)), |
|
||||||
showQrView: (selected, identity) => dispatch(actions.showQrView(selected, identity)), |
|
||||||
showExportPrivateKeyModal: () => { |
|
||||||
dispatch(actions.showModal({ name: 'EXPORT_PRIVATE_KEY' })) |
|
||||||
}, |
|
||||||
hideModal: () => dispatch(actions.hideModal()), |
|
||||||
setAccountLabel: (address, label) => dispatch(actions.setAccountLabel(address, label)), |
|
||||||
}) |
|
||||||
|
|
||||||
export default connect(mapStateToProps, mapDispatchToProps)(CreateAccountPage) |
|
@ -1 +1 @@ |
|||||||
export { default } from './create-account.container' |
export { default } from './create-account.component' |
||||||
|
Loading…
Reference in new issue