From abfc5632efcc72b3ad45ec1df8bf5889f75a8472 Mon Sep 17 00:00:00 2001 From: Kevin Serrano Date: Wed, 10 Aug 2016 10:54:55 -0700 Subject: Fix ether warning checkbox. --- ui/app/reducers/metamask.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ui/app/reducers') diff --git a/ui/app/reducers/metamask.js b/ui/app/reducers/metamask.js index 8d4520fb1..4eef20f56 100644 --- a/ui/app/reducers/metamask.js +++ b/ui/app/reducers/metamask.js @@ -10,6 +10,7 @@ function reduceMetamask (state, action) { var metamaskState = extend({ isInitialized: false, isUnlocked: false, + isEthConfirmed: false, currentDomain: 'example.com', rpcTarget: 'https://rawtestrpc.metamask.io/', identities: {}, @@ -33,7 +34,7 @@ function reduceMetamask (state, action) { case actions.AGREE_TO_ETH_WARNING: return extend(metamaskState, { - isEthConfirmed: true, + isEthConfirmed: !metamaskState.isEthConfirmed, }) case actions.UNLOCK_METAMASK: -- cgit From 4ace425a9c4a5112692d1e9269d3074a0987e5e9 Mon Sep 17 00:00:00 2001 From: Frankie Date: Wed, 10 Aug 2016 13:51:14 -0700 Subject: Fix merge mess --- ui/app/reducers/app.js | 106 ++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 104 insertions(+), 2 deletions(-) (limited to 'ui/app/reducers') diff --git a/ui/app/reducers/app.js b/ui/app/reducers/app.js index a9d6e4ff0..3b23ce005 100644 --- a/ui/app/reducers/app.js +++ b/ui/app/reducers/app.js @@ -317,6 +317,15 @@ function reduceApp (state, action) { isLoading: false, }) + case actions.SHOW_SUB_LOADING_INDICATION: + return extend(appState, { + isSubLoading: true, + }) + + case actions.HIDE_SUB_LOADING_INDICATION: + return extend(appState, { + isSubLoading: false, + }) case actions.CLEAR_SEED_WORD_CACHE: return extend(appState, { transForward: true, @@ -369,7 +378,7 @@ function reduceApp (state, action) { }, }) - case actions.SHOW_ETH_WARNING: + case actions.BUY_ETH_SUBVIEW: return extend(appState, { transForward: true, currentView: { @@ -377,7 +386,100 @@ function reduceApp (state, action) { context: appState.currentView.context, }, accountDetail: { - subview: 'buy-eth-warning', + subview: 'buyForm', + amount: '5.00', + buyAddress: appState.currentView.context, + formView: { + coinbase: true, + shapeshift: false, + }, + }, + }) + + case actions.UPDATE_BUY_ADDRESS: + return extend(appState, { + accountDetail: { + subview: 'buyForm', + formView: { + coinbase: true, + shapeshift: false, + }, + buyAddress: action.value, + amount: appState.accountDetail.amount, + }, + }) + + case actions.UPDATE_COINBASE_AMOUNT: + return extend(appState, { + accountDetail: { + subview: 'buyForm', + formView: { + coinbase: true, + shapeshift: false, + }, + buyAddress: appState.accountDetail.buyAddress, + amount: action.value, + }, + }) + + case actions.COINBASE_SUBVIEW: + return extend(appState, { + accountDetail: { + subview: 'buyForm', + formView: { + coinbase: true, + shapeshift: false, + }, + buyAddress: appState.accountDetail.buyAddress, + amount: appState.accountDetail.amount, + }, + }) + + case actions.SHAPESHIFT_SUBVIEW: + return extend(appState, { + accountDetail: { + subview: 'buyForm', + formView: { + coinbase: false, + shapeshift: true, + marketinfo: action.value.marketinfo, + coinOptions: action.value.coinOptions, + }, + buyAddress: appState.accountDetail.buyAddress, + amount: appState.accountDetail.amount, + }, + }) + + case actions.PAIR_UPDATE: + return extend(appState, { + accountDetail: { + subview: 'buyForm', + formView: { + coinbase: false, + shapeshift: true, + marketinfo: action.value.marketinfo, + coinOptions: appState.accountDetail.formView.coinOptions, + }, + buyAddress: appState.accountDetail.buyAddress, + amount: appState.accountDetail.amount, + warning: null, + }, + }) + + case actions.COIN_SHIFT_REQUEST: + return extend(appState, { + accountDetail: { + subview: 'buyForm', + formView: { + coinbase: false, + shapeshift: true, + marketinfo: appState.accountDetail.formView.marketinfo, + coinOptions: appState.accountDetail.formView.coinOptions, + response: action.value.response, + }, + buyAddress: appState.accountDetail.buyAddress, + amount: appState.accountDetail.amount, + warning: null, }, }) default: -- cgit From b4c9a5225947f9aadac5fd1bb23fde64740d774a Mon Sep 17 00:00:00 2001 From: Frankie Date: Fri, 12 Aug 2016 15:41:59 -0700 Subject: Change buy forms so that they are their own view and add Qr-code --- ui/app/reducers/app.js | 60 +++++++++++++++++++++++--------------------------- 1 file changed, 27 insertions(+), 33 deletions(-) (limited to 'ui/app/reducers') diff --git a/ui/app/reducers/app.js b/ui/app/reducers/app.js index 3b23ce005..95b60f929 100644 --- a/ui/app/reducers/app.js +++ b/ui/app/reducers/app.js @@ -378,17 +378,17 @@ function reduceApp (state, action) { }, }) - case actions.BUY_ETH_SUBVIEW: + case actions.BUY_ETH_VIEW: return extend(appState, { transForward: true, currentView: { - name: 'accountDetail', + name: 'buyEth', context: appState.currentView.context, }, - accountDetail: { + buyView: { subview: 'buyForm', amount: '5.00', - buyAddress: appState.currentView.context, + buyAddress: action.value, formView: { coinbase: true, shapeshift: false, @@ -398,46 +398,46 @@ function reduceApp (state, action) { case actions.UPDATE_BUY_ADDRESS: return extend(appState, { - accountDetail: { + buyView: { subview: 'buyForm', formView: { - coinbase: true, - shapeshift: false, + coinbase: appState.buyView.formView.coinbase, + shapeshift: appState.buyView.formView.shapeshift, }, buyAddress: action.value, - amount: appState.accountDetail.amount, + amount: appState.buyView.amount, }, }) case actions.UPDATE_COINBASE_AMOUNT: return extend(appState, { - accountDetail: { + buyView: { subview: 'buyForm', formView: { coinbase: true, shapeshift: false, }, - buyAddress: appState.accountDetail.buyAddress, + buyAddress: appState.buyView.buyAddress, amount: action.value, }, }) case actions.COINBASE_SUBVIEW: return extend(appState, { - accountDetail: { + buyView: { subview: 'buyForm', formView: { coinbase: true, shapeshift: false, }, - buyAddress: appState.accountDetail.buyAddress, - amount: appState.accountDetail.amount, + buyAddress: appState.buyView.buyAddress, + amount: appState.buyView.amount, }, }) case actions.SHAPESHIFT_SUBVIEW: return extend(appState, { - accountDetail: { + buyView: { subview: 'buyForm', formView: { coinbase: false, @@ -445,41 +445,35 @@ function reduceApp (state, action) { marketinfo: action.value.marketinfo, coinOptions: action.value.coinOptions, }, - buyAddress: appState.accountDetail.buyAddress, - amount: appState.accountDetail.amount, + buyAddress: appState.buyView.buyAddress, + amount: appState.buyView.amount, }, }) case actions.PAIR_UPDATE: return extend(appState, { - accountDetail: { + buyView: { subview: 'buyForm', formView: { coinbase: false, shapeshift: true, marketinfo: action.value.marketinfo, - coinOptions: appState.accountDetail.formView.coinOptions, + coinOptions: appState.buyView.formView.coinOptions, }, - buyAddress: appState.accountDetail.buyAddress, - amount: appState.accountDetail.amount, + buyAddress: appState.buyView.buyAddress, + amount: appState.buyView.amount, warning: null, }, }) - case actions.COIN_SHIFT_REQUEST: + case actions.SHOW_QR: return extend(appState, { - accountDetail: { - subview: 'buyForm', - formView: { - coinbase: false, - shapeshift: true, - marketinfo: appState.accountDetail.formView.marketinfo, - coinOptions: appState.accountDetail.formView.coinOptions, - response: action.value.response, - }, - buyAddress: appState.accountDetail.buyAddress, - amount: appState.accountDetail.amount, - warning: null, + qrRequested: true, + transForward: true, + Qr: { + message: action.value.message, + image: action.value.qr, + data: action.value.data, }, }) default: -- cgit