1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 01:39:44 +01:00
This commit is contained in:
Thomas Huang 2017-11-09 14:23:10 -08:00 committed by Chi Kei Chan
parent 62f2aebe1d
commit 5120cfdff3
5 changed files with 9 additions and 9 deletions

View File

@ -40,7 +40,7 @@ function sanitizeDecimal (val) {
// sanitizeValue('.200') -> '0.200'
// sanitizeValue('a.b.1.c,89.123') -> '0.189123'
function sanitizeValue (value) {
let [,integer, point, decimal] = (/([^.]*)([.]?)([^.]*)/).exec(value)
let [integer, point, decimal] = (/([^.]*)([.]?)([^.]*)/).exec(value)
integer = sanitizeInteger(integer) || '0'
decimal = sanitizeDecimal(decimal)

View File

@ -115,7 +115,7 @@ CustomizeGasModal.prototype.validate = function ({ gasTotal, gasLimit }) {
} = this.props
let error = null
const balanceIsSufficient = isBalanceSufficient({
amount,
gasTotal,

View File

@ -7,7 +7,7 @@ const {
calcTokenAmount,
} = require('../../token-util')
function isBalanceSufficient({
function isBalanceSufficient ({
amount = '0x0',
gasTotal = '0x0',
balance,
@ -39,7 +39,7 @@ function isBalanceSufficient({
return balanceIsSufficient
}
function isTokenBalanceSufficient({
function isTokenBalanceSufficient ({
amount = '0x0',
tokenBalance,
decimals,

View File

@ -151,7 +151,7 @@ const subtractCurrencies = (a, b, options = {}) => {
bBase,
...conversionOptions
} = options
const value = (new BigNumber(a, aBase)).minus(b, bBase);
const value = (new BigNumber(a, aBase)).minus(b, bBase)
return converter({
value,
@ -183,7 +183,7 @@ const conversionGreaterThan = (
) => {
const firstValue = converter({ ...firstProps })
const secondValue = converter({ ...secondProps })
return firstValue.gt(secondValue)
}

View File

@ -106,7 +106,7 @@ SendTransactionScreen.prototype.componentWillMount = function () {
.all([
getGasPrice(),
estimateGas(estimateGasParams),
tokenContract && tokenContract.balanceOf(from.address)
tokenContract && tokenContract.balanceOf(from.address),
])
.then(([gasPrice, gas, usersToken]) => {
@ -352,7 +352,7 @@ SendTransactionScreen.prototype.validateAmount = function (value) {
let amountError = null
const sufficientBalance = isBalanceSufficient({
amount: selectedToken ? '0x0' : amount,
amount: selectedToken ? '0x0' : amount,
gasTotal,
balance,
primaryCurrency,
@ -395,7 +395,7 @@ SendTransactionScreen.prototype.renderAmountRow = function () {
amount,
} = this.props
return h('div.send-v2__form-row', [
h('div.send-v2__form-label', [
'Amount:',
this.renderErrorMessage('amount'),