aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Miller <danjm.com@gmail.com>2019-03-28 02:27:44 +0800
committerDan Miller <danjm.com@gmail.com>2019-03-28 02:27:44 +0800
commit0346089caac58f5866e770999fd0055e16c52d78 (patch)
tree1951e1d9753ba7bb2f06c8f517831ef0b62dea06
parent8108eac705ff8ea11d6efdbeacc0322e46a3431b (diff)
downloadtangerine-wallet-browser-0346089caac58f5866e770999fd0055e16c52d78.tar
tangerine-wallet-browser-0346089caac58f5866e770999fd0055e16c52d78.tar.gz
tangerine-wallet-browser-0346089caac58f5866e770999fd0055e16c52d78.tar.bz2
tangerine-wallet-browser-0346089caac58f5866e770999fd0055e16c52d78.tar.lz
tangerine-wallet-browser-0346089caac58f5866e770999fd0055e16c52d78.tar.xz
tangerine-wallet-browser-0346089caac58f5866e770999fd0055e16c52d78.tar.zst
tangerine-wallet-browser-0346089caac58f5866e770999fd0055e16c52d78.zip
getHexGasTotal and increaseLastGasPrice now gracefully handle null and undefined values
-rw-r--r--ui/app/helpers/utils/confirm-tx.util.js4
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..853427b31 100644
--- a/ui/app/helpers/utils/confirm-tx.util.js
+++ b/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,