aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
Diffstat (limited to 'ui')
-rw-r--r--ui/app/components/send/send-constants.js3
-rw-r--r--ui/app/send-v2.js3
2 files changed, 5 insertions, 1 deletions
diff --git a/ui/app/components/send/send-constants.js b/ui/app/components/send/send-constants.js
index 9c240972f..b3ee0899a 100644
--- a/ui/app/components/send/send-constants.js
+++ b/ui/app/components/send/send-constants.js
@@ -20,6 +20,8 @@ const MIN_GAS_TOTAL = multiplyCurrencies(MIN_GAS_LIMIT_HEX, MIN_GAS_PRICE_HEX, {
multiplierBase: 16,
})
+const TOKEN_TRANSFER_FUNCTION_SIGNATURE = '0xa9059cbb'
+
module.exports = {
MIN_GAS_PRICE_GWEI,
MIN_GAS_PRICE_HEX,
@@ -27,4 +29,5 @@ module.exports = {
MIN_GAS_LIMIT_HEX,
MIN_GAS_LIMIT_DEC,
MIN_GAS_TOTAL,
+ TOKEN_TRANSFER_FUNCTION_SIGNATURE,
}
diff --git a/ui/app/send-v2.js b/ui/app/send-v2.js
index 1c0ff3aea..cf9e709d4 100644
--- a/ui/app/send-v2.js
+++ b/ui/app/send-v2.js
@@ -14,6 +14,7 @@ const GasFeeDisplay = require('./components/send/gas-fee-display-v2')
const {
MIN_GAS_TOTAL,
+ TOKEN_TRANSFER_FUNCTION_SIGNATURE,
} = require('./components/send/send-constants')
const {
@@ -574,7 +575,7 @@ SendTransactionScreen.prototype.getEditedTx = function () {
}
if (selectedToken) {
- const data = '0xa9059cbb' + Array.prototype.map.call(
+ const data = TOKEN_TRANSFER_FUNCTION_SIGNATURE + Array.prototype.map.call(
ethAbi.rawEncode(['address', 'uint256'], [to, ethUtil.addHexPrefix(amount)]),
x => ('00' + x.toString(16)).slice(-2)
).join('')