Defaults to the args list in increaseLastGasPrice and getHexGasTotal

feature/default_network_editable
Dan Miller 6 years ago
parent 0346089caa
commit 31d8b279e4
  1. 8
      ui/app/helpers/utils/confirm-tx.util.js

@ -12,8 +12,8 @@ import {
import { unconfirmedTransactionsCountSelector } from '../../selectors/confirm-transaction' import { unconfirmedTransactionsCountSelector } from '../../selectors/confirm-transaction'
export function increaseLastGasPrice (lastGasPrice) { export function increaseLastGasPrice (lastGasPrice = '0x0') {
return ethUtil.addHexPrefix(multiplyCurrencies(lastGasPrice || '0x0', 1.1, { return ethUtil.addHexPrefix(multiplyCurrencies(lastGasPrice, 1.1, {
multiplicandBase: 16, multiplicandBase: 16,
multiplierBase: 10, multiplierBase: 10,
toNumericBase: 'hex', toNumericBase: 'hex',
@ -27,8 +27,8 @@ export function hexGreaterThan (a, b) {
) )
} }
export function getHexGasTotal ({ gasLimit, gasPrice }) { export function getHexGasTotal ({ gasLimit = '0x0', gasPrice = '0x0' }) {
return ethUtil.addHexPrefix(multiplyCurrencies(gasLimit || '0x0', gasPrice || '0x0', { return ethUtil.addHexPrefix(multiplyCurrencies(gasLimit, gasPrice, {
toNumericBase: 'hex', toNumericBase: 'hex',
multiplicandBase: 16, multiplicandBase: 16,
multiplierBase: 16, multiplierBase: 16,

Loading…
Cancel
Save