From 6f5cc9c6c70aea2020ebb34711da4520c587beb1 Mon Sep 17 00:00:00 2001 From: ryanml Date: Fri, 1 Apr 2022 08:51:30 -0700 Subject: [PATCH] Fix Buy Ether via Moonpay and Wyre actions (#14322) --- .../deposit-ether-modal.component.js | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/ui/components/app/modals/deposit-ether-modal/deposit-ether-modal.component.js b/ui/components/app/modals/deposit-ether-modal/deposit-ether-modal.component.js index 90f707f75..4d77a53d5 100644 --- a/ui/components/app/modals/deposit-ether-modal/deposit-ether-modal.component.js +++ b/ui/components/app/modals/deposit-ether-modal/deposit-ether-modal.component.js @@ -154,11 +154,12 @@ export default class DepositEtherModal extends Component { text: t('buyCryptoWithMoonPayDescription', [symbol]), buttonLabel: t('continueToMoonPay'), onButtonClick: () => { - this.context.metricsEvent({ - eventOpts: { - category: 'Accounts', - action: 'Deposit tokens', - name: 'Click buy tokens via MoonPay', + this.context.trackEvent({ + category: 'Accounts', + event: 'Click buy Ether via MoonPay', + properties: { + action: 'Deposit Ether', + legacy_event: true, }, }); toMoonPay(address, chainId); @@ -171,11 +172,12 @@ export default class DepositEtherModal extends Component { text: t('buyWithWyreDescription'), buttonLabel: t('continueToWyre'), onButtonClick: () => { - this.context.metricsEvent({ - eventOpts: { - category: 'Accounts', + this.context.trackEvent({ + category: 'Accounts', + event: 'Click buy Ether via Wyre', + properties: { action: 'Deposit Ether', - name: 'Click buy Ether via Wyre', + legacy_event: true, }, }); toWyre(address);