mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
metaMetricsEvent -> trackEvent (#14249)
This commit is contained in:
parent
c7f8c629be
commit
7cb22bd883
@ -595,7 +595,7 @@ export const fetchQuotesAndSetQuoteState = (
|
|||||||
history,
|
history,
|
||||||
inputValue,
|
inputValue,
|
||||||
maxSlippage,
|
maxSlippage,
|
||||||
metaMetricsEvent,
|
trackEvent,
|
||||||
pageRedirectionDisabled,
|
pageRedirectionDisabled,
|
||||||
) => {
|
) => {
|
||||||
return async (dispatch, getState) => {
|
return async (dispatch, getState) => {
|
||||||
@ -711,7 +711,7 @@ export const fetchQuotesAndSetQuoteState = (
|
|||||||
const currentSmartTransactionsEnabled = getCurrentSmartTransactionsEnabled(
|
const currentSmartTransactionsEnabled = getCurrentSmartTransactionsEnabled(
|
||||||
state,
|
state,
|
||||||
);
|
);
|
||||||
metaMetricsEvent({
|
trackEvent({
|
||||||
event: 'Quotes Requested',
|
event: 'Quotes Requested',
|
||||||
category: 'swaps',
|
category: 'swaps',
|
||||||
sensitiveProperties: {
|
sensitiveProperties: {
|
||||||
@ -765,7 +765,7 @@ export const fetchQuotesAndSetQuoteState = (
|
|||||||
]);
|
]);
|
||||||
|
|
||||||
if (Object.values(fetchedQuotes)?.length === 0) {
|
if (Object.values(fetchedQuotes)?.length === 0) {
|
||||||
metaMetricsEvent({
|
trackEvent({
|
||||||
event: 'No Quotes Available',
|
event: 'No Quotes Available',
|
||||||
category: 'swaps',
|
category: 'swaps',
|
||||||
sensitiveProperties: {
|
sensitiveProperties: {
|
||||||
@ -786,7 +786,7 @@ export const fetchQuotesAndSetQuoteState = (
|
|||||||
} else {
|
} else {
|
||||||
const newSelectedQuote = fetchedQuotes[selectedAggId];
|
const newSelectedQuote = fetchedQuotes[selectedAggId];
|
||||||
|
|
||||||
metaMetricsEvent({
|
trackEvent({
|
||||||
event: 'Quotes Received',
|
event: 'Quotes Received',
|
||||||
category: 'swaps',
|
category: 'swaps',
|
||||||
sensitiveProperties: {
|
sensitiveProperties: {
|
||||||
@ -832,7 +832,7 @@ export const fetchQuotesAndSetQuoteState = (
|
|||||||
|
|
||||||
export const signAndSendSwapsSmartTransaction = ({
|
export const signAndSendSwapsSmartTransaction = ({
|
||||||
unsignedTransaction,
|
unsignedTransaction,
|
||||||
metaMetricsEvent,
|
trackEvent,
|
||||||
history,
|
history,
|
||||||
additionalTrackingParams,
|
additionalTrackingParams,
|
||||||
}) => {
|
}) => {
|
||||||
@ -888,7 +888,7 @@ export const signAndSendSwapsSmartTransaction = ({
|
|||||||
stx_user_opt_in: smartTransactionsOptInStatus,
|
stx_user_opt_in: smartTransactionsOptInStatus,
|
||||||
...additionalTrackingParams,
|
...additionalTrackingParams,
|
||||||
};
|
};
|
||||||
metaMetricsEvent({
|
trackEvent({
|
||||||
event: 'STX Swap Started',
|
event: 'STX Swap Started',
|
||||||
category: 'swaps',
|
category: 'swaps',
|
||||||
sensitiveProperties: swapMetaData,
|
sensitiveProperties: swapMetaData,
|
||||||
@ -984,7 +984,7 @@ export const signAndSendSwapsSmartTransaction = ({
|
|||||||
|
|
||||||
export const signAndSendTransactions = (
|
export const signAndSendTransactions = (
|
||||||
history,
|
history,
|
||||||
metaMetricsEvent,
|
trackEvent,
|
||||||
additionalTrackingParams,
|
additionalTrackingParams,
|
||||||
) => {
|
) => {
|
||||||
return async (dispatch, getState) => {
|
return async (dispatch, getState) => {
|
||||||
@ -1138,7 +1138,7 @@ export const signAndSendTransactions = (
|
|||||||
swapMetaData.base_and_priority_fee_per_gas = baseAndPriorityFeePerGas;
|
swapMetaData.base_and_priority_fee_per_gas = baseAndPriorityFeePerGas;
|
||||||
}
|
}
|
||||||
|
|
||||||
metaMetricsEvent({
|
trackEvent({
|
||||||
event: 'Swap Started',
|
event: 'Swap Started',
|
||||||
category: 'swaps',
|
category: 'swaps',
|
||||||
sensitiveProperties: swapMetaData,
|
sensitiveProperties: swapMetaData,
|
||||||
|
@ -29,7 +29,7 @@ export default function LoadingSwapsQuotes({
|
|||||||
onDone,
|
onDone,
|
||||||
}) {
|
}) {
|
||||||
const t = useContext(I18nContext);
|
const t = useContext(I18nContext);
|
||||||
const metaMetricsEvent = useContext(MetaMetricsContext);
|
const trackEvent = useContext(MetaMetricsContext);
|
||||||
const dispatch = useDispatch();
|
const dispatch = useDispatch();
|
||||||
const history = useHistory();
|
const history = useHistory();
|
||||||
const animationEventEmitter = useRef(new EventEmitter());
|
const animationEventEmitter = useRef(new EventEmitter());
|
||||||
@ -158,7 +158,7 @@ export default function LoadingSwapsQuotes({
|
|||||||
<SwapsFooter
|
<SwapsFooter
|
||||||
submitText={t('back')}
|
submitText={t('back')}
|
||||||
onSubmit={async () => {
|
onSubmit={async () => {
|
||||||
metaMetricsEvent(quotesRequestCancelledEventConfig);
|
trackEvent(quotesRequestCancelledEventConfig);
|
||||||
await dispatch(navigateBackToBuildQuote(history));
|
await dispatch(navigateBackToBuildQuote(history));
|
||||||
}}
|
}}
|
||||||
hideCancel
|
hideCancel
|
||||||
|
Loading…
x
Reference in New Issue
Block a user