feature/default_network_editable
Thomas Huang 7 years ago committed by Chi Kei Chan
parent 62f2aebe1d
commit 5120cfdff3
  1. 2
      ui/app/components/currency-input.js
  2. 2
      ui/app/components/customize-gas-modal/index.js
  3. 4
      ui/app/components/send/send-utils.js
  4. 4
      ui/app/conversion-util.js
  5. 6
      ui/app/send-v2.js

@ -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)

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

@ -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,

@ -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)
}

@ -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'),

Loading…
Cancel
Save