aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2016-10-13 07:31:15 +0800
committerDan Finlay <dan@danfinlay.com>2016-10-13 07:31:15 +0800
commit5c9969e126b1da153d8b0f969fbb430d7a146b14 (patch)
tree2551ee0c1827fe1ce825b29bf18f6089eddb94da
parent535d832a64daa4d87367cd29042554f77f4e3dc2 (diff)
downloadtangerine-wallet-browser-5c9969e126b1da153d8b0f969fbb430d7a146b14.tar.gz
tangerine-wallet-browser-5c9969e126b1da153d8b0f969fbb430d7a146b14.tar.zst
tangerine-wallet-browser-5c9969e126b1da153d8b0f969fbb430d7a146b14.zip
Remove opinionated seed word code
Completely breaking all account maangement, I have removed the opinionated seed-word code from the UI. Web3 injection still seems to work.
-rw-r--r--keychains/bip44/create-vault-complete.js (renamed from ui/app/first-time/create-vault-complete.js)0
-rw-r--r--keychains/bip44/recover-seed/confirmation.js (renamed from ui/app/recover-seed/confirmation.js)0
-rw-r--r--keychains/bip44/restore-vault.js (renamed from ui/app/first-time/restore-vault.js)0
-rw-r--r--ui/app/actions.js66
-rw-r--r--ui/app/app.js18
-rw-r--r--ui/app/config.js16
-rw-r--r--ui/app/first-time/init-menu.js20
7 files changed, 4 insertions, 116 deletions
diff --git a/ui/app/first-time/create-vault-complete.js b/keychains/bip44/create-vault-complete.js
index 2b5413955..2b5413955 100644
--- a/ui/app/first-time/create-vault-complete.js
+++ b/keychains/bip44/create-vault-complete.js
diff --git a/ui/app/recover-seed/confirmation.js b/keychains/bip44/recover-seed/confirmation.js
index 55b18025f..55b18025f 100644
--- a/ui/app/recover-seed/confirmation.js
+++ b/keychains/bip44/recover-seed/confirmation.js
diff --git a/ui/app/first-time/restore-vault.js b/keychains/bip44/restore-vault.js
index 4c1f21008..4c1f21008 100644
--- a/ui/app/first-time/restore-vault.js
+++ b/keychains/bip44/restore-vault.js
diff --git a/ui/app/actions.js b/ui/app/actions.js
index 0cce9065e..fb33b7bc2 100644
--- a/ui/app/actions.js
+++ b/ui/app/actions.js
@@ -16,10 +16,6 @@ var actions = {
SHOW_INIT_MENU: 'SHOW_INIT_MENU',
SHOW_NEW_VAULT_SEED: 'SHOW_NEW_VAULT_SEED',
SHOW_INFO_PAGE: 'SHOW_INFO_PAGE',
- RECOVER_FROM_SEED: 'RECOVER_FROM_SEED',
- CLEAR_SEED_WORD_CACHE: 'CLEAR_SEED_WORD_CACHE',
- clearSeedWordCache: clearSeedWordCache,
- recoverFromSeed: recoverFromSeed,
unlockMetamask: unlockMetamask,
unlockFailed: unlockFailed,
showCreateVault: showCreateVault,
@@ -29,10 +25,6 @@ var actions = {
createNewVaultInProgress: createNewVaultInProgress,
showNewVaultSeed: showNewVaultSeed,
showInfoPage: showInfoPage,
- // seed recovery actions
- REVEAL_SEED_CONFIRMATION: 'REVEAL_SEED_CONFIRMATION',
- revealSeedConfirmation: revealSeedConfirmation,
- requestRevealSeed: requestRevealSeed,
// unlock screen
UNLOCK_IN_PROGRESS: 'UNLOCK_IN_PROGRESS',
UNLOCK_FAILED: 'UNLOCK_FAILED',
@@ -95,7 +87,6 @@ var actions = {
backToAccountDetail: backToAccountDetail,
showAccountsPage: showAccountsPage,
showConfTxPage: showConfTxPage,
- confirmSeedWords: confirmSeedWords,
// config screen
SHOW_CONFIG_PAGE: 'SHOW_CONFIG_PAGE',
SET_RPC_TARGET: 'SET_RPC_TARGET',
@@ -182,41 +173,7 @@ function createNewVault (password, entropy) {
if (err) {
return dispatch(actions.showWarning(err.message))
}
- dispatch(actions.showNewVaultSeed(result))
- })
- }
-}
-
-function revealSeedConfirmation () {
- return {
- type: this.REVEAL_SEED_CONFIRMATION,
- }
-}
-
-function requestRevealSeed (password) {
- return (dispatch) => {
- dispatch(actions.showLoadingIndication())
- _accountManager.tryPassword(password, (err, seed) => {
- dispatch(actions.hideLoadingIndication())
- if (err) return dispatch(actions.displayWarning(err.message))
- _accountManager.recoverSeed((err, seed) => {
- if (err) return dispatch(actions.displayWarning(err.message))
- dispatch(actions.showNewVaultSeed(seed))
- })
- })
- }
-}
-
-function recoverFromSeed (password, seed) {
- return (dispatch) => {
- // dispatch(actions.createNewVaultInProgress())
- dispatch(actions.showLoadingIndication())
- _accountManager.recoverFromSeed(password, seed, (err, metamaskState) => {
- dispatch(actions.hideLoadingIndication())
- if (err) return dispatch(actions.displayWarning(err.message))
-
- var account = Object.keys(metamaskState.identities)[0]
- dispatch(actions.unlockMetamask(account))
+ dispatch(actions.goHome())
})
}
}
@@ -451,27 +408,6 @@ function backToAccountDetail (address) {
value: address,
}
}
-function clearSeedWordCache (account) {
- return {
- type: actions.CLEAR_SEED_WORD_CACHE,
- value: account,
- }
-}
-
-function confirmSeedWords () {
- return (dispatch) => {
- dispatch(actions.showLoadingIndication())
- _accountManager.clearSeedWordCache((err, account) => {
- dispatch(actions.hideLoadingIndication())
- if (err) {
- return dispatch(actions.showWarning(err.message))
- }
-
- console.log('Seed word cache cleared. ' + account)
- dispatch(actions.showAccountDetail(account))
- })
- }
-}
function showAccountsPage () {
return {
diff --git a/ui/app/app.js b/ui/app/app.js
index 71e0637d0..3266ced51 100644
--- a/ui/app/app.js
+++ b/ui/app/app.js
@@ -8,8 +8,6 @@ const ReactCSSTransitionGroup = require('react-addons-css-transition-group')
const DisclaimerScreen = require('./first-time/disclaimer')
const InitializeMenuScreen = require('./first-time/init-menu')
const CreateVaultScreen = require('./first-time/create-vault')
-const CreateVaultCompleteScreen = require('./first-time/create-vault-complete')
-const RestoreVaultScreen = require('./first-time/restore-vault')
// unlock
const UnlockScreen = require('./unlock')
// accounts
@@ -19,7 +17,6 @@ const SendTransactionScreen = require('./send')
const ConfirmTxScreen = require('./conf-tx')
// other views
const ConfigScreen = require('./config')
-const RevealSeedConfirmation = require('./recover-seed/confirmation')
const InfoScreen = require('./info')
const LoadingIndicator = require('./components/loading')
const SandwichExpando = require('sandwich-expando')
@@ -402,10 +399,6 @@ App.prototype.renderPrimary = function () {
return h(DisclaimerScreen, {key: 'disclaimerScreen'})
}
- if (props.seedWords) {
- return h(CreateVaultCompleteScreen, {key: 'createVaultComplete'})
- }
-
// show initialize screen
if (!props.isInitialized || props.forgottenPassword) {
// show current view
@@ -414,12 +407,6 @@ App.prototype.renderPrimary = function () {
case 'createVault':
return h(CreateVaultScreen, {key: 'createVault'})
- case 'restoreVault':
- return h(RestoreVaultScreen, {key: 'restoreVault'})
-
- case 'createVaultComplete':
- return h(CreateVaultCompleteScreen, {key: 'createVaultComplete'})
-
default:
return h(InitializeMenuScreen, {key: 'menuScreenInit'})
@@ -451,16 +438,15 @@ App.prototype.renderPrimary = function () {
case 'config':
return h(ConfigScreen, {key: 'config'})
- case 'reveal-seed-conf':
- return h(RevealSeedConfirmation, {key: 'reveal-seed-conf'})
-
case 'info':
return h(InfoScreen, {key: 'info'})
case 'createVault':
return h(CreateVaultScreen, {key: 'createVault'})
+
case 'buyEth':
return h(BuyView, {key: 'buyEthView'})
+
case 'qr':
return h('div', {
style: {
diff --git a/ui/app/config.js b/ui/app/config.js
index e09a38cd8..d4730e558 100644
--- a/ui/app/config.js
+++ b/ui/app/config.js
@@ -77,22 +77,6 @@ ConfigScreen.prototype.render = function () {
currentConversionInformation(metamaskState, state),
h('hr.horizontal-line'),
- h('div', {
- style: {
- marginTop: '20px',
- },
- }, [
- h('button', {
- style: {
- alignSelf: 'center',
- },
- onClick (event) {
- event.preventDefault()
- state.dispatch(actions.revealSeedConfirmation())
- },
- }, 'Reveal Seed Words'),
- ]),
-
]),
]),
])
diff --git a/ui/app/first-time/init-menu.js b/ui/app/first-time/init-menu.js
index 94a9d3df6..9b733d0e7 100644
--- a/ui/app/first-time/init-menu.js
+++ b/ui/app/first-time/init-menu.js
@@ -63,33 +63,15 @@ InitializeMenuScreen.prototype.renderMenu = function () {
h('.flex-row.flex-center.flex-grow', [
h('hr'),
- h('div', 'OR'),
+ h('div', 'Advanced (Eventually?)'),
h('hr'),
]),
- h('button.primary', {
- onClick: this.showRestoreVault.bind(this),
- style: {
- margin: 12,
- },
- }, 'Restore Existing Vault'),
])
)
}
-// InitializeMenuScreen.prototype.splitWor = function() {
-// this.props.dispatch(actions.showInitializeMenu())
-// }
-
-InitializeMenuScreen.prototype.showInitializeMenu = function () {
- this.props.dispatch(actions.showInitializeMenu())
-}
-
InitializeMenuScreen.prototype.showCreateVault = function () {
this.props.dispatch(actions.showCreateVault())
}
-InitializeMenuScreen.prototype.showRestoreVault = function () {
- this.props.dispatch(actions.showRestoreVault())
-}
-