aboutsummaryrefslogtreecommitdiffstats
path: root/mascara
diff options
context:
space:
mode:
authorDan <danjm.com@gmail.com>2018-02-21 08:21:45 +0800
committerDan <danjm.com@gmail.com>2018-02-21 08:22:41 +0800
commit66f55f954e9f3868396e478fd79c4bbd8f8673e5 (patch)
treee9971a0a83702cba2090f0c38ff3055f56604d3c /mascara
parent98d3fba3efaedb65ee0cf60b4cc3f954a1fd9740 (diff)
downloadtangerine-wallet-browser-66f55f954e9f3868396e478fd79c4bbd8f8673e5.tar
tangerine-wallet-browser-66f55f954e9f3868396e478fd79c4bbd8f8673e5.tar.gz
tangerine-wallet-browser-66f55f954e9f3868396e478fd79c4bbd8f8673e5.tar.bz2
tangerine-wallet-browser-66f55f954e9f3868396e478fd79c4bbd8f8673e5.tar.lz
tangerine-wallet-browser-66f55f954e9f3868396e478fd79c4bbd8f8673e5.tar.xz
tangerine-wallet-browser-66f55f954e9f3868396e478fd79c4bbd8f8673e5.tar.zst
tangerine-wallet-browser-66f55f954e9f3868396e478fd79c4bbd8f8673e5.zip
Render loading inside notice screen, and don't set isLoading from unMarkPasswordForgotten.
Diffstat (limited to 'mascara')
-rw-r--r--mascara/src/app/first-time/index.js11
-rw-r--r--mascara/src/app/first-time/notice-screen.js44
2 files changed, 24 insertions, 31 deletions
diff --git a/mascara/src/app/first-time/index.js b/mascara/src/app/first-time/index.js
index 46b821c8b..da2f6bab9 100644
--- a/mascara/src/app/first-time/index.js
+++ b/mascara/src/app/first-time/index.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()),
diff --git a/mascara/src/app/first-time/notice-screen.js b/mascara/src/app/first-time/notice-screen.js
index e691a2f47..0f0a7e95d 100644
--- a/mascara/src/app/first-time/notice-screen.js
+++ b/mascara/src/app/first-time/notice-screen.js
@@ -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,36 +56,39 @@ class NoticeScreen extends Component {
const {
address,
lastUnreadNotice: { title, body },
+ isLoading,
} = this.props
const { atBottom } = this.state
return (
- <div
- className="tou"
- onScroll={this.onScroll}
- >
- <Identicon address={address} diameter={70} />
- <div className="tou__title">{title}</div>
- <Markdown
- className="tou__body markdown"
- source={body}
- skipHtml
- />
- <button
- className="first-time-flow__button"
- onClick={atBottom && this.acceptTerms}
- disabled={!atBottom}
+ isLoading
+ ? <LoadingScreen />
+ : <div
+ className="tou"
+ onScroll={this.onScroll}
>
- Accept
- </button>
- <Breadcrumbs total={3} currentIndex={2} />
- </div>
+ <Identicon address={address} diameter={70} />
+ <div className="tou__title">{title}</div>
+ <Markdown
+ className="tou__body markdown"
+ source={body}
+ skipHtml
+ />
+ <button
+ className="first-time-flow__button"
+ onClick={atBottom && this.acceptTerms}
+ disabled={!atBottom}
+ >
+ Accept
+ </button>
+ <Breadcrumbs total={3} currentIndex={2} />
+ </div>
)
}
}
export default connect(
- ({ metamask: { selectedAddress, lastUnreadNotice } }) => ({
+ ({ metamask: { selectedAddress, lastUnreadNotice }, appState: { isLoading } }) => ({
lastUnreadNotice,
address: selectedAddress,
}),