mirror of
https://github.com/haveno-dex/haveno.git
synced 2024-12-22 19:49:32 +00:00
do not set offer state to pending after canceled
This commit is contained in:
parent
ebcadb7bed
commit
09fd8710b1
1 changed files with 3 additions and 1 deletions
|
@ -625,6 +625,7 @@ public class OpenOfferManager implements PeerManager.Listener, DecryptedDirectMe
|
||||||
log.info("Canceling open offer: {}", openOffer.getId());
|
log.info("Canceling open offer: {}", openOffer.getId());
|
||||||
if (!offersToBeEdited.containsKey(openOffer.getId())) {
|
if (!offersToBeEdited.containsKey(openOffer.getId())) {
|
||||||
if (openOffer.isAvailable()) {
|
if (openOffer.isAvailable()) {
|
||||||
|
openOffer.setState(OpenOffer.State.CANCELED);
|
||||||
offerBookService.removeOffer(openOffer.getOffer().getOfferPayload(),
|
offerBookService.removeOffer(openOffer.getOffer().getOfferPayload(),
|
||||||
() -> {
|
() -> {
|
||||||
ThreadUtils.submitToPool(() -> { // TODO: this runs off thread and then shows popup when done. should show overlay spinner until done
|
ThreadUtils.submitToPool(() -> { // TODO: this runs off thread and then shows popup when done. should show overlay spinner until done
|
||||||
|
@ -634,6 +635,7 @@ public class OpenOfferManager implements PeerManager.Listener, DecryptedDirectMe
|
||||||
},
|
},
|
||||||
errorMessageHandler);
|
errorMessageHandler);
|
||||||
} else {
|
} else {
|
||||||
|
openOffer.setState(OpenOffer.State.CANCELED);
|
||||||
ThreadUtils.submitToPool(() -> {
|
ThreadUtils.submitToPool(() -> {
|
||||||
doCancelOffer(openOffer);
|
doCancelOffer(openOffer);
|
||||||
if (resultHandler != null) resultHandler.handleResult();
|
if (resultHandler != null) resultHandler.handleResult();
|
||||||
|
@ -1082,7 +1084,7 @@ public class OpenOfferManager implements PeerManager.Listener, DecryptedDirectMe
|
||||||
openOffer.setSplitOutputTxFee(splitOutputTx.getFee().longValueExact());
|
openOffer.setSplitOutputTxFee(splitOutputTx.getFee().longValueExact());
|
||||||
openOffer.setScheduledTxHashes(Arrays.asList(splitOutputTx.getHash()));
|
openOffer.setScheduledTxHashes(Arrays.asList(splitOutputTx.getHash()));
|
||||||
openOffer.setScheduledAmount(openOffer.getOffer().getAmountNeeded().toString());
|
openOffer.setScheduledAmount(openOffer.getOffer().getAmountNeeded().toString());
|
||||||
openOffer.setState(OpenOffer.State.PENDING);
|
if (!openOffer.isCanceled()) openOffer.setState(OpenOffer.State.PENDING);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void scheduleWithEarliestTxs(List<OpenOffer> openOffers, OpenOffer openOffer) {
|
private void scheduleWithEarliestTxs(List<OpenOffer> openOffers, OpenOffer openOffer) {
|
||||||
|
|
Loading…
Reference in a new issue