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

chore(swap): track swap cancel #6399

Merged
merged 2 commits into from
Jan 8, 2025
Merged

chore(swap): track swap cancel #6399

merged 2 commits into from
Jan 8, 2025

Conversation

bakoushin
Copy link
Contributor

@bakoushin bakoushin commented Jan 7, 2025

Description

When the swap is cancelled by the user we aren't tracking anything. This fixes it.

After this fix, we can expect that the number of submitted same-chain swaps should equal to sum of successful, errored, and cancelled swaps.

A new event swap_cancel is introduced instead of reusing swap_execute_error to not contribute to the swap error count.

Test plan

Updated unit test

Related issues

Backwards compatibility

Y

Network scalability

If a new NetworkId and/or Network are added in the future, the changes in this PR will:

  • Continue to work without code changes, OR trigger a compilation error (guaranteeing we find it when a new network is added)

Copy link

codecov bot commented Jan 7, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.09%. Comparing base (e72427d) to head (d1a1e0a).
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #6399      +/-   ##
==========================================
- Coverage   89.09%   89.09%   -0.01%     
==========================================
  Files         736      736              
  Lines       31838    31840       +2     
  Branches     6040     5732     -308     
==========================================
+ Hits        28366    28367       +1     
- Misses       3276     3425     +149     
+ Partials      196       48     -148     
Files with missing lines Coverage Δ
src/analytics/Events.tsx 100.00% <100.00%> (ø)
src/analytics/Properties.tsx 100.00% <ø> (ø)
src/swap/saga.ts 94.35% <100.00%> (+0.04%) ⬆️

... and 66 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e72427d...d1a1e0a. Read the comment docs.

Copy link
Collaborator

@kathaypacific kathaypacific left a comment

Choose a reason for hiding this comment

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

💅🏼

@bakoushin bakoushin added this pull request to the merge queue Jan 8, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 8, 2025
@bakoushin bakoushin added this pull request to the merge queue Jan 8, 2025
Merged via the queue into main with commit 9170504 Jan 8, 2025
16 checks passed
@bakoushin bakoushin deleted the alex/track-swap-cancel branch January 8, 2025 10:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants