diff --git a/test/unit/reducers/unlock_vault_test.js b/test/unit/reducers/unlock_vault_test.js deleted file mode 100644 index baf590956..000000000 --- a/test/unit/reducers/unlock_vault_test.js +++ /dev/null @@ -1,35 +0,0 @@ -import assert from 'assert' -import * as actions from '../../../ui/app/store/actions' -import reducers from '../../../ui/app/ducks' - -describe('#unlockMetamask(selectedAccount)', function () { - describe('after an error', function () { - it('clears warning', function () { - const warning = 'this is the wrong warning' - const account = 'foo_account' - const initialState = { - appState: { - warning: warning, - }, - } - - const resultState = reducers(initialState, actions.unlockMetamask(account)) - assert.equal(resultState.appState.warning, null, 'warning nullified') - }) - }) - - describe('going home after an error', function () { - it('clears warning', function () { - const warning = 'this is the wrong warning' - // const account = 'foo_account' - const initialState = { - appState: { - warning: warning, - }, - } - - const resultState = reducers(initialState, actions.goHome()) - assert.equal(resultState.appState.warning, null, 'warning nullified') - }) - }) -}) diff --git a/test/unit/ui/app/reducers/app.spec.js b/test/unit/ui/app/reducers/app.spec.js index 44e072f1a..8cfc47fb2 100644 --- a/test/unit/ui/app/reducers/app.spec.js +++ b/test/unit/ui/app/reducers/app.spec.js @@ -144,17 +144,6 @@ describe('App State', function () { assert.equal(state.warning, null) }) - it('unlocks Metamask', function () { - const state = reduceApp(metamaskState, { - type: actions.UNLOCK_METAMASK, - }) - - assert.equal(state.forgottenPassword, null) - assert.deepEqual(state.detailView, {}) - assert.equal(state.transForward, true) - assert.equal(state.warning, null) - }) - it('locks Metamask', function () { const state = reduceApp(metamaskState, { type: actions.LOCK_METAMASK, diff --git a/test/unit/ui/app/reducers/metamask.spec.js b/test/unit/ui/app/reducers/metamask.spec.js index 31d953617..eac5e2644 100644 --- a/test/unit/ui/app/reducers/metamask.spec.js +++ b/test/unit/ui/app/reducers/metamask.spec.js @@ -9,17 +9,6 @@ describe('MetaMask Reducers', function () { assert(initState) }) - it('unlocks MetaMask', function () { - const state = reduceMetamask({}, { - type: actions.UNLOCK_METAMASK, - value: 'test address', - }) - - assert.equal(state.isUnlocked, true) - assert.equal(state.isInitialized, true) - assert.equal(state.selectedAddress, 'test address') - }) - it('locks MetaMask', function () { const unlockMetaMaskState = { isUnlocked: true, diff --git a/ui/app/ducks/app/app.js b/ui/app/ducks/app/app.js index 0ec0aea2f..79cd87e38 100644 --- a/ui/app/ducks/app/app.js +++ b/ui/app/ducks/app/app.js @@ -159,18 +159,6 @@ export default function reduceApp (state = {}, action) { warning: null, } - // unlock - - case actions.UNLOCK_METAMASK: - return { - ...appState, - forgottenPassword: appState.forgottenPassword ? !appState.forgottenPassword : null, - detailView: {}, - transForward: true, - isLoading: false, - warning: null, - } - case actions.LOCK_METAMASK: return { ...appState, diff --git a/ui/app/ducks/metamask/metamask.js b/ui/app/ducks/metamask/metamask.js index 4477e6042..3cafd1011 100644 --- a/ui/app/ducks/metamask/metamask.js +++ b/ui/app/ducks/metamask/metamask.js @@ -56,14 +56,6 @@ export default function reduceMetamask (state = {}, action) { case actions.UPDATE_METAMASK_STATE: return { ...metamaskState, ...action.value } - case actions.UNLOCK_METAMASK: - return { - ...metamaskState, - isUnlocked: true, - isInitialized: true, - selectedAddress: action.value, - } - case actions.LOCK_METAMASK: return { ...metamaskState, diff --git a/ui/app/store/actions.js b/ui/app/store/actions.js index 38043c9b0..45d0a77e4 100644 --- a/ui/app/store/actions.js +++ b/ui/app/store/actions.js @@ -42,7 +42,6 @@ export const actionConstants = { UNLOCK_IN_PROGRESS: 'UNLOCK_IN_PROGRESS', UNLOCK_FAILED: 'UNLOCK_FAILED', UNLOCK_SUCCEEDED: 'UNLOCK_SUCCEEDED', - UNLOCK_METAMASK: 'UNLOCK_METAMASK', LOCK_METAMASK: 'LOCK_METAMASK', // error handling DISPLAY_WARNING: 'DISPLAY_WARNING', @@ -1260,13 +1259,6 @@ export function unlockSucceeded (message) { } } -export function unlockMetamask (account) { - return { - type: actionConstants.UNLOCK_METAMASK, - value: account, - } -} - export function updateMetamaskState (newState) { return { type: actionConstants.UPDATE_METAMASK_STATE,