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: some pending stand by transaction not getting cleaned up #6224

Merged
merged 2 commits into from
Nov 12, 2024

Conversation

sviderock
Copy link
Contributor

@sviderock sviderock commented Nov 12, 2024

Description

The saga that is watching for pending transactions to turn into completed is not reporting certain transactions' status correctly. It was tested that when swapping from USDC(Optimism) to USDC(Celo):

  • cross-chain swap transaction was hanging in a forever "Pending" state
  • approval has never appeared in a saga's list

This PR fixes this by doing more thorough cleanup of stand by transactions, once they appear in Zerion's response. Previously, we didn't clean pending transactions up and this PR fixes that as if we get any transaction from Zerion - we should use it as a source of truth.

Test plan

Existing tests pass.

Related issues

N/A

Backwards compatibility

Yes

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)

@@ -246,7 +246,7 @@ const slice = createSlice({
* - ignore pending as it should only affect confirmed transactions that are already
Copy link
Collaborator

Choose a reason for hiding this comment

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

should this comment also be removed? i don't really understand what it means, but it seems like the pending transactions were intentionally checked before

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, you're right! Forgot to remove, sorry!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

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.

🚀

Copy link

codecov bot commented Nov 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.97%. Comparing base (c9bc051) to head (aafa558).
Report is 2 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #6224      +/-   ##
==========================================
- Coverage   88.97%   88.97%   -0.01%     
==========================================
  Files         736      736              
  Lines       31407    31407              
  Branches     5809     5809              
==========================================
- Hits        27944    27943       -1     
- Misses       3265     3266       +1     
  Partials      198      198              
Files with missing lines Coverage Δ
src/transactions/slice.ts 98.63% <100.00%> (ø)

... and 1 file 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 c9bc051...aafa558. Read the comment docs.

@sviderock sviderock added this pull request to the merge queue Nov 12, 2024
Merged via the queue into main with commit 3b04940 Nov 12, 2024
15 checks passed
@sviderock sviderock deleted the slava/fix-pending-cleanup-feed-v2 branch November 12, 2024 15:35
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