mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Add metrics events for clicking and saving tx speed ups (#7275)
This commit is contained in:
parent
4ad42d8374
commit
994a8a3167
@ -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…
Reference in New Issue
Block a user