diff options
author | Thomas Huang <tmashuang@users.noreply.github.com> | 2017-10-25 02:22:31 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-25 02:22:31 +0800 |
commit | ae56b865e8a4d3a6a82a97efeca34b8a592c985b (patch) | |
tree | b2d91f3094a096bee2e74c4306f5d71f1415f2a6 /ui/app/reducers | |
parent | 61eea51310508714d753965e3055f533434001e7 (diff) | |
parent | 099078d13b7f8c3c9c4ca1e4d9e775f480b0ad8d (diff) | |
download | tangerine-wallet-browser-ae56b865e8a4d3a6a82a97efeca34b8a592c985b.tar tangerine-wallet-browser-ae56b865e8a4d3a6a82a97efeca34b8a592c985b.tar.gz tangerine-wallet-browser-ae56b865e8a4d3a6a82a97efeca34b8a592c985b.tar.bz2 tangerine-wallet-browser-ae56b865e8a4d3a6a82a97efeca34b8a592c985b.tar.lz tangerine-wallet-browser-ae56b865e8a4d3a6a82a97efeca34b8a592c985b.tar.xz tangerine-wallet-browser-ae56b865e8a4d3a6a82a97efeca34b8a592c985b.tar.zst tangerine-wallet-browser-ae56b865e8a4d3a6a82a97efeca34b8a592c985b.zip |
Merge pull request #1990 from chikeichan/firsttimeflow
Implement Mascara First Time Flow
Diffstat (limited to 'ui/app/reducers')
-rw-r--r-- | ui/app/reducers/app.js | 10 | ||||
-rw-r--r-- | ui/app/reducers/metamask.js | 23 |
2 files changed, 33 insertions, 0 deletions
diff --git a/ui/app/reducers/app.js b/ui/app/reducers/app.js index 349c25b96..6f08c6dc4 100644 --- a/ui/app/reducers/app.js +++ b/ui/app/reducers/app.js @@ -494,6 +494,16 @@ 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: { diff --git a/ui/app/reducers/metamask.js b/ui/app/reducers/metamask.js index e0c416c2d..85ac3e201 100644 --- a/ui/app/reducers/metamask.js +++ b/ui/app/reducers/metamask.js @@ -1,5 +1,6 @@ const extend = require('xtend') const actions = require('../actions') +const MetamascaraPlatform = require('../../../app/scripts/platforms/window') module.exports = reduceMetamask @@ -10,6 +11,7 @@ function reduceMetamask (state, action) { var metamaskState = extend({ isInitialized: false, isUnlocked: false, + isMascara: window.platform instanceof MetamascaraPlatform, rpcTarget: 'https://rawtestrpc.metamask.io/', identities: {}, unapprovedTxs: {}, @@ -17,6 +19,8 @@ function reduceMetamask (state, action) { lastUnreadNotice: undefined, frequentRpcList: [], addressBook: [], + tokenExchangeRates: {}, + coinOptions: {}, }, state.metamask) switch (action.type) { @@ -130,6 +134,25 @@ function reduceMetamask (state, action) { conversionDate: action.value.conversionDate, }) + case actions.PAIR_UPDATE: + const { value: { marketinfo: pairMarketInfo } } = action + return extend(metamaskState, { + tokenExchangeRates: { + ...metamaskState.tokenExchangeRates, + [pairMarketInfo.pair]: pairMarketInfo, + }, + }) + + case actions.SHAPESHIFT_SUBVIEW: + const { value: { marketinfo, coinOptions } } = action + return extend(metamaskState, { + tokenExchangeRates: { + ...metamaskState.tokenExchangeRates, + [marketinfo.pair]: marketinfo, + }, + coinOptions, + }) + default: return metamaskState |