mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-01-05 10:29:36 +00:00
rename proto type from CONFIRMED_IN_UI* to CONFIRMED*
This commit is contained in:
parent
6c83fc4cf8
commit
d26ddac5c0
7 changed files with 12 additions and 12 deletions
|
@ -156,7 +156,7 @@ public abstract class Trade implements Tradable, Model {
|
||||||
DEPOSIT_TXS_UNLOCKED_IN_BLOCKCHAIN(Phase.DEPOSITS_UNLOCKED),
|
DEPOSIT_TXS_UNLOCKED_IN_BLOCKCHAIN(Phase.DEPOSITS_UNLOCKED),
|
||||||
|
|
||||||
// payment sent
|
// payment sent
|
||||||
BUYER_CONFIRMED_IN_UI_PAYMENT_SENT(Phase.PAYMENT_SENT),
|
BUYER_CONFIRMED_PAYMENT_SENT(Phase.PAYMENT_SENT),
|
||||||
BUYER_SENT_PAYMENT_SENT_MSG(Phase.PAYMENT_SENT),
|
BUYER_SENT_PAYMENT_SENT_MSG(Phase.PAYMENT_SENT),
|
||||||
BUYER_SEND_FAILED_PAYMENT_SENT_MSG(Phase.PAYMENT_SENT),
|
BUYER_SEND_FAILED_PAYMENT_SENT_MSG(Phase.PAYMENT_SENT),
|
||||||
BUYER_STORED_IN_MAILBOX_PAYMENT_SENT_MSG(Phase.PAYMENT_SENT),
|
BUYER_STORED_IN_MAILBOX_PAYMENT_SENT_MSG(Phase.PAYMENT_SENT),
|
||||||
|
@ -164,7 +164,7 @@ public abstract class Trade implements Tradable, Model {
|
||||||
SELLER_RECEIVED_PAYMENT_SENT_MSG(Phase.PAYMENT_SENT),
|
SELLER_RECEIVED_PAYMENT_SENT_MSG(Phase.PAYMENT_SENT),
|
||||||
|
|
||||||
// payment received
|
// payment received
|
||||||
SELLER_CONFIRMED_IN_UI_PAYMENT_RECEIPT(Phase.PAYMENT_RECEIVED),
|
SELLER_CONFIRMED_PAYMENT_RECEIPT(Phase.PAYMENT_RECEIVED),
|
||||||
SELLER_SENT_PAYMENT_RECEIVED_MSG(Phase.PAYMENT_RECEIVED),
|
SELLER_SENT_PAYMENT_RECEIVED_MSG(Phase.PAYMENT_RECEIVED),
|
||||||
SELLER_SEND_FAILED_PAYMENT_RECEIVED_MSG(Phase.PAYMENT_RECEIVED),
|
SELLER_SEND_FAILED_PAYMENT_RECEIVED_MSG(Phase.PAYMENT_RECEIVED),
|
||||||
SELLER_STORED_IN_MAILBOX_PAYMENT_RECEIVED_MSG(Phase.PAYMENT_RECEIVED),
|
SELLER_STORED_IN_MAILBOX_PAYMENT_RECEIVED_MSG(Phase.PAYMENT_RECEIVED),
|
||||||
|
@ -610,13 +610,13 @@ public abstract class Trade implements Tradable, Model {
|
||||||
});
|
});
|
||||||
|
|
||||||
// reset buyer's payment sent state if no ack receive
|
// reset buyer's payment sent state if no ack receive
|
||||||
if (this instanceof BuyerTrade && getState().ordinal() >= Trade.State.BUYER_CONFIRMED_IN_UI_PAYMENT_SENT.ordinal() && getState().ordinal() < Trade.State.BUYER_STORED_IN_MAILBOX_PAYMENT_SENT_MSG.ordinal()) {
|
if (this instanceof BuyerTrade && getState().ordinal() >= Trade.State.BUYER_CONFIRMED_PAYMENT_SENT.ordinal() && getState().ordinal() < Trade.State.BUYER_STORED_IN_MAILBOX_PAYMENT_SENT_MSG.ordinal()) {
|
||||||
log.warn("Resetting state of {} {} from {} to {} because no ack was received", getClass().getSimpleName(), getId(), getState(), Trade.State.DEPOSIT_TXS_UNLOCKED_IN_BLOCKCHAIN);
|
log.warn("Resetting state of {} {} from {} to {} because no ack was received", getClass().getSimpleName(), getId(), getState(), Trade.State.DEPOSIT_TXS_UNLOCKED_IN_BLOCKCHAIN);
|
||||||
setState(Trade.State.DEPOSIT_TXS_UNLOCKED_IN_BLOCKCHAIN);
|
setState(Trade.State.DEPOSIT_TXS_UNLOCKED_IN_BLOCKCHAIN);
|
||||||
}
|
}
|
||||||
|
|
||||||
// reset seller's payment received state if no ack receive
|
// reset seller's payment received state if no ack receive
|
||||||
if (this instanceof SellerTrade && getState().ordinal() >= Trade.State.SELLER_CONFIRMED_IN_UI_PAYMENT_RECEIPT.ordinal() && getState().ordinal() < Trade.State.SELLER_STORED_IN_MAILBOX_PAYMENT_RECEIVED_MSG.ordinal()) {
|
if (this instanceof SellerTrade && getState().ordinal() >= Trade.State.SELLER_CONFIRMED_PAYMENT_RECEIPT.ordinal() && getState().ordinal() < Trade.State.SELLER_STORED_IN_MAILBOX_PAYMENT_RECEIVED_MSG.ordinal()) {
|
||||||
log.warn("Resetting state of {} {} from {} to {} because no ack was received", getClass().getSimpleName(), getId(), getState(), Trade.State.BUYER_SENT_PAYMENT_SENT_MSG);
|
log.warn("Resetting state of {} {} from {} to {} because no ack was received", getClass().getSimpleName(), getId(), getState(), Trade.State.BUYER_SENT_PAYMENT_SENT_MSG);
|
||||||
setState(Trade.State.BUYER_SENT_PAYMENT_SENT_MSG);
|
setState(Trade.State.BUYER_SENT_PAYMENT_SENT_MSG);
|
||||||
}
|
}
|
||||||
|
|
|
@ -123,7 +123,7 @@ public class BuyerProtocol extends DisputeProtocol {
|
||||||
(errorMessage) -> {
|
(errorMessage) -> {
|
||||||
handleTaskRunnerFault(event, errorMessage);
|
handleTaskRunnerFault(event, errorMessage);
|
||||||
})))
|
})))
|
||||||
.run(() -> trade.setState(Trade.State.BUYER_CONFIRMED_IN_UI_PAYMENT_SENT))
|
.run(() -> trade.setState(Trade.State.BUYER_CONFIRMED_PAYMENT_SENT))
|
||||||
.executeTasks(true);
|
.executeTasks(true);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
errorMessageHandler.handleErrorMessage("Error confirming payment sent: " + e.getMessage());
|
errorMessageHandler.handleErrorMessage("Error confirming payment sent: " + e.getMessage());
|
||||||
|
|
|
@ -119,7 +119,7 @@ public class SellerProtocol extends DisputeProtocol {
|
||||||
}, (errorMessage) -> {
|
}, (errorMessage) -> {
|
||||||
handleTaskRunnerFault(event, errorMessage);
|
handleTaskRunnerFault(event, errorMessage);
|
||||||
})))
|
})))
|
||||||
.run(() -> trade.setState(Trade.State.SELLER_CONFIRMED_IN_UI_PAYMENT_RECEIPT))
|
.run(() -> trade.setState(Trade.State.SELLER_CONFIRMED_PAYMENT_RECEIPT))
|
||||||
.executeTasks(true);
|
.executeTasks(true);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
errorMessageHandler.handleErrorMessage("Error confirming payment received: " + e.getMessage());
|
errorMessageHandler.handleErrorMessage("Error confirming payment received: " + e.getMessage());
|
||||||
|
|
|
@ -401,7 +401,7 @@ public class PendingTradesViewModel extends ActivatableWithDataModel<PendingTrad
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// buyer step 3
|
// buyer step 3
|
||||||
case BUYER_CONFIRMED_IN_UI_PAYMENT_SENT: // UI action
|
case BUYER_CONFIRMED_PAYMENT_SENT: // UI action
|
||||||
case BUYER_SENT_PAYMENT_SENT_MSG: // PAYMENT_SENT_MSG sent
|
case BUYER_SENT_PAYMENT_SENT_MSG: // PAYMENT_SENT_MSG sent
|
||||||
case BUYER_SAW_ARRIVED_PAYMENT_SENT_MSG: // PAYMENT_SENT_MSG arrived
|
case BUYER_SAW_ARRIVED_PAYMENT_SENT_MSG: // PAYMENT_SENT_MSG arrived
|
||||||
// We don't switch the UI before we got the feedback of the msg delivery
|
// We don't switch the UI before we got the feedback of the msg delivery
|
||||||
|
@ -424,7 +424,7 @@ public class PendingTradesViewModel extends ActivatableWithDataModel<PendingTrad
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// seller step 3
|
// seller step 3
|
||||||
case SELLER_CONFIRMED_IN_UI_PAYMENT_RECEIPT:
|
case SELLER_CONFIRMED_PAYMENT_RECEIPT:
|
||||||
case SELLER_SEND_FAILED_PAYMENT_RECEIVED_MSG:
|
case SELLER_SEND_FAILED_PAYMENT_RECEIVED_MSG:
|
||||||
case SELLER_STORED_IN_MAILBOX_PAYMENT_RECEIVED_MSG:
|
case SELLER_STORED_IN_MAILBOX_PAYMENT_RECEIVED_MSG:
|
||||||
case SELLER_SAW_ARRIVED_PAYMENT_RECEIVED_MSG:
|
case SELLER_SAW_ARRIVED_PAYMENT_RECEIVED_MSG:
|
||||||
|
|
|
@ -150,7 +150,7 @@ public class BuyerStep2View extends TradeStepView {
|
||||||
showPopup();
|
showPopup();
|
||||||
} else if (state.ordinal() <= Trade.State.SELLER_RECEIVED_PAYMENT_SENT_MSG.ordinal()) {
|
} else if (state.ordinal() <= Trade.State.SELLER_RECEIVED_PAYMENT_SENT_MSG.ordinal()) {
|
||||||
switch (state) {
|
switch (state) {
|
||||||
case BUYER_CONFIRMED_IN_UI_PAYMENT_SENT:
|
case BUYER_CONFIRMED_PAYMENT_SENT:
|
||||||
busyAnimation.play();
|
busyAnimation.play();
|
||||||
statusLabel.setText(Res.get("shared.preparingConfirmation"));
|
statusLabel.setText(Res.get("shared.preparingConfirmation"));
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -116,7 +116,7 @@ public class SellerStep3View extends TradeStepView {
|
||||||
busyAnimation.stop();
|
busyAnimation.stop();
|
||||||
statusLabel.setText("");
|
statusLabel.setText("");
|
||||||
} else switch (state) {
|
} else switch (state) {
|
||||||
case SELLER_CONFIRMED_IN_UI_PAYMENT_RECEIPT:
|
case SELLER_CONFIRMED_PAYMENT_RECEIPT:
|
||||||
busyAnimation.play();
|
busyAnimation.play();
|
||||||
statusLabel.setText(Res.get("shared.preparingConfirmation"));
|
statusLabel.setText(Res.get("shared.preparingConfirmation"));
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -1423,13 +1423,13 @@ message Trade {
|
||||||
DEPOSIT_TXS_SEEN_IN_NETWORK = 13;
|
DEPOSIT_TXS_SEEN_IN_NETWORK = 13;
|
||||||
DEPOSIT_TXS_CONFIRMED_IN_BLOCKCHAIN = 14;
|
DEPOSIT_TXS_CONFIRMED_IN_BLOCKCHAIN = 14;
|
||||||
DEPOSIT_TXS_UNLOCKED_IN_BLOCKCHAIN = 15;
|
DEPOSIT_TXS_UNLOCKED_IN_BLOCKCHAIN = 15;
|
||||||
BUYER_CONFIRMED_IN_UI_PAYMENT_SENT = 16;
|
BUYER_CONFIRMED_PAYMENT_SENT = 16;
|
||||||
BUYER_SENT_PAYMENT_SENT_MSG = 17;
|
BUYER_SENT_PAYMENT_SENT_MSG = 17;
|
||||||
BUYER_SEND_FAILED_PAYMENT_SENT_MSG = 18;
|
BUYER_SEND_FAILED_PAYMENT_SENT_MSG = 18;
|
||||||
BUYER_STORED_IN_MAILBOX_PAYMENT_SENT_MSG = 19;
|
BUYER_STORED_IN_MAILBOX_PAYMENT_SENT_MSG = 19;
|
||||||
BUYER_SAW_ARRIVED_PAYMENT_SENT_MSG = 20;
|
BUYER_SAW_ARRIVED_PAYMENT_SENT_MSG = 20;
|
||||||
SELLER_RECEIVED_PAYMENT_SENT_MSG = 21;
|
SELLER_RECEIVED_PAYMENT_SENT_MSG = 21;
|
||||||
SELLER_CONFIRMED_IN_UI_PAYMENT_RECEIPT = 22;
|
SELLER_CONFIRMED_PAYMENT_RECEIPT = 22;
|
||||||
SELLER_SENT_PAYMENT_RECEIVED_MSG = 23;
|
SELLER_SENT_PAYMENT_RECEIVED_MSG = 23;
|
||||||
SELLER_SEND_FAILED_PAYMENT_RECEIVED_MSG = 24;
|
SELLER_SEND_FAILED_PAYMENT_RECEIVED_MSG = 24;
|
||||||
SELLER_STORED_IN_MAILBOX_PAYMENT_RECEIVED_MSG = 25;
|
SELLER_STORED_IN_MAILBOX_PAYMENT_RECEIVED_MSG = 25;
|
||||||
|
|
Loading…
Reference in a new issue