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

869: Speeding up the tx changes the tx id and is not tracked #894

Merged
7 commits merged into from
Apr 17, 2024

Conversation

ghost
Copy link

@ghost ghost commented Apr 5, 2024

Fixes #869

Transactions are now tracked differently to account for hash changes.

Normally after a transaction is submitted it will use the hash to listen for a successful receipt. The problem is that the hash will change when you speed up a transaction.

I have a rewritten the whole listening part. Now it always listens for all events (swap, cancel, approve, deposit, withdrawal) and it will try to match it with any processing transaction in the store. It will first try to match with a hash, but if that fails it checks for matching attributes like order nonce, or amount.

If there's a match then the transaction is complete (or failed) and other actions can be fired from that, like show a toast.

Everything is consolidated in src/features/transactions/transactionsHooks.ts, I've also added some comments in there to make everything clear.

I've also done some refactoring.

@ghost ghost requested review from dmosites and gpxl-dev April 5, 2024 21:36
@ghost ghost merged commit 56bd85d into develop Apr 17, 2024
3 checks passed
@ghost ghost deleted the feature/869-rebased branch April 17, 2024 20:32
This pull request was closed.
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.

Speeding up the tx changes the tx id and is not tracked
1 participant