Render loading inside notice screen, and don't set isLoading from unMarkPasswordForgotten.

feature/default_network_editable
Dan 7 years ago
parent 98d3fba3ef
commit 66f55f954e
  1. 11
      mascara/src/app/first-time/index.js
  2. 8
      mascara/src/app/first-time/notice-screen.js
  3. 1
      ui/app/actions.js

@ -7,7 +7,6 @@ import NoticeScreen from './notice-screen'
import BackupPhraseScreen from './backup-phrase-screen'
import ImportAccountScreen from './import-account-screen'
import ImportSeedPhraseScreen from './import-seed-phrase-screen'
const Loading = require('../../../../ui/app/components/loading')
import {
onboardingBuyEthView,
unMarkPasswordForgotten,
@ -85,15 +84,9 @@ class FirstTimeFlow extends Component {
address,
restoreCreatePasswordScreen,
forgottenPassword,
isLoading,
leaveImportSeedScreenState,
} = this.props
// Disable until testing bug resolved
// if (isLoading) {
// return (<Loading />)
// }
switch (this.state.screenType) {
case SCREEN_TYPE.CREATE_PASSWORD:
return (
@ -164,9 +157,6 @@ export default connect(
noActiveNotices,
selectedAddress,
forgottenPassword,
},
appState: {
isLoading,
}
}) => ({
isInitialized,
@ -174,7 +164,6 @@ export default connect(
noActiveNotices,
address: selectedAddress,
forgottenPassword,
isLoading,
}),
dispatch => ({
leaveImportSeedScreenState: () => dispatch(unMarkPasswordForgotten()),

@ -6,6 +6,7 @@ import debounce from 'lodash.debounce'
import {markNoticeRead} from '../../../../ui/app/actions'
import Identicon from '../../../../ui/app/components/identicon'
import Breadcrumbs from './breadcrumbs'
import LoadingScreen from './loading-screen'
class NoticeScreen extends Component {
static propTypes = {
@ -55,11 +56,14 @@ class NoticeScreen extends Component {
const {
address,
lastUnreadNotice: { title, body },
isLoading,
} = this.props
const { atBottom } = this.state
return (
<div
isLoading
? <LoadingScreen />
: <div
className="tou"
onScroll={this.onScroll}
>
@ -84,7 +88,7 @@ class NoticeScreen extends Component {
}
export default connect(
({ metamask: { selectedAddress, lastUnreadNotice } }) => ({
({ metamask: { selectedAddress, lastUnreadNotice }, appState: { isLoading } }) => ({
lastUnreadNotice,
address: selectedAddress,
}),

@ -853,7 +853,6 @@ function markPasswordForgotten () {
function unMarkPasswordForgotten () {
return (dispatch) => {
return background.unMarkPasswordForgotten(() => {
dispatch(actions.hideLoadingIndication())
dispatch(actions.forgotPassword())
forceUpdateMetamaskState(dispatch)
})

Loading…
Cancel
Save