diff options
author | Dan Miller <danjm.com@gmail.com> | 2018-09-13 20:35:17 +0800 |
---|---|---|
committer | Dan Miller <danjm.com@gmail.com> | 2018-12-04 11:36:04 +0800 |
commit | b567c78bcae73e9c73b69040d22e096e4f876a2b (patch) | |
tree | 0b8327736e09cd41ca978d82cd7c1108c23165a5 /ui/app/ducks | |
parent | 7de3f22d63748ed5a81e947755db056d4cdef3db (diff) | |
download | tangerine-wallet-browser-b567c78bcae73e9c73b69040d22e096e4f876a2b.tar tangerine-wallet-browser-b567c78bcae73e9c73b69040d22e096e4f876a2b.tar.gz tangerine-wallet-browser-b567c78bcae73e9c73b69040d22e096e4f876a2b.tar.bz2 tangerine-wallet-browser-b567c78bcae73e9c73b69040d22e096e4f876a2b.tar.lz tangerine-wallet-browser-b567c78bcae73e9c73b69040d22e096e4f876a2b.tar.xz tangerine-wallet-browser-b567c78bcae73e9c73b69040d22e096e4f876a2b.tar.zst tangerine-wallet-browser-b567c78bcae73e9c73b69040d22e096e4f876a2b.zip |
Integrate gas buttons with the send screen.
Diffstat (limited to 'ui/app/ducks')
-rw-r--r-- | ui/app/ducks/send.duck.js | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/ui/app/ducks/send.duck.js b/ui/app/ducks/send.duck.js index db01bbaa9..758916d48 100644 --- a/ui/app/ducks/send.duck.js +++ b/ui/app/ducks/send.duck.js @@ -7,11 +7,14 @@ 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' const RESET_SEND_STATE = 'metamask/send/RESET_SEND_STATE' +const SHOW_GAS_BUTTON_GROUP = 'metamask/send/SHOW_GAS_BUTTON_GROUP' +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: {}, } @@ -43,6 +46,14 @@ export default function reducer ({ send: sendState = initState }, action = {}) { ...action.value, }, }) + case SHOW_GAS_BUTTON_GROUP: + return extend(newState, { + gasButtonGroupShown: true, + }) + case HIDE_GAS_BUTTON_GROUP: + return extend(newState, { + gasButtonGroupShown: false, + }) case RESET_SEND_STATE: return extend({}, initState) default: @@ -67,6 +78,14 @@ export function closeToDropdown () { return { type: CLOSE_TO_DROPDOWN } } +export function showGasButtonGroup () { + return { type: SHOW_GAS_BUTTON_GROUP } +} + +export function hideGasButtonGroup () { + return { type: HIDE_GAS_BUTTON_GROUP } +} + export function updateSendErrors (errorObject) { return { type: UPDATE_SEND_ERRORS, |