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:
parent
3f9c3d76b6
commit
25417fad26
@ -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,
|
||||
|
@ -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: {
|
||||
|
Loading…
Reference in New Issue
Block a user