diff options
Diffstat (limited to 'ui')
-rw-r--r-- | ui/app/actions.js | 9 | ||||
-rw-r--r-- | ui/app/app.js | 15 | ||||
-rw-r--r-- | ui/app/reducers/app.js | 11 |
3 files changed, 28 insertions, 7 deletions
diff --git a/ui/app/actions.js b/ui/app/actions.js index a9f3185dd..eb066a0e7 100644 --- a/ui/app/actions.js +++ b/ui/app/actions.js @@ -133,6 +133,8 @@ var actions = { showLoadingIndication: showLoadingIndication, hideLoadingIndication: hideLoadingIndication, // buy Eth with coinbase + onboardingBuyEthView, + ONBOARDING_BUY_ETH_VIEW: 'ONBOARDING_BUY_ETH_VIEW', BUY_ETH: 'BUY_ETH', buyEth: buyEth, buyEthView: buyEthView, @@ -903,6 +905,13 @@ function buyEth (opts) { } } +function onboardingBuyEthView (address) { + return { + type: actions.ONBOARDING_BUY_ETH_VIEW, + value: address, + } +} + function buyEthView (address) { return { type: actions.BUY_ETH_VIEW, diff --git a/ui/app/app.js b/ui/app/app.js index 36241b942..bd0ccb0a2 100644 --- a/ui/app/app.js +++ b/ui/app/app.js @@ -46,10 +46,9 @@ function mapStateToProps (state) { accounts, address, keyrings, - isMascara, isInitialized, noActiveNotices, - seedWords + seedWords, } = state.metamask const selected = address || Object.keys(accounts)[0] @@ -405,8 +404,8 @@ App.prototype.renderDropdown = function () { ]) } -App.prototype.renderLoadingIndicator = function({ isLoading, isLoadingNetwork, loadMessage }) { - const { isMascara } = this.props; +App.prototype.renderLoadingIndicator = function ({ isLoading, isLoadingNetwork, loadMessage }) { + const { isMascara } = this.props return isMascara ? null @@ -541,9 +540,11 @@ App.prototype.renderPrimary = function () { case 'buyEth': log.debug('rendering buy ether screen') - return isMascara - ? h(MascaraBuyEtherScreen, {key: 'buyEthView'}) - : h(BuyView, {key: 'buyEthView'}) + return h(BuyView, {key: 'buyEthView'}) + + case 'onboardingBuyEth': + log.debug('rendering onboarding buy ether screen') + return h(MascaraBuyEtherScreen, {key: 'buyEthView'}) case 'qr': log.debug('rendering show qr screen') diff --git a/ui/app/reducers/app.js b/ui/app/reducers/app.js index 349c25b96..4b05b608d 100644 --- a/ui/app/reducers/app.js +++ b/ui/app/reducers/app.js @@ -494,6 +494,17 @@ function reduceApp (state, action) { }, }) + + case actions.ONBOARDING_BUY_ETH_VIEW: + return extend(appState, { + transForward: true, + currentView: { + name: 'onboardingBuyEth', + context: appState.currentView.name, + }, + identity: state.metamask.identities[action.value], + }) + case actions.COINBASE_SUBVIEW: return extend(appState, { buyView: { |