From 0264ecaad77330b151f4bf4248b66f4659a67cce Mon Sep 17 00:00:00 2001 From: Jacky Chan Date: Fri, 18 Aug 2017 04:11:26 -0700 Subject: Adding CreatePasswordScreen --- ui/app/reducers/metamask.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'ui/app/reducers') diff --git a/ui/app/reducers/metamask.js b/ui/app/reducers/metamask.js index e0c416c2d..323539eef 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: {}, -- cgit v1.2.3 From c6a3d00d80e1fa6ca1426246d9a3e03b7ad4ecbb Mon Sep 17 00:00:00 2001 From: Chi Kei Chan Date: Mon, 18 Sep 2017 15:41:25 -0700 Subject: Fix merge conflict; separate onboarding buy screen --- ui/app/reducers/app.js | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'ui/app/reducers') 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: { -- cgit v1.2.3 From 5cbbb476b3eb7a5fd70b014b2a1a83fea7092b58 Mon Sep 17 00:00:00 2001 From: Chi Kei Chan Date: Mon, 25 Sep 2017 14:51:49 -0700 Subject: ShapeShift Integration --- ui/app/reducers/app.js | 1 - ui/app/reducers/metamask.js | 21 +++++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) (limited to 'ui/app/reducers') diff --git a/ui/app/reducers/app.js b/ui/app/reducers/app.js index 4b05b608d..6f08c6dc4 100644 --- a/ui/app/reducers/app.js +++ b/ui/app/reducers/app.js @@ -494,7 +494,6 @@ function reduceApp (state, action) { }, }) - case actions.ONBOARDING_BUY_ETH_VIEW: return extend(appState, { transForward: true, diff --git a/ui/app/reducers/metamask.js b/ui/app/reducers/metamask.js index 323539eef..85ac3e201 100644 --- a/ui/app/reducers/metamask.js +++ b/ui/app/reducers/metamask.js @@ -19,6 +19,8 @@ function reduceMetamask (state, action) { lastUnreadNotice: undefined, frequentRpcList: [], addressBook: [], + tokenExchangeRates: {}, + coinOptions: {}, }, state.metamask) switch (action.type) { @@ -132,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 -- cgit v1.2.3