-
Notifications
You must be signed in to change notification settings - Fork 23
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(trade): Spawn trade execution in dedicated task #2030
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
holzeis
force-pushed
the
fix/spawn-task-when-executing-trade
branch
5 times, most recently
from
February 15, 2024 09:47
21d105b
to
200bae9
Compare
bonomat
approved these changes
Feb 15, 2024
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.
LGTM
@@ -7,12 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 | |||
|
|||
## [Unreleased] | |||
|
|||
- Fix(validation): Show correct max counterparty collateral in validation message. | |||
- Fix(trade): Spawn dedicated tokio task when executing trade |
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.
Nit: I would have mentioned what problem was fixed, not how.
…o complete the action Otherwise, it could happen that the app is already responding to a dlc message, where the 10101 metadata hasn't been updated yet.
Introduces a `Message::TradeError`, which allows to inform the app async about a failed trade execution.
holzeis
force-pushed
the
fix/spawn-task-when-executing-trade
branch
from
February 15, 2024 10:04
200bae9
to
39f599f
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
If the trade execution takes longer than 30 seconds the http request times out and the thread gets killed.
However, the spawned blocking thread to propose the dlc channel is finishing and sending the offer message. That leads to the coordinator sending the dlc message without updating the 10101 meta data (e.g. creating the position, updating order, etc.)
This also applies to the renew and close position flows.
Note, this is not fixing the issue of why proposing a dlc channel would take such a long time, but will fix the issue that the user may end up in a broken state.
Simulator.Screen.Recording.-.iPhone.13.Pro.-.2024-02-14.at.14.19.44.mp4