diff --git a/development/states/confirm-new-ui.json b/development/states/confirm-new-ui.json index f03b67202..b7c1f3fcb 100644 --- a/development/states/confirm-new-ui.json +++ b/development/states/confirm-new-ui.json @@ -156,7 +156,6 @@ }, "identities": {}, "send": { - "fromDropdownOpen": false, "toDropdownOpen": false, "errors": {}, "warnings": {} diff --git a/development/states/navigate-txs.json b/development/states/navigate-txs.json index 39d24c1ea..88b44bbf8 100644 --- a/development/states/navigate-txs.json +++ b/development/states/navigate-txs.json @@ -276,7 +276,6 @@ }, "localeMessages": {}, "send": { - "fromDropdownOpen": false, "toDropdownOpen": false, "errors": {}, "warnings": {} diff --git a/development/states/send-edit.json b/development/states/send-edit.json index b6130643b..a527c9fde 100644 --- a/development/states/send-edit.json +++ b/development/states/send-edit.json @@ -175,7 +175,6 @@ }, "identities": {}, "send": { - "fromDropdownOpen": false, "toDropdownOpen": false, "errors": {}, "warnings": {} diff --git a/development/states/send-new-ui.json b/development/states/send-new-ui.json index 69b4b0568..350aaab8b 100644 --- a/development/states/send-new-ui.json +++ b/development/states/send-new-ui.json @@ -141,7 +141,6 @@ }, "identities": {}, "send": { - "fromDropdownOpen": false, "toDropdownOpen": false, "errors": {}, "warnings": {}, diff --git a/development/states/tx-list-items.json b/development/states/tx-list-items.json index fa5e93c6c..e03cab342 100644 --- a/development/states/tx-list-items.json +++ b/development/states/tx-list-items.json @@ -1087,7 +1087,6 @@ }, "identities": {}, "send": { - "fromDropdownOpen": false, "toDropdownOpen": false, "errors": {}, "warnings": {} diff --git a/ui/app/ducks/send/send-duck.test.js b/ui/app/ducks/send/send-duck.test.js index 418707518..d0e3ab7af 100644 --- a/ui/app/ducks/send/send-duck.test.js +++ b/ui/app/ducks/send/send-duck.test.js @@ -15,13 +15,10 @@ describe('Send Duck', () => { }, } const initState = { - fromDropdownOpen: false, toDropdownOpen: false, errors: {}, gasButtonGroupShown: true, } - const OPEN_FROM_DROPDOWN = 'metamask/send/OPEN_FROM_DROPDOWN' - const CLOSE_FROM_DROPDOWN = 'metamask/send/CLOSE_FROM_DROPDOWN' const OPEN_TO_DROPDOWN = 'metamask/send/OPEN_TO_DROPDOWN' const CLOSE_TO_DROPDOWN = 'metamask/send/CLOSE_TO_DROPDOWN' const UPDATE_SEND_ERRORS = 'metamask/send/UPDATE_SEND_ERRORS' @@ -47,28 +44,11 @@ describe('Send Duck', () => { ) }) - it('should set fromDropdownOpen to true when receiving a OPEN_FROM_DROPDOWN action', () => { - assert.deepEqual( - SendReducer(mockState, { - type: OPEN_FROM_DROPDOWN, - }), - Object.assign({ fromDropdownOpen: true }, mockState.send) - ) - }) - it('should return a new object (and not just modify the existing state object)', () => { assert.deepEqual(SendReducer(mockState), mockState.send) assert.notEqual(SendReducer(mockState), mockState.send) }) - it('should set fromDropdownOpen to false when receiving a CLOSE_FROM_DROPDOWN action', () => { - assert.deepEqual( - SendReducer(mockState, { - type: CLOSE_FROM_DROPDOWN, - }), - Object.assign({ fromDropdownOpen: false }, mockState.send) - ) - }) it('should set toDropdownOpen to true when receiving a OPEN_TO_DROPDOWN action', () => { assert.deepEqual( diff --git a/ui/app/ducks/send/send.duck.js b/ui/app/ducks/send/send.duck.js index 4d212bd03..543b0a911 100644 --- a/ui/app/ducks/send/send.duck.js +++ b/ui/app/ducks/send/send.duck.js @@ -1,8 +1,6 @@ import extend from 'xtend' // Actions -const OPEN_FROM_DROPDOWN = 'metamask/send/OPEN_FROM_DROPDOWN' -const CLOSE_FROM_DROPDOWN = 'metamask/send/CLOSE_FROM_DROPDOWN' const OPEN_TO_DROPDOWN = 'metamask/send/OPEN_TO_DROPDOWN' const CLOSE_TO_DROPDOWN = 'metamask/send/CLOSE_TO_DROPDOWN' const UPDATE_SEND_ERRORS = 'metamask/send/UPDATE_SEND_ERRORS' @@ -12,7 +10,6 @@ const HIDE_GAS_BUTTON_GROUP = 'metamask/send/HIDE_GAS_BUTTON_GROUP' // TODO: determine if this approach to initState is consistent with conventional ducks pattern const initState = { - fromDropdownOpen: false, toDropdownOpen: false, gasButtonGroupShown: true, errors: {}, @@ -23,14 +20,6 @@ export default function reducer ({ send: sendState = initState }, action = {}) { const newState = extend({}, sendState) switch (action.type) { - case OPEN_FROM_DROPDOWN: - return extend(newState, { - fromDropdownOpen: true, - }) - case CLOSE_FROM_DROPDOWN: - return extend(newState, { - fromDropdownOpen: false, - }) case OPEN_TO_DROPDOWN: return extend(newState, { toDropdownOpen: true, diff --git a/ui/app/pages/send/send-content/send-from-row/send-from-row.selectors.js b/ui/app/pages/send/send-content/send-from-row/send-from-row.selectors.js deleted file mode 100644 index 03ef4806b..000000000 --- a/ui/app/pages/send/send-content/send-from-row/send-from-row.selectors.js +++ /dev/null @@ -1,9 +0,0 @@ -const selectors = { - getFromDropdownOpen, -} - -module.exports = selectors - -function getFromDropdownOpen (state) { - return state.send.fromDropdownOpen -} diff --git a/ui/app/pages/send/send-content/send-from-row/tests/send-from-row-selectors.test.js b/ui/app/pages/send/send-content/send-from-row/tests/send-from-row-selectors.test.js deleted file mode 100644 index ecb57bbc3..000000000 --- a/ui/app/pages/send/send-content/send-from-row/tests/send-from-row-selectors.test.js +++ /dev/null @@ -1,20 +0,0 @@ -import assert from 'assert' -import { - getFromDropdownOpen, -} from '../send-from-row.selectors.js' - -describe('send-from-row selectors', () => { - - describe('getFromDropdownOpen()', () => { - it('should get send.fromDropdownOpen', () => { - const state = { - send: { - fromDropdownOpen: null, - }, - } - - assert.equal(getFromDropdownOpen(state), null) - }) - }) - -})