aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWhymarrh Whitby <whymarrh.whitby@gmail.com>2018-07-17 06:31:36 +0800
committerWhymarrh Whitby <whymarrh.whitby@gmail.com>2018-07-18 20:22:13 +0800
commit25417fad26566ca3f6e3ccbc4bf6508239f90e58 (patch)
tree8f9e7767b4bac66062f8e562699d86aa68265b76
parent3f9c3d76b6edb70f91363c1e0787707ed1440c41 (diff)
downloadtangerine-wallet-browser-25417fad26566ca3f6e3ccbc4bf6508239f90e58.tar
tangerine-wallet-browser-25417fad26566ca3f6e3ccbc4bf6508239f90e58.tar.gz
tangerine-wallet-browser-25417fad26566ca3f6e3ccbc4bf6508239f90e58.tar.bz2
tangerine-wallet-browser-25417fad26566ca3f6e3ccbc4bf6508239f90e58.tar.lz
tangerine-wallet-browser-25417fad26566ca3f6e3ccbc4bf6508239f90e58.tar.xz
tangerine-wallet-browser-25417fad26566ca3f6e3ccbc4bf6508239f90e58.tar.zst
tangerine-wallet-browser-25417fad26566ca3f6e3ccbc4bf6508239f90e58.zip
Add updateSendHexData action
-rw-r--r--ui/app/actions.js9
-rw-r--r--ui/app/reducers/metamask.js8
2 files changed, 17 insertions, 0 deletions
diff --git a/ui/app/actions.js b/ui/app/actions.js
index 0aeb802f8..d8b3ed69d 100644
--- a/ui/app/actions.js
+++ b/ui/app/actions.js
@@ -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,
diff --git a/ui/app/reducers/metamask.js b/ui/app/reducers/metamask.js
index 6c8ac9ed7..3f1d3394f 100644
--- a/ui/app/reducers/metamask.js
+++ b/ui/app/reducers/metamask.js
@@ -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: {