mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-22 22:45:21 +01:00
Remove delay form UserThread.execute
For tradeStateListener that would cause a wrong state as we would get called after we have completed and do the isPayoutPublished check. Keeping it in sync does remove the listener before we complete the trade. For autoConfirmSettings it would probably not cause and issue but as we use a CopyOnWriteArrayList there the remove is safe anyway (to not cause a ConcurrentListModification exception).
This commit is contained in:
parent
37241f98d8
commit
d725590a9c
1 changed files with 2 additions and 3 deletions
|
@ -25,7 +25,6 @@ import bisq.core.user.AutoConfirmSettings;
|
|||
|
||||
import bisq.network.Socks5ProxyProvider;
|
||||
|
||||
import bisq.common.UserThread;
|
||||
import bisq.common.handlers.FaultHandler;
|
||||
|
||||
import org.bitcoinj.core.Coin;
|
||||
|
@ -182,10 +181,10 @@ class XmrTxProofRequestsPerTrade implements AssetTxProofRequestsPerTrade {
|
|||
requests.forEach(XmrTxProofRequest::terminate);
|
||||
requests.clear();
|
||||
if (tradeStateListener != null) {
|
||||
UserThread.execute(() -> trade.stateProperty().removeListener(tradeStateListener));
|
||||
trade.stateProperty().removeListener(tradeStateListener);
|
||||
}
|
||||
if (autoConfirmSettingsListener != null) {
|
||||
UserThread.execute(() -> autoConfirmSettings.removeListener(autoConfirmSettingsListener));
|
||||
autoConfirmSettings.removeListener(autoConfirmSettingsListener);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue