aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/transaction-view-balance/transaction-view-balance.component.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui/app/components/transaction-view-balance/transaction-view-balance.component.js')
-rw-r--r--ui/app/components/transaction-view-balance/transaction-view-balance.component.js25
1 files changed, 22 insertions, 3 deletions
diff --git a/ui/app/components/transaction-view-balance/transaction-view-balance.component.js b/ui/app/components/transaction-view-balance/transaction-view-balance.component.js
index b16e04f4f..a18e959b5 100644
--- a/ui/app/components/transaction-view-balance/transaction-view-balance.component.js
+++ b/ui/app/components/transaction-view-balance/transaction-view-balance.component.js
@@ -12,6 +12,7 @@ import Tooltip from '../tooltip-v2'
export default class TransactionViewBalance extends PureComponent {
static contextTypes = {
t: PropTypes.func,
+ metricsEvent: PropTypes.func,
}
static propTypes = {
@@ -78,7 +79,7 @@ export default class TransactionViewBalance extends PureComponent {
}
renderButtons () {
- const { t } = this.context
+ const { t, metricsEvent } = this.context
const { selectedToken, showDepositModal, history } = this.props
return (
@@ -88,7 +89,16 @@ export default class TransactionViewBalance extends PureComponent {
<Button
type="primary"
className="transaction-view-balance__button"
- onClick={() => showDepositModal()}
+ onClick={() => {
+ metricsEvent({
+ eventOpts: {
+ category: 'Navigation',
+ action: 'Home',
+ name: 'Clicked Deposit',
+ },
+ })
+ showDepositModal()
+ }}
>
{ t('deposit') }
</Button>
@@ -97,7 +107,16 @@ export default class TransactionViewBalance extends PureComponent {
<Button
type="primary"
className="transaction-view-balance__button"
- onClick={() => history.push(SEND_ROUTE)}
+ onClick={() => {
+ metricsEvent({
+ eventOpts: {
+ category: 'Navigation',
+ action: 'Home',
+ name: 'Clicked Send',
+ },
+ })
+ history.push(SEND_ROUTE)
+ }}
>
{ t('send') }
</Button>