aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/pending-tx
diff options
context:
space:
mode:
authorDan <danjm.com@gmail.com>2018-03-09 11:49:26 +0800
committerDan <danjm.com@gmail.com>2018-03-09 11:49:26 +0800
commit5433d2fe3a3f48948449258b03ae431fe81b8cf2 (patch)
treee71cc3b9969f0a57032a798a54305d564e9c15bc /ui/app/components/pending-tx
parent6cee76b3e797dd302c1bf97d7799567a366b2004 (diff)
downloadtangerine-wallet-browser-5433d2fe3a3f48948449258b03ae431fe81b8cf2.tar.gz
tangerine-wallet-browser-5433d2fe3a3f48948449258b03ae431fe81b8cf2.tar.zst
tangerine-wallet-browser-5433d2fe3a3f48948449258b03ae431fe81b8cf2.zip
Retry transaction logic added to tx-list-item, confirm-send-ether, customize-gas-modal, and dependents.
Diffstat (limited to 'ui/app/components/pending-tx')
-rw-r--r--ui/app/components/pending-tx/confirm-send-ether.js20
1 files changed, 19 insertions, 1 deletions
diff --git a/ui/app/components/pending-tx/confirm-send-ether.js b/ui/app/components/pending-tx/confirm-send-ether.js
index 3f8d9c28f..a6e00d922 100644
--- a/ui/app/components/pending-tx/confirm-send-ether.js
+++ b/ui/app/components/pending-tx/confirm-send-ether.js
@@ -36,13 +36,29 @@ function mapDispatchToProps (dispatch) {
return {
clearSend: () => dispatch(actions.clearSend()),
editTransaction: txMeta => {
- const { id, txParams } = txMeta
+ const { id, txParams, lastGasPrice } = txMeta
const {
gas: gasLimit,
gasPrice,
to,
value: amount,
} = txParams
+
+ let forceGasMin
+ let nonce
+ if (lastGasPrice) {
+ const stripped = ethUtil.stripHexPrefix(lastGasPrice)
+ forceGasMin = ethUtil.addHexPrefix(addCurrencies(stripped, MIN_GAS_PRICE_HEX, {
+ aBase: 16,
+ bBase: 16,
+ toNumericBase: 'hex',
+ fromDenomination: 'WEI',
+ toDenomination: 'GWEI',
+ }))
+
+ nonce = txParams.nonce
+ }
+
dispatch(actions.updateSend({
gasLimit,
gasPrice,
@@ -51,6 +67,8 @@ function mapDispatchToProps (dispatch) {
amount,
errors: { to: null, amount: null },
editingTransactionId: id,
+ forceGasMin,
+ nonce,
}))
dispatch(actions.showSendPage())
},