mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-08-13 00:45:29 -04:00
only remove trade if not in funded state
track sent vs seen deposit request state cleanup trade phases
This commit is contained in:
parent
25b2d6591a
commit
cebdef31c0
13 changed files with 66 additions and 62 deletions
|
@ -416,10 +416,10 @@ class TakeOfferViewModel extends ActivatableWithDataModel<TakeOfferDataModel> im
|
|||
case INIT:
|
||||
appendMsg = Res.get("takeOffer.error.noFundsLost");
|
||||
break;
|
||||
case TAKER_FEE_PUBLISHED:
|
||||
case DEPOSIT_REQUESTED:
|
||||
appendMsg = Res.get("takeOffer.error.feePaid");
|
||||
break;
|
||||
case DEPOSIT_PUBLISHED:
|
||||
case DEPOSITS_PUBLISHED:
|
||||
case PAYMENT_SENT:
|
||||
case PAYMENT_RECEIVED:
|
||||
appendMsg = Res.get("takeOffer.error.depositPublished");
|
||||
|
|
|
@ -187,7 +187,7 @@ public class NotificationCenter {
|
|||
message = Res.get("notification.trade.completed");
|
||||
} else {
|
||||
if (trade instanceof MakerTrade &&
|
||||
phase.ordinal() == Trade.Phase.DEPOSIT_PUBLISHED.ordinal()) {
|
||||
phase.ordinal() == Trade.Phase.DEPOSITS_PUBLISHED.ordinal()) {
|
||||
final String role = trade instanceof BuyerTrade ? Res.get("shared.seller") : Res.get("shared.buyer");
|
||||
message = Res.get("notification.trade.accepted", role);
|
||||
}
|
||||
|
|
|
@ -381,7 +381,7 @@ public class PendingTradesView extends ActivatableViewAndModel<VBox, PendingTrad
|
|||
|
||||
private boolean isMaybeInvalidTrade(Trade trade) {
|
||||
return trade.hasErrorMessage() ||
|
||||
(Trade.Phase.DEPOSIT_PUBLISHED.ordinal() <= trade.getPhase().ordinal() && trade.isTxChainInvalid());
|
||||
(Trade.Phase.DEPOSITS_PUBLISHED.ordinal() <= trade.getPhase().ordinal() && trade.isTxChainInvalid());
|
||||
}
|
||||
|
||||
private void onMoveInvalidTradeToFailedTrades(Trade trade) {
|
||||
|
|
|
@ -402,6 +402,10 @@ public class PendingTradesViewModel extends ActivatableWithDataModel<PendingTrad
|
|||
switch (tradeState) {
|
||||
// preparation
|
||||
case PREPARATION:
|
||||
case MULTISIG_PREPARED:
|
||||
case MULTISIG_MADE:
|
||||
case MULTISIG_EXCHANGED:
|
||||
case MULTISIG_COMPLETED:
|
||||
case CONTRACT_SIGNATURE_REQUESTED:
|
||||
case CONTRACT_SIGNED:
|
||||
sellerState.set(UNDEFINED);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue