getHexGasTotal and increaseLastGasPrice now gracefully handle null and undefined values

feature/default_network_editable
Dan Miller 6 years ago
parent 8108eac705
commit 0346089caa
  1. 4
      ui/app/helpers/utils/confirm-tx.util.js

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

Loading…
Cancel
Save