mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-08-13 00:45:29 -04:00
renames in proto and api (#277)
rename to getNewDepositAddress() rename trade phase DEPOSIT_CONFIRMED to DEPOSIT_UNLOCKED rename fiat sent/received to payment sent/received
This commit is contained in:
parent
f1b3ff6f08
commit
730bee3e71
26 changed files with 127 additions and 133 deletions
|
@ -192,7 +192,7 @@ public class NotificationCenter {
|
|||
message = Res.get("notification.trade.accepted", role);
|
||||
}
|
||||
|
||||
if (trade instanceof BuyerTrade && phase.ordinal() == Trade.Phase.DEPOSIT_CONFIRMED.ordinal())
|
||||
if (trade instanceof BuyerTrade && phase.ordinal() == Trade.Phase.DEPOSIT_UNLOCKED.ordinal())
|
||||
message = Res.get("notification.trade.confirmed");
|
||||
else if (trade instanceof SellerTrade && phase.ordinal() == Trade.Phase.PAYMENT_SENT.ordinal())
|
||||
message = Res.get("notification.trade.paymentStarted");
|
||||
|
|
|
@ -445,29 +445,29 @@ public class PendingTradesViewModel extends ActivatableWithDataModel<PendingTrad
|
|||
|
||||
|
||||
// buyer and seller step 2
|
||||
// #################### Phase DEPOSIT_CONFIRMED
|
||||
case DEPOSIT_CONFIRMED_IN_BLOCK_CHAIN:
|
||||
// #################### Phase DEPOSIT_UNLOCKED
|
||||
case DEPOSIT_UNLOCKED_IN_BLOCK_CHAIN:
|
||||
sellerState.set(SellerState.STEP2);
|
||||
buyerState.set(BuyerState.STEP2);
|
||||
break;
|
||||
|
||||
// buyer step 3
|
||||
case BUYER_CONFIRMED_IN_UI_PAYMENT_INITIATED: // UI action
|
||||
case BUYER_SENT_PAYMENT_INITIATED_MSG: // FIAT_PAYMENT_INITIATED_MSG sent
|
||||
case BUYER_SENT_PAYMENT_INITIATED_MSG: // PAYMENT_INITIATED_MSG sent
|
||||
// We don't switch the UI before we got the feedback of the msg delivery
|
||||
buyerState.set(BuyerState.STEP2);
|
||||
break;
|
||||
case BUYER_SAW_ARRIVED_PAYMENT_INITIATED_MSG: // FIAT_PAYMENT_INITIATED_MSG arrived
|
||||
case BUYER_STORED_IN_MAILBOX_PAYMENT_INITIATED_MSG: // FIAT_PAYMENT_INITIATED_MSG in mailbox
|
||||
case BUYER_SAW_ARRIVED_PAYMENT_INITIATED_MSG: // PAYMENT_INITIATED_MSG arrived
|
||||
case BUYER_STORED_IN_MAILBOX_PAYMENT_INITIATED_MSG: // PAYMENT_INITIATED_MSG in mailbox
|
||||
buyerState.set(BuyerState.STEP3);
|
||||
break;
|
||||
case BUYER_SEND_FAILED_PAYMENT_INITIATED_MSG: // FIAT_PAYMENT_INITIATED_MSG failed
|
||||
case BUYER_SEND_FAILED_PAYMENT_INITIATED_MSG: // PAYMENT_INITIATED_MSG failed
|
||||
// if failed we need to repeat sending so back to step 2
|
||||
buyerState.set(BuyerState.STEP2);
|
||||
break;
|
||||
|
||||
// seller step 3
|
||||
case SELLER_RECEIVED_PAYMENT_INITIATED_MSG: // FIAT_PAYMENT_INITIATED_MSG received
|
||||
case SELLER_RECEIVED_PAYMENT_INITIATED_MSG: // PAYMENT_INITIATED_MSG received
|
||||
sellerState.set(SellerState.STEP3);
|
||||
break;
|
||||
|
||||
|
|
|
@ -771,7 +771,7 @@ public abstract class TradeStepView extends AnchorPane {
|
|||
}
|
||||
break;
|
||||
case SECOND_HALF:
|
||||
if (!trade.isFiatReceived()) {
|
||||
if (!trade.isPaymentReceived()) {
|
||||
if (tradeStepInfo != null) {
|
||||
tradeStepInfo.setFirstHalfOverWarnTextSupplier(this::getFirstHalfOverWarnText);
|
||||
tradeStepInfo.setState(TradeStepInfo.State.WARN_HALF_PERIOD);
|
||||
|
|
|
@ -133,7 +133,7 @@ public class BuyerStep2View extends TradeStepView {
|
|||
if (timeoutTimer != null)
|
||||
timeoutTimer.stop();
|
||||
|
||||
if (trade.isDepositConfirmed() && !trade.isFiatSent()) {
|
||||
if (trade.isDepositConfirmed() && !trade.isPaymentSent()) {
|
||||
showPopup();
|
||||
} else if (state.ordinal() <= Trade.State.BUYER_SEND_FAILED_PAYMENT_INITIATED_MSG.ordinal()) {
|
||||
if (!trade.hasFailed()) {
|
||||
|
@ -523,8 +523,8 @@ public class BuyerStep2View extends TradeStepView {
|
|||
statusLabel.setText(Res.get("shared.sendingConfirmation"));
|
||||
|
||||
//TODO seems this was a hack to enable repeated confirm???
|
||||
if (trade.isFiatSent()) {
|
||||
trade.setState(Trade.State.DEPOSIT_CONFIRMED_IN_BLOCK_CHAIN);
|
||||
if (trade.isPaymentSent()) {
|
||||
trade.setState(Trade.State.DEPOSIT_UNLOCKED_IN_BLOCK_CHAIN);
|
||||
model.dataModel.getTradeManager().requestPersistence();
|
||||
}
|
||||
|
||||
|
|
|
@ -111,9 +111,9 @@ public class SellerStep3View extends TradeStepView {
|
|||
if (timeoutTimer != null)
|
||||
timeoutTimer.stop();
|
||||
|
||||
if (trade.isFiatSent() && !trade.isFiatReceived()) {
|
||||
if (trade.isPaymentSent() && !trade.isPaymentReceived()) {
|
||||
showPopup();
|
||||
} else if (trade.isFiatReceived()) {
|
||||
} else if (trade.isPaymentReceived()) {
|
||||
if (!trade.hasFailed()) {
|
||||
switch (state) {
|
||||
case SELLER_CONFIRMED_IN_UI_PAYMENT_RECEIPT:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue