diff options
author | Chi Kei Chan <chikeichan@gmail.com> | 2017-10-25 07:50:25 +0800 |
---|---|---|
committer | Chi Kei Chan <chikeichan@gmail.com> | 2017-10-25 07:50:25 +0800 |
commit | 7c2001102311d8e35f01d39ede9d5ac00e635006 (patch) | |
tree | 7ac6ad5567cb9731e8d19159ba339e4e5d73cb44 /ui/app/reducers | |
parent | ac3072e037ee97e87ff405d4562ce7e7c00dcd8a (diff) | |
parent | ae56b865e8a4d3a6a82a97efeca34b8a592c985b (diff) | |
download | tangerine-wallet-browser-7c2001102311d8e35f01d39ede9d5ac00e635006.tar tangerine-wallet-browser-7c2001102311d8e35f01d39ede9d5ac00e635006.tar.gz tangerine-wallet-browser-7c2001102311d8e35f01d39ede9d5ac00e635006.tar.bz2 tangerine-wallet-browser-7c2001102311d8e35f01d39ede9d5ac00e635006.tar.lz tangerine-wallet-browser-7c2001102311d8e35f01d39ede9d5ac00e635006.tar.xz tangerine-wallet-browser-7c2001102311d8e35f01d39ede9d5ac00e635006.tar.zst tangerine-wallet-browser-7c2001102311d8e35f01d39ede9d5ac00e635006.zip |
Merge branch 'master' into NewUI-flat
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 |