Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fix unwanted IncompleteAssetDisplayed events #27651

Open
wants to merge 10 commits into
base: develop
Choose a base branch
from

Conversation

OGPoyraz
Copy link
Member

@OGPoyraz OGPoyraz commented Oct 7, 2024

Description

This PR aims to stop IncompleteAssetDisplayed events appearing in the mix panel even the token is known by the API.

For more information please see the mixpanel link https://mixpanel.com/project/2212883/view/2760759/app/events#zy8pCckfmZvq

Open in GitHub Codespaces

Related issues

Fixes: https://github.com/MetaMask/MetaMask-planning/issues/3362

Manual testing steps

N/A

Screenshots/Recordings

Before

After

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

@OGPoyraz OGPoyraz requested a review from a team as a code owner October 7, 2024 08:14
@github-actions github-actions bot added the team-confirmations Push issues to confirmations team label Oct 7, 2024
@OGPoyraz OGPoyraz force-pushed the 3362-incomplete-asset-displayed-incorrectly-fired branch from 54e3eb7 to 18f2aa7 Compare October 7, 2024 08:37
@metamaskbot
Copy link
Collaborator

Builds ready [6f1f48e]
Page Load Metrics (2083 ± 88 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint26625831904561269
domContentLoaded18102562204917283
load18202636208318388
domInteractive23107492412
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 21 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

Copy link

sonarcloud bot commented Oct 15, 2024

@metamaskbot
Copy link
Collaborator

Builds ready [389e6ef]
Page Load Metrics (2003 ± 132 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint170928292001271130
domContentLoaded166925811959235113
load170628542003276132
domInteractive154848110048
backgroundConnect9244445928
firstReactRender571791032914
getState4164253919
initialActions01000
loadScripts12161944147420196
setupStore11165434120
uiStartup191138222279459220
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 21 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@OGPoyraz OGPoyraz force-pushed the 3362-incomplete-asset-displayed-incorrectly-fired branch from 389e6ef to c57767c Compare October 18, 2024 10:10
@@ -67,6 +67,10 @@ export function useSimulationMetrics({
setLoadingComplete();
}

if(!simulationData) {
Copy link
Member

@matthewwalsh0 matthewwalsh0 Oct 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We've other hooks below including a useEffect so would this condition best be added to the shouldSkipMetrics boolean that is checked inside the effect?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the way we trigger SimulationIncompleteAssetDisplayed is getting send regardless of that variable, it's not tied to transaction.

But now I noticed that useIncompleteAssetEvent not even cares if metrics are enabled or not 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team-confirmations Push issues to confirmations team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants