aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2017-12-07 17:02:11 +0800
committerDan Finlay <dan@danfinlay.com>2017-12-07 17:02:11 +0800
commitc82fd990aafd72ede0c08d2820c0c1f1db6bfa81 (patch)
tree4054ef7b266199742fb20b0054569c1227fdbedc /ui
parenta2057a8d295f0c21bf3d459eaba6d205271c1753 (diff)
downloadtangerine-wallet-browser-c82fd990aafd72ede0c08d2820c0c1f1db6bfa81.tar
tangerine-wallet-browser-c82fd990aafd72ede0c08d2820c0c1f1db6bfa81.tar.gz
tangerine-wallet-browser-c82fd990aafd72ede0c08d2820c0c1f1db6bfa81.tar.bz2
tangerine-wallet-browser-c82fd990aafd72ede0c08d2820c0c1f1db6bfa81.tar.lz
tangerine-wallet-browser-c82fd990aafd72ede0c08d2820c0c1f1db6bfa81.tar.xz
tangerine-wallet-browser-c82fd990aafd72ede0c08d2820c0c1f1db6bfa81.tar.zst
tangerine-wallet-browser-c82fd990aafd72ede0c08d2820c0c1f1db6bfa81.zip
Add 10% price bump to retry attempts.
Turns out geth requires at least a 10% price bump to replace txs: https://github.com/ethereum/go-ethereum/blob/9619a610248e9630968ba1d9be8e214b645c9c55/core/tx_pool.go#L133
Diffstat (limited to 'ui')
-rw-r--r--ui/app/components/pending-tx.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/ui/app/components/pending-tx.js b/ui/app/components/pending-tx.js
index 51e57dcd2..32d54902e 100644
--- a/ui/app/components/pending-tx.js
+++ b/ui/app/components/pending-tx.js
@@ -43,7 +43,9 @@ PendingTx.prototype.render = function () {
let forceGasMin
if (lastGasPrice) {
const stripped = ethUtil.stripHexPrefix(lastGasPrice)
- forceGasMin = new BN(stripped, 16).add(MIN_GAS_PRICE_BN)
+ const lastGas = new BN(stripped, 16)
+ const priceBump = lastGas.divn('10')
+ forceGasMin = lastGas.add(priceBump)
}
// Account Details