aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/send_/send.utils.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui/app/components/send_/send.utils.js')
-rw-r--r--ui/app/components/send_/send.utils.js24
1 files changed, 12 insertions, 12 deletions
diff --git a/ui/app/components/send_/send.utils.js b/ui/app/components/send_/send.utils.js
index f56f91e48..f289ea989 100644
--- a/ui/app/components/send_/send.utils.js
+++ b/ui/app/components/send_/send.utils.js
@@ -8,13 +8,21 @@ const {
calcTokenAmount,
} = require('../../token-util')
+function getGasTotal (gasLimit, gasPrice) {
+ return multiplyCurrencies(gasLimit, gasPrice, {
+ toNumericBase: 'hex',
+ multiplicandBase: 16,
+ multiplierBase: 16,
+ })
+}
+
function isBalanceSufficient ({
amount = '0x0',
- gasTotal = '0x0',
- balance,
- primaryCurrency,
amountConversionRate,
+ balance,
conversionRate,
+ gasTotal = '0x0',
+ primaryCurrency,
}) {
const totalAmount = addCurrencies(amount, gasTotal, {
aBase: 16,
@@ -63,16 +71,8 @@ function isTokenBalanceSufficient ({
return tokenBalanceIsSufficient
}
-function getGasTotal (gasLimit, gasPrice) {
- return multiplyCurrencies(gasLimit, gasPrice, {
- toNumericBase: 'hex',
- multiplicandBase: 16,
- multiplierBase: 16,
- })
-}
-
module.exports = {
getGasTotal,
isBalanceSufficient,
isTokenBalanceSufficient,
-} \ No newline at end of file
+}