aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorJacky Chan <jchan@uber.com>2017-08-30 16:30:55 +0800
committerChi Kei Chan <chikeichan@gmail.com>2017-10-21 12:51:37 +0800
commit85e485128ff3ca4e458bd5d99d15dc295de70f43 (patch)
tree05cec7065bc7c6102dbc5265528629b6cd3e54be /ui
parent4ecd28ca9b50aab4363339405d90a2bcc511bf26 (diff)
downloadtangerine-wallet-browser-85e485128ff3ca4e458bd5d99d15dc295de70f43.tar
tangerine-wallet-browser-85e485128ff3ca4e458bd5d99d15dc295de70f43.tar.gz
tangerine-wallet-browser-85e485128ff3ca4e458bd5d99d15dc295de70f43.tar.bz2
tangerine-wallet-browser-85e485128ff3ca4e458bd5d99d15dc295de70f43.tar.lz
tangerine-wallet-browser-85e485128ff3ca4e458bd5d99d15dc295de70f43.tar.xz
tangerine-wallet-browser-85e485128ff3ca4e458bd5d99d15dc295de70f43.tar.zst
tangerine-wallet-browser-85e485128ff3ca4e458bd5d99d15dc295de70f43.zip
Add Go to Coinbase; Show Buy Ether after signup
Diffstat (limited to 'ui')
-rw-r--r--ui/app/actions.js2
-rw-r--r--ui/app/app.js17
-rw-r--r--ui/app/keychains/hd/create-vault-complete.js9
3 files changed, 21 insertions, 7 deletions
diff --git a/ui/app/actions.js b/ui/app/actions.js
index 04bba6bf2..a9f3185dd 100644
--- a/ui/app/actions.js
+++ b/ui/app/actions.js
@@ -224,7 +224,7 @@ function confirmSeedWords () {
}
log.info('Seed word cache cleared. ' + account)
- dispatch(actions.showAccountDetail(account))
+ dispatch(actions.showAccountsPage())
resolve(account)
})
})
diff --git a/ui/app/app.js b/ui/app/app.js
index ec36eb22e..362d9cf27 100644
--- a/ui/app/app.js
+++ b/ui/app/app.js
@@ -5,6 +5,7 @@ const h = require('react-hyperscript')
const actions = require('./actions')
// mascara
const MascaraFirstTime = require('../../mascara/src/app/first-time').default
+const MascaraBuyEtherScreen = require('../../mascara/src/app/first-time/buy-ether-screen').default
// init
const InitializeMenuScreen = require('./first-time/init-menu')
const NewKeyChainScreen = require('./new-keychain')
@@ -130,10 +131,16 @@ App.prototype.renderAppBar = function () {
const isNetworkMenuOpen = state.isNetworkMenuOpen || false
const {isMascara, isOnboarding} = props
+ // Do not render header if user is in mascara onboarding
if (isMascara && isOnboarding) {
return null
}
+ // Do not render header if user is in mascara buy ether
+ if (isMascara && props.currentView.name === 'buyEth') {
+ return null
+ }
+
return (
h('.full-width', {
@@ -433,9 +440,9 @@ App.prototype.renderPrimary = function () {
var props = this.props
const {isMascara, isOnboarding} = props
- if (isMascara && isOnboarding) {
- return h(MascaraFirstTime)
- }
+ // if (isMascara && isOnboarding) {
+ // return h(MascaraFirstTime)
+ // }
// notices
if (!props.noActiveNotices) {
@@ -534,7 +541,9 @@ App.prototype.renderPrimary = function () {
case 'buyEth':
log.debug('rendering buy ether screen')
- return h(BuyView, {key: 'buyEthView'})
+ return isMascara
+ ? h(MascaraBuyEtherScreen, {key: 'buyEthView'})
+ : h(BuyView, {key: 'buyEthView'})
case 'qr':
log.debug('rendering show qr screen')
diff --git a/ui/app/keychains/hd/create-vault-complete.js b/ui/app/keychains/hd/create-vault-complete.js
index 745990351..5ab5d4c33 100644
--- a/ui/app/keychains/hd/create-vault-complete.js
+++ b/ui/app/keychains/hd/create-vault-complete.js
@@ -62,7 +62,8 @@ CreateVaultCompleteScreen.prototype.render = function () {
}),
h('button.primary', {
- onClick: () => this.confirmSeedWords(),
+ onClick: () => this.confirmSeedWords()
+ .then(account => this.showAccountDetail(account)),
style: {
margin: '24px',
fontSize: '0.9em',
@@ -82,5 +83,9 @@ CreateVaultCompleteScreen.prototype.render = function () {
}
CreateVaultCompleteScreen.prototype.confirmSeedWords = function () {
- this.props.dispatch(actions.confirmSeedWords())
+ return this.props.dispatch(actions.confirmSeedWords())
+}
+
+CreateVaultCompleteScreen.prototype.showAccountDetail = function (account) {
+ return this.props.dispatch(actions.showAccountDetail(account))
}