-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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: Simplify event logging for SWAP_QUOTE_RECEIVED #6628
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
]) | ||
if (!trade || prevTrade === trade) return // no new swap quote to log | ||
|
||
setSwapQuoteReceivedDate(new Date()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this property is still used downstream in child components, so not getting rid of it for now
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #6628 +/- ##
==========================================
+ Coverage 58.76% 60.09% +1.32%
==========================================
Files 720 721 +1
Lines 21172 21166 -6
Branches 6981 6976 -5
==========================================
+ Hits 12442 12719 +277
+ Misses 8657 8370 -287
- Partials 73 77 +4
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
1 flaky tests on run #11235 ↗︎
Details:
cypress/e2e/swap/swap.test.ts • 1 flaky test • e2e
This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. |
Description
The previous version of the hook was infinite looping when
trade
is always defined, so simplify logic to just keep track oftrade
changes. Also removes the time-based logging since we have stats on the backend nowScreen capture
No UI changes
Test plan
Reproducing the error
Throw in a console.log right before
sendAnalyticsEvent
and see it firing like 1 million times lol