1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

Add updateSendHexData action

This commit is contained in:
Whymarrh Whitby 2018-07-16 20:01:36 -02:30
parent 3f9c3d76b6
commit 25417fad26
2 changed files with 17 additions and 0 deletions

View File

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

View File

@ -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:
return extend(metamaskState, {
send: {