diff options
author | Thomas Huang <tmashuang@users.noreply.github.com> | 2019-03-28 05:39:10 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-28 05:39:10 +0800 |
commit | a239ef4dd56deb027724bab75112d225424155b8 (patch) | |
tree | f36e4a4f46fd1c2610a26fdbbc3cf0ed5fd5881e | |
parent | 8108eac705ff8ea11d6efdbeacc0322e46a3431b (diff) | |
parent | 31d8b279e43b7ebd6fcb11752d24c67f12a6b622 (diff) | |
download | tangerine-wallet-browser-a239ef4dd56deb027724bab75112d225424155b8.tar.gz tangerine-wallet-browser-a239ef4dd56deb027724bab75112d225424155b8.tar.zst tangerine-wallet-browser-a239ef4dd56deb027724bab75112d225424155b8.zip |
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
-rw-r--r-- | ui/app/helpers/utils/confirm-tx.util.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ui/app/helpers/utils/confirm-tx.util.js b/ui/app/helpers/utils/confirm-tx.util.js index f843db118..224560f5a 100644 --- a/ui/app/helpers/utils/confirm-tx.util.js +++ b/ui/app/helpers/utils/confirm-tx.util.js @@ -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, |