diff --git a/app/_locales/en/messages.json b/app/_locales/en/messages.json
index 4fe04674b..3733830cc 100644
--- a/app/_locales/en/messages.json
+++ b/app/_locales/en/messages.json
@@ -1442,6 +1442,9 @@
"viewOnEtherscan": {
"message": "View on Etherscan"
},
+ "retryTransaction": {
+ "message": "Retry Transaction"
+ },
"visitWebSite": {
"message": "Visit our web site"
},
diff --git a/ui/app/components/app/gas-customization/gas-modal-page-container/gas-modal-page-container.component.js b/ui/app/components/app/gas-customization/gas-modal-page-container/gas-modal-page-container.component.js
index 779dfc12d..1f26397af 100644
--- a/ui/app/components/app/gas-customization/gas-modal-page-container/gas-modal-page-container.component.js
+++ b/ui/app/components/app/gas-customization/gas-modal-page-container/gas-modal-page-container.component.js
@@ -42,6 +42,7 @@ export default class GasModalPageContainer extends Component {
]),
customPriceIsSafe: PropTypes.bool,
isSpeedUp: PropTypes.bool,
+ isRetry: PropTypes.bool,
disableSave: PropTypes.bool,
isEthereumNetwork: PropTypes.bool,
}
@@ -80,6 +81,7 @@ export default class GasModalPageContainer extends Component {
gasEstimatesLoading,
customPriceIsSafe,
isSpeedUp,
+ isRetry,
infoRowProps: {
transactionFee,
},
@@ -99,6 +101,7 @@ export default class GasModalPageContainer extends Component {
gasEstimatesLoading={gasEstimatesLoading}
customPriceIsSafe={customPriceIsSafe}
isSpeedUp={isSpeedUp}
+ isRetry={isRetry}
isEthereumNetwork={isEthereumNetwork}
/>
)
diff --git a/ui/app/components/app/gas-customization/gas-modal-page-container/gas-modal-page-container.container.js b/ui/app/components/app/gas-customization/gas-modal-page-container/gas-modal-page-container.container.js
index 2533dec68..bf17a049a 100644
--- a/ui/app/components/app/gas-customization/gas-modal-page-container/gas-modal-page-container.container.js
+++ b/ui/app/components/app/gas-customization/gas-modal-page-container/gas-modal-page-container.container.js
@@ -6,6 +6,7 @@ import {
setGasLimit,
setGasPrice,
createSpeedUpTransaction,
+ createRetryTransaction,
hideSidebar,
updateSendAmount,
setGasTotal,
@@ -153,6 +154,7 @@ const mapStateToProps = (state, ownProps) => {
},
transaction: txData || transaction,
isSpeedUp: transaction.status === 'submitted',
+ isRetry: transaction.status === 'failed',
txId: transaction.id,
insufficientBalance,
gasEstimatesLoading,
@@ -187,6 +189,9 @@ const mapDispatchToProps = dispatch => {
createSpeedUpTransaction: (txId, gasPrice) => {
return dispatch(createSpeedUpTransaction(txId, gasPrice))
},
+ createRetryTransaction: (txId, gasPrice) => {
+ return dispatch(createRetryTransaction(txId, gasPrice))
+ },
hideGasButtonGroup: () => dispatch(hideGasButtonGroup()),
setCustomTimeEstimate: (timeEstimateInSeconds) => dispatch(setCustomTimeEstimate(timeEstimateInSeconds)),
hideSidebar: () => dispatch(hideSidebar()),
@@ -206,6 +211,7 @@ const mergeProps = (stateProps, dispatchProps, ownProps) => {
isConfirm,
txId,
isSpeedUp,
+ isRetry,
insufficientBalance,
maxModeOn,
customGasPrice,
@@ -221,6 +227,7 @@ const mergeProps = (stateProps, dispatchProps, ownProps) => {
setGasData: dispatchSetGasData,
updateConfirmTxGasAndCalculate: dispatchUpdateConfirmTxGasAndCalculate,
createSpeedUpTransaction: dispatchCreateSpeedUpTransaction,
+ createRetryTransaction: dispatchCreateRetryTransaction,
hideSidebar: dispatchHideSidebar,
cancelAndClose: dispatchCancelAndClose,
hideModal: dispatchHideModal,
@@ -248,6 +255,10 @@ const mergeProps = (stateProps, dispatchProps, ownProps) => {
dispatchCreateSpeedUpTransaction(txId, gasPrice)
dispatchHideSidebar()
dispatchCancelAndClose()
+ } else if (isRetry) {
+ dispatchCreateRetryTransaction(txId, gasPrice)
+ dispatchHideSidebar()
+ dispatchCancelAndClose()
} else {
dispatchSetGasData(gasLimit, gasPrice)
dispatchHideGasButtonGroup()
@@ -268,7 +279,7 @@ const mergeProps = (stateProps, dispatchProps, ownProps) => {
},
cancelAndClose: () => {
dispatchCancelAndClose()
- if (isSpeedUp) {
+ if (isSpeedUp || isRetry) {
dispatchHideSidebar()
}
},
diff --git a/ui/app/components/app/gas-customization/gas-modal-page-container/tests/gas-modal-page-container-container.test.js b/ui/app/components/app/gas-customization/gas-modal-page-container/tests/gas-modal-page-container-container.test.js
index 7a21ac36a..8e3d14ea4 100644
--- a/ui/app/components/app/gas-customization/gas-modal-page-container/tests/gas-modal-page-container-container.test.js
+++ b/ui/app/components/app/gas-customization/gas-modal-page-container/tests/gas-modal-page-container-container.test.js
@@ -157,6 +157,7 @@ describe('gas-modal-page-container container', () => {
},
insufficientBalance: true,
isSpeedUp: false,
+ isRetry: false,
txId: 34,
isEthereumNetwork: true,
isMainnet: true,
diff --git a/ui/app/components/app/transaction-list-item-details/tests/transaction-list-item-details.component.test.js b/ui/app/components/app/transaction-list-item-details/tests/transaction-list-item-details.component.test.js
index 583980d26..85bd073e5 100644
--- a/ui/app/components/app/transaction-list-item-details/tests/transaction-list-item-details.component.test.js
+++ b/ui/app/components/app/transaction-list-item-details/tests/transaction-list-item-details.component.test.js
@@ -70,7 +70,7 @@ describe('TransactionListItemDetails Component', () => {
const wrapper = shallow(