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 {
|
export default class GasModalPageContainer extends Component {
|
||||||
static contextTypes = {
|
static contextTypes = {
|
||||||
t: PropTypes.func,
|
t: PropTypes.func,
|
||||||
|
metricsEvent: PropTypes.func,
|
||||||
}
|
}
|
||||||
|
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
@ -162,6 +163,7 @@ export default class GasModalPageContainer extends Component {
|
|||||||
customModalGasPriceInHex,
|
customModalGasPriceInHex,
|
||||||
customModalGasLimitInHex,
|
customModalGasLimitInHex,
|
||||||
disableSave,
|
disableSave,
|
||||||
|
isSpeedUp,
|
||||||
...tabProps
|
...tabProps
|
||||||
} = this.props
|
} = this.props
|
||||||
|
|
||||||
@ -175,6 +177,15 @@ export default class GasModalPageContainer extends Component {
|
|||||||
onCancel={() => cancelAndClose()}
|
onCancel={() => cancelAndClose()}
|
||||||
onClose={() => cancelAndClose()}
|
onClose={() => cancelAndClose()}
|
||||||
onSubmit={() => {
|
onSubmit={() => {
|
||||||
|
if (isSpeedUp) {
|
||||||
|
this.context.metricsEvent({
|
||||||
|
eventOpts: {
|
||||||
|
category: 'Navigation',
|
||||||
|
action: 'Activity Log',
|
||||||
|
name: 'Saved "Speed Up"',
|
||||||
|
},
|
||||||
|
})
|
||||||
|
}
|
||||||
onSubmit(customModalGasLimitInHex, customModalGasPriceInHex)
|
onSubmit(customModalGasLimitInHex, customModalGasPriceInHex)
|
||||||
}}
|
}}
|
||||||
submitText={this.context.t('save')}
|
submitText={this.context.t('save')}
|
||||||
|
@ -113,6 +113,14 @@ export default class TransactionListItem extends PureComponent {
|
|||||||
|
|
||||||
const retryId = id || initialTransactionId
|
const retryId = id || initialTransactionId
|
||||||
|
|
||||||
|
this.context.metricsEvent({
|
||||||
|
eventOpts: {
|
||||||
|
category: 'Navigation',
|
||||||
|
action: 'Activity Log',
|
||||||
|
name: 'Clicked "Speed Up"',
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
return fetchBasicGasAndTimeEstimates()
|
return fetchBasicGasAndTimeEstimates()
|
||||||
.then(basicEstimates => fetchGasEstimates(basicEstimates.blockTime))
|
.then(basicEstimates => fetchGasEstimates(basicEstimates.blockTime))
|
||||||
.then(retryTransaction(retryId, gasPrice))
|
.then(retryTransaction(retryId, gasPrice))
|
||||||
|
Loading…
Reference in New Issue
Block a user