mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Render loading inside notice screen, and don't set isLoading from unMarkPasswordForgotten.
This commit is contained in:
parent
98d3fba3ef
commit
66f55f954e
@ -7,7 +7,6 @@ import NoticeScreen from './notice-screen'
|
|||||||
import BackupPhraseScreen from './backup-phrase-screen'
|
import BackupPhraseScreen from './backup-phrase-screen'
|
||||||
import ImportAccountScreen from './import-account-screen'
|
import ImportAccountScreen from './import-account-screen'
|
||||||
import ImportSeedPhraseScreen from './import-seed-phrase-screen'
|
import ImportSeedPhraseScreen from './import-seed-phrase-screen'
|
||||||
const Loading = require('../../../../ui/app/components/loading')
|
|
||||||
import {
|
import {
|
||||||
onboardingBuyEthView,
|
onboardingBuyEthView,
|
||||||
unMarkPasswordForgotten,
|
unMarkPasswordForgotten,
|
||||||
@ -85,15 +84,9 @@ class FirstTimeFlow extends Component {
|
|||||||
address,
|
address,
|
||||||
restoreCreatePasswordScreen,
|
restoreCreatePasswordScreen,
|
||||||
forgottenPassword,
|
forgottenPassword,
|
||||||
isLoading,
|
|
||||||
leaveImportSeedScreenState,
|
leaveImportSeedScreenState,
|
||||||
} = this.props
|
} = this.props
|
||||||
|
|
||||||
// Disable until testing bug resolved
|
|
||||||
// if (isLoading) {
|
|
||||||
// return (<Loading />)
|
|
||||||
// }
|
|
||||||
|
|
||||||
switch (this.state.screenType) {
|
switch (this.state.screenType) {
|
||||||
case SCREEN_TYPE.CREATE_PASSWORD:
|
case SCREEN_TYPE.CREATE_PASSWORD:
|
||||||
return (
|
return (
|
||||||
@ -164,9 +157,6 @@ export default connect(
|
|||||||
noActiveNotices,
|
noActiveNotices,
|
||||||
selectedAddress,
|
selectedAddress,
|
||||||
forgottenPassword,
|
forgottenPassword,
|
||||||
},
|
|
||||||
appState: {
|
|
||||||
isLoading,
|
|
||||||
}
|
}
|
||||||
}) => ({
|
}) => ({
|
||||||
isInitialized,
|
isInitialized,
|
||||||
@ -174,7 +164,6 @@ export default connect(
|
|||||||
noActiveNotices,
|
noActiveNotices,
|
||||||
address: selectedAddress,
|
address: selectedAddress,
|
||||||
forgottenPassword,
|
forgottenPassword,
|
||||||
isLoading,
|
|
||||||
}),
|
}),
|
||||||
dispatch => ({
|
dispatch => ({
|
||||||
leaveImportSeedScreenState: () => dispatch(unMarkPasswordForgotten()),
|
leaveImportSeedScreenState: () => dispatch(unMarkPasswordForgotten()),
|
||||||
|
@ -6,6 +6,7 @@ import debounce from 'lodash.debounce'
|
|||||||
import {markNoticeRead} from '../../../../ui/app/actions'
|
import {markNoticeRead} from '../../../../ui/app/actions'
|
||||||
import Identicon from '../../../../ui/app/components/identicon'
|
import Identicon from '../../../../ui/app/components/identicon'
|
||||||
import Breadcrumbs from './breadcrumbs'
|
import Breadcrumbs from './breadcrumbs'
|
||||||
|
import LoadingScreen from './loading-screen'
|
||||||
|
|
||||||
class NoticeScreen extends Component {
|
class NoticeScreen extends Component {
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
@ -55,11 +56,14 @@ class NoticeScreen extends Component {
|
|||||||
const {
|
const {
|
||||||
address,
|
address,
|
||||||
lastUnreadNotice: { title, body },
|
lastUnreadNotice: { title, body },
|
||||||
|
isLoading,
|
||||||
} = this.props
|
} = this.props
|
||||||
const { atBottom } = this.state
|
const { atBottom } = this.state
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
isLoading
|
||||||
|
? <LoadingScreen />
|
||||||
|
: <div
|
||||||
className="tou"
|
className="tou"
|
||||||
onScroll={this.onScroll}
|
onScroll={this.onScroll}
|
||||||
>
|
>
|
||||||
@ -84,7 +88,7 @@ class NoticeScreen extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export default connect(
|
export default connect(
|
||||||
({ metamask: { selectedAddress, lastUnreadNotice } }) => ({
|
({ metamask: { selectedAddress, lastUnreadNotice }, appState: { isLoading } }) => ({
|
||||||
lastUnreadNotice,
|
lastUnreadNotice,
|
||||||
address: selectedAddress,
|
address: selectedAddress,
|
||||||
}),
|
}),
|
||||||
|
@ -853,7 +853,6 @@ function markPasswordForgotten () {
|
|||||||
function unMarkPasswordForgotten () {
|
function unMarkPasswordForgotten () {
|
||||||
return (dispatch) => {
|
return (dispatch) => {
|
||||||
return background.unMarkPasswordForgotten(() => {
|
return background.unMarkPasswordForgotten(() => {
|
||||||
dispatch(actions.hideLoadingIndication())
|
|
||||||
dispatch(actions.forgotPassword())
|
dispatch(actions.forgotPassword())
|
||||||
forceUpdateMetamaskState(dispatch)
|
forceUpdateMetamaskState(dispatch)
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user