mirror of
https://github.com/retoaccess1/haveno-reto.git
synced 2024-11-10 13:13:36 +01:00
unfreeze funds if error during creating offer
fix jfx error
This commit is contained in:
parent
4a171c9baa
commit
7945514c46
@ -426,6 +426,7 @@ public class OpenOfferManager implements PeerManager.Listener, DecryptedDirectMe
|
||||
requestPersistence();
|
||||
resultHandler.handleResult(transaction);
|
||||
}, (errMessage) -> {
|
||||
onRemoved(openOffer);
|
||||
errorMessageHandler.handleErrorMessage(errMessage);
|
||||
});
|
||||
}
|
||||
@ -478,12 +479,11 @@ public class OpenOfferManager implements PeerManager.Listener, DecryptedDirectMe
|
||||
ResultHandler resultHandler,
|
||||
ErrorMessageHandler errorMessageHandler) {
|
||||
if (!offersToBeEdited.containsKey(openOffer.getId())) {
|
||||
Offer offer = openOffer.getOffer();
|
||||
if (openOffer.isDeactivated()) {
|
||||
onRemoved(openOffer, resultHandler, offer);
|
||||
onRemoved(openOffer);
|
||||
} else {
|
||||
offerBookService.removeOffer(offer.getOfferPayload(),
|
||||
() -> onRemoved(openOffer, resultHandler, offer),
|
||||
offerBookService.removeOffer(openOffer.getOffer().getOfferPayload(),
|
||||
() -> onRemoved(openOffer),
|
||||
errorMessageHandler);
|
||||
}
|
||||
} else {
|
||||
@ -560,7 +560,8 @@ public class OpenOfferManager implements PeerManager.Listener, DecryptedDirectMe
|
||||
}
|
||||
}
|
||||
|
||||
private void onRemoved(@NotNull OpenOffer openOffer, ResultHandler resultHandler, Offer offer) {
|
||||
private void onRemoved(@NotNull OpenOffer openOffer) {
|
||||
Offer offer = openOffer.getOffer();
|
||||
if (offer.getOfferPayload().getReserveTxKeyImages() != null) {
|
||||
for (String frozenKeyImage : offer.getOfferPayload().getReserveTxKeyImages()) xmrWalletService.getWallet().thawOutput(frozenKeyImage);
|
||||
}
|
||||
@ -571,7 +572,6 @@ public class OpenOfferManager implements PeerManager.Listener, DecryptedDirectMe
|
||||
log.info("onRemoved offerId={}", offer.getId());
|
||||
btcWalletService.resetAddressEntriesForOpenOffer(offer.getId());
|
||||
requestPersistence();
|
||||
resultHandler.handleResult();
|
||||
}
|
||||
|
||||
// Close openOffer after deposit published
|
||||
|
@ -17,6 +17,7 @@
|
||||
|
||||
package bisq.desktop.main.shared;
|
||||
|
||||
import bisq.common.UserThread;
|
||||
import javafx.beans.property.SimpleStringProperty;
|
||||
import javafx.beans.property.StringProperty;
|
||||
|
||||
@ -38,6 +39,6 @@ public class PriceFeedComboBoxItem {
|
||||
}
|
||||
|
||||
public void setDisplayString(String displayString) {
|
||||
this.displayStringProperty.set(displayString);
|
||||
UserThread.execute(() -> this.displayStringProperty.set(displayString));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user