Add updateSendHexData action

feature/default_network_editable
Whymarrh Whitby 6 years ago
parent 3f9c3d76b6
commit 25417fad26
  1. 9
      ui/app/actions.js
  2. 8
      ui/app/reducers/metamask.js

@ -164,6 +164,7 @@ var actions = {
UPDATE_GAS_PRICE: 'UPDATE_GAS_PRICE', UPDATE_GAS_PRICE: 'UPDATE_GAS_PRICE',
UPDATE_GAS_TOTAL: 'UPDATE_GAS_TOTAL', UPDATE_GAS_TOTAL: 'UPDATE_GAS_TOTAL',
UPDATE_SEND_FROM: 'UPDATE_SEND_FROM', UPDATE_SEND_FROM: 'UPDATE_SEND_FROM',
UPDATE_SEND_HEX_DATA: 'UPDATE_SEND_HEX_DATA',
UPDATE_SEND_TOKEN_BALANCE: 'UPDATE_SEND_TOKEN_BALANCE', UPDATE_SEND_TOKEN_BALANCE: 'UPDATE_SEND_TOKEN_BALANCE',
UPDATE_SEND_TO: 'UPDATE_SEND_TO', UPDATE_SEND_TO: 'UPDATE_SEND_TO',
UPDATE_SEND_AMOUNT: 'UPDATE_SEND_AMOUNT', UPDATE_SEND_AMOUNT: 'UPDATE_SEND_AMOUNT',
@ -183,6 +184,7 @@ var actions = {
setSendTokenBalance, setSendTokenBalance,
updateSendTokenBalance, updateSendTokenBalance,
updateSendFrom, updateSendFrom,
updateSendHexData,
updateSendTo, updateSendTo,
updateSendAmount, updateSendAmount,
updateSendMemo, updateSendMemo,
@ -838,6 +840,13 @@ function updateSendFrom (from) {
} }
} }
function updateSendHexData (value) {
return {
type: actions.UPDATE_SEND_HEX_DATA,
value,
}
}
function updateSendTo (to, nickname = '') { function updateSendTo (to, nickname = '') {
return { return {
type: actions.UPDATE_SEND_TO, type: actions.UPDATE_SEND_TO,

@ -222,6 +222,14 @@ function reduceMetamask (state, action) {
}, },
}) })
case actions.UPDATE_SEND_HEX_DATA:
return extend(metamaskState, {
send: {
...metamaskState.send,
data: action.value,
},
})
case actions.UPDATE_SEND_FROM: case actions.UPDATE_SEND_FROM:
return extend(metamaskState, { return extend(metamaskState, {
send: { send: {

Loading…
Cancel
Save