Prevent shutdown if trade is in process of being taken. #6211
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.
Fixes #6205
We've had a few trades that do not contain a multisig deposit TxId, even though the deposit tx is valid on the blockchain. An example is #6205. (Maybe @pazza83 can give an idea how often this happens). The deposit TxId gets written to the trade once BitcoinJ tells us the tx has been seen by peer nodes, but that can sometimes be delayed by network issues, and the remainder of the P2P negotiation can continue successfully. This leaves the trade looking ok, but if the user closes Bisq the trade will forever be without a deposit TxId. The result is a trade which cannot be completed, nor can mediation be opened by the affected trader because the deposit TxId is missing.
This PR makes a check of open trades when the user is closing the app. If any recent trades are found (less than 5 minutes old), and still in the phase TAKER_FEE_PUBLISHED, it prompts the user to please wait a bit more before closing the app.
(The popup can list more multiple trades' information in the rare case that more than one was affected - if you want a screenshot of that scenario let me know).
Anyone (e.g. @w0000000t) if the popup message does not appear clear to you, please feel free to suggest improvements.