mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 01:39:44 +01:00
Merge pull request #6358 from MetaMask/dont-assume-tx-has-gas-data-in-list
Gracefully handle null/undefined in a couple methods that operate on hex values
This commit is contained in:
commit
a239ef4dd5
@ -12,7 +12,7 @@ import {
|
||||
|
||||
import { unconfirmedTransactionsCountSelector } from '../../selectors/confirm-transaction'
|
||||
|
||||
export function increaseLastGasPrice (lastGasPrice) {
|
||||
export function increaseLastGasPrice (lastGasPrice = '0x0') {
|
||||
return ethUtil.addHexPrefix(multiplyCurrencies(lastGasPrice, 1.1, {
|
||||
multiplicandBase: 16,
|
||||
multiplierBase: 10,
|
||||
@ -27,7 +27,7 @@ export function hexGreaterThan (a, b) {
|
||||
)
|
||||
}
|
||||
|
||||
export function getHexGasTotal ({ gasLimit, gasPrice }) {
|
||||
export function getHexGasTotal ({ gasLimit = '0x0', gasPrice = '0x0' }) {
|
||||
return ethUtil.addHexPrefix(multiplyCurrencies(gasLimit, gasPrice, {
|
||||
toNumericBase: 'hex',
|
||||
multiplicandBase: 16,
|
||||
|
Loading…
Reference in New Issue
Block a user