aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/pending-tx/confirm-send-ether.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui/app/components/pending-tx/confirm-send-ether.js')
-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())
},