aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorDan <danjm.com@gmail.com>2017-11-08 09:19:14 +0800
committerDan <danjm.com@gmail.com>2017-11-08 09:25:12 +0800
commitd1977225a48f381f3a6bda4a54ce9e0e0914357e (patch)
treef2cb10316fd7435c1969c4cf043c29e05eec6527 /ui
parentc156c85eaa064b971ce0202df0bb1681eb0e22dd (diff)
downloadtangerine-wallet-browser-d1977225a48f381f3a6bda4a54ce9e0e0914357e.tar
tangerine-wallet-browser-d1977225a48f381f3a6bda4a54ce9e0e0914357e.tar.gz
tangerine-wallet-browser-d1977225a48f381f3a6bda4a54ce9e0e0914357e.tar.bz2
tangerine-wallet-browser-d1977225a48f381f3a6bda4a54ce9e0e0914357e.tar.lz
tangerine-wallet-browser-d1977225a48f381f3a6bda4a54ce9e0e0914357e.tar.xz
tangerine-wallet-browser-d1977225a48f381f3a6bda4a54ce9e0e0914357e.tar.zst
tangerine-wallet-browser-d1977225a48f381f3a6bda4a54ce9e0e0914357e.zip
Calculate max amount for send ether based on minimum gas total.
Diffstat (limited to 'ui')
-rw-r--r--ui/app/components/send/currency-display.js8
-rw-r--r--ui/app/send-v2.js3
2 files changed, 1 insertions, 10 deletions
diff --git a/ui/app/components/send/currency-display.js b/ui/app/components/send/currency-display.js
index 49df5b0b7..870fbb42a 100644
--- a/ui/app/components/send/currency-display.js
+++ b/ui/app/components/send/currency-display.js
@@ -11,11 +11,6 @@ function CurrencyDisplay () {
Component.call(this)
}
-function isValidInput (text) {
- const re = /^([1-9]\d*|0)(\.|\.\d*)?$/
- return re.test(text)
-}
-
function toHexWei (value) {
return conversionUtil(value, {
fromNumericBase: 'dec',
@@ -68,7 +63,6 @@ CurrencyDisplay.prototype.render = function () {
convertedCurrency,
readOnly = false,
inError = false,
- value,
handleChange,
} = this.props
@@ -82,8 +76,6 @@ CurrencyDisplay.prototype.render = function () {
conversionRate,
})
- const inputSizeMultiplier = readOnly ? 1 : 1.2
-
return h('div', {
className,
style: {
diff --git a/ui/app/send-v2.js b/ui/app/send-v2.js
index ffc9accc5..0cef47b27 100644
--- a/ui/app/send-v2.js
+++ b/ui/app/send-v2.js
@@ -307,7 +307,6 @@ SendTransactionScreen.prototype.handleAmountChange = function (value) {
SendTransactionScreen.prototype.setAmountToMax = function () {
const {
from: { balance },
- gasTotal,
updateSendAmount,
updateSendErrors,
updateGasPrice,
@@ -323,7 +322,7 @@ SendTransactionScreen.prototype.setAmountToMax = function () {
? multiplyCurrencies(tokenBalance, multiplier, {toNumericBase: 'hex'})
: subtractCurrencies(
ethUtil.addHexPrefix(balance),
- ethUtil.addHexPrefix(gasTotal),
+ ethUtil.addHexPrefix(MIN_GAS_TOTAL),
{ toNumericBase: 'hex' }
)