mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-07-28 09:24:15 -04:00
Fix bug with tx broadcast state
This commit is contained in:
parent
e5cfc2892b
commit
43d811d9fe
12 changed files with 59 additions and 69 deletions
|
@ -110,13 +110,11 @@ public class BuyerSubView extends TradeSubView {
|
|||
step2.setCompleted();
|
||||
showItem(step3);
|
||||
break;
|
||||
case WAIT_FOR_UNLOCK_PAYOUT:
|
||||
if (model.getLockTime() > 0) {
|
||||
step1.setCompleted();
|
||||
step2.setCompleted();
|
||||
step3.setCompleted();
|
||||
showItem(step4);
|
||||
}
|
||||
case WAIT_FOR_BROADCAST_AFTER_UNLOCK:
|
||||
step1.setCompleted();
|
||||
step2.setCompleted();
|
||||
step3.setCompleted();
|
||||
showItem(step4);
|
||||
break;
|
||||
case REQUEST_WITHDRAWAL:
|
||||
step1.setCompleted();
|
||||
|
|
|
@ -53,7 +53,7 @@ public class PendingTradesViewModel extends ActivatableWithDataModel<PendingTrad
|
|||
WAIT_FOR_BLOCKCHAIN_CONFIRMATION,
|
||||
REQUEST_START_FIAT_PAYMENT,
|
||||
WAIT_FOR_FIAT_PAYMENT_RECEIPT,
|
||||
WAIT_FOR_UNLOCK_PAYOUT,
|
||||
WAIT_FOR_BROADCAST_AFTER_UNLOCK,
|
||||
REQUEST_WITHDRAWAL
|
||||
}
|
||||
|
||||
|
@ -63,7 +63,7 @@ public class PendingTradesViewModel extends ActivatableWithDataModel<PendingTrad
|
|||
WAIT_FOR_FIAT_PAYMENT_STARTED,
|
||||
REQUEST_CONFIRM_FIAT_PAYMENT_RECEIVED,
|
||||
WAIT_FOR_PAYOUT_TX,
|
||||
WAIT_FOR_UNLOCK_PAYOUT,
|
||||
WAIT_FOR_BROADCAST_AFTER_UNLOCK,
|
||||
REQUEST_WITHDRAWAL
|
||||
}
|
||||
|
||||
|
@ -412,12 +412,12 @@ public class PendingTradesViewModel extends ActivatableWithDataModel<PendingTrad
|
|||
|
||||
|
||||
case PAYOUT_TX_SENT:
|
||||
buyerState.set(PendingTradesViewModel.BuyerState.WAIT_FOR_UNLOCK_PAYOUT);
|
||||
buyerState.set(PendingTradesViewModel.BuyerState.WAIT_FOR_BROADCAST_AFTER_UNLOCK);
|
||||
break;
|
||||
case PAYOUT_TX_RECEIVED:
|
||||
break;
|
||||
case PAYOUT_TX_COMMITTED:
|
||||
sellerState.set(WAIT_FOR_UNLOCK_PAYOUT);
|
||||
sellerState.set(SellerState.WAIT_FOR_BROADCAST_AFTER_UNLOCK);
|
||||
break;
|
||||
case PAYOUT_BROAD_CASTED:
|
||||
sellerState.set(REQUEST_WITHDRAWAL);
|
||||
|
|
|
@ -20,7 +20,6 @@ package io.bitsquare.gui.main.portfolio.pendingtrades;
|
|||
import io.bitsquare.gui.main.portfolio.pendingtrades.steps.TradeWizardItem;
|
||||
import io.bitsquare.gui.main.portfolio.pendingtrades.steps.seller.*;
|
||||
import javafx.beans.value.ChangeListener;
|
||||
import javafx.scene.layout.GridPane;
|
||||
|
||||
public class SellerSubView extends TradeSubView {
|
||||
private TradeWizardItem step1;
|
||||
|
@ -59,7 +58,7 @@ public class SellerSubView extends TradeSubView {
|
|||
step1 = new TradeWizardItem(SellerStep1View.class, "Wait for blockchain confirmation");
|
||||
step2 = new TradeWizardItem(SellerStep2View.class, "Wait until payment has started");
|
||||
step3 = new TradeWizardItem(SellerStep3View.class, "Confirm payment received");
|
||||
step4 = new TradeWizardItem(SellerStep4aView.class, "Wait for payout unlock");
|
||||
step4 = new TradeWizardItem(SellerStep4View.class, "Wait for payout unlock");
|
||||
step5 = new TradeWizardItem(SellerStep5View.class, "Completed");
|
||||
|
||||
if (model.getLockTime() > 0) {
|
||||
|
@ -74,7 +73,6 @@ public class SellerSubView extends TradeSubView {
|
|||
addWizardsToGridPane(step2);
|
||||
addWizardsToGridPane(step3);
|
||||
addWizardsToGridPane(step5);
|
||||
GridPane.setRowSpan(tradeProcessTitledGroupBg, 4);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -115,14 +113,13 @@ public class SellerSubView extends TradeSubView {
|
|||
case WAIT_FOR_PAYOUT_TX:
|
||||
step1.setCompleted();
|
||||
step2.setCompleted();
|
||||
step3.setCompleted();
|
||||
showItem(step4);
|
||||
showItem(step3);
|
||||
|
||||
// We don't use a wizard for that step as it only gets displayed in case the other peer is offline
|
||||
tradeStepView = new SellerStep4bView(model);
|
||||
tradeStepView = new SellerStep3bView(model);
|
||||
contentPane.getChildren().setAll(tradeStepView);
|
||||
break;
|
||||
case WAIT_FOR_UNLOCK_PAYOUT:
|
||||
case WAIT_FOR_BROADCAST_AFTER_UNLOCK:
|
||||
step1.setCompleted();
|
||||
step2.setCompleted();
|
||||
step3.setCompleted();
|
||||
|
|
|
@ -20,13 +20,13 @@ package io.bitsquare.gui.main.portfolio.pendingtrades.steps.seller;
|
|||
import io.bitsquare.gui.main.portfolio.pendingtrades.PendingTradesViewModel;
|
||||
import io.bitsquare.gui.main.portfolio.pendingtrades.steps.TradeStepView;
|
||||
|
||||
public class SellerStep4bView extends TradeStepView {
|
||||
public class SellerStep3bView extends TradeStepView {
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Constructor, Initialisation
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
public SellerStep4bView(PendingTradesViewModel model) {
|
||||
public SellerStep3bView(PendingTradesViewModel model) {
|
||||
super(model);
|
||||
}
|
||||
|
|
@ -20,13 +20,13 @@ package io.bitsquare.gui.main.portfolio.pendingtrades.steps.seller;
|
|||
import io.bitsquare.gui.main.portfolio.pendingtrades.PendingTradesViewModel;
|
||||
import io.bitsquare.gui.main.portfolio.pendingtrades.steps.buyer.BuyerStep4View;
|
||||
|
||||
public class SellerStep4aView extends BuyerStep4View {
|
||||
public class SellerStep4View extends BuyerStep4View {
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Constructor, Initialisation
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
public SellerStep4aView(PendingTradesViewModel model) {
|
||||
public SellerStep4View(PendingTradesViewModel model) {
|
||||
super(model);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue