diff options
Diffstat (limited to 'ui/app/reducers')
-rw-r--r-- | ui/app/reducers/app.js | 10 | ||||
-rw-r--r-- | ui/app/reducers/metamask.js | 24 |
2 files changed, 33 insertions, 1 deletions
diff --git a/ui/app/reducers/app.js b/ui/app/reducers/app.js index f10bf9fb7..6fb7f8cca 100644 --- a/ui/app/reducers/app.js +++ b/ui/app/reducers/app.js @@ -557,6 +557,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 8bf003e64..7408f827a 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 @@ -11,6 +12,7 @@ function reduceMetamask (state, action) { isInitialized: false, isUnlocked: false, isAccountMenuOpen: false, + isMascara: window.platform instanceof MetamascaraPlatform, rpcTarget: 'https://rawtestrpc.metamask.io/', identities: {}, unapprovedTxs: {}, @@ -31,6 +33,7 @@ function reduceMetamask (state, action) { memo: '', errors: {}, }, + coinOptions: {}, }, state.metamask) switch (action.type) { @@ -150,7 +153,7 @@ function reduceMetamask (state, action) { }) case actions.UPDATE_TOKEN_EXCHANGE_RATE: - const { payload: { pair, marketinfo } } = action + const { payload: { pair, marketinfo } } = action return extend(metamaskState, { tokenExchangeRates: { ...metamaskState.tokenExchangeRates, @@ -250,6 +253,25 @@ function reduceMetamask (state, action) { }, }) + 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: ssMarketInfo, coinOptions } } = action + return extend(metamaskState, { + tokenExchangeRates: { + ...metamaskState.tokenExchangeRates, + [marketinfo.pair]: ssMarketInfo, + }, + coinOptions, + }) + default: return metamaskState |