1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

Revert to providing inline defaults in getHexGasTotal and increaseLastGasPrice (#6361)

This commit is contained in:
Dan J Miller 2019-03-29 12:47:58 -02:30 committed by Whymarrh Whitby
parent 19c2b298f1
commit 1d14646a4c

View File

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