Add metrics events for clicking and saving tx speed ups (#7275)

feature/default_network_editable
Dan J Miller 5 years ago committed by GitHub
parent 4ad42d8374
commit 994a8a3167
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 11
      ui/app/components/app/gas-customization/gas-modal-page-container/gas-modal-page-container.component.js
  2. 8
      ui/app/components/app/transaction-list-item/transaction-list-item.component.js

@ -8,6 +8,7 @@ import BasicTabContent from './basic-tab-content'
export default class GasModalPageContainer extends Component {
static contextTypes = {
t: PropTypes.func,
metricsEvent: PropTypes.func,
}
static propTypes = {
@ -162,6 +163,7 @@ export default class GasModalPageContainer extends Component {
customModalGasPriceInHex,
customModalGasLimitInHex,
disableSave,
isSpeedUp,
...tabProps
} = this.props
@ -175,6 +177,15 @@ export default class GasModalPageContainer extends Component {
onCancel={() => cancelAndClose()}
onClose={() => cancelAndClose()}
onSubmit={() => {
if (isSpeedUp) {
this.context.metricsEvent({
eventOpts: {
category: 'Navigation',
action: 'Activity Log',
name: 'Saved "Speed Up"',
},
})
}
onSubmit(customModalGasLimitInHex, customModalGasPriceInHex)
}}
submitText={this.context.t('save')}

@ -113,6 +113,14 @@ export default class TransactionListItem extends PureComponent {
const retryId = id || initialTransactionId
this.context.metricsEvent({
eventOpts: {
category: 'Navigation',
action: 'Activity Log',
name: 'Clicked "Speed Up"',
},
})
return fetchBasicGasAndTimeEstimates()
.then(basicEstimates => fetchGasEstimates(basicEstimates.blockTime))
.then(retryTransaction(retryId, gasPrice))

Loading…
Cancel
Save