diff options
Diffstat (limited to 'ui/app/ducks/send.duck.js')
-rw-r--r-- | ui/app/ducks/send.duck.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/ui/app/ducks/send.duck.js b/ui/app/ducks/send.duck.js index 4d212bd03..90e92140b 100644 --- a/ui/app/ducks/send.duck.js +++ b/ui/app/ducks/send.duck.js @@ -6,6 +6,7 @@ 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' +const UPDATE_SEND_WARNINGS = 'metamask/send/UPDATE_SEND_WARNINGS' 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' @@ -16,6 +17,7 @@ const initState = { toDropdownOpen: false, gasButtonGroupShown: true, errors: {}, + warnings: {}, } // Reducer @@ -46,6 +48,13 @@ export default function reducer ({ send: sendState = initState }, action = {}) { ...action.value, }, }) + case UPDATE_SEND_WARNINGS: + return extend(newState, { + warnings: { + ...newState.warnings, + ...action.value, + }, + }) case SHOW_GAS_BUTTON_GROUP: return extend(newState, { gasButtonGroupShown: true, @@ -85,6 +94,13 @@ export function updateSendErrors (errorObject) { } } +export function updateSendWarnings (warningObject) { + return { + type: UPDATE_SEND_WARNINGS, + value: warningObject, + } +} + export function resetSendState () { return { type: RESET_SEND_STATE } } |