diff --git a/apitest/scripts/trade-simulation-utils.sh b/apitest/scripts/trade-simulation-utils.sh index 577cc1fff3..804900263c 100755 --- a/apitest/scripts/trade-simulation-utils.sh +++ b/apitest/scripts/trade-simulation-utils.sh @@ -418,7 +418,7 @@ waitfortradepaymentreceived() { done } -delayconfirmpaymentstarted() { +delayconfirmpaymentsent() { # Confirm payment started after a random delay. This should be run in the background # while the payee polls the trade status, waiting for the message before confirming # payment has been received. @@ -428,11 +428,11 @@ delayconfirmpaymentstarted() { RANDOM_WAIT=$(echo $[$RANDOM % 5 + 1]) printdate "$PAYER: Sending 'payment sent' message to seller in $RANDOM_WAIT seconds..." sleeptraced "$RANDOM_WAIT" - CMD="$CLI_BASE --port=$PORT confirmpaymentstarted --trade-id=$OFFER_ID" + CMD="$CLI_BASE --port=$PORT confirmpaymentsent --trade-id=$OFFER_ID" printdate "$PAYER_CLI: $CMD" SENT_MSG=$($CMD) - commandalert $? "Could not send confirmpaymentstarted message." - # Print the confirmpaymentstarted command's console output. + commandalert $? "Could not send confirmpaymentsent message." + # Print the confirmpaymentsent command's console output. printdate "$SENT_MSG" printbreak } @@ -450,8 +450,8 @@ delayconfirmpaymentreceived() { CMD="$CLI_BASE --port=$PORT confirmpaymentreceived --trade-id=$OFFER_ID" printdate "$PAYEE_CLI: $CMD" RCVD_MSG=$($CMD) - commandalert $? "Could not send confirmpaymentstarted message." - # Print the confirmpaymentstarted command's console output. + commandalert $? "Could not send confirmpaymentsent message." + # Print the confirmpaymentsent command's console output. printdate "$RCVD_MSG" printbreak } @@ -505,7 +505,7 @@ executetrade() { fi # Asynchronously send a confirm payment started message after a random delay. - delayconfirmpaymentstarted "$PAYER" "$PAYER_PORT" "$OFFER_ID" & + delayconfirmpaymentsent "$PAYER" "$PAYER_PORT" "$OFFER_ID" & if [ "$DIRECTION" = "BUY" ] then diff --git a/apitest/src/test/java/bisq/apitest/method/trade/AbstractTradeTest.java b/apitest/src/test/java/bisq/apitest/method/trade/AbstractTradeTest.java index da11cd1c47..b966eb830c 100644 --- a/apitest/src/test/java/bisq/apitest/method/trade/AbstractTradeTest.java +++ b/apitest/src/test/java/bisq/apitest/method/trade/AbstractTradeTest.java @@ -136,7 +136,7 @@ public class AbstractTradeTest extends AbstractOfferTest { // it might be AVAILABLE, not OFFER_FEE_RESERVED. EXPECTED_PROTOCOL_STATUS.setState(BUYER_SAW_ARRIVED_PAYMENT_SENT_MSG) .setPhase(PAYMENT_SENT) - .setPaymentStartedMessageSent(true); + .setPaymentSentMessageSent(true); verifyExpectedProtocolStatus(trade); logTrade(log, testInfo, userName + "'s view after confirming trade payment sent", trade); break; @@ -185,7 +185,7 @@ public class AbstractTradeTest extends AbstractOfferTest { assertEquals(EXPECTED_PROTOCOL_STATUS.isDepositPublished, trade.getIsDepositsPublished()); assertEquals(EXPECTED_PROTOCOL_STATUS.isDepositConfirmed, trade.getIsDepositsUnlocked()); - assertEquals(EXPECTED_PROTOCOL_STATUS.isPaymentStartedMessageSent, trade.getIsPaymentSent()); + assertEquals(EXPECTED_PROTOCOL_STATUS.isPaymentSentMessageSent, trade.getIsPaymentSent()); assertEquals(EXPECTED_PROTOCOL_STATUS.isPaymentReceivedMessageSent, trade.getIsPaymentReceived()); assertEquals(EXPECTED_PROTOCOL_STATUS.isPayoutPublished, trade.getIsPayoutPublished()); assertEquals(EXPECTED_PROTOCOL_STATUS.isCompleted, trade.getIsCompleted()); diff --git a/apitest/src/test/java/bisq/apitest/method/trade/ExpectedProtocolStatus.java b/apitest/src/test/java/bisq/apitest/method/trade/ExpectedProtocolStatus.java index 3c58b3ae90..44fb1ad8c4 100644 --- a/apitest/src/test/java/bisq/apitest/method/trade/ExpectedProtocolStatus.java +++ b/apitest/src/test/java/bisq/apitest/method/trade/ExpectedProtocolStatus.java @@ -11,7 +11,7 @@ public class ExpectedProtocolStatus { Trade.Phase phase; boolean isDepositPublished; boolean isDepositConfirmed; - boolean isPaymentStartedMessageSent; + boolean isPaymentSentMessageSent; boolean isPaymentReceivedMessageSent; boolean isPayoutPublished; boolean isCompleted; @@ -36,8 +36,8 @@ public class ExpectedProtocolStatus { return this; } - public ExpectedProtocolStatus setPaymentStartedMessageSent(boolean paymentStartedMessageSent) { - isPaymentStartedMessageSent = paymentStartedMessageSent; + public ExpectedProtocolStatus setPaymentSentMessageSent(boolean paymentSentMessageSent) { + isPaymentSentMessageSent = paymentSentMessageSent; return this; } @@ -61,7 +61,7 @@ public class ExpectedProtocolStatus { phase = null; isDepositPublished = false; isDepositConfirmed = false; - isPaymentStartedMessageSent = false; + isPaymentSentMessageSent = false; isPaymentReceivedMessageSent = false; isPayoutPublished = false; isCompleted = false; diff --git a/apitest/src/test/java/bisq/apitest/method/trade/TakeBuyBTCOfferTest.java b/apitest/src/test/java/bisq/apitest/method/trade/TakeBuyBTCOfferTest.java index 47d90e2c8d..ab02303dea 100644 --- a/apitest/src/test/java/bisq/apitest/method/trade/TakeBuyBTCOfferTest.java +++ b/apitest/src/test/java/bisq/apitest/method/trade/TakeBuyBTCOfferTest.java @@ -87,11 +87,11 @@ public class TakeBuyBTCOfferTest extends AbstractTradeTest { @Test @Order(2) - public void testAlicesConfirmPaymentStarted(final TestInfo testInfo) { + public void testAlicesConfirmPaymentSent(final TestInfo testInfo) { try { var trade = aliceClient.getTrade(tradeId); waitForDepositUnlocked(log, testInfo, aliceClient, trade.getTradeId()); - aliceClient.confirmPaymentStarted(trade.getTradeId()); + aliceClient.confirmPaymentSent(trade.getTradeId()); sleep(6_000); waitForBuyerSeesPaymentInitiatedMessage(log, testInfo, aliceClient, tradeId); } catch (StatusRuntimeException e) { diff --git a/apitest/src/test/java/bisq/apitest/method/trade/TakeBuyBTCOfferWithNationalBankAcctTest.java b/apitest/src/test/java/bisq/apitest/method/trade/TakeBuyBTCOfferWithNationalBankAcctTest.java index 979db8e9b7..067e6fff91 100644 --- a/apitest/src/test/java/bisq/apitest/method/trade/TakeBuyBTCOfferWithNationalBankAcctTest.java +++ b/apitest/src/test/java/bisq/apitest/method/trade/TakeBuyBTCOfferWithNationalBankAcctTest.java @@ -173,11 +173,11 @@ public class TakeBuyBTCOfferWithNationalBankAcctTest extends AbstractTradeTest { @Test @Order(3) - public void testAlicesConfirmPaymentStarted(final TestInfo testInfo) { + public void testAlicesConfirmPaymentSent(final TestInfo testInfo) { try { var trade = aliceClient.getTrade(tradeId); waitForDepositUnlocked(log, testInfo, aliceClient, trade.getTradeId()); - aliceClient.confirmPaymentStarted(trade.getTradeId()); + aliceClient.confirmPaymentSent(trade.getTradeId()); sleep(6_000); waitForBuyerSeesPaymentInitiatedMessage(log, testInfo, aliceClient, tradeId); trade = aliceClient.getTrade(tradeId); diff --git a/apitest/src/test/java/bisq/apitest/method/trade/TakeBuyXMROfferTest.java b/apitest/src/test/java/bisq/apitest/method/trade/TakeBuyXMROfferTest.java index 9fcfdd4bc5..33a9e4207b 100644 --- a/apitest/src/test/java/bisq/apitest/method/trade/TakeBuyXMROfferTest.java +++ b/apitest/src/test/java/bisq/apitest/method/trade/TakeBuyXMROfferTest.java @@ -95,13 +95,13 @@ public class TakeBuyXMROfferTest extends AbstractTradeTest { @Test @Order(2) - public void testBobsConfirmPaymentStarted(final TestInfo testInfo) { + public void testBobsConfirmPaymentSent(final TestInfo testInfo) { try { var trade = bobClient.getTrade(tradeId); verifyTakerDepositConfirmed(trade); log.debug("Bob sends XMR payment to Alice for trade {}", trade.getTradeId()); - bobClient.confirmPaymentStarted(trade.getTradeId()); + bobClient.confirmPaymentSent(trade.getTradeId()); sleep(3500); waitForBuyerSeesPaymentInitiatedMessage(log, testInfo, bobClient, tradeId); diff --git a/apitest/src/test/java/bisq/apitest/method/trade/TakeSellBTCOfferTest.java b/apitest/src/test/java/bisq/apitest/method/trade/TakeSellBTCOfferTest.java index 293bdb94f0..46d938d2b1 100644 --- a/apitest/src/test/java/bisq/apitest/method/trade/TakeSellBTCOfferTest.java +++ b/apitest/src/test/java/bisq/apitest/method/trade/TakeSellBTCOfferTest.java @@ -96,11 +96,11 @@ public class TakeSellBTCOfferTest extends AbstractTradeTest { @Test @Order(2) - public void testBobsConfirmPaymentStarted(final TestInfo testInfo) { + public void testBobsConfirmPaymentSent(final TestInfo testInfo) { try { var trade = bobClient.getTrade(tradeId); verifyTakerDepositConfirmed(trade); - bobClient.confirmPaymentStarted(tradeId); + bobClient.confirmPaymentSent(tradeId); sleep(6_000); waitForBuyerSeesPaymentInitiatedMessage(log, testInfo, bobClient, tradeId); } catch (StatusRuntimeException e) { diff --git a/apitest/src/test/java/bisq/apitest/method/trade/TakeSellXMROfferTest.java b/apitest/src/test/java/bisq/apitest/method/trade/TakeSellXMROfferTest.java index aa7e313d3d..a10d97865f 100644 --- a/apitest/src/test/java/bisq/apitest/method/trade/TakeSellXMROfferTest.java +++ b/apitest/src/test/java/bisq/apitest/method/trade/TakeSellXMROfferTest.java @@ -103,12 +103,12 @@ public class TakeSellXMROfferTest extends AbstractTradeTest { @Test @Order(2) - public void testAlicesConfirmPaymentStarted(final TestInfo testInfo) { + public void testAlicesConfirmPaymentSent(final TestInfo testInfo) { try { var trade = aliceClient.getTrade(tradeId); waitForDepositUnlocked(log, testInfo, aliceClient, trade.getTradeId()); log.debug("Alice sends XMR payment to Bob for trade {}", trade.getTradeId()); - aliceClient.confirmPaymentStarted(trade.getTradeId()); + aliceClient.confirmPaymentSent(trade.getTradeId()); sleep(3500); waitForBuyerSeesPaymentInitiatedMessage(log, testInfo, aliceClient, tradeId); diff --git a/apitest/src/test/java/bisq/apitest/scenario/LongRunningTradesTest.java b/apitest/src/test/java/bisq/apitest/scenario/LongRunningTradesTest.java index b43d0e32bc..81273de6cb 100644 --- a/apitest/src/test/java/bisq/apitest/scenario/LongRunningTradesTest.java +++ b/apitest/src/test/java/bisq/apitest/scenario/LongRunningTradesTest.java @@ -69,7 +69,7 @@ public class LongRunningTradesTest extends AbstractTradeTest { TakeBuyBTCOfferTest test = new TakeBuyBTCOfferTest(); setLongRunningTest(true); test.testTakeAlicesBuyOffer(testInfo); - test.testAlicesConfirmPaymentStarted(testInfo); + test.testAlicesConfirmPaymentSent(testInfo); test.testBobsConfirmPaymentReceived(testInfo); } @@ -77,7 +77,7 @@ public class LongRunningTradesTest extends AbstractTradeTest { TakeSellBTCOfferTest test = new TakeSellBTCOfferTest(); setLongRunningTest(true); test.testTakeAlicesSellOffer(testInfo); - test.testBobsConfirmPaymentStarted(testInfo); + test.testBobsConfirmPaymentSent(testInfo); test.testAlicesConfirmPaymentReceived(testInfo); } diff --git a/apitest/src/test/java/bisq/apitest/scenario/TradeTest.java b/apitest/src/test/java/bisq/apitest/scenario/TradeTest.java index 1cd60b69ba..9be18beaad 100644 --- a/apitest/src/test/java/bisq/apitest/scenario/TradeTest.java +++ b/apitest/src/test/java/bisq/apitest/scenario/TradeTest.java @@ -50,7 +50,7 @@ public class TradeTest extends AbstractTradeTest { public void testTakeBuyBTCOffer(final TestInfo testInfo) { TakeBuyBTCOfferTest test = new TakeBuyBTCOfferTest(); test.testTakeAlicesBuyOffer(testInfo); - test.testAlicesConfirmPaymentStarted(testInfo); + test.testAlicesConfirmPaymentSent(testInfo); test.testBobsConfirmPaymentReceived(testInfo); } @@ -59,7 +59,7 @@ public class TradeTest extends AbstractTradeTest { public void testTakeSellBTCOffer(final TestInfo testInfo) { TakeSellBTCOfferTest test = new TakeSellBTCOfferTest(); test.testTakeAlicesSellOffer(testInfo); - test.testBobsConfirmPaymentStarted(testInfo); + test.testBobsConfirmPaymentSent(testInfo); test.testAlicesConfirmPaymentReceived(testInfo); } @@ -69,7 +69,7 @@ public class TradeTest extends AbstractTradeTest { TakeBuyBTCOfferWithNationalBankAcctTest test = new TakeBuyBTCOfferWithNationalBankAcctTest(); test.testTakeAlicesBuyOffer(testInfo); test.testBankAcctDetailsIncludedInContracts(testInfo); - test.testAlicesConfirmPaymentStarted(testInfo); + test.testAlicesConfirmPaymentSent(testInfo); test.testBobsConfirmPaymentReceived(testInfo); } @@ -79,7 +79,7 @@ public class TradeTest extends AbstractTradeTest { TakeBuyXMROfferTest test = new TakeBuyXMROfferTest(); TakeBuyXMROfferTest.createXmrPaymentAccounts(); test.testTakeAlicesSellBTCForXMROffer(testInfo); - test.testBobsConfirmPaymentStarted(testInfo); + test.testBobsConfirmPaymentSent(testInfo); test.testAlicesConfirmPaymentReceived(testInfo); } @@ -89,7 +89,7 @@ public class TradeTest extends AbstractTradeTest { TakeSellXMROfferTest test = new TakeSellXMROfferTest(); TakeBuyXMROfferTest.createXmrPaymentAccounts(); test.testTakeAlicesBuyBTCForXMROffer(testInfo); - test.testAlicesConfirmPaymentStarted(testInfo); + test.testAlicesConfirmPaymentSent(testInfo); test.testBobsConfirmPaymentReceived(testInfo); } } diff --git a/apitest/src/test/java/bisq/apitest/scenario/bot/BotClient.java b/apitest/src/test/java/bisq/apitest/scenario/bot/BotClient.java index 8d29a2c0de..472236f151 100644 --- a/apitest/src/test/java/bisq/apitest/scenario/bot/BotClient.java +++ b/apitest/src/test/java/bisq/apitest/scenario/bot/BotClient.java @@ -239,7 +239,7 @@ public class BotClient { * @param tradeId a valid trade id * @return boolean */ - public boolean isTradePaymentStartedSent(String tradeId) { + public boolean isTradePaymentSentSent(String tradeId) { return grpcClient.getTrade(tradeId).getIsPaymentSent(); } @@ -266,8 +266,8 @@ public class BotClient { * or throws an exception. * @param tradeId */ - public void sendConfirmPaymentStartedMessage(String tradeId) { - grpcClient.confirmPaymentStarted(tradeId); + public void sendConfirmPaymentSentMessage(String tradeId) { + grpcClient.confirmPaymentSent(tradeId); } /** diff --git a/apitest/src/test/java/bisq/apitest/scenario/bot/protocol/BotProtocol.java b/apitest/src/test/java/bisq/apitest/scenario/bot/protocol/BotProtocol.java index 50e9cfb525..37135a27d9 100644 --- a/apitest/src/test/java/bisq/apitest/scenario/bot/protocol/BotProtocol.java +++ b/apitest/src/test/java/bisq/apitest/scenario/bot/protocol/BotProtocol.java @@ -124,10 +124,10 @@ public abstract class BotProtocol { return trade; }; - protected final Function waitForPaymentStartedMessage = (trade) -> { - initProtocolStep.accept(WAIT_FOR_PAYMENT_STARTED_MESSAGE); + protected final Function waitForPaymentSentMessage = (trade) -> { + initProtocolStep.accept(WAIT_FOR_PAYMENT_SENT_MESSAGE); try { - createPaymentStartedScript(trade); + createPaymentSentScript(trade); log.info(" Waiting for a 'payment started' message from buyer for trade with id {}.", trade.getTradeId()); while (isWithinProtocolStepTimeLimit()) { checkIfShutdownCalled("Interrupted before checking if 'payment started' message has been sent."); @@ -152,10 +152,10 @@ public abstract class BotProtocol { } }; - protected final Function sendPaymentStartedMessage = (trade) -> { - initProtocolStep.accept(SEND_PAYMENT_STARTED_MESSAGE); + protected final Function sendPaymentSentMessage = (trade) -> { + initProtocolStep.accept(SEND_PAYMENT_SENT_MESSAGE); checkIfShutdownCalled("Interrupted before sending 'payment started' message."); - this.getBotClient().sendConfirmPaymentStartedMessage(trade.getTradeId()); + this.getBotClient().sendConfirmPaymentSentMessage(trade.getTradeId()); return trade; }; @@ -222,8 +222,8 @@ public abstract class BotProtocol { } }; - protected void createPaymentStartedScript(TradeInfo trade) { - File script = bashScriptGenerator.createPaymentStartedScript(trade); + protected void createPaymentSentScript(TradeInfo trade) { + File script = bashScriptGenerator.createPaymentSentScript(trade); printCliHintAndOrScript(script, "The manual CLI side can send a 'payment started' message"); } diff --git a/apitest/src/test/java/bisq/apitest/scenario/bot/protocol/MakerBotProtocol.java b/apitest/src/test/java/bisq/apitest/scenario/bot/protocol/MakerBotProtocol.java index 533d5f1c99..400ec7465a 100644 --- a/apitest/src/test/java/bisq/apitest/scenario/bot/protocol/MakerBotProtocol.java +++ b/apitest/src/test/java/bisq/apitest/scenario/bot/protocol/MakerBotProtocol.java @@ -52,8 +52,8 @@ public class MakerBotProtocol extends BotProtocol { var makerIsBuyer = trade.getOffer().getDirection().equalsIgnoreCase(BUY); Function completeFiatTransaction = makerIsBuyer - ? sendPaymentStartedMessage.andThen(waitForPaymentReceivedConfirmation) - : waitForPaymentStartedMessage.andThen(sendPaymentReceivedMessage); + ? sendPaymentSentMessage.andThen(waitForPaymentReceivedConfirmation) + : waitForPaymentSentMessage.andThen(sendPaymentReceivedMessage); completeFiatTransaction.apply(trade); currentProtocolStep = DONE; diff --git a/apitest/src/test/java/bisq/apitest/scenario/bot/protocol/ProtocolStep.java b/apitest/src/test/java/bisq/apitest/scenario/bot/protocol/ProtocolStep.java index 2c8c8cd07f..6d8fd0ee48 100644 --- a/apitest/src/test/java/bisq/apitest/scenario/bot/protocol/ProtocolStep.java +++ b/apitest/src/test/java/bisq/apitest/scenario/bot/protocol/ProtocolStep.java @@ -7,8 +7,8 @@ public enum ProtocolStep { WAIT_FOR_OFFER_TAKER, WAIT_FOR_TAKER_DEPOSIT_TX_PUBLISHED, WAIT_FOR_TAKER_DEPOSIT_TX_CONFIRMED, - SEND_PAYMENT_STARTED_MESSAGE, - WAIT_FOR_PAYMENT_STARTED_MESSAGE, + SEND_PAYMENT_SENT_MESSAGE, + WAIT_FOR_PAYMENT_SENT_MESSAGE, SEND_PAYMENT_RECEIVED_CONFIRMATION_MESSAGE, WAIT_FOR_PAYMENT_RECEIVED_CONFIRMATION_MESSAGE, WAIT_FOR_PAYOUT_TX, diff --git a/apitest/src/test/java/bisq/apitest/scenario/bot/protocol/TakerBotProtocol.java b/apitest/src/test/java/bisq/apitest/scenario/bot/protocol/TakerBotProtocol.java index a8635056f1..0aafeb29d3 100644 --- a/apitest/src/test/java/bisq/apitest/scenario/bot/protocol/TakerBotProtocol.java +++ b/apitest/src/test/java/bisq/apitest/scenario/bot/protocol/TakerBotProtocol.java @@ -52,8 +52,8 @@ public class TakerBotProtocol extends BotProtocol { var takerIsSeller = trade.getOffer().getDirection().equalsIgnoreCase(BUY); Function completeFiatTransaction = takerIsSeller - ? waitForPaymentStartedMessage.andThen(sendPaymentReceivedMessage) - : sendPaymentStartedMessage.andThen(waitForPaymentReceivedConfirmation); + ? waitForPaymentSentMessage.andThen(sendPaymentReceivedMessage) + : sendPaymentSentMessage.andThen(waitForPaymentReceivedConfirmation); completeFiatTransaction.apply(trade); currentProtocolStep = DONE; diff --git a/apitest/src/test/java/bisq/apitest/scenario/bot/script/BashScriptGenerator.java b/apitest/src/test/java/bisq/apitest/scenario/bot/script/BashScriptGenerator.java index 55115dbb5a..98aabd3c8f 100644 --- a/apitest/src/test/java/bisq/apitest/scenario/bot/script/BashScriptGenerator.java +++ b/apitest/src/test/java/bisq/apitest/scenario/bot/script/BashScriptGenerator.java @@ -140,34 +140,34 @@ public class BashScriptGenerator { getTradeCmd); } - public File createPaymentStartedScript(TradeInfo trade) { - String paymentStartedCmd = format("%s confirmpaymentstarted --trade-id=%s", + public File createPaymentSentScript(TradeInfo trade) { + String paymentSentCmd = format("%s confirmpaymentsent --trade-id=%s", cliBase, trade.getTradeId()); String getTradeCmd = format("%s gettrade --trade-id=%s", cliBase, trade.getTradeId()); - return createCliScript("confirmpaymentstarted.sh", - paymentStartedCmd, + return createCliScript("confirmpaymentsent.sh", + paymentSentCmd, "sleep 2", getTradeCmd); } public File createPaymentReceivedScript(TradeInfo trade) { - String paymentStartedCmd = format("%s confirmpaymentreceived --trade-id=%s", + String paymentSentCmd = format("%s confirmpaymentreceived --trade-id=%s", cliBase, trade.getTradeId()); String getTradeCmd = format("%s gettrade --trade-id=%s", cliBase, trade.getTradeId()); return createCliScript("confirmpaymentreceived.sh", - paymentStartedCmd, + paymentSentCmd, "sleep 2", getTradeCmd); } public File createKeepFundsScript(TradeInfo trade) { - String paymentStartedCmd = format("%s closetrade --trade-id=%s", cliBase, trade.getTradeId()); + String paymentSentCmd = format("%s closetrade --trade-id=%s", cliBase, trade.getTradeId()); String getTradeCmd = format("%s gettrade --trade-id=%s", cliBase, trade.getTradeId()); String getBalanceCmd = format("%s getbalance", cliBase); return createCliScript("closetrade.sh", - paymentStartedCmd, + paymentSentCmd, "sleep 2", getTradeCmd, getBalanceCmd); diff --git a/cli/src/main/java/bisq/cli/CliMain.java b/cli/src/main/java/bisq/cli/CliMain.java index bc0be898a7..8fa7798948 100644 --- a/cli/src/main/java/bisq/cli/CliMain.java +++ b/cli/src/main/java/bisq/cli/CliMain.java @@ -374,14 +374,14 @@ public class CliMain { } return; } - case confirmpaymentstarted: { + case confirmpaymentsent: { var opts = new GetTradeOptionParser(args).parse(); if (opts.isForHelp()) { out.println(client.getMethodHelp(method)); return; } var tradeId = opts.getTradeId(); - client.confirmPaymentStarted(tradeId); + client.confirmPaymentSent(tradeId); out.printf("trade %s payment started message sent%n", tradeId); return; } @@ -700,7 +700,7 @@ public class CliMain { stream.println(); stream.format(rowFormat, gettrades.name(), "[--category=]", "Get open (default), closed, or failed trades"); stream.println(); - stream.format(rowFormat, confirmpaymentstarted.name(), "--trade-id=", "Confirm payment started"); + stream.format(rowFormat, confirmpaymentsent.name(), "--trade-id=", "Confirm payment started"); stream.println(); stream.format(rowFormat, confirmpaymentreceived.name(), "--trade-id=", "Confirm payment received"); stream.println(); diff --git a/cli/src/main/java/bisq/cli/GrpcClient.java b/cli/src/main/java/bisq/cli/GrpcClient.java index 3091f222a8..c500869cc7 100644 --- a/cli/src/main/java/bisq/cli/GrpcClient.java +++ b/cli/src/main/java/bisq/cli/GrpcClient.java @@ -211,8 +211,8 @@ public final class GrpcClient { return tradesServiceRequest.getTradeHistory(category); } - public void confirmPaymentStarted(String tradeId) { - tradesServiceRequest.confirmPaymentStarted(tradeId); + public void confirmPaymentSent(String tradeId) { + tradesServiceRequest.confirmPaymentSent(tradeId); } public void confirmPaymentReceived(String tradeId) { diff --git a/cli/src/main/java/bisq/cli/Method.java b/cli/src/main/java/bisq/cli/Method.java index 21b7712e2d..676d896752 100644 --- a/cli/src/main/java/bisq/cli/Method.java +++ b/cli/src/main/java/bisq/cli/Method.java @@ -24,7 +24,7 @@ public enum Method { canceloffer, closetrade, confirmpaymentreceived, - confirmpaymentstarted, + confirmpaymentsent, createoffer, editoffer, createpaymentacct, diff --git a/cli/src/main/java/bisq/cli/request/TradesServiceRequest.java b/cli/src/main/java/bisq/cli/request/TradesServiceRequest.java index 6819e919cf..3b3ad32fe6 100644 --- a/cli/src/main/java/bisq/cli/request/TradesServiceRequest.java +++ b/cli/src/main/java/bisq/cli/request/TradesServiceRequest.java @@ -18,7 +18,7 @@ package bisq.cli.request; import bisq.proto.grpc.ConfirmPaymentReceivedRequest; -import bisq.proto.grpc.ConfirmPaymentStartedRequest; +import bisq.proto.grpc.ConfirmPaymentSentRequest; import bisq.proto.grpc.GetTradeRequest; import bisq.proto.grpc.GetTradesRequest; import bisq.proto.grpc.TakeOfferReply; @@ -82,12 +82,12 @@ public class TradesServiceRequest { return grpcStubs.tradesService.getTrades(request).getTradesList(); } - public void confirmPaymentStarted(String tradeId) { - var request = ConfirmPaymentStartedRequest.newBuilder() + public void confirmPaymentSent(String tradeId) { + var request = ConfirmPaymentSentRequest.newBuilder() .setTradeId(tradeId) .build(); //noinspection ResultOfMethodCallIgnored - grpcStubs.tradesService.confirmPaymentStarted(request); + grpcStubs.tradesService.confirmPaymentSent(request); } public void confirmPaymentReceived(String tradeId) { diff --git a/cli/src/main/java/bisq/cli/table/builder/AbstractTradeListBuilder.java b/cli/src/main/java/bisq/cli/table/builder/AbstractTradeListBuilder.java index 91230dc94e..1c0fcf5294 100644 --- a/cli/src/main/java/bisq/cli/table/builder/AbstractTradeListBuilder.java +++ b/cli/src/main/java/bisq/cli/table/builder/AbstractTradeListBuilder.java @@ -94,7 +94,7 @@ abstract class AbstractTradeListBuilder extends AbstractTableBuilder { @Nullable protected final Column colTradeCost; @Nullable - protected final Column colIsPaymentStartedMessageSent; + protected final Column colIsPaymentSentMessageSent; @Nullable protected final Column colIsPaymentReceivedMessageSent; @Nullable @@ -132,7 +132,7 @@ abstract class AbstractTradeListBuilder extends AbstractTableBuilder { this.colIsCompleted = colSupplier.fundsWithdrawnColumn.get(); this.colBisqTradeFee = colSupplier.bisqTradeDetailFeeColumn.get(); this.colTradeCost = colSupplier.tradeCostColumn.get(); - this.colIsPaymentStartedMessageSent = colSupplier.paymentStartedMessageSentColumn.get(); + this.colIsPaymentSentMessageSent = colSupplier.paymentSentMessageSentColumn.get(); this.colIsPaymentReceivedMessageSent = colSupplier.paymentReceivedMessageSentColumn.get(); //noinspection ConstantConditions this.colAltcoinReceiveAddressColumn = colSupplier.altcoinReceiveAddressColumn.get(); diff --git a/cli/src/main/java/bisq/cli/table/builder/TradeDetailTableBuilder.java b/cli/src/main/java/bisq/cli/table/builder/TradeDetailTableBuilder.java index e0040453c5..cd3fbcdb11 100644 --- a/cli/src/main/java/bisq/cli/table/builder/TradeDetailTableBuilder.java +++ b/cli/src/main/java/bisq/cli/table/builder/TradeDetailTableBuilder.java @@ -68,7 +68,7 @@ class TradeDetailTableBuilder extends AbstractTradeListBuilder { colIsDepositPublished.addRow(trade.getIsDepositsPublished()); colIsDepositConfirmed.addRow(trade.getIsDepositsUnlocked()); colTradeCost.addRow(toTradeVolumeAsString.apply(trade)); - colIsPaymentStartedMessageSent.addRow(trade.getIsPaymentSent()); + colIsPaymentSentMessageSent.addRow(trade.getIsPaymentSent()); colIsPaymentReceivedMessageSent.addRow(trade.getIsPaymentReceived()); colIsPayoutPublished.addRow(trade.getIsPayoutPublished()); colIsCompleted.addRow(trade.getIsCompleted()); @@ -91,7 +91,7 @@ class TradeDetailTableBuilder extends AbstractTradeListBuilder { add(colIsDepositPublished.asStringColumn()); add(colIsDepositConfirmed.asStringColumn()); add(colTradeCost.justify()); - add(colIsPaymentStartedMessageSent.asStringColumn()); + add(colIsPaymentSentMessageSent.asStringColumn()); add(colIsPaymentReceivedMessageSent.asStringColumn()); add(colIsPayoutPublished.asStringColumn()); add(colIsCompleted.asStringColumn()); diff --git a/cli/src/main/java/bisq/cli/table/builder/TradeTableColumnSupplier.java b/cli/src/main/java/bisq/cli/table/builder/TradeTableColumnSupplier.java index 225926ac00..96ef64344b 100644 --- a/cli/src/main/java/bisq/cli/table/builder/TradeTableColumnSupplier.java +++ b/cli/src/main/java/bisq/cli/table/builder/TradeTableColumnSupplier.java @@ -204,7 +204,7 @@ class TradeTableColumnSupplier { ? t.getOffer().getCounterCurrencyCode() : t.getOffer().getBaseCurrencyCode(); - final Supplier> paymentStartedMessageSentColumn = () -> { + final Supplier> paymentSentMessageSentColumn = () -> { if (isTradeDetailTblBuilder.get()) { String headerCurrencyCode = toPaymentCurrencyCode.apply(firstRow.get()); String colHeader = format(COL_HEADER_TRADE_PAYMENT_SENT, headerCurrencyCode); diff --git a/core/src/main/java/bisq/core/account/witness/AccountAgeWitnessService.java b/core/src/main/java/bisq/core/account/witness/AccountAgeWitnessService.java index d9d7e44cc8..0840de1a41 100644 --- a/core/src/main/java/bisq/core/account/witness/AccountAgeWitnessService.java +++ b/core/src/main/java/bisq/core/account/witness/AccountAgeWitnessService.java @@ -34,7 +34,7 @@ import bisq.core.support.dispute.DisputeResult; import bisq.core.support.dispute.arbitration.TraderDataItem; import bisq.core.trade.ArbitratorTrade; import bisq.core.trade.Trade; -import bisq.core.trade.protocol.TradingPeer; +import bisq.core.trade.protocol.TradePeer; import bisq.core.user.User; import bisq.network.p2p.BootstrapListener; @@ -308,12 +308,12 @@ public class AccountAgeWitnessService { private Optional findTradePeerWitness(Trade trade) { if (trade instanceof ArbitratorTrade) return Optional.empty(); // TODO (woodser): arbitrator trade has two peers - TradingPeer tradingPeer = trade.getTradingPeer(); - return (tradingPeer == null || - tradingPeer.getPaymentAccountPayload() == null || - tradingPeer.getPubKeyRing() == null) ? + TradePeer tradePeer = trade.getTradePeer(); + return (tradePeer == null || + tradePeer.getPaymentAccountPayload() == null || + tradePeer.getPubKeyRing() == null) ? Optional.empty() : - findWitness(tradingPeer.getPaymentAccountPayload(), tradingPeer.getPubKeyRing()); + findWitness(tradePeer.getPaymentAccountPayload(), tradePeer.getPubKeyRing()); } private Optional getWitnessByHash(byte[] hash) { @@ -732,8 +732,8 @@ public class AccountAgeWitnessService { public Optional traderSignAndPublishPeersAccountAgeWitness(Trade trade) { AccountAgeWitness peersWitness = findTradePeerWitness(trade).orElse(null); Coin tradeAmount = trade.getAmount(); - checkNotNull(trade.getTradingPeer().getPubKeyRing(), "Peer must have a keyring"); - PublicKey peersPubKey = trade.getTradingPeer().getPubKeyRing().getSignaturePubKey(); + checkNotNull(trade.getTradePeer().getPubKeyRing(), "Peer must have a keyring"); + PublicKey peersPubKey = trade.getTradePeer().getPubKeyRing().getSignaturePubKey(); checkNotNull(peersWitness, "Not able to find peers witness, unable to sign for trade {}", trade.toString()); checkNotNull(tradeAmount, "Trade amount must not be null"); diff --git a/core/src/main/java/bisq/core/api/CoreApi.java b/core/src/main/java/bisq/core/api/CoreApi.java index 04bbb97ab2..5e118a6a1f 100644 --- a/core/src/main/java/bisq/core/api/CoreApi.java +++ b/core/src/main/java/bisq/core/api/CoreApi.java @@ -541,10 +541,10 @@ public class CoreApi { coreTradesService.takeOffer(offer, paymentAccountId, resultHandler, errorMessageHandler); } - public void confirmPaymentStarted(String tradeId, + public void confirmPaymentSent(String tradeId, ResultHandler resultHandler, ErrorMessageHandler errorMessageHandler) { - coreTradesService.confirmPaymentStarted(tradeId, resultHandler, errorMessageHandler); + coreTradesService.confirmPaymentSent(tradeId, resultHandler, errorMessageHandler); } public void confirmPaymentReceived(String tradeId, diff --git a/core/src/main/java/bisq/core/api/CoreDisputesService.java b/core/src/main/java/bisq/core/api/CoreDisputesService.java index 9dae56f3c7..e1f1a99f1e 100644 --- a/core/src/main/java/bisq/core/api/CoreDisputesService.java +++ b/core/src/main/java/bisq/core/api/CoreDisputesService.java @@ -151,7 +151,7 @@ public class CoreDisputesService { Trade trade = tradeManager.getTrade(tradeId); var winningDisputeOptional = arbitrationManager.getDisputesAsObservableList().stream() // TODO (woodser): use getDispute() .filter(d -> tradeId.equals(d.getTradeId())) - .filter(d -> trade.getTradingPeer(d.getTraderPubKeyRing()) == (winner == DisputeResult.Winner.BUYER ? trade.getBuyer() : trade.getSeller())) + .filter(d -> trade.getTradePeer(d.getTraderPubKeyRing()) == (winner == DisputeResult.Winner.BUYER ? trade.getBuyer() : trade.getSeller())) .findFirst(); if (winningDisputeOptional.isPresent()) winningDispute = winningDisputeOptional.get(); else throw new IllegalStateException(format("dispute for tradeId '%s' not found", tradeId)); diff --git a/core/src/main/java/bisq/core/api/CoreTradesService.java b/core/src/main/java/bisq/core/api/CoreTradesService.java index 3b96f59b9c..9f71aebf21 100644 --- a/core/src/main/java/bisq/core/api/CoreTradesService.java +++ b/core/src/main/java/bisq/core/api/CoreTradesService.java @@ -129,13 +129,13 @@ class CoreTradesService { } } - void confirmPaymentStarted(String tradeId, + void confirmPaymentSent(String tradeId, ResultHandler resultHandler, ErrorMessageHandler errorMessageHandler) { var trade = getTrade(tradeId); if (isFollowingBuyerProtocol(trade)) { var tradeProtocol = tradeManager.getTradeProtocol(trade); - ((BuyerProtocol) tradeProtocol).onPaymentStarted(resultHandler, errorMessageHandler); + ((BuyerProtocol) tradeProtocol).onPaymentSent(resultHandler, errorMessageHandler); } else { throw new IllegalStateException("you are the seller and not sending payment"); } diff --git a/core/src/main/java/bisq/core/api/model/TradeInfo.java b/core/src/main/java/bisq/core/api/model/TradeInfo.java index f882bb17eb..06b2edc329 100644 --- a/core/src/main/java/bisq/core/api/model/TradeInfo.java +++ b/core/src/main/java/bisq/core/api/model/TradeInfo.java @@ -41,9 +41,9 @@ public class TradeInfo implements Payload { // view and interact with trades. private static final Function toPeerNodeAddress = (trade) -> - trade.getTradingPeerNodeAddress() == null + trade.getTradePeerNodeAddress() == null ? "" - : trade.getTradingPeerNodeAddress().getFullAddress(); + : trade.getTradePeerNodeAddress().getFullAddress(); private static final Function toArbitratorNodeAddress = (trade) -> trade.getArbitratorNodeAddress() == null @@ -76,7 +76,7 @@ public class TradeInfo implements Payload { private final String price; private final String volume; private final String arbitratorNodeAddress; - private final String tradingPeerNodeAddress; + private final String tradePeerNodeAddress; private final String state; private final String phase; private final String periodState; @@ -111,7 +111,7 @@ public class TradeInfo implements Payload { this.price = builder.getPrice(); this.volume = builder.getVolume(); this.arbitratorNodeAddress = builder.getArbitratorNodeAddress(); - this.tradingPeerNodeAddress = builder.getTradingPeerNodeAddress(); + this.tradePeerNodeAddress = builder.getTradePeerNodeAddress(); this.state = builder.getState(); this.phase = builder.getPhase(); this.periodState = builder.getPeriodState(); @@ -169,7 +169,7 @@ public class TradeInfo implements Payload { .withPrice(toPreciseTradePrice.apply(trade)) .withVolume(toRoundedVolume.apply(trade)) .withArbitratorNodeAddress(toArbitratorNodeAddress.apply(trade)) - .withTradingPeerNodeAddress(toPeerNodeAddress.apply(trade)) + .withTradePeerNodeAddress(toPeerNodeAddress.apply(trade)) .withState(trade.getState().name()) .withPhase(trade.getPhase().name()) .withPeriodState(trade.getPeriodState().name()) @@ -213,7 +213,7 @@ public class TradeInfo implements Payload { .setPrice(price) .setTradeVolume(volume) .setArbitratorNodeAddress(arbitratorNodeAddress) - .setTradingPeerNodeAddress(tradingPeerNodeAddress) + .setTradePeerNodeAddress(tradePeerNodeAddress) .setState(state) .setPhase(phase) .setPeriodState(periodState) @@ -256,7 +256,7 @@ public class TradeInfo implements Payload { .withState(proto.getState()) .withPhase(proto.getPhase()) .withArbitratorNodeAddress(proto.getArbitratorNodeAddress()) - .withTradingPeerNodeAddress(proto.getTradingPeerNodeAddress()) + .withTradePeerNodeAddress(proto.getTradePeerNodeAddress()) .withIsDepositsPublished(proto.getIsDepositsPublished()) .withIsDepositsConfirmed(proto.getIsDepositsConfirmed()) .withIsDepositsUnlocked(proto.getIsDepositsUnlocked()) @@ -288,7 +288,7 @@ public class TradeInfo implements Payload { ", sellerSecurityDeposit='" + sellerSecurityDeposit + '\'' + "\n" + ", price='" + price + '\'' + "\n" + ", arbitratorNodeAddress='" + arbitratorNodeAddress + '\'' + "\n" + - ", tradingPeerNodeAddress='" + tradingPeerNodeAddress + '\'' + "\n" + + ", tradePeerNodeAddress='" + tradePeerNodeAddress + '\'' + "\n" + ", state='" + state + '\'' + "\n" + ", phase='" + phase + '\'' + "\n" + ", periodState='" + periodState + '\'' + "\n" + diff --git a/core/src/main/java/bisq/core/api/model/builder/TradeInfoV1Builder.java b/core/src/main/java/bisq/core/api/model/builder/TradeInfoV1Builder.java index 796a69f97b..5c05ffa626 100644 --- a/core/src/main/java/bisq/core/api/model/builder/TradeInfoV1Builder.java +++ b/core/src/main/java/bisq/core/api/model/builder/TradeInfoV1Builder.java @@ -49,7 +49,7 @@ public final class TradeInfoV1Builder { private String price; private String volume; private String arbitratorNodeAddress; - private String tradingPeerNodeAddress; + private String tradePeerNodeAddress; private String state; private String phase; private String periodState; @@ -178,8 +178,8 @@ public final class TradeInfoV1Builder { return this; } - public TradeInfoV1Builder withTradingPeerNodeAddress(String tradingPeerNodeAddress) { - this.tradingPeerNodeAddress = tradingPeerNodeAddress; + public TradeInfoV1Builder withTradePeerNodeAddress(String tradePeerNodeAddress) { + this.tradePeerNodeAddress = tradePeerNodeAddress; return this; } diff --git a/core/src/main/java/bisq/core/app/HavenoExecutable.java b/core/src/main/java/bisq/core/app/HavenoExecutable.java index 1935bdb461..07959d04ee 100644 --- a/core/src/main/java/bisq/core/app/HavenoExecutable.java +++ b/core/src/main/java/bisq/core/app/HavenoExecutable.java @@ -19,7 +19,6 @@ package bisq.core.app; import bisq.core.api.AccountServiceListener; import bisq.core.api.CoreAccountService; -import bisq.core.api.CoreMoneroConnectionsService; import bisq.core.btc.setup.WalletsSetup; import bisq.core.btc.wallet.BtcWalletService; import bisq.core.btc.wallet.XmrWalletService; @@ -317,11 +316,11 @@ public abstract class HavenoExecutable implements GracefulShutDownHandler, Haven injector.getInstance(XmrTxProofService.class).shutDown(); injector.getInstance(AvoidStandbyModeService.class).shutDown(); injector.getInstance(TradeManager.class).shutDown(); - injector.getInstance(XmrWalletService.class).shutDown(!isReadOnly); // TODO: why not shut down BtcWalletService, etc? shutdown CoreMoneroConnectionsService log.info("OpenOfferManager shutdown started"); injector.getInstance(OpenOfferManager.class).shutDown(() -> { log.info("OpenOfferManager shutdown completed"); + injector.getInstance(XmrWalletService.class).shutDown(!isReadOnly); injector.getInstance(BtcWalletService.class).shutDown(); // We need to shutdown BitcoinJ before the P2PService as it uses Tor. diff --git a/core/src/main/java/bisq/core/app/misc/ExecutableForAppWithP2p.java b/core/src/main/java/bisq/core/app/misc/ExecutableForAppWithP2p.java index bc7b598dc4..d0e0a8c9ef 100644 --- a/core/src/main/java/bisq/core/app/misc/ExecutableForAppWithP2p.java +++ b/core/src/main/java/bisq/core/app/misc/ExecutableForAppWithP2p.java @@ -97,7 +97,7 @@ public abstract class ExecutableForAppWithP2p extends HavenoExecutable { }); }); injector.getInstance(WalletsSetup.class).shutDown(); - injector.getInstance(XmrWalletService.class).shutDown(true); // TODO (woodser): this is not actually called, perhaps because WalletsSetup.class completes too quick so its listener calls System.exit(0) + injector.getInstance(XmrWalletService.class).shutDown(true); injector.getInstance(BtcWalletService.class).shutDown(); })); // we wait max 5 sec. diff --git a/core/src/main/java/bisq/core/support/SupportManager.java b/core/src/main/java/bisq/core/support/SupportManager.java index 284d797e8a..6ae6672bfb 100644 --- a/core/src/main/java/bisq/core/support/SupportManager.java +++ b/core/src/main/java/bisq/core/support/SupportManager.java @@ -196,7 +196,7 @@ public abstract class SupportManager { for (Dispute dispute : trade.getDisputes()) { for (ChatMessage chatMessage : dispute.getChatMessages()) { if (chatMessage.getUid().equals(ackMessage.getSourceUid())) { - trade.setDisputeStateIfProgress(Trade.DisputeState.DISPUTE_OPENED); + trade.advanceDisputeState(Trade.DisputeState.DISPUTE_OPENED); } } } diff --git a/core/src/main/java/bisq/core/support/dispute/Dispute.java b/core/src/main/java/bisq/core/support/dispute/Dispute.java index 7bf2107687..b8091eeab3 100644 --- a/core/src/main/java/bisq/core/support/dispute/Dispute.java +++ b/core/src/main/java/bisq/core/support/dispute/Dispute.java @@ -451,9 +451,9 @@ public final class Dispute implements NetworkPayload, PersistablePayload { public String getRoleString() { if (disputeOpenerIsMaker) { if (disputeOpenerIsBuyer) - return Res.get("support.buyerOfferer"); + return Res.get("support.buyerMaker"); else - return Res.get("support.sellerOfferer"); + return Res.get("support.sellerMaker"); } else { if (disputeOpenerIsBuyer) return Res.get("support.buyerTaker"); diff --git a/core/src/main/java/bisq/core/support/dispute/DisputeManager.java b/core/src/main/java/bisq/core/support/dispute/DisputeManager.java index 1c04748252..8c9efaca93 100644 --- a/core/src/main/java/bisq/core/support/dispute/DisputeManager.java +++ b/core/src/main/java/bisq/core/support/dispute/DisputeManager.java @@ -42,7 +42,7 @@ import bisq.core.trade.HavenoUtils; import bisq.core.trade.Trade; import bisq.core.trade.TradeDataValidation; import bisq.core.trade.TradeManager; -import bisq.core.trade.protocol.TradingPeer; +import bisq.core.trade.protocol.TradePeer; import bisq.network.p2p.BootstrapListener; import bisq.network.p2p.NodeAddress; import bisq.network.p2p.P2PService; @@ -387,7 +387,7 @@ public abstract class DisputeManager> extends Sup // We use the chatMessage wrapped inside the openNewDisputeMessage for // the state, as that is displayed to the user and we only persist that msg chatMessage.setArrived(true); - trade.setDisputeStateIfProgress(Trade.DisputeState.DISPUTE_REQUESTED); + trade.advanceDisputeState(Trade.DisputeState.DISPUTE_REQUESTED); requestPersistence(); resultHandler.handleResult(); } @@ -403,7 +403,7 @@ public abstract class DisputeManager> extends Sup // We use the chatMessage wrapped inside the openNewDisputeMessage for // the state, as that is displayed to the user and we only persist that msg chatMessage.setStoredInMailbox(true); - trade.setDisputeStateIfProgress(Trade.DisputeState.DISPUTE_REQUESTED); + trade.advanceDisputeState(Trade.DisputeState.DISPUTE_REQUESTED); requestPersistence(); resultHandler.handleResult(); } @@ -478,7 +478,7 @@ public abstract class DisputeManager> extends Sup // get sender senderPubKeyRing = trade.isArbitrator() ? (dispute.isDisputeOpenerIsBuyer() ? contract.getBuyerPubKeyRing() : contract.getSellerPubKeyRing()) : trade.getArbitrator().getPubKeyRing(); - TradingPeer sender = trade.getTradingPeer(senderPubKeyRing); + TradePeer sender = trade.getTradePeer(senderPubKeyRing); if (sender == null) throw new RuntimeException("Pub key ring is not from arbitrator, buyer, or seller"); // message to trader is expected from arbitrator @@ -490,7 +490,7 @@ public abstract class DisputeManager> extends Sup if (trade.isArbitrator() && message.getPaymentSentMessage() != null) { HavenoUtils.verifyPaymentSentMessage(trade, message.getPaymentSentMessage()); trade.getBuyer().setUpdatedMultisigHex(message.getPaymentSentMessage().getUpdatedMultisigHex()); - trade.setStateIfProgress(sender == trade.getBuyer() ? Trade.State.BUYER_SENT_PAYMENT_SENT_MSG : Trade.State.SELLER_RECEIVED_PAYMENT_SENT_MSG); + trade.advanceState(sender == trade.getBuyer() ? Trade.State.BUYER_SENT_PAYMENT_SENT_MSG : Trade.State.SELLER_RECEIVED_PAYMENT_SENT_MSG); } // update multisig hex @@ -509,7 +509,7 @@ public abstract class DisputeManager> extends Sup Optional storedDisputeOptional = findDispute(dispute); if (!storedDisputeOptional.isPresent()) { disputeList.add(dispute); - trade.setDisputeStateIfProgress(Trade.DisputeState.DISPUTE_OPENED); + trade.advanceDisputeState(Trade.DisputeState.DISPUTE_OPENED); // send dispute opened message to peer if arbitrator if (trade.isArbitrator()) sendDisputeOpenedMessageToPeer(dispute, contract, dispute.isDisputeOpenerIsBuyer() ? contract.getSellerPubKeyRing() : contract.getBuyerPubKeyRing(), trade.getSelf().getUpdatedMultisigHex()); @@ -724,9 +724,9 @@ public abstract class DisputeManager> extends Sup } // create dispute closed message - TradingPeer receiver = trade.getTradingPeer(dispute.getTraderPubKeyRing()); + TradePeer receiver = trade.getTradePeer(dispute.getTraderPubKeyRing()); String unsignedPayoutTxHex = payoutTx == null ? null : payoutTx.getTxSet().getMultisigTxHex(); - TradingPeer receiverPeer = receiver == trade.getBuyer() ? trade.getSeller() : trade.getBuyer(); + TradePeer receiverPeer = receiver == trade.getBuyer() ? trade.getSeller() : trade.getBuyer(); boolean deferPublishPayout = !resending && unsignedPayoutTxHex != null && receiverPeer.getUpdatedMultisigHex() != null && trade.getDisputeState().ordinal() >= Trade.DisputeState.ARBITRATOR_SAW_ARRIVED_DISPUTE_CLOSED_MSG.ordinal() ; DisputeClosedMessage disputeClosedMessage = new DisputeClosedMessage(disputeResult, p2PService.getAddress(), @@ -756,7 +756,7 @@ public abstract class DisputeManager> extends Sup // We use the chatMessage wrapped inside the DisputeClosedMessage for // the state, as that is displayed to the user and we only persist that msg disputeResult.getChatMessage().setArrived(true); - trade.setDisputeStateIfProgress(Trade.DisputeState.ARBITRATOR_SAW_ARRIVED_DISPUTE_CLOSED_MSG); + trade.advanceDisputeState(Trade.DisputeState.ARBITRATOR_SAW_ARRIVED_DISPUTE_CLOSED_MSG); trade.syncWalletNormallyForMs(30000); requestPersistence(); resultHandler.handleResult(); @@ -774,7 +774,7 @@ public abstract class DisputeManager> extends Sup // the state, as that is displayed to the user and we only persist that msg disputeResult.getChatMessage().setStoredInMailbox(true); Trade trade = tradeManager.getTrade(dispute.getTradeId()); - trade.setDisputeStateIfProgress(Trade.DisputeState.ARBITRATOR_STORED_IN_MAILBOX_DISPUTE_CLOSED_MSG); + trade.advanceDisputeState(Trade.DisputeState.ARBITRATOR_STORED_IN_MAILBOX_DISPUTE_CLOSED_MSG); requestPersistence(); resultHandler.handleResult(); } @@ -790,7 +790,7 @@ public abstract class DisputeManager> extends Sup // We use the chatMessage wrapped inside the DisputeClosedMessage for // the state, as that is displayed to the user and we only persist that msg disputeResult.getChatMessage().setSendMessageError(errorMessage); - trade.setDisputeStateIfProgress(Trade.DisputeState.ARBITRATOR_SEND_FAILED_DISPUTE_CLOSED_MSG); + trade.advanceDisputeState(Trade.DisputeState.ARBITRATOR_SEND_FAILED_DISPUTE_CLOSED_MSG); requestPersistence(); faultHandler.handleFault(errorMessage, new RuntimeException(errorMessage)); } @@ -802,7 +802,7 @@ public abstract class DisputeManager> extends Sup trade.setPayoutTx(payoutTx); trade.setPayoutTxHex(payoutTx.getTxSet().getMultisigTxHex()); } - trade.setDisputeStateIfProgress(Trade.DisputeState.ARBITRATOR_SENT_DISPUTE_CLOSED_MSG); + trade.advanceDisputeState(Trade.DisputeState.ARBITRATOR_SENT_DISPUTE_CLOSED_MSG); requestPersistence(); } catch (Exception e) { faultHandler.handleFault(e.getMessage(), e); @@ -820,7 +820,7 @@ public abstract class DisputeManager> extends Sup trade.saveWallet(); // create unsigned dispute payout tx if not already published and arbitrator has trader's updated multisig info - TradingPeer receiver = trade.getTradingPeer(dispute.getTraderPubKeyRing()); + TradePeer receiver = trade.getTradePeer(dispute.getTraderPubKeyRing()); if (!trade.isPayoutPublished() && receiver.getUpdatedMultisigHex() != null) { MoneroWallet multisigWallet = trade.getWallet(); diff --git a/core/src/main/java/bisq/core/support/dispute/arbitration/ArbitrationManager.java b/core/src/main/java/bisq/core/support/dispute/arbitration/ArbitrationManager.java index 3366cf1173..2738663472 100644 --- a/core/src/main/java/bisq/core/support/dispute/arbitration/ArbitrationManager.java +++ b/core/src/main/java/bisq/core/support/dispute/arbitration/ArbitrationManager.java @@ -260,7 +260,7 @@ public final class ArbitrationManager extends DisputeManager updatedMultisigHexes = new ArrayList(); - if (trade.getTradingPeer().getUpdatedMultisigHex() != null) updatedMultisigHexes.add(trade.getTradingPeer().getUpdatedMultisigHex()); + if (trade.getTradePeer().getUpdatedMultisigHex() != null) updatedMultisigHexes.add(trade.getTradePeer().getUpdatedMultisigHex()); if (trade.getArbitrator().getUpdatedMultisigHex() != null) updatedMultisigHexes.add(trade.getArbitrator().getUpdatedMultisigHex()); if (!updatedMultisigHexes.isEmpty()) trade.getWallet().importMultisigHex(updatedMultisigHexes.toArray(new String[0])); // TODO (monero-project): fails if multisig hex imported individually @@ -315,7 +315,7 @@ public final class ArbitrationManager extends DisputeManager { diff --git a/core/src/main/java/bisq/core/support/dispute/mediation/MediationManager.java b/core/src/main/java/bisq/core/support/dispute/mediation/MediationManager.java index 13f03c1606..876f2ae993 100644 --- a/core/src/main/java/bisq/core/support/dispute/mediation/MediationManager.java +++ b/core/src/main/java/bisq/core/support/dispute/mediation/MediationManager.java @@ -240,7 +240,7 @@ public final class MediationManager extends DisputeManager // If we have not got yet the peers signature we sign and send to the peer our signature. // Otherwise we sign and complete with the peers signature the payout tx. - if (trade.getTradingPeer().getMediatedPayoutTxSignature() == null) { + if (trade.getTradePeer().getMediatedPayoutTxSignature() == null) { tradeProtocol.onAcceptMediationResult(() -> { if (trade.getPayoutTx() != null) { tradeManager.closeDisputedTrade(tradeId, Trade.DisputeState.MEDIATION_CLOSED); diff --git a/core/src/main/java/bisq/core/trade/BuyerTrade.java b/core/src/main/java/bisq/core/trade/BuyerTrade.java index b01c602266..2ef64f20d2 100644 --- a/core/src/main/java/bisq/core/trade/BuyerTrade.java +++ b/core/src/main/java/bisq/core/trade/BuyerTrade.java @@ -63,6 +63,6 @@ public abstract class BuyerTrade extends Trade { @Override public boolean confirmPermitted() { - return !getDisputeState().isArbitrated(); + return true; } } diff --git a/core/src/main/java/bisq/core/trade/CleanupMailboxMessages.java b/core/src/main/java/bisq/core/trade/CleanupMailboxMessages.java index dcd66d05c0..a600d62939 100644 --- a/core/src/main/java/bisq/core/trade/CleanupMailboxMessages.java +++ b/core/src/main/java/bisq/core/trade/CleanupMailboxMessages.java @@ -122,7 +122,7 @@ public class CleanupMailboxMessages { private boolean isPubKeyValid(DecryptedMessageWithPubKey decryptedMessageWithPubKey, Trade trade) { // We can only validate the peers pubKey if we have it already. If we are the taker we get it from the offer // Otherwise it depends on the state of the trade protocol if we have received the peers pubKeyRing already. - PubKeyRing peersPubKeyRing = trade.getTradingPeer().getPubKeyRing(); + PubKeyRing peersPubKeyRing = trade.getTradePeer().getPubKeyRing(); boolean isValid = true; if (peersPubKeyRing != null && !decryptedMessageWithPubKey.getSignaturePubKey().equals(peersPubKeyRing.getSignaturePubKey())) { diff --git a/core/src/main/java/bisq/core/trade/CleanupMailboxMessagesService.java b/core/src/main/java/bisq/core/trade/CleanupMailboxMessagesService.java index 6b05b82385..63d67b77df 100644 --- a/core/src/main/java/bisq/core/trade/CleanupMailboxMessagesService.java +++ b/core/src/main/java/bisq/core/trade/CleanupMailboxMessagesService.java @@ -122,7 +122,7 @@ public class CleanupMailboxMessagesService { private boolean isPubKeyValid(DecryptedMessageWithPubKey decryptedMessageWithPubKey, Trade trade) { // We can only validate the peers pubKey if we have it already. If we are the taker we get it from the offer // Otherwise it depends on the state of the trade protocol if we have received the peers pubKeyRing already. - PubKeyRing peersPubKeyRing = trade.getTradingPeer().getPubKeyRing(); + PubKeyRing peersPubKeyRing = trade.getTradePeer().getPubKeyRing(); boolean isValid = true; if (peersPubKeyRing != null && !decryptedMessageWithPubKey.getSignaturePubKey().equals(peersPubKeyRing.getSignaturePubKey())) { diff --git a/core/src/main/java/bisq/core/trade/ClosedTradableManager.java b/core/src/main/java/bisq/core/trade/ClosedTradableManager.java index 0470fcf71d..92fec33df1 100644 --- a/core/src/main/java/bisq/core/trade/ClosedTradableManager.java +++ b/core/src/main/java/bisq/core/trade/ClosedTradableManager.java @@ -191,9 +191,9 @@ public class ClosedTradableManager implements PersistedDataHost { if (isOpenOffer(tradable)) { return 0; } - NodeAddress addressInTrade = castToTradeModel(tradable).getTradingPeerNodeAddress(); + NodeAddress addressInTrade = castToTradeModel(tradable).getTradePeerNodeAddress(); return (int) getTradeModelStream() - .map(Trade::getTradingPeerNodeAddress) + .map(Trade::getTradePeerNodeAddress) .filter(Objects::nonNull) .filter(address -> address.equals(addressInTrade)) .count(); diff --git a/core/src/main/java/bisq/core/trade/HavenoUtils.java b/core/src/main/java/bisq/core/trade/HavenoUtils.java index 25851cb787..553d4c2ffe 100644 --- a/core/src/main/java/bisq/core/trade/HavenoUtils.java +++ b/core/src/main/java/bisq/core/trade/HavenoUtils.java @@ -195,7 +195,7 @@ public class HavenoUtils { * @return a unique deterministic id for sending a trade mailbox message */ public static String getDeterministicId(Trade trade, Class tradeMessageClass, NodeAddress receiver) { - String uniqueId = trade.getId() + "_" + tradeMessageClass.getSimpleName() + "_" + trade.getRole() + "_to_" + trade.getPeerRole(trade.getTradingPeer(receiver)); + String uniqueId = trade.getId() + "_" + tradeMessageClass.getSimpleName() + "_" + trade.getRole() + "_to_" + trade.getPeerRole(trade.getTradePeer(receiver)); return Utilities.bytesAsHexString(Hash.getSha256Ripemd160hash(uniqueId.getBytes(Charsets.UTF_8))); } diff --git a/core/src/main/java/bisq/core/trade/SellerTrade.java b/core/src/main/java/bisq/core/trade/SellerTrade.java index e33d57f284..51f844f34e 100644 --- a/core/src/main/java/bisq/core/trade/SellerTrade.java +++ b/core/src/main/java/bisq/core/trade/SellerTrade.java @@ -63,35 +63,7 @@ public abstract class SellerTrade extends Trade { @Override public boolean confirmPermitted() { - // For altcoin there is no reason to delay BTC release as no chargeback risk - if (CurrencyUtil.isCryptoCurrency(getOffer().getCurrencyCode())) { - return true; - } - - switch (getDisputeState()) { - case NO_DISPUTE: - return true; - - case DISPUTE_REQUESTED: - case DISPUTE_OPENED: - case ARBITRATOR_SENT_DISPUTE_CLOSED_MSG: - case ARBITRATOR_SEND_FAILED_DISPUTE_CLOSED_MSG: - case ARBITRATOR_STORED_IN_MAILBOX_DISPUTE_CLOSED_MSG: - case ARBITRATOR_SAW_ARRIVED_DISPUTE_CLOSED_MSG: - case DISPUTE_CLOSED: - case MEDIATION_REQUESTED: - case MEDIATION_STARTED_BY_PEER: - return false; - - case MEDIATION_CLOSED: - return !mediationResultAppliedPenaltyToSeller(); - - case REFUND_REQUESTED: - case REFUND_REQUEST_STARTED_BY_PEER: - case REFUND_REQUEST_CLOSED: - default: - return false; - } + return true; } } diff --git a/core/src/main/java/bisq/core/trade/Tradable.java b/core/src/main/java/bisq/core/trade/Tradable.java index 01001805bf..e8f420f79d 100644 --- a/core/src/main/java/bisq/core/trade/Tradable.java +++ b/core/src/main/java/bisq/core/trade/Tradable.java @@ -74,7 +74,7 @@ public interface Tradable extends PersistablePayload { return asTradeModel().map(Trade::getOffer).map(Offer::getMakerFee).or(() -> Optional.ofNullable(getOffer().getMakerFee())); } - default Optional getOptionalTradingPeerNodeAddress() { - return asTradeModel().map(Trade::getTradingPeerNodeAddress); + default Optional getOptionalTradePeerNodeAddress() { + return asTradeModel().map(Trade::getTradePeerNodeAddress); } } diff --git a/core/src/main/java/bisq/core/trade/Trade.java b/core/src/main/java/bisq/core/trade/Trade.java index 753b4fbe3a..906b71ba83 100644 --- a/core/src/main/java/bisq/core/trade/Trade.java +++ b/core/src/main/java/bisq/core/trade/Trade.java @@ -38,7 +38,7 @@ import bisq.core.trade.protocol.ProcessModel; import bisq.core.trade.protocol.ProcessModelServiceProvider; import bisq.core.trade.protocol.TradeListener; import bisq.core.trade.protocol.TradeProtocol; -import bisq.core.trade.protocol.TradingPeer; +import bisq.core.trade.protocol.TradePeer; import bisq.core.trade.txproof.AssetTxProofResult; import bisq.core.util.VolumeUtil; import bisq.network.p2p.AckMessage; @@ -672,8 +672,8 @@ public abstract class Trade implements Tradable, Model { getSelf().setNodeAddress(P2PService.getMyNodeAddress()); } - public NodeAddress getTradingPeerNodeAddress() { - return getTradingPeer() == null ? null : getTradingPeer().getNodeAddress(); + public NodeAddress getTradePeerNodeAddress() { + return getTradePeer() == null ? null : getTradePeer().getNodeAddress(); } public NodeAddress getArbitratorNodeAddress() { @@ -883,9 +883,9 @@ public abstract class Trade implements Tradable, Model { try { // decrypt payment account payload - getTradingPeer().setPaymentAccountKey(paymentAccountKey); - SecretKey sk = Encryption.getSecretKeyFromBytes(getTradingPeer().getPaymentAccountKey()); - byte[] decryptedPaymentAccountPayload = Encryption.decrypt(getTradingPeer().getEncryptedPaymentAccountPayload(), sk); + getTradePeer().setPaymentAccountKey(paymentAccountKey); + SecretKey sk = Encryption.getSecretKeyFromBytes(getTradePeer().getPaymentAccountKey()); + byte[] decryptedPaymentAccountPayload = Encryption.decrypt(getTradePeer().getEncryptedPaymentAccountPayload(), sk); CoreNetworkProtoResolver resolver = new CoreNetworkProtoResolver(Clock.systemDefaultZone()); // TODO: reuse resolver from elsewhere? PaymentAccountPayload paymentAccountPayload = resolver.fromProto(protobuf.PaymentAccountPayload.parseFrom(decryptedPaymentAccountPayload)); @@ -894,7 +894,7 @@ public abstract class Trade implements Tradable, Model { if (!Arrays.equals(paymentAccountPayload.getHash(), peerPaymentAccountPayloadHash)) throw new RuntimeException("Hash of peer's payment account payload does not match contract"); // set payment account payload - getTradingPeer().setPaymentAccountPayload(paymentAccountPayload); + getTradePeer().setPaymentAccountPayload(paymentAccountPayload); } catch (Exception e) { throw new RuntimeException(e); } @@ -977,7 +977,7 @@ public abstract class Trade implements Tradable, Model { try { syncWallet(); } catch (Exception e) { - log.warn("Error syncing wallet for {} {}: {}", getClass().getSimpleName(), getId(), e.getMessage()); + if (isInitialized) log.warn("Error syncing wallet for {} {}: {}", getClass().getSimpleName(), getId(), e.getMessage()); } } @@ -1074,7 +1074,7 @@ public abstract class Trade implements Tradable, Model { }); } - public void setStateIfProgress(State state) { + public void advanceState(State state) { if (state.ordinal() > getState().ordinal()) setState(state); } @@ -1121,7 +1121,7 @@ public abstract class Trade implements Tradable, Model { }); } - public void setDisputeStateIfProgress(DisputeState disputeState) { + public void advanceDisputeState(DisputeState disputeState) { if (disputeState.ordinal() > getDisputeState().ordinal()) setDisputeState(disputeState); } @@ -1193,35 +1193,35 @@ public abstract class Trade implements Tradable, Model { return this instanceof TakerTrade; } - public TradingPeer getSelf() { + public TradePeer getSelf() { if (this instanceof MakerTrade) return processModel.getMaker(); if (this instanceof TakerTrade) return processModel.getTaker(); if (this instanceof ArbitratorTrade) return processModel.getArbitrator(); throw new RuntimeException("Trade is not maker, taker, or arbitrator"); } - public TradingPeer getArbitrator() { + public TradePeer getArbitrator() { return processModel.getArbitrator(); } - public TradingPeer getMaker() { + public TradePeer getMaker() { return processModel.getMaker(); } - public TradingPeer getTaker() { + public TradePeer getTaker() { return processModel.getTaker(); } - public TradingPeer getBuyer() { + public TradePeer getBuyer() { return offer.getDirection() == OfferDirection.BUY ? processModel.getMaker() : processModel.getTaker(); } - public TradingPeer getSeller() { + public TradePeer getSeller() { return offer.getDirection() == OfferDirection.BUY ? processModel.getTaker() : processModel.getMaker(); } // get the taker if maker, maker if taker, null if arbitrator - public TradingPeer getTradingPeer() { + public TradePeer getTradePeer() { if (this instanceof MakerTrade) return processModel.getTaker(); else if (this instanceof TakerTrade) return processModel.getMaker(); else if (this instanceof ArbitratorTrade) return null; @@ -1229,14 +1229,14 @@ public abstract class Trade implements Tradable, Model { } // TODO (woodser): this naming convention is confusing - public TradingPeer getTradingPeer(NodeAddress address) { + public TradePeer getTradePeer(NodeAddress address) { if (address.equals(getMaker().getNodeAddress())) return processModel.getMaker(); if (address.equals(getTaker().getNodeAddress())) return processModel.getTaker(); if (address.equals(getArbitrator().getNodeAddress())) return processModel.getArbitrator(); return null; } - public TradingPeer getTradingPeer(PubKeyRing pubKeyRing) { + public TradePeer getTradePeer(PubKeyRing pubKeyRing) { if (getMaker() != null && getMaker().getPubKeyRing().equals(pubKeyRing)) return getMaker(); if (getTaker() != null && getTaker().getPubKeyRing().equals(pubKeyRing)) return getTaker(); if (getArbitrator() != null && getArbitrator().getPubKeyRing().equals(pubKeyRing)) return getArbitrator(); @@ -1250,7 +1250,7 @@ public abstract class Trade implements Tradable, Model { throw new IllegalArgumentException("Trade is not buyer, seller, or arbitrator"); } - public String getPeerRole(TradingPeer peer) { + public String getPeerRole(TradePeer peer) { if (peer == getBuyer()) return "Buyer"; if (peer == getSeller()) return "Seller"; if (peer == getArbitrator()) return "Arbitrator"; @@ -1637,7 +1637,7 @@ public abstract class Trade implements Tradable, Model { } } } catch (Exception e) { - if (isInitialized && getWallet() != null) log.warn("Error polling trade wallet {}: {}", getId(), e.getMessage()); // TODO (monero-java): poller.isPolling() and then don't need to use isInitialized here as shutdown flag + if (isInitialized && getWallet() != null && isWalletConnected()) log.warn("Error polling trade wallet {}: {}", getId(), e.getMessage()); // TODO (monero-java): poller.isPolling() and then don't need to use isInitialized here as shutdown flag } } diff --git a/core/src/main/java/bisq/core/trade/TradeDataValidation.java b/core/src/main/java/bisq/core/trade/TradeDataValidation.java index 01ac2fd31d..2f41eef93b 100644 --- a/core/src/main/java/bisq/core/trade/TradeDataValidation.java +++ b/core/src/main/java/bisq/core/trade/TradeDataValidation.java @@ -343,28 +343,6 @@ public class TradeDataValidation { } } - public static void validateDepositInputs(Trade trade) throws InvalidTxException { - throw new RuntimeException("TradeDataValidation.validateDepositInputs() needs updated for XMR"); -// // assumption: deposit tx always has 2 inputs, the maker and taker -// if (trade == null || trade.getDepositTx() == null || trade.getDepositTx().getInputs().size() != 2) { -// throw new InvalidTxException("Deposit transaction is null or has unexpected input count"); -// } -// Transaction depositTx = trade.getDepositTx(); -// String txIdInput0 = depositTx.getInput(0).getOutpoint().getHash().toString(); -// String txIdInput1 = depositTx.getInput(1).getOutpoint().getHash().toString(); -// String contractMakerTxId = trade.getContract().getOfferPayload().getOfferFeePaymentTxId(); -// String contractTakerTxId = trade.getContract().getTakerFeeTxID(); -// boolean makerFirstMatch = contractMakerTxId.equalsIgnoreCase(txIdInput0) && contractTakerTxId.equalsIgnoreCase(txIdInput1); -// boolean takerFirstMatch = contractMakerTxId.equalsIgnoreCase(txIdInput1) && contractTakerTxId.equalsIgnoreCase(txIdInput0); -// if (!makerFirstMatch && !takerFirstMatch) { -// String errMsg = "Maker/Taker txId in contract does not match deposit tx input"; -// log.error(errMsg + -// "\nContract Maker tx=" + contractMakerTxId + " Contract Taker tx=" + contractTakerTxId + -// "\nDeposit Input0=" + txIdInput0 + " Deposit Input1=" + txIdInput1); -// throw new InvalidTxException(errMsg); -// } - } - /////////////////////////////////////////////////////////////////////////////////////////// // Exceptions diff --git a/core/src/main/java/bisq/core/trade/TradeManager.java b/core/src/main/java/bisq/core/trade/TradeManager.java index a62726e8c5..0ecfb5480d 100644 --- a/core/src/main/java/bisq/core/trade/TradeManager.java +++ b/core/src/main/java/bisq/core/trade/TradeManager.java @@ -557,8 +557,8 @@ public class TradeManager implements PersistedDataHost, DecryptedDirectMessageLi request.getTakerNodeAddress(), request.getArbitratorNodeAddress()); - //System.out.println("TradeManager trade.getTradingPeer().setNodeAddress(): " + sender); - //trade.getTradingPeer().setNodeAddress(sender); + //System.out.println("TradeManager trade.getTradePeer().setNodeAddress(): " + sender); + //trade.getTradePeer().setNodeAddress(sender); // TODO (woodser): what if maker's address changes while offer open, or taker's address changes after multisig deposit available? need to verify and update. see OpenOfferManager.maybeUpdatePersistedOffers() trade.getArbitrator().setPubKeyRing(arbitrator.getPubKeyRing()); trade.getMaker().setPubKeyRing(trade.getOffer().getPubKeyRing()); diff --git a/core/src/main/java/bisq/core/trade/protocol/BuyerAsMakerProtocol.java b/core/src/main/java/bisq/core/trade/protocol/BuyerAsMakerProtocol.java index 77b7e60bf9..e50aa79ec0 100644 --- a/core/src/main/java/bisq/core/trade/protocol/BuyerAsMakerProtocol.java +++ b/core/src/main/java/bisq/core/trade/protocol/BuyerAsMakerProtocol.java @@ -20,6 +20,7 @@ package bisq.core.trade.protocol; import bisq.core.trade.BuyerAsMakerTrade; import bisq.core.trade.Trade; import bisq.core.trade.messages.InitTradeRequest; +import bisq.core.trade.protocol.tasks.ApplyFilter; import bisq.core.trade.protocol.tasks.MakerSendInitTradeRequest; import bisq.core.trade.protocol.tasks.ProcessInitTradeRequest; import bisq.network.p2p.NodeAddress; @@ -50,9 +51,8 @@ public class BuyerAsMakerProtocol extends BuyerProtocol implements MakerProtocol .with(message) .from(peer)) .setup(tasks( + ApplyFilter.class, ProcessInitTradeRequest.class, - //ApplyFilter.class, // TODO (woodser): these checks apply when maker signs availability request, but not here - //VerifyPeersAccountAgeWitness.class, // TODO (woodser): these checks apply after in multisig, means if rejected need to reimburse other's fee MakerSendInitTradeRequest.class) .using(new TradeTaskRunner(trade, () -> { diff --git a/core/src/main/java/bisq/core/trade/protocol/BuyerAsTakerProtocol.java b/core/src/main/java/bisq/core/trade/protocol/BuyerAsTakerProtocol.java index 86ec262534..85beeb1b67 100644 --- a/core/src/main/java/bisq/core/trade/protocol/BuyerAsTakerProtocol.java +++ b/core/src/main/java/bisq/core/trade/protocol/BuyerAsTakerProtocol.java @@ -56,7 +56,7 @@ public class BuyerAsTakerProtocol extends BuyerProtocol implements TakerProtocol this.errorMessageHandler = errorMessageHandler; expect(phase(Trade.Phase.INIT) .with(TakerEvent.TAKE_OFFER) - .from(trade.getTradingPeer().getNodeAddress())) + .from(trade.getTradePeer().getNodeAddress())) .setup(tasks( ApplyFilter.class, TakerReserveTradeFunds.class, diff --git a/core/src/main/java/bisq/core/trade/protocol/BuyerProtocol.java b/core/src/main/java/bisq/core/trade/protocol/BuyerProtocol.java index 933d00cf8b..4b04f74813 100644 --- a/core/src/main/java/bisq/core/trade/protocol/BuyerProtocol.java +++ b/core/src/main/java/bisq/core/trade/protocol/BuyerProtocol.java @@ -95,8 +95,8 @@ public class BuyerProtocol extends DisputeProtocol { // User interaction /////////////////////////////////////////////////////////////////////////////////////////// - public void onPaymentStarted(ResultHandler resultHandler, ErrorMessageHandler errorMessageHandler) { - System.out.println("BuyerProtocol.onPaymentStarted()"); + public void onPaymentSent(ResultHandler resultHandler, ErrorMessageHandler errorMessageHandler) { + System.out.println("BuyerProtocol.onPaymentSent()"); new Thread(() -> { synchronized (trade) { latchTrade(); diff --git a/core/src/main/java/bisq/core/trade/protocol/DisputeProtocol.java b/core/src/main/java/bisq/core/trade/protocol/DisputeProtocol.java index 4129e468d5..3660e4decd 100644 --- a/core/src/main/java/bisq/core/trade/protocol/DisputeProtocol.java +++ b/core/src/main/java/bisq/core/trade/protocol/DisputeProtocol.java @@ -87,7 +87,7 @@ public abstract class DisputeProtocol extends TradeProtocol { Trade.Phase.PAYMENT_SENT, Trade.Phase.PAYMENT_RECEIVED) .with(event) - .preCondition(trade.getTradingPeer().getMediatedPayoutTxSignature() == null, + .preCondition(trade.getTradePeer().getMediatedPayoutTxSignature() == null, () -> errorMessageHandler.handleErrorMessage("We have received already the signature from the peer.")) .preCondition(trade.getPayoutTx() == null, () -> errorMessageHandler.handleErrorMessage("Payout tx is already published."))) diff --git a/core/src/main/java/bisq/core/trade/protocol/FluentProtocol.java b/core/src/main/java/bisq/core/trade/protocol/FluentProtocol.java index b87951d6ec..7021954a49 100644 --- a/core/src/main/java/bisq/core/trade/protocol/FluentProtocol.java +++ b/core/src/main/java/bisq/core/trade/protocol/FluentProtocol.java @@ -109,7 +109,7 @@ public class FluentProtocol { NodeAddress peer = condition.getPeer(); if (peer != null) { - tradeProtocol.processModel.setTempTradingPeerNodeAddress(peer); // TODO (woodser): node has multiple peers (arbitrator and maker or taker), but fluent protocol assumes only one + tradeProtocol.processModel.setTempTradePeerNodeAddress(peer); // TODO (woodser): node has multiple peers (arbitrator and maker or taker), but fluent protocol assumes only one tradeProtocol.processModel.getTradeManager().requestPersistence(); } diff --git a/core/src/main/java/bisq/core/trade/protocol/ProcessModel.java b/core/src/main/java/bisq/core/trade/protocol/ProcessModel.java index 4327dcde60..aefb968f36 100644 --- a/core/src/main/java/bisq/core/trade/protocol/ProcessModel.java +++ b/core/src/main/java/bisq/core/trade/protocol/ProcessModel.java @@ -108,9 +108,9 @@ public class ProcessModel implements Model, PersistablePayload { transient private Transaction depositTx; // TODO (woodser): remove and rename depositTxBtc with depositTx // Persistable Immutable (private setter only used by PB method) - private TradingPeer maker = new TradingPeer(); - private TradingPeer taker = new TradingPeer(); - private TradingPeer arbitrator = new TradingPeer(); + private TradePeer maker = new TradePeer(); + private TradePeer taker = new TradePeer(); + private TradePeer arbitrator = new TradePeer(); private String offerId; private String accountId; private PubKeyRing pubKeyRing; @@ -141,10 +141,10 @@ public class ProcessModel implements Model, PersistablePayload { @Setter private byte[] myMultiSigPubKey; // that is used to store temp. the peers address when we get an incoming message before the message is verified. - // After successful verified we copy that over to the trade.tradingPeerAddress + // After successful verified we copy that over to the trade.tradePeerAddress @Nullable @Setter - private NodeAddress tempTradingPeerNodeAddress; // TODO (woodser): remove entirely? + private NodeAddress tempTradePeerNodeAddress; // TODO (woodser): remove entirely? // Added in v.1.1.6 @Nullable @@ -195,20 +195,20 @@ public class ProcessModel implements Model, PersistablePayload { // PaymentSentMessage. As well we do an automatic re-send in case it was not ACKed yet. // To enable that even after restart we persist the state. @Setter - private ObjectProperty paymentStartedMessageStateProperty = new SimpleObjectProperty<>(MessageState.UNDEFINED); + private ObjectProperty paymentSentMessageStateProperty = new SimpleObjectProperty<>(MessageState.UNDEFINED); public ProcessModel(String offerId, String accountId, PubKeyRing pubKeyRing) { - this(offerId, accountId, pubKeyRing, new TradingPeer(), new TradingPeer(), new TradingPeer()); + this(offerId, accountId, pubKeyRing, new TradePeer(), new TradePeer(), new TradePeer()); } - public ProcessModel(String offerId, String accountId, PubKeyRing pubKeyRing, TradingPeer arbitrator, TradingPeer maker, TradingPeer taker) { + public ProcessModel(String offerId, String accountId, PubKeyRing pubKeyRing, TradePeer arbitrator, TradePeer maker, TradePeer taker) { this.offerId = offerId; this.accountId = accountId; this.pubKeyRing = pubKeyRing; - // If tradingPeer was null in persisted data from some error cases we set a new one to not cause nullPointers - this.arbitrator = arbitrator != null ? arbitrator : new TradingPeer(); - this.maker = maker != null ? maker : new TradingPeer(); - this.taker = taker != null ? taker : new TradingPeer(); + // If tradePeer was null in persisted data from some error cases we set a new one to not cause nullPointers + this.arbitrator = arbitrator != null ? arbitrator : new TradePeer(); + this.maker = maker != null ? maker : new TradePeer(); + this.taker = taker != null ? taker : new TradePeer(); } public void applyTransient(ProcessModelServiceProvider provider, @@ -233,19 +233,19 @@ public class ProcessModel implements Model, PersistablePayload { .setChangeOutputValue(changeOutputValue) .setUseSavingsWallet(useSavingsWallet) .setFundsNeededForTradeAsLong(fundsNeededForTradeAsLong) - .setPaymentStartedMessageState(paymentStartedMessageStateProperty.get().name()) + .setPaymentSentMessageState(paymentSentMessageStateProperty.get().name()) .setBuyerPayoutAmountFromMediation(buyerPayoutAmountFromMediation) .setSellerPayoutAmountFromMediation(sellerPayoutAmountFromMediation) .setDepositsConfirmedMessagesDelivered(isDepositsConfirmedMessagesDelivered); - Optional.ofNullable(maker).ifPresent(e -> builder.setMaker((protobuf.TradingPeer) maker.toProtoMessage())); - Optional.ofNullable(taker).ifPresent(e -> builder.setTaker((protobuf.TradingPeer) taker.toProtoMessage())); - Optional.ofNullable(arbitrator).ifPresent(e -> builder.setArbitrator((protobuf.TradingPeer) arbitrator.toProtoMessage())); + Optional.ofNullable(maker).ifPresent(e -> builder.setMaker((protobuf.TradePeer) maker.toProtoMessage())); + Optional.ofNullable(taker).ifPresent(e -> builder.setTaker((protobuf.TradePeer) taker.toProtoMessage())); + Optional.ofNullable(arbitrator).ifPresent(e -> builder.setArbitrator((protobuf.TradePeer) arbitrator.toProtoMessage())); Optional.ofNullable(takeOfferFeeTxId).ifPresent(builder::setTakeOfferFeeTxId); Optional.ofNullable(payoutTxSignature).ifPresent(e -> builder.setPayoutTxSignature(ByteString.copyFrom(payoutTxSignature))); Optional.ofNullable(rawTransactionInputs).ifPresent(e -> builder.addAllRawTransactionInputs(ProtoUtil.collectionToProto(rawTransactionInputs, protobuf.RawTransactionInput.class))); Optional.ofNullable(changeOutputAddress).ifPresent(builder::setChangeOutputAddress); Optional.ofNullable(myMultiSigPubKey).ifPresent(e -> builder.setMyMultiSigPubKey(ByteString.copyFrom(myMultiSigPubKey))); - Optional.ofNullable(tempTradingPeerNodeAddress).ifPresent(e -> builder.setTempTradingPeerNodeAddress(tempTradingPeerNodeAddress.toProtoMessage())); + Optional.ofNullable(tempTradePeerNodeAddress).ifPresent(e -> builder.setTempTradePeerNodeAddress(tempTradePeerNodeAddress.toProtoMessage())); Optional.ofNullable(makerSignature).ifPresent(e -> builder.setMakerSignature(makerSignature)); Optional.ofNullable(multisigAddress).ifPresent(e -> builder.setMultisigAddress(multisigAddress)); Optional.ofNullable(paymentSentMessage).ifPresent(e -> builder.setPaymentSentMessage(paymentSentMessage.toProtoNetworkEnvelope().getPaymentSentMessage())); @@ -255,9 +255,9 @@ public class ProcessModel implements Model, PersistablePayload { } public static ProcessModel fromProto(protobuf.ProcessModel proto, CoreProtoResolver coreProtoResolver) { - TradingPeer arbitrator = TradingPeer.fromProto(proto.getArbitrator(), coreProtoResolver); - TradingPeer maker = TradingPeer.fromProto(proto.getMaker(), coreProtoResolver); - TradingPeer taker = TradingPeer.fromProto(proto.getTaker(), coreProtoResolver); + TradePeer arbitrator = TradePeer.fromProto(proto.getArbitrator(), coreProtoResolver); + TradePeer maker = TradePeer.fromProto(proto.getMaker(), coreProtoResolver); + TradePeer taker = TradePeer.fromProto(proto.getTaker(), coreProtoResolver); PubKeyRing pubKeyRing = PubKeyRing.fromProto(proto.getPubKeyRing()); ProcessModel processModel = new ProcessModel(proto.getOfferId(), proto.getAccountId(), pubKeyRing, arbitrator, maker, taker); processModel.setChangeOutputValue(proto.getChangeOutputValue()); @@ -276,14 +276,14 @@ public class ProcessModel implements Model, PersistablePayload { processModel.setRawTransactionInputs(rawTransactionInputs); processModel.setChangeOutputAddress(ProtoUtil.stringOrNullFromProto(proto.getChangeOutputAddress())); processModel.setMyMultiSigPubKey(ProtoUtil.byteArrayOrNullFromProto(proto.getMyMultiSigPubKey())); - processModel.setTempTradingPeerNodeAddress(proto.hasTempTradingPeerNodeAddress() ? NodeAddress.fromProto(proto.getTempTradingPeerNodeAddress()) : null); + processModel.setTempTradePeerNodeAddress(proto.hasTempTradePeerNodeAddress() ? NodeAddress.fromProto(proto.getTempTradePeerNodeAddress()) : null); processModel.setMediatedPayoutTxSignature(ProtoUtil.byteArrayOrNullFromProto(proto.getMediatedPayoutTxSignature())); processModel.setMakerSignature(proto.getMakerSignature()); processModel.setMultisigAddress(ProtoUtil.stringOrNullFromProto(proto.getMultisigAddress())); - String paymentStartedMessageStateString = ProtoUtil.stringOrNullFromProto(proto.getPaymentStartedMessageState()); - MessageState paymentStartedMessageState = ProtoUtil.enumFromProto(MessageState.class, paymentStartedMessageStateString); - processModel.setPaymentStartedMessageState(paymentStartedMessageState); + String paymentSentMessageStateString = ProtoUtil.stringOrNullFromProto(proto.getPaymentSentMessageState()); + MessageState paymentSentMessageState = ProtoUtil.enumFromProto(MessageState.class, paymentSentMessageStateString); + processModel.setPaymentSentMessageState(paymentSentMessageState); processModel.setPaymentSentMessage(proto.hasPaymentSentMessage() ? PaymentSentMessage.fromProto(proto.getPaymentSentMessage(), Version.getP2PMessageVersion()) : null); processModel.setPaymentReceivedMessage(proto.hasPaymentReceivedMessage() ? PaymentReceivedMessage.fromProto(proto.getPaymentReceivedMessage(), Version.getP2PMessageVersion()) : null); @@ -330,15 +330,15 @@ public class ProcessModel implements Model, PersistablePayload { return getP2PService().getAddress(); } - void setPaymentStartedAckMessage(AckMessage ackMessage) { + void setPaymentSentAckMessage(AckMessage ackMessage) { MessageState messageState = ackMessage.isSuccess() ? MessageState.ACKNOWLEDGED : MessageState.FAILED; - setPaymentStartedMessageState(messageState); + setPaymentSentMessageState(messageState); } - public void setPaymentStartedMessageState(MessageState paymentStartedMessageStateProperty) { - this.paymentStartedMessageStateProperty.set(paymentStartedMessageStateProperty); + public void setPaymentSentMessageState(MessageState paymentSentMessageStateProperty) { + this.paymentSentMessageStateProperty.set(paymentSentMessageStateProperty); if (tradeManager != null) { tradeManager.requestPersistence(); } diff --git a/core/src/main/java/bisq/core/trade/protocol/SellerAsMakerProtocol.java b/core/src/main/java/bisq/core/trade/protocol/SellerAsMakerProtocol.java index 5ae14d3516..370ca016bb 100644 --- a/core/src/main/java/bisq/core/trade/protocol/SellerAsMakerProtocol.java +++ b/core/src/main/java/bisq/core/trade/protocol/SellerAsMakerProtocol.java @@ -21,6 +21,7 @@ package bisq.core.trade.protocol; import bisq.core.trade.SellerAsMakerTrade; import bisq.core.trade.Trade; import bisq.core.trade.messages.InitTradeRequest; +import bisq.core.trade.protocol.tasks.ApplyFilter; import bisq.core.trade.protocol.tasks.MakerSendInitTradeRequest; import bisq.core.trade.protocol.tasks.ProcessInitTradeRequest; import bisq.network.p2p.NodeAddress; @@ -56,9 +57,8 @@ public class SellerAsMakerProtocol extends SellerProtocol implements MakerProtoc .with(message) .from(peer)) .setup(tasks( + ApplyFilter.class, ProcessInitTradeRequest.class, - //ApplyFilter.class, // TODO (woodser): these checks apply when maker signs availability request, but not here - //VerifyPeersAccountAgeWitness.class, // TODO (woodser): these checks apply after in multisig, means if rejected need to reimburse other's fee MakerSendInitTradeRequest.class) .using(new TradeTaskRunner(trade, () -> { diff --git a/core/src/main/java/bisq/core/trade/protocol/SellerAsTakerProtocol.java b/core/src/main/java/bisq/core/trade/protocol/SellerAsTakerProtocol.java index b1430c6c57..701f56e9a6 100644 --- a/core/src/main/java/bisq/core/trade/protocol/SellerAsTakerProtocol.java +++ b/core/src/main/java/bisq/core/trade/protocol/SellerAsTakerProtocol.java @@ -56,7 +56,7 @@ public class SellerAsTakerProtocol extends SellerProtocol implements TakerProtoc this.errorMessageHandler = errorMessageHandler; expect(phase(Trade.Phase.INIT) .with(TakerEvent.TAKE_OFFER) - .from(trade.getTradingPeer().getNodeAddress())) + .from(trade.getTradePeer().getNodeAddress())) .setup(tasks( ApplyFilter.class, TakerReserveTradeFunds.class, diff --git a/core/src/main/java/bisq/core/trade/protocol/TradingPeer.java b/core/src/main/java/bisq/core/trade/protocol/TradePeer.java similarity index 66% rename from core/src/main/java/bisq/core/trade/protocol/TradingPeer.java rename to core/src/main/java/bisq/core/trade/protocol/TradePeer.java index 71c4d1ad2e..6654955e5a 100644 --- a/core/src/main/java/bisq/core/trade/protocol/TradingPeer.java +++ b/core/src/main/java/bisq/core/trade/protocol/TradePeer.java @@ -45,7 +45,7 @@ import javax.annotation.Nullable; @Slf4j @Getter @Setter -public final class TradingPeer implements PersistablePayload { +public final class TradePeer implements PersistablePayload { // Transient/Mutable // Added in v1.2.0 @Setter @@ -130,12 +130,12 @@ public final class TradingPeer implements PersistablePayload { @Nullable private String updatedMultisigHex; - public TradingPeer() { + public TradePeer() { } @Override public Message toProtoMessage() { - final protobuf.TradingPeer.Builder builder = protobuf.TradingPeer.newBuilder() + final protobuf.TradePeer.Builder builder = protobuf.TradePeer.newBuilder() .setChangeOutputValue(changeOutputValue); Optional.ofNullable(nodeAddress).ifPresent(e -> builder.setNodeAddress(nodeAddress.toProtoMessage())); Optional.ofNullable(pubKeyRing).ifPresent(e -> builder.setPubKeyRing(pubKeyRing.toProtoMessage())); @@ -174,52 +174,52 @@ public final class TradingPeer implements PersistablePayload { return builder.build(); } - public static TradingPeer fromProto(protobuf.TradingPeer proto, CoreProtoResolver coreProtoResolver) { + public static TradePeer fromProto(protobuf.TradePeer proto, CoreProtoResolver coreProtoResolver) { if (proto.getDefaultInstanceForType().equals(proto)) { return null; } else { - TradingPeer tradingPeer = new TradingPeer(); - tradingPeer.setNodeAddress(proto.hasNodeAddress() ? NodeAddress.fromProto(proto.getNodeAddress()) : null); - tradingPeer.setPubKeyRing(proto.hasPubKeyRing() ? PubKeyRing.fromProto(proto.getPubKeyRing()) : null); - tradingPeer.setChangeOutputValue(proto.getChangeOutputValue()); - tradingPeer.setAccountId(ProtoUtil.stringOrNullFromProto(proto.getAccountId())); - tradingPeer.setPaymentAccountId(ProtoUtil.stringOrNullFromProto(proto.getPaymentAccountId())); - tradingPeer.setPaymentMethodId(ProtoUtil.stringOrNullFromProto(proto.getPaymentMethodId())); - tradingPeer.setPaymentAccountPayloadHash(proto.getPaymentAccountPayloadHash().toByteArray()); - tradingPeer.setEncryptedPaymentAccountPayload(proto.getEncryptedPaymentAccountPayload().toByteArray()); - tradingPeer.setPaymentAccountKey(ProtoUtil.byteArrayOrNullFromProto(proto.getPaymentAccountKey())); - tradingPeer.setPaymentAccountPayload(proto.hasPaymentAccountPayload() ? coreProtoResolver.fromProto(proto.getPaymentAccountPayload()) : null); - tradingPeer.setPayoutAddressString(ProtoUtil.stringOrNullFromProto(proto.getPayoutAddressString())); - tradingPeer.setContractAsJson(ProtoUtil.stringOrNullFromProto(proto.getContractAsJson())); - tradingPeer.setContractSignature(ProtoUtil.stringOrNullFromProto(proto.getContractSignature())); - tradingPeer.setSignature(ProtoUtil.byteArrayOrNullFromProto(proto.getSignature())); - tradingPeer.setPubKeyRing(proto.hasPubKeyRing() ? PubKeyRing.fromProto(proto.getPubKeyRing()) : null); - tradingPeer.setMultiSigPubKey(ProtoUtil.byteArrayOrNullFromProto(proto.getMultiSigPubKey())); + TradePeer tradePeer = new TradePeer(); + tradePeer.setNodeAddress(proto.hasNodeAddress() ? NodeAddress.fromProto(proto.getNodeAddress()) : null); + tradePeer.setPubKeyRing(proto.hasPubKeyRing() ? PubKeyRing.fromProto(proto.getPubKeyRing()) : null); + tradePeer.setChangeOutputValue(proto.getChangeOutputValue()); + tradePeer.setAccountId(ProtoUtil.stringOrNullFromProto(proto.getAccountId())); + tradePeer.setPaymentAccountId(ProtoUtil.stringOrNullFromProto(proto.getPaymentAccountId())); + tradePeer.setPaymentMethodId(ProtoUtil.stringOrNullFromProto(proto.getPaymentMethodId())); + tradePeer.setPaymentAccountPayloadHash(proto.getPaymentAccountPayloadHash().toByteArray()); + tradePeer.setEncryptedPaymentAccountPayload(proto.getEncryptedPaymentAccountPayload().toByteArray()); + tradePeer.setPaymentAccountKey(ProtoUtil.byteArrayOrNullFromProto(proto.getPaymentAccountKey())); + tradePeer.setPaymentAccountPayload(proto.hasPaymentAccountPayload() ? coreProtoResolver.fromProto(proto.getPaymentAccountPayload()) : null); + tradePeer.setPayoutAddressString(ProtoUtil.stringOrNullFromProto(proto.getPayoutAddressString())); + tradePeer.setContractAsJson(ProtoUtil.stringOrNullFromProto(proto.getContractAsJson())); + tradePeer.setContractSignature(ProtoUtil.stringOrNullFromProto(proto.getContractSignature())); + tradePeer.setSignature(ProtoUtil.byteArrayOrNullFromProto(proto.getSignature())); + tradePeer.setPubKeyRing(proto.hasPubKeyRing() ? PubKeyRing.fromProto(proto.getPubKeyRing()) : null); + tradePeer.setMultiSigPubKey(ProtoUtil.byteArrayOrNullFromProto(proto.getMultiSigPubKey())); List rawTransactionInputs = proto.getRawTransactionInputsList().isEmpty() ? null : proto.getRawTransactionInputsList().stream() .map(RawTransactionInput::fromProto) .collect(Collectors.toList()); - tradingPeer.setRawTransactionInputs(rawTransactionInputs); - tradingPeer.setChangeOutputAddress(ProtoUtil.stringOrNullFromProto(proto.getChangeOutputAddress())); - tradingPeer.setAccountAgeWitnessNonce(ProtoUtil.byteArrayOrNullFromProto(proto.getAccountAgeWitnessNonce())); - tradingPeer.setAccountAgeWitnessSignature(ProtoUtil.byteArrayOrNullFromProto(proto.getAccountAgeWitnessSignature())); + tradePeer.setRawTransactionInputs(rawTransactionInputs); + tradePeer.setChangeOutputAddress(ProtoUtil.stringOrNullFromProto(proto.getChangeOutputAddress())); + tradePeer.setAccountAgeWitnessNonce(ProtoUtil.byteArrayOrNullFromProto(proto.getAccountAgeWitnessNonce())); + tradePeer.setAccountAgeWitnessSignature(ProtoUtil.byteArrayOrNullFromProto(proto.getAccountAgeWitnessSignature())); protobuf.AccountAgeWitness protoAccountAgeWitness = proto.getAccountAgeWitness(); - tradingPeer.setAccountAgeWitness(protoAccountAgeWitness.getHash().isEmpty() ? null : AccountAgeWitness.fromProto(protoAccountAgeWitness)); - tradingPeer.setCurrentDate(proto.getCurrentDate()); - tradingPeer.setMediatedPayoutTxSignature(ProtoUtil.byteArrayOrNullFromProto(proto.getMediatedPayoutTxSignature())); - tradingPeer.setReserveTxHash(ProtoUtil.stringOrNullFromProto(proto.getReserveTxHash())); - tradingPeer.setReserveTxHex(ProtoUtil.stringOrNullFromProto(proto.getReserveTxHex())); - tradingPeer.setReserveTxKey(ProtoUtil.stringOrNullFromProto(proto.getReserveTxKey())); - tradingPeer.setReserveTxKeyImages(proto.getReserveTxKeyImagesList()); - tradingPeer.setPreparedMultisigHex(ProtoUtil.stringOrNullFromProto(proto.getPreparedMultisigHex())); - tradingPeer.setMadeMultisigHex(ProtoUtil.stringOrNullFromProto(proto.getMadeMultisigHex())); - tradingPeer.setExchangedMultisigHex(ProtoUtil.stringOrNullFromProto(proto.getExchangedMultisigHex())); - tradingPeer.setDepositTxHash(ProtoUtil.stringOrNullFromProto(proto.getDepositTxHash())); - tradingPeer.setDepositTxHex(ProtoUtil.stringOrNullFromProto(proto.getDepositTxHex())); - tradingPeer.setDepositTxKey(ProtoUtil.stringOrNullFromProto(proto.getDepositTxKey())); - tradingPeer.setUpdatedMultisigHex(ProtoUtil.stringOrNullFromProto(proto.getUpdatedMultisigHex())); - return tradingPeer; + tradePeer.setAccountAgeWitness(protoAccountAgeWitness.getHash().isEmpty() ? null : AccountAgeWitness.fromProto(protoAccountAgeWitness)); + tradePeer.setCurrentDate(proto.getCurrentDate()); + tradePeer.setMediatedPayoutTxSignature(ProtoUtil.byteArrayOrNullFromProto(proto.getMediatedPayoutTxSignature())); + tradePeer.setReserveTxHash(ProtoUtil.stringOrNullFromProto(proto.getReserveTxHash())); + tradePeer.setReserveTxHex(ProtoUtil.stringOrNullFromProto(proto.getReserveTxHex())); + tradePeer.setReserveTxKey(ProtoUtil.stringOrNullFromProto(proto.getReserveTxKey())); + tradePeer.setReserveTxKeyImages(proto.getReserveTxKeyImagesList()); + tradePeer.setPreparedMultisigHex(ProtoUtil.stringOrNullFromProto(proto.getPreparedMultisigHex())); + tradePeer.setMadeMultisigHex(ProtoUtil.stringOrNullFromProto(proto.getMadeMultisigHex())); + tradePeer.setExchangedMultisigHex(ProtoUtil.stringOrNullFromProto(proto.getExchangedMultisigHex())); + tradePeer.setDepositTxHash(ProtoUtil.stringOrNullFromProto(proto.getDepositTxHash())); + tradePeer.setDepositTxHex(ProtoUtil.stringOrNullFromProto(proto.getDepositTxHex())); + tradePeer.setDepositTxKey(ProtoUtil.stringOrNullFromProto(proto.getDepositTxKey())); + tradePeer.setUpdatedMultisigHex(ProtoUtil.stringOrNullFromProto(proto.getUpdatedMultisigHex())); + return tradePeer; } } } diff --git a/core/src/main/java/bisq/core/trade/protocol/TradeProtocol.java b/core/src/main/java/bisq/core/trade/protocol/TradeProtocol.java index 7e759965d0..3682a395c9 100644 --- a/core/src/main/java/bisq/core/trade/protocol/TradeProtocol.java +++ b/core/src/main/java/bisq/core/trade/protocol/TradeProtocol.java @@ -508,7 +508,7 @@ public abstract class TradeProtocol implements DecryptedDirectMessageListener, D log.warn("Error processing payment received message: " + errorMessage); processModel.getTradeManager().requestPersistence(); - // reprocess message depending on error + // schedule to reprocess message unless deleted if (trade.getProcessModel().getPaymentReceivedMessage() != null) { UserThread.runAfter(() -> { reprocessPaymentReceivedMessageCount++; @@ -583,8 +583,8 @@ public abstract class TradeProtocol implements DecryptedDirectMessageListener, D private void onAckMessage(AckMessage ackMessage, NodeAddress peer) { // We handle the ack for PaymentSentMessage and DepositTxAndDelayedPayoutTxMessage // as we support automatic re-send of the msg in case it was not ACKed after a certain time - if (ackMessage.getSourceMsgClassName().equals(PaymentSentMessage.class.getSimpleName()) && trade.getTradingPeer(peer) == trade.getSeller()) { - processModel.setPaymentStartedAckMessage(ackMessage); + if (ackMessage.getSourceMsgClassName().equals(PaymentSentMessage.class.getSimpleName()) && trade.getTradePeer(peer) == trade.getSeller()) { + processModel.setPaymentSentAckMessage(ackMessage); } if (ackMessage.isSuccess()) { @@ -705,7 +705,7 @@ public abstract class TradeProtocol implements DecryptedDirectMessageListener, D private PubKeyRing getPeersPubKeyRing(NodeAddress address) { trade.setMyNodeAddress(); // TODO: this is a hack to update my node address before verifying the message - TradingPeer peer = trade.getTradingPeer(address); + TradePeer peer = trade.getTradePeer(address); if (peer == null) { log.warn("Cannot get peer's pub key ring because peer is not maker, taker, or arbitrator. Their address might have changed: " + peer); return null; @@ -733,13 +733,13 @@ public abstract class TradeProtocol implements DecryptedDirectMessageListener, D } else { // valid if arbitrator or peer unknown - if (trade.getArbitrator().getPubKeyRing() == null || (trade.getTradingPeer() == null || trade.getTradingPeer().getPubKeyRing() == null)) return true; + if (trade.getArbitrator().getPubKeyRing() == null || (trade.getTradePeer() == null || trade.getTradePeer().getPubKeyRing() == null)) return true; // valid if arbitrator's pub key ring if (message.getSignaturePubKey().equals(trade.getArbitrator().getPubKeyRing().getSignaturePubKey())) return true; // valid if peer's pub key ring - if (message.getSignaturePubKey().equals(trade.getTradingPeer().getPubKeyRing().getSignaturePubKey())) return true; + if (message.getSignaturePubKey().equals(trade.getTradePeer().getPubKeyRing().getSignaturePubKey())) return true; } // invalid diff --git a/core/src/main/java/bisq/core/trade/protocol/tasks/ApplyFilter.java b/core/src/main/java/bisq/core/trade/protocol/tasks/ApplyFilter.java index b9b3a3d28b..8438abc5c9 100644 --- a/core/src/main/java/bisq/core/trade/protocol/tasks/ApplyFilter.java +++ b/core/src/main/java/bisq/core/trade/protocol/tasks/ApplyFilter.java @@ -18,18 +18,13 @@ package bisq.core.trade.protocol.tasks; import bisq.core.filter.FilterManager; -import bisq.core.payment.payload.PaymentAccountPayload; -import bisq.core.trade.ArbitratorTrade; import bisq.core.trade.Trade; -import bisq.core.trade.messages.InitTradeRequest; import bisq.network.p2p.NodeAddress; import bisq.common.taskrunner.TaskRunner; import lombok.extern.slf4j.Slf4j; -import javax.annotation.Nullable; - import static com.google.common.base.Preconditions.checkNotNull; @Slf4j @@ -43,12 +38,12 @@ public class ApplyFilter extends TradeTask { try { runInterceptHook(); - NodeAddress nodeAddress = checkNotNull(processModel.getTempTradingPeerNodeAddress()); + NodeAddress nodeAddress = checkNotNull(processModel.getTempTradePeerNodeAddress()); FilterManager filterManager = processModel.getFilterManager(); if (filterManager.isNodeAddressBanned(nodeAddress)) { failed("Other trader is banned by their node address.\n" + - "tradingPeerNodeAddress=" + nodeAddress); + "tradePeerNodeAddress=" + nodeAddress); } else if (filterManager.isOfferIdBanned(trade.getId())) { failed("Offer ID is banned.\n" + "Offer ID=" + trade.getId()); diff --git a/core/src/main/java/bisq/core/trade/protocol/tasks/ArbitratorProcessDepositRequest.java b/core/src/main/java/bisq/core/trade/protocol/tasks/ArbitratorProcessDepositRequest.java index d984d789ec..672620bfff 100644 --- a/core/src/main/java/bisq/core/trade/protocol/tasks/ArbitratorProcessDepositRequest.java +++ b/core/src/main/java/bisq/core/trade/protocol/tasks/ArbitratorProcessDepositRequest.java @@ -27,7 +27,7 @@ import bisq.core.trade.HavenoUtils; import bisq.core.trade.Trade; import bisq.core.trade.messages.DepositRequest; import bisq.core.trade.messages.DepositResponse; -import bisq.core.trade.protocol.TradingPeer; +import bisq.core.trade.protocol.TradePeer; import bisq.network.p2p.NodeAddress; import bisq.network.p2p.SendDirectMessageListener; import common.utils.JsonUtils; @@ -65,7 +65,7 @@ public class ArbitratorProcessDepositRequest extends TradeTask { String signature = request.getContractSignature(); // get trader info - TradingPeer trader = trade.getTradingPeer(processModel.getTempTradingPeerNodeAddress()); + TradePeer trader = trade.getTradePeer(processModel.getTempTradePeerNodeAddress()); if (trader == null) throw new RuntimeException(request.getClass().getSimpleName() + " is not from maker, taker, or arbitrator"); PubKeyRing peerPubKeyRing = trader.getPubKeyRing(); diff --git a/core/src/main/java/bisq/core/trade/protocol/tasks/ArbitratorProcessReserveTx.java b/core/src/main/java/bisq/core/trade/protocol/tasks/ArbitratorProcessReserveTx.java index 97c26b1b23..c4ba2629d3 100644 --- a/core/src/main/java/bisq/core/trade/protocol/tasks/ArbitratorProcessReserveTx.java +++ b/core/src/main/java/bisq/core/trade/protocol/tasks/ArbitratorProcessReserveTx.java @@ -23,7 +23,7 @@ import bisq.core.offer.OfferDirection; import bisq.core.trade.HavenoUtils; import bisq.core.trade.Trade; import bisq.core.trade.messages.InitTradeRequest; -import bisq.core.trade.protocol.TradingPeer; +import bisq.core.trade.protocol.TradePeer; import java.math.BigInteger; import org.bitcoinj.core.Coin; @@ -73,7 +73,7 @@ public class ArbitratorProcessReserveTx extends TradeTask { } // save reserve tx to model - TradingPeer trader = isFromTaker ? processModel.getTaker() : processModel.getMaker(); + TradePeer trader = isFromTaker ? processModel.getTaker() : processModel.getMaker(); trader.setReserveTxHash(request.getReserveTxHash()); trader.setReserveTxHex(request.getReserveTxHex()); trader.setReserveTxKey(request.getReserveTxKey()); diff --git a/core/src/main/java/bisq/core/trade/protocol/tasks/BuyerSendPaymentSentMessage.java b/core/src/main/java/bisq/core/trade/protocol/tasks/BuyerSendPaymentSentMessage.java index 66863f570d..69359c261f 100644 --- a/core/src/main/java/bisq/core/trade/protocol/tasks/BuyerSendPaymentSentMessage.java +++ b/core/src/main/java/bisq/core/trade/protocol/tasks/BuyerSendPaymentSentMessage.java @@ -91,7 +91,7 @@ public abstract class BuyerSendPaymentSentMessage extends SendMailboxMessageTask trade.getPayoutTxHex(), trade.getSelf().getUpdatedMultisigHex(), trade.getSelf().getPaymentAccountKey(), - trade.getTradingPeer().getAccountAgeWitness() + trade.getTradePeer().getAccountAgeWitness() ); // sign message @@ -139,7 +139,7 @@ public abstract class BuyerSendPaymentSentMessage extends SendMailboxMessageTask timer.stop(); } if (listener != null) { - processModel.getPaymentStartedMessageStateProperty().removeListener(listener); + processModel.getPaymentSentMessageStateProperty().removeListener(listener); } } } diff --git a/core/src/main/java/bisq/core/trade/protocol/tasks/MaybeSendSignContractRequest.java b/core/src/main/java/bisq/core/trade/protocol/tasks/MaybeSendSignContractRequest.java index 7cacee13bd..4a35bc2397 100644 --- a/core/src/main/java/bisq/core/trade/protocol/tasks/MaybeSendSignContractRequest.java +++ b/core/src/main/java/bisq/core/trade/protocol/tasks/MaybeSendSignContractRequest.java @@ -98,16 +98,16 @@ public class MaybeSendSignContractRequest extends TradeTask { sig); // send request to trading peer - processModel.getP2PService().sendEncryptedDirectMessage(trade.getTradingPeer().getNodeAddress(), trade.getTradingPeer().getPubKeyRing(), request, new SendDirectMessageListener() { + processModel.getP2PService().sendEncryptedDirectMessage(trade.getTradePeer().getNodeAddress(), trade.getTradePeer().getPubKeyRing(), request, new SendDirectMessageListener() { @Override public void onArrived() { - log.info("{} arrived: trading peer={}; offerId={}; uid={}", request.getClass().getSimpleName(), trade.getTradingPeer().getNodeAddress(), trade.getId()); + log.info("{} arrived: trading peer={}; offerId={}; uid={}", request.getClass().getSimpleName(), trade.getTradePeer().getNodeAddress(), trade.getId()); ack1 = true; if (ack1 && ack2) completeAux(); } @Override public void onFault(String errorMessage) { - log.error("Sending {} failed: uid={}; peer={}; error={}", request.getClass().getSimpleName(), trade.getTradingPeer().getNodeAddress(), trade.getId(), errorMessage); + log.error("Sending {} failed: uid={}; peer={}; error={}", request.getClass().getSimpleName(), trade.getTradePeer().getNodeAddress(), trade.getId(), errorMessage); appendToErrorMessage("Sending message failed: message=" + request + "\nerrorMessage=" + errorMessage); failed(); } diff --git a/core/src/main/java/bisq/core/trade/protocol/tasks/ProcessDepositsConfirmedMessage.java b/core/src/main/java/bisq/core/trade/protocol/tasks/ProcessDepositsConfirmedMessage.java index 9f37023315..86ef0b67e7 100644 --- a/core/src/main/java/bisq/core/trade/protocol/tasks/ProcessDepositsConfirmedMessage.java +++ b/core/src/main/java/bisq/core/trade/protocol/tasks/ProcessDepositsConfirmedMessage.java @@ -21,7 +21,7 @@ package bisq.core.trade.protocol.tasks; import bisq.common.taskrunner.TaskRunner; import bisq.core.trade.Trade; import bisq.core.trade.messages.DepositsConfirmedMessage; -import bisq.core.trade.protocol.TradingPeer; +import bisq.core.trade.protocol.TradePeer; import bisq.core.util.Validator; import lombok.extern.slf4j.Slf4j; @@ -44,11 +44,11 @@ public class ProcessDepositsConfirmedMessage extends TradeTask { DepositsConfirmedMessage request = (DepositsConfirmedMessage) processModel.getTradeMessage(); checkNotNull(request); Validator.checkTradeId(processModel.getOfferId(), request); - TradingPeer sender = trade.getTradingPeer(request.getPubKeyRing()); + TradePeer sender = trade.getTradePeer(request.getPubKeyRing()); if (sender == null) throw new RuntimeException("Pub key ring is not from arbitrator, buyer, or seller"); // update peer node address - sender.setNodeAddress(processModel.getTempTradingPeerNodeAddress()); + sender.setNodeAddress(processModel.getTempTradePeerNodeAddress()); if (sender.getNodeAddress().equals(trade.getBuyer().getNodeAddress()) && sender != trade.getBuyer()) trade.getBuyer().setNodeAddress(null); // tests can reuse addresses if (sender.getNodeAddress().equals(trade.getSeller().getNodeAddress()) && sender != trade.getSeller()) trade.getSeller().setNodeAddress(null); if (sender.getNodeAddress().equals(trade.getArbitrator().getNodeAddress()) && sender != trade.getArbitrator()) trade.getArbitrator().setNodeAddress(null); @@ -57,7 +57,7 @@ public class ProcessDepositsConfirmedMessage extends TradeTask { sender.setUpdatedMultisigHex(request.getUpdatedMultisigHex()); // decrypt seller payment account payload if key given - if (request.getSellerPaymentAccountKey() != null && trade.getTradingPeer().getPaymentAccountPayload() == null) { + if (request.getSellerPaymentAccountKey() != null && trade.getTradePeer().getPaymentAccountPayload() == null) { log.info(trade.getClass().getSimpleName() + " decrypting using seller payment account key"); trade.decryptPeerPaymentAccountPayload(request.getSellerPaymentAccountKey()); } diff --git a/core/src/main/java/bisq/core/trade/protocol/tasks/ProcessInitMultisigRequest.java b/core/src/main/java/bisq/core/trade/protocol/tasks/ProcessInitMultisigRequest.java index 484bdf562a..c34a53a257 100644 --- a/core/src/main/java/bisq/core/trade/protocol/tasks/ProcessInitMultisigRequest.java +++ b/core/src/main/java/bisq/core/trade/protocol/tasks/ProcessInitMultisigRequest.java @@ -23,7 +23,7 @@ import bisq.core.trade.MakerTrade; import bisq.core.trade.TakerTrade; import bisq.core.trade.Trade; import bisq.core.trade.messages.InitMultisigRequest; -import bisq.core.trade.protocol.TradingPeer; +import bisq.core.trade.protocol.TradePeer; import bisq.network.p2p.NodeAddress; import bisq.network.p2p.SendDirectMessageListener; @@ -68,7 +68,7 @@ public class ProcessInitMultisigRequest extends TradeTask { XmrWalletService xmrWalletService = processModel.getProvider().getXmrWalletService(); // get peer multisig participant - TradingPeer multisigParticipant = trade.getTradingPeer(processModel.getTempTradingPeerNodeAddress()); + TradePeer multisigParticipant = trade.getTradePeer(processModel.getTempTradePeerNodeAddress()); // reconcile peer's established multisig hex with message if (multisigParticipant.getPreparedMultisigHex() == null) multisigParticipant.setPreparedMultisigHex(request.getPreparedMultisigHex()); @@ -91,7 +91,7 @@ public class ProcessInitMultisigRequest extends TradeTask { } // make multisig if applicable - TradingPeer[] peers = getMultisigPeers(); + TradePeer[] peers = getMultisigPeers(); if (trade.getSelf().getMadeMultisigHex() == null && peers[0].getPreparedMultisigHex() != null && peers[1].getPreparedMultisigHex() != null) { log.info("Making multisig wallet for trade {}", trade.getId()); String multisigHex = multisigWallet.makeMultisig(Arrays.asList(peers[0].getPreparedMultisigHex(), peers[1].getPreparedMultisigHex()), 2, xmrWalletService.getWalletPassword()); // TODO (woodser): xmrWalletService.makeMultisig(tradeId, multisigHexes, threshold)? @@ -187,8 +187,8 @@ public class ProcessInitMultisigRequest extends TradeTask { } } - private TradingPeer[] getMultisigPeers() { - TradingPeer[] peers = new TradingPeer[2]; + private TradePeer[] getMultisigPeers() { + TradePeer[] peers = new TradePeer[2]; if (trade instanceof TakerTrade) { peers[0] = processModel.getArbitrator(); peers[1] = processModel.getMaker(); diff --git a/core/src/main/java/bisq/core/trade/protocol/tasks/ProcessInitTradeRequest.java b/core/src/main/java/bisq/core/trade/protocol/tasks/ProcessInitTradeRequest.java index 78f8385bd2..b4949cd3fc 100644 --- a/core/src/main/java/bisq/core/trade/protocol/tasks/ProcessInitTradeRequest.java +++ b/core/src/main/java/bisq/core/trade/protocol/tasks/ProcessInitTradeRequest.java @@ -24,7 +24,7 @@ import bisq.core.trade.MakerTrade; import bisq.core.trade.Trade; import bisq.core.trade.HavenoUtils; import bisq.core.trade.messages.InitTradeRequest; -import bisq.core.trade.protocol.TradingPeer; +import bisq.core.trade.protocol.TradePeer; import bisq.common.taskrunner.TaskRunner; import org.bitcoinj.core.Coin; @@ -58,7 +58,7 @@ public class ProcessInitTradeRequest extends TradeTask { checkTradeId(processModel.getOfferId(), request); // handle request as arbitrator - TradingPeer multisigParticipant; + TradePeer multisigParticipant; if (trade instanceof ArbitratorTrade) { trade.getMaker().setPubKeyRing((trade.getOffer().getPubKeyRing())); trade.getArbitrator().setPubKeyRing(processModel.getPubKeyRing()); // TODO (woodser): why duplicating field in process model diff --git a/core/src/main/java/bisq/core/trade/protocol/tasks/ProcessPaymentReceivedMessage.java b/core/src/main/java/bisq/core/trade/protocol/tasks/ProcessPaymentReceivedMessage.java index 53860114d3..ea93871636 100644 --- a/core/src/main/java/bisq/core/trade/protocol/tasks/ProcessPaymentReceivedMessage.java +++ b/core/src/main/java/bisq/core/trade/protocol/tasks/ProcessPaymentReceivedMessage.java @@ -68,12 +68,12 @@ public class ProcessPaymentReceivedMessage extends TradeTask { trade.getBuyer().setAccountAgeWitness(message.getBuyerAccountAgeWitness()); // update to the latest peer address of our peer if message is correct - trade.getSeller().setNodeAddress(processModel.getTempTradingPeerNodeAddress()); + trade.getSeller().setNodeAddress(processModel.getTempTradePeerNodeAddress()); if (trade.getSeller().getNodeAddress().equals(trade.getBuyer().getNodeAddress())) trade.getBuyer().setNodeAddress(null); // tests can reuse addresses // close open disputes if (trade.getDisputeState().ordinal() >= Trade.DisputeState.DISPUTE_REQUESTED.ordinal()) { - trade.setDisputeStateIfProgress(Trade.DisputeState.DISPUTE_CLOSED); + trade.advanceDisputeState(Trade.DisputeState.DISPUTE_CLOSED); for (Dispute dispute : trade.getDisputes()) { dispute.setIsClosed(); } @@ -94,7 +94,7 @@ public class ProcessPaymentReceivedMessage extends TradeTask { } // complete - trade.setStateIfProgress(Trade.State.SELLER_SENT_PAYMENT_RECEIVED_MSG); // arbitrator auto completes when payout published + trade.advanceState(Trade.State.SELLER_SENT_PAYMENT_RECEIVED_MSG); // arbitrator auto completes when payout published trade.requestPersistence(); complete(); } catch (Throwable t) { diff --git a/core/src/main/java/bisq/core/trade/protocol/tasks/ProcessPaymentSentMessage.java b/core/src/main/java/bisq/core/trade/protocol/tasks/ProcessPaymentSentMessage.java index 2dd4605c29..08e6c9b063 100644 --- a/core/src/main/java/bisq/core/trade/protocol/tasks/ProcessPaymentSentMessage.java +++ b/core/src/main/java/bisq/core/trade/protocol/tasks/ProcessPaymentSentMessage.java @@ -54,14 +54,14 @@ public class ProcessPaymentSentMessage extends TradeTask { if (trade.isSeller()) trade.decryptPeerPaymentAccountPayload(message.getPaymentAccountKey()); // update latest peer address - trade.getBuyer().setNodeAddress(processModel.getTempTradingPeerNodeAddress()); + trade.getBuyer().setNodeAddress(processModel.getTempTradePeerNodeAddress()); // set state String counterCurrencyTxId = message.getCounterCurrencyTxId(); if (counterCurrencyTxId != null && counterCurrencyTxId.length() < 100) trade.setCounterCurrencyTxId(counterCurrencyTxId); String counterCurrencyExtraData = message.getCounterCurrencyExtraData(); if (counterCurrencyExtraData != null && counterCurrencyExtraData.length() < 100) trade.setCounterCurrencyExtraData(counterCurrencyExtraData); - trade.setStateIfProgress(trade.isSeller() ? Trade.State.SELLER_RECEIVED_PAYMENT_SENT_MSG : Trade.State.BUYER_SENT_PAYMENT_SENT_MSG); + trade.advanceState(trade.isSeller() ? Trade.State.SELLER_RECEIVED_PAYMENT_SENT_MSG : Trade.State.BUYER_SENT_PAYMENT_SENT_MSG); trade.requestPersistence(); complete(); } catch (Throwable t) { diff --git a/core/src/main/java/bisq/core/trade/protocol/tasks/ProcessSignContractRequest.java b/core/src/main/java/bisq/core/trade/protocol/tasks/ProcessSignContractRequest.java index 31b8426aa7..a6c0855f2e 100644 --- a/core/src/main/java/bisq/core/trade/protocol/tasks/ProcessSignContractRequest.java +++ b/core/src/main/java/bisq/core/trade/protocol/tasks/ProcessSignContractRequest.java @@ -33,7 +33,7 @@ import bisq.core.trade.Trade; import bisq.core.trade.Trade.State; import bisq.core.trade.messages.SignContractRequest; import bisq.core.trade.messages.SignContractResponse; -import bisq.core.trade.protocol.TradingPeer; +import bisq.core.trade.protocol.TradePeer; import bisq.core.util.JsonUtil; import bisq.network.p2p.NodeAddress; import bisq.network.p2p.SendDirectMessageListener; @@ -65,7 +65,7 @@ public class ProcessSignContractRequest extends TradeTask { // extract fields from request // TODO (woodser): verify request and from maker or taker SignContractRequest request = (SignContractRequest) processModel.getTradeMessage(); - TradingPeer trader = trade.getTradingPeer(processModel.getTempTradingPeerNodeAddress()); + TradePeer trader = trade.getTradePeer(processModel.getTempTradePeerNodeAddress()); trader.setDepositTxHash(request.getDepositTxHash()); trader.setAccountId(request.getAccountId()); trader.setPaymentAccountPayloadHash(request.getPaymentAccountPayloadHash()); @@ -120,8 +120,8 @@ public class ProcessSignContractRequest extends TradeTask { encryptedPaymentAccountPayload); // get response recipients. only arbitrator sends response to both peers - NodeAddress recipient1 = trade instanceof ArbitratorTrade ? trade.getMaker().getNodeAddress() : trade.getTradingPeer().getNodeAddress(); - PubKeyRing recipient1PubKey = trade instanceof ArbitratorTrade ? trade.getMaker().getPubKeyRing() : trade.getTradingPeer().getPubKeyRing(); + NodeAddress recipient1 = trade instanceof ArbitratorTrade ? trade.getMaker().getNodeAddress() : trade.getTradePeer().getNodeAddress(); + PubKeyRing recipient1PubKey = trade instanceof ArbitratorTrade ? trade.getMaker().getPubKeyRing() : trade.getTradePeer().getPubKeyRing(); NodeAddress recipient2 = trade instanceof ArbitratorTrade ? trade.getTaker().getNodeAddress() : null; PubKeyRing recipient2PubKey = trade instanceof ArbitratorTrade ? trade.getTaker().getPubKeyRing() : null; diff --git a/core/src/main/java/bisq/core/trade/protocol/tasks/ProcessSignContractResponse.java b/core/src/main/java/bisq/core/trade/protocol/tasks/ProcessSignContractResponse.java index 0a8785c2a2..d342558c57 100644 --- a/core/src/main/java/bisq/core/trade/protocol/tasks/ProcessSignContractResponse.java +++ b/core/src/main/java/bisq/core/trade/protocol/tasks/ProcessSignContractResponse.java @@ -25,7 +25,7 @@ import bisq.common.taskrunner.TaskRunner; import bisq.core.trade.Trade; import bisq.core.trade.messages.DepositRequest; import bisq.core.trade.messages.SignContractResponse; -import bisq.core.trade.protocol.TradingPeer; +import bisq.core.trade.protocol.TradePeer; import bisq.network.p2p.SendDirectMessageListener; import java.util.Date; import java.util.UUID; @@ -54,7 +54,7 @@ public class ProcessSignContractResponse extends TradeTask { } // get peer info - TradingPeer peer = trade.getTradingPeer(processModel.getTempTradingPeerNodeAddress()); + TradePeer peer = trade.getTradePeer(processModel.getTempTradePeerNodeAddress()); PubKeyRing peerPubKeyRing = peer.getPubKeyRing(); // save peer's encrypted payment account payload diff --git a/core/src/main/java/bisq/core/trade/protocol/tasks/ResendDisputeClosedMessageWithPayout.java b/core/src/main/java/bisq/core/trade/protocol/tasks/ResendDisputeClosedMessageWithPayout.java index 8ebd32a193..69791c061b 100644 --- a/core/src/main/java/bisq/core/trade/protocol/tasks/ResendDisputeClosedMessageWithPayout.java +++ b/core/src/main/java/bisq/core/trade/protocol/tasks/ResendDisputeClosedMessageWithPayout.java @@ -23,7 +23,7 @@ import bisq.core.support.dispute.Dispute; import bisq.core.trade.HavenoUtils; import bisq.core.trade.Trade; import bisq.core.trade.messages.DepositsConfirmedMessage; -import bisq.core.trade.protocol.TradingPeer; +import bisq.core.trade.protocol.TradePeer; import bisq.core.util.Validator; import lombok.extern.slf4j.Slf4j; @@ -48,7 +48,7 @@ public class ResendDisputeClosedMessageWithPayout extends TradeTask { DepositsConfirmedMessage request = (DepositsConfirmedMessage) processModel.getTradeMessage(); checkNotNull(request); Validator.checkTradeId(processModel.getOfferId(), request); - TradingPeer sender = trade.getTradingPeer(request.getPubKeyRing()); + TradePeer sender = trade.getTradePeer(request.getPubKeyRing()); if (sender == null) throw new RuntimeException("Pub key ring is not from arbitrator, buyer, or seller"); // arbitrator resends DisputeClosedMessage with payout tx when updated multisig info received diff --git a/core/src/main/java/bisq/core/trade/protocol/tasks/SellerPublishTradeStatistics.java b/core/src/main/java/bisq/core/trade/protocol/tasks/SellerPublishTradeStatistics.java index 9904390b03..f0d3a2601e 100644 --- a/core/src/main/java/bisq/core/trade/protocol/tasks/SellerPublishTradeStatistics.java +++ b/core/src/main/java/bisq/core/trade/protocol/tasks/SellerPublishTradeStatistics.java @@ -36,7 +36,7 @@ public class SellerPublishTradeStatistics extends TradeTask { // // checkNotNull(trade.getDepositTx()); // -// processModel.getP2PService().findPeersCapabilities(trade.getTradingPeer().getNodeAddress()) +// processModel.getP2PService().findPeersCapabilities(trade.getTradePeer().getNodeAddress()) // .filter(capabilities -> capabilities.containsAll(Capability.TRADE_STATISTICS_3)) // .ifPresentOrElse(capabilities -> { // // Our peer has updated, so as we are the seller we will publish the trade statistics. diff --git a/core/src/main/java/bisq/core/trade/protocol/tasks/SellerSendPaymentReceivedMessage.java b/core/src/main/java/bisq/core/trade/protocol/tasks/SellerSendPaymentReceivedMessage.java index b127628911..18410e6155 100644 --- a/core/src/main/java/bisq/core/trade/protocol/tasks/SellerSendPaymentReceivedMessage.java +++ b/core/src/main/java/bisq/core/trade/protocol/tasks/SellerSendPaymentReceivedMessage.java @@ -85,7 +85,7 @@ public abstract class SellerSendPaymentReceivedMessage extends SendMailboxMessag trade.isPayoutPublished() ? trade.getPayoutTxHex() : null, // signed trade.getSelf().getUpdatedMultisigHex(), trade.getState().ordinal() >= Trade.State.SELLER_SAW_ARRIVED_PAYMENT_RECEIVED_MSG.ordinal(), // informs to expect payout - trade.getTradingPeer().getAccountAgeWitness(), + trade.getTradePeer().getAccountAgeWitness(), signedWitness, processModel.getPaymentSentMessage() ); @@ -106,28 +106,28 @@ public abstract class SellerSendPaymentReceivedMessage extends SendMailboxMessag @Override protected void setStateSent() { - trade.setStateIfProgress(Trade.State.SELLER_SENT_PAYMENT_RECEIVED_MSG); + trade.advanceState(Trade.State.SELLER_SENT_PAYMENT_RECEIVED_MSG); log.info("{} sent: tradeId={} at peer {} SignedWitness {}", getClass().getSimpleName(), trade.getId(), getReceiverNodeAddress(), signedWitness); processModel.getTradeManager().requestPersistence(); } @Override protected void setStateFault() { - trade.setStateIfProgress(Trade.State.SELLER_SEND_FAILED_PAYMENT_RECEIVED_MSG); + trade.advanceState(Trade.State.SELLER_SEND_FAILED_PAYMENT_RECEIVED_MSG); log.error("{} failed: tradeId={} at peer {} SignedWitness {}", getClass().getSimpleName(), trade.getId(), getReceiverNodeAddress(), signedWitness); processModel.getTradeManager().requestPersistence(); } @Override protected void setStateStoredInMailbox() { - trade.setStateIfProgress(Trade.State.SELLER_STORED_IN_MAILBOX_PAYMENT_RECEIVED_MSG); + trade.advanceState(Trade.State.SELLER_STORED_IN_MAILBOX_PAYMENT_RECEIVED_MSG); log.info("{} stored in mailbox: tradeId={} at peer {} SignedWitness {}", getClass().getSimpleName(), trade.getId(), getReceiverNodeAddress(), signedWitness); processModel.getTradeManager().requestPersistence(); } @Override protected void setStateArrived() { - trade.setStateIfProgress(Trade.State.SELLER_SAW_ARRIVED_PAYMENT_RECEIVED_MSG); + trade.advanceState(Trade.State.SELLER_SAW_ARRIVED_PAYMENT_RECEIVED_MSG); log.info("{} arrived: tradeId={} at peer {} SignedWitness {}", getClass().getSimpleName(), trade.getId(), getReceiverNodeAddress(), signedWitness); processModel.getTradeManager().requestPersistence(); } diff --git a/core/src/main/java/bisq/core/trade/protocol/tasks/SendDepositsConfirmedMessage.java b/core/src/main/java/bisq/core/trade/protocol/tasks/SendDepositsConfirmedMessage.java index 38900f9610..9cc57f3891 100644 --- a/core/src/main/java/bisq/core/trade/protocol/tasks/SendDepositsConfirmedMessage.java +++ b/core/src/main/java/bisq/core/trade/protocol/tasks/SendDepositsConfirmedMessage.java @@ -78,7 +78,7 @@ public abstract class SendDepositsConfirmedMessage extends SendMailboxMessageTas processModel.getMyNodeAddress(), processModel.getPubKeyRing(), deterministicId, - trade.getBuyer() == trade.getTradingPeer(getReceiverNodeAddress()) ? trade.getSeller().getPaymentAccountKey() : null, // buyer receives seller's payment account decryption key + trade.getBuyer() == trade.getTradePeer(getReceiverNodeAddress()) ? trade.getSeller().getPaymentAccountKey() : null, // buyer receives seller's payment account decryption key trade.getSelf().getUpdatedMultisigHex()); } return message; diff --git a/core/src/main/java/bisq/core/trade/protocol/tasks/SendMailboxMessageTask.java b/core/src/main/java/bisq/core/trade/protocol/tasks/SendMailboxMessageTask.java index 847958fe5f..7f908c4c7a 100644 --- a/core/src/main/java/bisq/core/trade/protocol/tasks/SendMailboxMessageTask.java +++ b/core/src/main/java/bisq/core/trade/protocol/tasks/SendMailboxMessageTask.java @@ -35,11 +35,11 @@ public abstract class SendMailboxMessageTask extends TradeTask { } protected NodeAddress getReceiverNodeAddress() { - return trade.getTradingPeer().getNodeAddress(); + return trade.getTradePeer().getNodeAddress(); } protected PubKeyRing getReceiverPubKeyRing() { - return trade.getTradingPeer().getPubKeyRing(); + return trade.getTradePeer().getPubKeyRing(); } protected abstract TradeMailboxMessage getTradeMailboxMessage(String tradeId); diff --git a/core/src/main/java/bisq/core/trade/protocol/tasks/VerifyPeersAccountAgeWitness.java b/core/src/main/java/bisq/core/trade/protocol/tasks/VerifyPeersAccountAgeWitness.java index 12710fdab0..f0d3e604fd 100644 --- a/core/src/main/java/bisq/core/trade/protocol/tasks/VerifyPeersAccountAgeWitness.java +++ b/core/src/main/java/bisq/core/trade/protocol/tasks/VerifyPeersAccountAgeWitness.java @@ -23,7 +23,7 @@ import bisq.core.offer.Offer; import bisq.core.payment.payload.PaymentAccountPayload; import bisq.core.trade.ArbitratorTrade; import bisq.core.trade.Trade; -import bisq.core.trade.protocol.TradingPeer; +import bisq.core.trade.protocol.TradePeer; import bisq.common.crypto.PubKeyRing; import bisq.common.taskrunner.TaskRunner; @@ -61,18 +61,18 @@ public class VerifyPeersAccountAgeWitness extends TradeTask { } // skip if payment account payload is null - TradingPeer tradingPeer = trade.getTradingPeer(); - if (tradingPeer.getPaymentAccountPayload() == null) { + TradePeer tradePeer = trade.getTradePeer(); + if (tradePeer.getPaymentAccountPayload() == null) { complete(); return; } AccountAgeWitnessService accountAgeWitnessService = processModel.getAccountAgeWitnessService(); - PaymentAccountPayload peersPaymentAccountPayload = checkNotNull(tradingPeer.getPaymentAccountPayload(), + PaymentAccountPayload peersPaymentAccountPayload = checkNotNull(tradePeer.getPaymentAccountPayload(), "Peers peersPaymentAccountPayload must not be null"); - PubKeyRing peersPubKeyRing = checkNotNull(tradingPeer.getPubKeyRing(), "peersPubKeyRing must not be null"); - byte[] nonce = checkNotNull(tradingPeer.getAccountAgeWitnessNonce()); - byte[] signature = checkNotNull(tradingPeer.getAccountAgeWitnessSignature()); + PubKeyRing peersPubKeyRing = checkNotNull(tradePeer.getPubKeyRing(), "peersPubKeyRing must not be null"); + byte[] nonce = checkNotNull(tradePeer.getAccountAgeWitnessNonce()); + byte[] signature = checkNotNull(tradePeer.getAccountAgeWitnessSignature()); AtomicReference errorMsg = new AtomicReference<>(); boolean isValid = accountAgeWitnessService.verifyAccountAgeWitness(trade, peersPaymentAccountPayload, @@ -81,8 +81,8 @@ public class VerifyPeersAccountAgeWitness extends TradeTask { signature, errorMsg::set); if (isValid) { - trade.getTradingPeer().setAccountAgeWitness(processModel.getAccountAgeWitnessService().findWitness(trade.getTradingPeer().getPaymentAccountPayload(), trade.getTradingPeer().getPubKeyRing()).orElse(null)); - log.info("{} {} verified witness data of peer {}", trade.getClass().getSimpleName(), trade.getId(), tradingPeer.getNodeAddress()); + trade.getTradePeer().setAccountAgeWitness(processModel.getAccountAgeWitnessService().findWitness(trade.getTradePeer().getPaymentAccountPayload(), trade.getTradePeer().getPubKeyRing()).orElse(null)); + log.info("{} {} verified witness data of peer {}", trade.getClass().getSimpleName(), trade.getId(), tradePeer.getNodeAddress()); complete(); } else { failed(errorMsg.get()); diff --git a/core/src/main/java/bisq/core/trade/protocol/tasks/mediation/FinalizeMediatedPayoutTx.java b/core/src/main/java/bisq/core/trade/protocol/tasks/mediation/FinalizeMediatedPayoutTx.java index 2461addea8..6cd9dc890c 100644 --- a/core/src/main/java/bisq/core/trade/protocol/tasks/mediation/FinalizeMediatedPayoutTx.java +++ b/core/src/main/java/bisq/core/trade/protocol/tasks/mediation/FinalizeMediatedPayoutTx.java @@ -39,7 +39,7 @@ public class FinalizeMediatedPayoutTx extends TradeTask { // Transaction depositTx = checkNotNull(trade.getDepositTx()); // String tradeId = trade.getId(); -// TradingPeer tradingPeer = trade.getTradingPeer(); +// TradePeer tradePeer = trade.getTradePeer(); // BtcWalletService walletService = processModel.getBtcWalletService(); // Offer offer = checkNotNull(trade.getOffer(), "offer must not be null"); // Coin tradeAmount = checkNotNull(trade.getTradeAmount(), "tradeAmount must not be null"); @@ -50,8 +50,8 @@ public class FinalizeMediatedPayoutTx extends TradeTask { // // byte[] mySignature = checkNotNull(processModel.getMediatedPayoutTxSignature(), // "processModel.getTxSignatureFromMediation must not be null"); -// byte[] peersSignature = checkNotNull(tradingPeer.getMediatedPayoutTxSignature(), -// "tradingPeer.getTxSignatureFromMediation must not be null"); +// byte[] peersSignature = checkNotNull(tradePeer.getMediatedPayoutTxSignature(), +// "tradePeer.getTxSignatureFromMediation must not be null"); // // boolean isMyRoleBuyer = contract.isMyRoleBuyer(processModel.getPubKeyRing()); // byte[] buyerSignature = isMyRoleBuyer ? mySignature : peersSignature; @@ -65,12 +65,12 @@ public class FinalizeMediatedPayoutTx extends TradeTask { // "; sellerPayoutAmount=" + sellerPayoutAmount); // // String myPayoutAddressString = walletService.getOrCreateAddressEntry(tradeId, AddressEntry.Context.TRADE_PAYOUT).getAddressString(); -// String peersPayoutAddressString = tradingPeer.getPayoutAddressString(); +// String peersPayoutAddressString = tradePeer.getPayoutAddressString(); // String buyerPayoutAddressString = isMyRoleBuyer ? myPayoutAddressString : peersPayoutAddressString; // String sellerPayoutAddressString = isMyRoleBuyer ? peersPayoutAddressString : myPayoutAddressString; // // byte[] myMultiSigPubKey = processModel.getMyMultiSigPubKey(); -// byte[] peersMultiSigPubKey = tradingPeer.getMultiSigPubKey(); +// byte[] peersMultiSigPubKey = tradePeer.getMultiSigPubKey(); // byte[] buyerMultiSigPubKey = isMyRoleBuyer ? myMultiSigPubKey : peersMultiSigPubKey; // byte[] sellerMultiSigPubKey = isMyRoleBuyer ? peersMultiSigPubKey : myMultiSigPubKey; // diff --git a/core/src/main/java/bisq/core/trade/protocol/tasks/mediation/ProcessMediatedPayoutSignatureMessage.java b/core/src/main/java/bisq/core/trade/protocol/tasks/mediation/ProcessMediatedPayoutSignatureMessage.java index b11f91d3a8..f8f2793734 100644 --- a/core/src/main/java/bisq/core/trade/protocol/tasks/mediation/ProcessMediatedPayoutSignatureMessage.java +++ b/core/src/main/java/bisq/core/trade/protocol/tasks/mediation/ProcessMediatedPayoutSignatureMessage.java @@ -44,10 +44,10 @@ public class ProcessMediatedPayoutSignatureMessage extends TradeTask { Validator.checkTradeId(processModel.getOfferId(), message); checkNotNull(message); - trade.getTradingPeer().setMediatedPayoutTxSignature(checkNotNull(message.getTxSignature())); + trade.getTradePeer().setMediatedPayoutTxSignature(checkNotNull(message.getTxSignature())); // update to the latest peer address of our peer if the message is correct - trade.getTradingPeer().setNodeAddress(processModel.getTempTradingPeerNodeAddress()); + trade.getTradePeer().setNodeAddress(processModel.getTempTradePeerNodeAddress()); trade.setMediationResultState(MediationResultState.RECEIVED_SIG_MSG); diff --git a/core/src/main/java/bisq/core/trade/protocol/tasks/mediation/ProcessMediatedPayoutTxPublishedMessage.java b/core/src/main/java/bisq/core/trade/protocol/tasks/mediation/ProcessMediatedPayoutTxPublishedMessage.java index 3a3812767b..5b366c2a38 100644 --- a/core/src/main/java/bisq/core/trade/protocol/tasks/mediation/ProcessMediatedPayoutTxPublishedMessage.java +++ b/core/src/main/java/bisq/core/trade/protocol/tasks/mediation/ProcessMediatedPayoutTxPublishedMessage.java @@ -41,7 +41,7 @@ public class ProcessMediatedPayoutTxPublishedMessage extends TradeTask { // checkArgument(message.getPayoutTx() != null); // // // update to the latest peer address of our peer if the message is correct -// trade.getTradingPeer().setNodeAddress(processModel.getTempTradingPeerNodeAddress()); +// trade.getTradePeer().setNodeAddress(processModel.getTempTradePeerNodeAddress()); // // if (trade.getPayoutTx() == null) { // Transaction committedMediatedPayoutTx = WalletService.maybeAddNetworkTxToWallet(message.getPayoutTx(), processModel.getBtcWalletService().getWallet()); diff --git a/core/src/main/java/bisq/core/trade/protocol/tasks/mediation/SignMediatedPayoutTx.java b/core/src/main/java/bisq/core/trade/protocol/tasks/mediation/SignMediatedPayoutTx.java index 8f8069cc17..f231d1a0c8 100644 --- a/core/src/main/java/bisq/core/trade/protocol/tasks/mediation/SignMediatedPayoutTx.java +++ b/core/src/main/java/bisq/core/trade/protocol/tasks/mediation/SignMediatedPayoutTx.java @@ -37,7 +37,7 @@ public class SignMediatedPayoutTx extends TradeTask { runInterceptHook(); throw new RuntimeException("SignMediatedPayoutTx not implemented for xmr"); -// TradingPeer tradingPeer = trade.getTradingPeer(); +// TradePeer tradePeer = trade.getTradePeer(); // if (processModel.getMediatedPayoutTxSignature() != null) { // log.warn("processModel.getTxSignatureFromMediation is already set"); // } @@ -60,12 +60,12 @@ public class SignMediatedPayoutTx extends TradeTask { // boolean isMyRoleBuyer = contract.isMyRoleBuyer(processModel.getPubKeyRing()); // // String myPayoutAddressString = walletService.getOrCreateAddressEntry(tradeId, AddressEntry.Context.TRADE_PAYOUT).getAddressString(); -// String peersPayoutAddressString = tradingPeer.getPayoutAddressString(); +// String peersPayoutAddressString = tradePeer.getPayoutAddressString(); // String buyerPayoutAddressString = isMyRoleBuyer ? myPayoutAddressString : peersPayoutAddressString; // String sellerPayoutAddressString = isMyRoleBuyer ? peersPayoutAddressString : myPayoutAddressString; // // byte[] myMultiSigPubKey = processModel.getMyMultiSigPubKey(); -// byte[] peersMultiSigPubKey = tradingPeer.getMultiSigPubKey(); +// byte[] peersMultiSigPubKey = tradePeer.getMultiSigPubKey(); // byte[] buyerMultiSigPubKey = isMyRoleBuyer ? myMultiSigPubKey : peersMultiSigPubKey; // byte[] sellerMultiSigPubKey = isMyRoleBuyer ? peersMultiSigPubKey : myMultiSigPubKey; // diff --git a/core/src/main/resources/help/confirmpaymentstarted-help.txt b/core/src/main/resources/help/confirmpaymentstarted-help.txt index c83907b58c..d32c7647f1 100644 --- a/core/src/main/resources/help/confirmpaymentstarted-help.txt +++ b/core/src/main/resources/help/confirmpaymentstarted-help.txt @@ -1,17 +1,17 @@ -confirmpaymentstarted +confirmpaymentsent NAME ---- -confirmpaymentstarted - confirm payment has been sent +confirmpaymentsent - confirm payment has been sent SYNOPSIS -------- -confirmpaymentstarted +confirmpaymentsent --trade-id= DESCRIPTION ----------- -After the buyer initiates payment to the BTC seller, confirmpaymentstarted notifies +After the buyer initiates payment to the BTC seller, confirmpaymentsent notifies the seller to begin watching for a funds deposit in her payment account. OPTIONS @@ -23,4 +23,4 @@ EXAMPLES -------- A BTC buyer has taken an offer with ID 83e8b2e2-51b6-4f39-a748-3ebd29c22aea, and has recently initiated the required fiat payment to the seller's fiat account: -$ ./bisq-cli --password=xyz --port=9998 confirmpaymentstarted --trade-id=83e8b2e2-51b6-4f39-a748-3ebd29c22aea +$ ./bisq-cli --password=xyz --port=9998 confirmpaymentsent --trade-id=83e8b2e2-51b6-4f39-a748-3ebd29c22aea diff --git a/core/src/main/resources/i18n/displayStrings.properties b/core/src/main/resources/i18n/displayStrings.properties index bbc96c5c43..f28545edc7 100644 --- a/core/src/main/resources/i18n/displayStrings.properties +++ b/core/src/main/resources/i18n/displayStrings.properties @@ -605,7 +605,7 @@ portfolio.pending.unconfirmedTooLong=Deposit transactions on trade {0} are still portfolio.pending.step1.waitForConf=Wait for blockchain confirmations portfolio.pending.step2_buyer.startPayment=Start payment -portfolio.pending.step2_seller.waitPaymentStarted=Wait until payment has started +portfolio.pending.step2_seller.waitPaymentSent=Wait until payment has been sent portfolio.pending.step3_buyer.waitPaymentArrived=Wait until payment arrived portfolio.pending.step3_seller.confirmPaymentReceived=Confirm payment received portfolio.pending.step5.completed=Completed @@ -685,7 +685,7 @@ portfolio.pending.step2_buyer.recipientsAccountData=Recipients {0} portfolio.pending.step2_buyer.amountToTransfer=Amount to transfer portfolio.pending.step2_buyer.sellersAddress=Seller''s {0} address portfolio.pending.step2_buyer.buyerAccount=Your payment account to be used -portfolio.pending.step2_buyer.paymentStarted=Payment started +portfolio.pending.step2_buyer.paymentSent=Payment sent portfolio.pending.step2_buyer.warn=You still have not done your {0} payment!\nPlease note that the trade has to be completed by {1}. portfolio.pending.step2_buyer.openForDispute=You have not completed your payment yet\nThe max. period for the trade has elapsed, but you can still complete the payment.\n\ Contact an arbitrator if you need assistance. @@ -1083,6 +1083,7 @@ funds.tx.dustAttackTx.popup=This transaction is sending a very small XMR amount #################################################################### support.tab.mediation.support=Mediation +support.tab.refund.support=Refund support.tab.arbitration.support=Arbitration support.tab.legacyArbitration.support=Legacy Arbitration support.tab.ArbitratorsSupportTickets={0}'s tickets @@ -1143,8 +1144,8 @@ support.requested=Requested support.closed=Closed support.open=Open support.process=Process -support.buyerOfferer=XMR buyer/Maker -support.sellerOfferer=XMR seller/Maker +support.buyerMaker=XMR buyer/Maker +support.sellerMaker=XMR seller/Maker support.buyerTaker=XMR buyer/Taker support.sellerTaker=XMR seller/Taker @@ -1779,7 +1780,7 @@ displayUpdateDownloadWindow.download.openDir=Open download directory disputeSummaryWindow.title=Summary disputeSummaryWindow.openDate=Ticket opening date -disputeSummaryWindow.role=Trader's role +disputeSummaryWindow.role=Opener's role disputeSummaryWindow.payout=Trade amount payout disputeSummaryWindow.payout.getsTradeAmount=BTC {0} gets trade amount payout disputeSummaryWindow.payout.getsAll=Max. payout to BTC {0} @@ -1965,8 +1966,8 @@ tradeDetailsWindow.headline=Trade tradeDetailsWindow.disputedPayoutTxId=Disputed payout transaction ID: tradeDetailsWindow.tradeDate=Trade date tradeDetailsWindow.txFee=Mining fee -tradeDetailsWindow.tradingPeersOnion=Trading peers onion address -tradeDetailsWindow.tradingPeersPubKeyHash=Trading peers pubkey hash +tradeDetailsWindow.tradePeersOnion=Trading peers onion address +tradeDetailsWindow.tradePeersPubKeyHash=Trading peers pubkey hash tradeDetailsWindow.tradeState=Trade state tradeDetailsWindow.tradePhase=Trade phase tradeDetailsWindow.agentAddresses=Arbitrator/Mediator @@ -2065,7 +2066,7 @@ popup.warning.startupFailed.twoInstances=Haveno is already running. You cannot r popup.warning.tradePeriod.halfReached=Your trade with ID {0} has reached the half of the max. allowed trading period and is still not completed.\n\nThe trade period ends on {1}\n\nPlease check your trade state at \"Portfolio/Open trades\" for further information. popup.warning.tradePeriod.ended=Your trade with ID {0} has reached the max. allowed trading period and is not completed.\n\n\ The trade period ended on {1}\n\n\ - Please check your trade at \"Portfolio/Open trades\" for contacting the mediator. + Please check your trade at \"Portfolio/Open trades\" for contacting the arbitrator. popup.warning.noTradingAccountSetup.headline=You have not setup a trading account popup.warning.noTradingAccountSetup.msg=You need to setup a national currency or cryptocurrency account before you can create an offer.\nDo you want to setup an account? popup.warning.noArbitratorsAvailable=There are no arbitrators available. @@ -2213,7 +2214,7 @@ notification.ticket.headline=Support ticket for trade with ID {0} notification.trade.completed=The trade is now completed, and you can withdraw your funds. notification.trade.accepted=Your offer has been accepted by a XMR {0}. notification.trade.unlocked=Your trade has been confirmed.\nYou can start the payment now. -notification.trade.paymentStarted=The XMR buyer has started the payment. +notification.trade.paymentSent=The XMR buyer has sent the payment. notification.trade.selectTrade=Select trade notification.trade.peerOpenedDispute=Your trading peer has opened a {0}. notification.trade.disputeClosed=The {0} has been closed. diff --git a/core/src/main/resources/i18n/displayStrings_cs.properties b/core/src/main/resources/i18n/displayStrings_cs.properties index 7a3ace61ce..0c0a0f82bb 100644 --- a/core/src/main/resources/i18n/displayStrings_cs.properties +++ b/core/src/main/resources/i18n/displayStrings_cs.properties @@ -554,7 +554,7 @@ portfolio.pending.invalidTx=Došlo k problému s chybějící nebo neplatnou tra portfolio.pending.step1.waitForConf=Počkejte na potvrzení na blockchainu portfolio.pending.step2_buyer.startPayment=Zahajte platbu -portfolio.pending.step2_seller.waitPaymentStarted=Počkejte, než začne platba +portfolio.pending.step2_seller.waitPaymentSent=Počkejte, než začne platba portfolio.pending.step3_buyer.waitPaymentArrived=Počkejte, než dorazí platba portfolio.pending.step3_seller.confirmPaymentReceived=Potvrďte přijetí platby portfolio.pending.step5.completed=Hotovo @@ -624,7 +624,7 @@ portfolio.pending.step2_buyer.recipientsAccountData=Příjemci {0} portfolio.pending.step2_buyer.amountToTransfer=Částka k převodu portfolio.pending.step2_buyer.sellersAddress={0} adresa prodejce portfolio.pending.step2_buyer.buyerAccount=Použijte svůj platební účet -portfolio.pending.step2_buyer.paymentStarted=Platba zahájena +portfolio.pending.step2_buyer.paymentSent=Platba zahájena portfolio.pending.step2_buyer.warn=Platbu {0} jste ještě neprovedli!\nVezměte prosím na vědomí, že obchod musí být dokončen do {1}. portfolio.pending.step2_buyer.openForDispute=Neukončili jste platbu!\nMax. doba obchodu uplynula. Obraťte se na mediátora a požádejte o pomoc. portfolio.pending.step2_buyer.paperReceipt.headline=Odeslali jste papírový doklad prodejci BTC? @@ -948,8 +948,8 @@ support.chat=Chat support.closed=Zavřeno support.open=Otevřené support.process=Rozhodnout -support.buyerOfferer=Kupující BTC/Tvůrce -support.sellerOfferer=Prodejce BTC/Tvůrce +support.buyerMaker=Kupující BTC/Tvůrce +support.sellerMaker=Prodejce BTC/Tvůrce support.buyerTaker=Kupující BTC/Příjemce support.sellerTaker=Prodávající BTC/Příjemce @@ -1494,8 +1494,8 @@ tradeDetailsWindow.headline=Obchod tradeDetailsWindow.disputedPayoutTxId=ID sporné platební transakce: tradeDetailsWindow.tradeDate=Datum obchodu tradeDetailsWindow.txFee=Poplatek za těžbu -tradeDetailsWindow.tradingPeersOnion=Onion adresa obchodního partnera -tradeDetailsWindow.tradingPeersPubKeyHash=Pubkey hash obchodních partnerů +tradeDetailsWindow.tradePeersOnion=Onion adresa obchodního partnera +tradeDetailsWindow.tradePeersPubKeyHash=Pubkey hash obchodních partnerů tradeDetailsWindow.tradeState=Stav obchodu tradeDetailsWindow.agentAddresses=Rozhodce/Mediátor tradeDetailsWindow.detailData=Detailní data @@ -1684,7 +1684,7 @@ notification.ticket.headline=Úkol na podporu pro obchod s ID {0} notification.trade.completed=Obchod je nyní dokončen a můžete si vybrat své prostředky. notification.trade.accepted=Vaše nabídka byla přijata BTC {0}. notification.trade.unlocked=Váš obchod má alespoň jedno potvrzení blockchainu.\nPlatbu můžete začít hned teď. -notification.trade.paymentStarted=Kupující BTC zahájil platbu. +notification.trade.paymentSent=Kupující BTC zahájil platbu. notification.trade.selectTrade=Vyberte obchod notification.trade.peerOpenedDispute=Váš obchodní partner otevřel {0}. notification.trade.disputeClosed={0} byl uzavřen. diff --git a/core/src/main/resources/i18n/displayStrings_de.properties b/core/src/main/resources/i18n/displayStrings_de.properties index f6857e5505..492e12dae8 100644 --- a/core/src/main/resources/i18n/displayStrings_de.properties +++ b/core/src/main/resources/i18n/displayStrings_de.properties @@ -554,7 +554,7 @@ portfolio.pending.invalidTx=There is an issue with a missing or invalid transact portfolio.pending.step1.waitForConf=Auf Blockchain-Bestätigung warten portfolio.pending.step2_buyer.startPayment=Zahlung beginnen -portfolio.pending.step2_seller.waitPaymentStarted=Auf Zahlungsbeginn warten +portfolio.pending.step2_seller.waitPaymentSent=Auf Zahlungsbeginn warten portfolio.pending.step3_buyer.waitPaymentArrived=Auf Zahlungseingang warten portfolio.pending.step3_seller.confirmPaymentReceived=Zahlungseingang bestätigen portfolio.pending.step5.completed=Abgeschlossen @@ -624,7 +624,7 @@ portfolio.pending.step2_buyer.recipientsAccountData=Empfänger {0} portfolio.pending.step2_buyer.amountToTransfer=Zu überweisender Betrag portfolio.pending.step2_buyer.sellersAddress={0}-Adresse des Verkäufers portfolio.pending.step2_buyer.buyerAccount=Ihr zu verwendendes Zahlungskonto -portfolio.pending.step2_buyer.paymentStarted=Zahlung begonnen +portfolio.pending.step2_buyer.paymentSent=Zahlung begonnen portfolio.pending.step2_buyer.warn=Sie haben Ihre {0} Zahlung noch nicht getätigt!\nBeachten Sie bitte, dass der Handel bis {1} abgeschlossen werden muss. portfolio.pending.step2_buyer.openForDispute=Sie haben Ihre Zahlung noch nicht abgeschlossen!\nDie maximale Frist für den Handel ist abgelaufen, bitte wenden Sie sich an den Vermittler, um Hilfe zu erhalten. portfolio.pending.step2_buyer.paperReceipt.headline=Haben Sie die Quittung an den BTC-Verkäufer gesendet? @@ -948,8 +948,8 @@ support.chat=Chat support.closed=Geschlossen support.open=Offen support.process=Process -support.buyerOfferer=BTC-Käufer/Ersteller -support.sellerOfferer=BTC-Verkäufer/Ersteller +support.buyerMaker=BTC-Käufer/Ersteller +support.sellerMaker=BTC-Verkäufer/Ersteller support.buyerTaker=BTC-Käufer/Abnehmer support.sellerTaker=BTC-Verkäufer/Abnehmer @@ -1494,8 +1494,8 @@ tradeDetailsWindow.headline=Handel tradeDetailsWindow.disputedPayoutTxId=Transaktions-ID der strittigen Auszahlung: tradeDetailsWindow.tradeDate=Handelsdatum tradeDetailsWindow.txFee=Mining-Gebühr -tradeDetailsWindow.tradingPeersOnion=Onion-Adresse des Handelspartners -tradeDetailsWindow.tradingPeersPubKeyHash=Trading Peers Pubkey Hash +tradeDetailsWindow.tradePeersOnion=Onion-Adresse des Handelspartners +tradeDetailsWindow.tradePeersPubKeyHash=Trading Peers Pubkey Hash tradeDetailsWindow.tradeState=Handelsstatus tradeDetailsWindow.agentAddresses=Vermittler/Mediator tradeDetailsWindow.detailData=Detaillierte Daten @@ -1684,7 +1684,7 @@ notification.ticket.headline=Support-Ticket für den Handel mit der ID {0} notification.trade.completed=Ihr Handel ist jetzt abgeschlossen und Sie können Ihre Gelder abheben. notification.trade.accepted=Ihr Angebot wurde von einem BTC-{0} angenommen. notification.trade.unlocked=Ihr Handel hat wenigstens eine Blockchain-Bestätigung.\nSie können die Zahlung nun beginnen. -notification.trade.paymentStarted=Der BTC-Käufer hat die Zahlung begonnen. +notification.trade.paymentSent=Der BTC-Käufer hat die Zahlung begonnen. notification.trade.selectTrade=Handel wählen notification.trade.peerOpenedDispute=Ihr Handelspartner hat ein/einen {0} geöffnet. notification.trade.disputeClosed=Der/Das {0} wurde geschlossen. diff --git a/core/src/main/resources/i18n/displayStrings_es.properties b/core/src/main/resources/i18n/displayStrings_es.properties index 125ad992b7..5e3fbf6fb2 100644 --- a/core/src/main/resources/i18n/displayStrings_es.properties +++ b/core/src/main/resources/i18n/displayStrings_es.properties @@ -554,7 +554,7 @@ portfolio.pending.invalidTx=Hay un problema con una transacción inválida o no portfolio.pending.step1.waitForConf=Esperar a la confirmación en la cadena de bloques portfolio.pending.step2_buyer.startPayment=Comenzar pago -portfolio.pending.step2_seller.waitPaymentStarted=Esperar hasta que el pago se haya iniciado +portfolio.pending.step2_seller.waitPaymentSent=Esperar hasta que el pago se haya iniciado portfolio.pending.step3_buyer.waitPaymentArrived=Esperar hasta que el pago haya llegado portfolio.pending.step3_seller.confirmPaymentReceived=Confirmar recepción de pago portfolio.pending.step5.completed=Completado @@ -624,7 +624,7 @@ portfolio.pending.step2_buyer.recipientsAccountData=Receptores {0} portfolio.pending.step2_buyer.amountToTransfer=Cantidad a transferir portfolio.pending.step2_buyer.sellersAddress=Dirección {0} del vendedor portfolio.pending.step2_buyer.buyerAccount=Su cuenta de pago para ser usada -portfolio.pending.step2_buyer.paymentStarted=Pago iniciado +portfolio.pending.step2_buyer.paymentSent=Pago iniciado portfolio.pending.step2_buyer.warn=¡Todavía no ha realizado su pago {0}!\nPor favor, tenga en cuenta que el pago tiene que completarse antes de {1}. portfolio.pending.step2_buyer.openForDispute=¡No ha completado su pago!\nEl periodo máximo para el intercambio ha concluido. Por favor, contacte con el mediador para abrir una disputa. portfolio.pending.step2_buyer.paperReceipt.headline=¿Ha enviado el recibo a el vendedor de BTC? @@ -948,8 +948,8 @@ support.chat=Chat support.closed=Cerrado support.open=Abierto support.process=Proceso -support.buyerOfferer=comprador/creador BTC -support.sellerOfferer=vendedor/creador BTC +support.buyerMaker=comprador/creador BTC +support.sellerMaker=vendedor/creador BTC support.buyerTaker=comprador/Tomador BTC support.sellerTaker=vendedor/Tomador BTC @@ -1494,8 +1494,8 @@ tradeDetailsWindow.headline=Intercambio tradeDetailsWindow.disputedPayoutTxId=ID transacción de pago en disputa: tradeDetailsWindow.tradeDate=Fecha de intercambio tradeDetailsWindow.txFee=Comisión de minado -tradeDetailsWindow.tradingPeersOnion=Dirección onion de par de intercambio -tradeDetailsWindow.tradingPeersPubKeyHash=Hash de las llaves públicas de pares de intercambio +tradeDetailsWindow.tradePeersOnion=Dirección onion de par de intercambio +tradeDetailsWindow.tradePeersPubKeyHash=Hash de las llaves públicas de pares de intercambio tradeDetailsWindow.tradeState=Estado del intercambio tradeDetailsWindow.agentAddresses=Árbitro/Mediador tradeDetailsWindow.detailData=Detalle de datos @@ -1684,7 +1684,7 @@ notification.ticket.headline=Ticket de soporte de intercambio con ID {0} notification.trade.completed=El intercambio se ha completado y puede retirar sus fondos. notification.trade.accepted=Su oferta ha sido aceptada por un {0} BTC notification.trade.unlocked=Su intercambio tiene al menos una confirmación en la cadena de bloques.\nPuede comenzar el pago ahora. -notification.trade.paymentStarted=El comprador de BTC ha comenzado el pago. +notification.trade.paymentSent=El comprador de BTC ha comenzado el pago. notification.trade.selectTrade=Seleccionar intercambio notification.trade.peerOpenedDispute=Su pareja de intercambio ha abierto un {0}. notification.trade.disputeClosed={0} se ha cerrado. diff --git a/core/src/main/resources/i18n/displayStrings_fa.properties b/core/src/main/resources/i18n/displayStrings_fa.properties index 0379d38bb8..9a04b1067a 100644 --- a/core/src/main/resources/i18n/displayStrings_fa.properties +++ b/core/src/main/resources/i18n/displayStrings_fa.properties @@ -554,7 +554,7 @@ portfolio.pending.invalidTx=There is an issue with a missing or invalid transact portfolio.pending.step1.waitForConf=برای تأییدیه بلاک چین منتظر باشید portfolio.pending.step2_buyer.startPayment=آغاز پرداخت -portfolio.pending.step2_seller.waitPaymentStarted=صبر کنید تا پرداخت شروع شود +portfolio.pending.step2_seller.waitPaymentSent=صبر کنید تا پرداخت شروع شود portfolio.pending.step3_buyer.waitPaymentArrived=صبر کنید تا پرداخت حاصل شود portfolio.pending.step3_seller.confirmPaymentReceived=تأیید رسید پرداخت portfolio.pending.step5.completed=تکمیل شده @@ -624,7 +624,7 @@ portfolio.pending.step2_buyer.recipientsAccountData=Recipients {0} portfolio.pending.step2_buyer.amountToTransfer=مبلغ انتقال portfolio.pending.step2_buyer.sellersAddress=آدرس {0} فروشنده portfolio.pending.step2_buyer.buyerAccount=حساب پرداخت مورد استفاده -portfolio.pending.step2_buyer.paymentStarted=پرداخت آغاز شد +portfolio.pending.step2_buyer.paymentSent=پرداخت آغاز شد portfolio.pending.step2_buyer.warn=You still have not done your {0} payment!\nPlease note that the trade has to be completed by {1}. portfolio.pending.step2_buyer.openForDispute=You have not completed your payment!\nThe max. period for the trade has elapsed.Please contact the mediator for assistance. portfolio.pending.step2_buyer.paperReceipt.headline=آیا کاغذ رسید را برای فروشنده‌ی بیتکوین فرستادید؟ @@ -948,8 +948,8 @@ support.chat=Chat support.closed=بسته support.open=باز support.process=Process -support.buyerOfferer=خریدار/سفارش گذار بیتکوین -support.sellerOfferer=فروشنده/سفارش گذار بیتکوین +support.buyerMaker=خریدار/سفارش گذار بیتکوین +support.sellerMaker=فروشنده/سفارش گذار بیتکوین support.buyerTaker=خریدار/پذیرنده‌ی بیتکوین support.sellerTaker=فروشنده/پذیرنده‌ی بیتکوین @@ -1494,8 +1494,8 @@ tradeDetailsWindow.headline=معامله tradeDetailsWindow.disputedPayoutTxId=شناسه تراکنش پرداختی مورد مناقشه: tradeDetailsWindow.tradeDate=تاریخ معامله tradeDetailsWindow.txFee=کارمزد استخراج -tradeDetailsWindow.tradingPeersOnion=آدرس Onion همتایان معامله: -tradeDetailsWindow.tradingPeersPubKeyHash=Trading peers pubkey hash +tradeDetailsWindow.tradePeersOnion=آدرس Onion همتایان معامله: +tradeDetailsWindow.tradePeersPubKeyHash=Trading peers pubkey hash tradeDetailsWindow.tradeState=وضعیت معامله tradeDetailsWindow.agentAddresses=Arbitrator/Mediator tradeDetailsWindow.detailData=Detail data @@ -1578,7 +1578,7 @@ popup.warning.wrongVersion=شما احتمالاً نسخه اشتباه Bisq ر popup.warning.incompatibleDB=We detected incompatible data base files!\n\nThose database file(s) are not compatible with our current code base:\n{0}\n\nWe made a backup of the corrupted file(s) and applied the default values to a new database version.\n\nThe backup is located at:\n{1}/db/backup_of_corrupted_data.\n\nPlease check if you have the latest version of Bisq installed.\nYou can download it at: [HYPERLINK:https://bisq.network/downloads].\n\nPlease restart the application. popup.warning.startupFailed.twoInstances=Bisq در حال اجرا است. شما نمیتوانید دو نمونه از Bisq را اجرا کنید. popup.warning.tradePeriod.halfReached=معامله شما با شناسه {0} نیمی از حداکثر مجاز دوره زمانی معامله را به پایان رسانده و هنوز کامل نشده است. \n\nدوره معامله در {1} به پایان می رسد\n\n لطفا وضعیت معامله خود را در \"سبد سهام/معاملات باز\" برای اطلاعات بیشتر، بررسی کنید. -popup.warning.tradePeriod.ended=Your trade with ID {0} has reached the max. allowed trading period and is not completed.\n\nThe trade period ended on {1}\n\nPlease check your trade at \"Portfolio/Open trades\" for contacting the mediator. +popup.warning.tradePeriod.ended=Your trade with ID {0} has reached the max. allowed trading period and is not completed.\n\nThe trade period ended on {1}\n\nPlease check your trade at \"Portfolio/Open trades\" for contacting the arbitrator. popup.warning.noTradingAccountSetup.headline=شما یک حساب معاملاتی را راه اندازی نکرده اید popup.warning.noTradingAccountSetup.msg=قبل از اینکه بتوانید یک پیشنهاد ایجاد کنید، باید یک ارز ملی یا حساب کاربری آلت کوین را تنظیم کنید. \nآیا می خواهید یک حساب کاربری را راه اندازی کنید؟ popup.warning.noArbitratorsAvailable=هیچ داوری در دسترس نیست. @@ -1684,7 +1684,7 @@ notification.ticket.headline=تیکت پشتیبانی برای معامله ب notification.trade.completed=معامله اکنون کامل شده است و می توانید وجوه خود را برداشت کنید. notification.trade.accepted=پیشنهاد شما توسط BTC {0} پذیرفته شده است. notification.trade.unlocked=معامله شما دارای حداقل یک تایید بلاک چین است.\n شما اکنون می توانید پرداخت را شروع کنید. -notification.trade.paymentStarted=خریدار BTC پرداخت را آغاز کرده است. +notification.trade.paymentSent=خریدار BTC پرداخت را آغاز کرده است. notification.trade.selectTrade=انتخاب معامله notification.trade.peerOpenedDispute=همتای معامله شما یک {0} را باز کرده است. notification.trade.disputeClosed={0} بسته شده است. diff --git a/core/src/main/resources/i18n/displayStrings_fr.properties b/core/src/main/resources/i18n/displayStrings_fr.properties index a9f1918c7d..3a263b1008 100644 --- a/core/src/main/resources/i18n/displayStrings_fr.properties +++ b/core/src/main/resources/i18n/displayStrings_fr.properties @@ -554,7 +554,7 @@ portfolio.pending.invalidTx=Il y'a un problème avec une transaction manquante o portfolio.pending.step1.waitForConf=Attendre la confirmation de la blockchain portfolio.pending.step2_buyer.startPayment=Initier le paiement -portfolio.pending.step2_seller.waitPaymentStarted=Patientez jusqu'à ce que le paiement soit commencé. +portfolio.pending.step2_seller.waitPaymentSent=Patientez jusqu'à ce que le paiement soit commencé. portfolio.pending.step3_buyer.waitPaymentArrived=Patientez jusqu'à la réception du paiement portfolio.pending.step3_seller.confirmPaymentReceived=Confirmation de paiement reçu portfolio.pending.step5.completed=Terminé @@ -624,7 +624,7 @@ portfolio.pending.step2_buyer.recipientsAccountData=Destinataires {0} portfolio.pending.step2_buyer.amountToTransfer=Montant à transférer portfolio.pending.step2_buyer.sellersAddress=Adresse {0} du vendeur portfolio.pending.step2_buyer.buyerAccount=Votre compte de paiement à utiliser -portfolio.pending.step2_buyer.paymentStarted=Paiement initié +portfolio.pending.step2_buyer.paymentSent=Paiement initié portfolio.pending.step2_buyer.fillInBsqWallet=Payer depuis le portefeuille BSQ portfolio.pending.step2_buyer.warn=Vous n''avez toujours pas effectué votre {0} paiement !\nVeuillez noter que l''échange doit être achevé avant {1}. portfolio.pending.step2_buyer.openForDispute=Vous n'avez pas effectué votre paiement !\nLe délai maximal alloué pour l'échange est écoulé, veuillez contacter le médiateur pour obtenir de l'aide. @@ -949,8 +949,8 @@ support.chat=Chat support.closed=Fermé support.open=Ouvert support.process=Processus -support.buyerOfferer=Acheteur BTC/Maker -support.sellerOfferer=Vendeur BTC/Maker +support.buyerMaker=Acheteur BTC/Maker +support.sellerMaker=Vendeur BTC/Maker support.buyerTaker=Acheteur BTC/Taker support.sellerTaker=Vendeur BTC/Taker @@ -1495,8 +1495,8 @@ tradeDetailsWindow.headline=Échange tradeDetailsWindow.disputedPayoutTxId=ID de la transaction de versement contestée : tradeDetailsWindow.tradeDate=Date de l'échange tradeDetailsWindow.txFee=Frais de minage -tradeDetailsWindow.tradingPeersOnion=Adresse onion du pair de trading -tradeDetailsWindow.tradingPeersPubKeyHash=Valeur de hachage de la clé publique du partenaire commercial +tradeDetailsWindow.tradePeersOnion=Adresse onion du pair de trading +tradeDetailsWindow.tradePeersPubKeyHash=Valeur de hachage de la clé publique du partenaire commercial tradeDetailsWindow.tradeState=État du trade tradeDetailsWindow.agentAddresses=Arbitre/Médiateur tradeDetailsWindow.detailData=Données détaillées @@ -1685,7 +1685,7 @@ notification.ticket.headline=Ticket de support pour l''échange avec l''ID {0} notification.trade.completed=La transaction est maintenant terminée et vous pouvez retirer vos fonds. notification.trade.accepted=Votre ordre a été accepté par un BTC {0}. notification.trade.unlocked=Votre échange avait au moins une confirmation sur la blockchain.\nVous pouvez effectuer le paiement maintenant. -notification.trade.paymentStarted=L'acheteur de BTC a initié le paiement. +notification.trade.paymentSent=L'acheteur de BTC a initié le paiement. notification.trade.selectTrade=Choisir un trade notification.trade.peerOpenedDispute=Votre pair de trading a ouvert un {0}. notification.trade.disputeClosed=Le {0} a été fermé diff --git a/core/src/main/resources/i18n/displayStrings_it.properties b/core/src/main/resources/i18n/displayStrings_it.properties index b32fc32352..6064d9ff7f 100644 --- a/core/src/main/resources/i18n/displayStrings_it.properties +++ b/core/src/main/resources/i18n/displayStrings_it.properties @@ -554,7 +554,7 @@ portfolio.pending.invalidTx=There is an issue with a missing or invalid transact portfolio.pending.step1.waitForConf=Attendi la conferma della blockchain portfolio.pending.step2_buyer.startPayment=Inizia il pagamento -portfolio.pending.step2_seller.waitPaymentStarted=Attendi fino all'avvio del pagamento +portfolio.pending.step2_seller.waitPaymentSent=Attendi fino all'avvio del pagamento portfolio.pending.step3_buyer.waitPaymentArrived=Attendi fino all'arrivo del pagamento portfolio.pending.step3_seller.confirmPaymentReceived=Conferma la ricezione del pagamento portfolio.pending.step5.completed=Completato @@ -624,7 +624,7 @@ portfolio.pending.step2_buyer.recipientsAccountData=Recipients {0} portfolio.pending.step2_buyer.amountToTransfer=Importo da trasferire portfolio.pending.step2_buyer.sellersAddress=Indirizzo {0} del venditore portfolio.pending.step2_buyer.buyerAccount=Il tuo conto di pagamento da utilizzare -portfolio.pending.step2_buyer.paymentStarted=Il pagamento è iniziato +portfolio.pending.step2_buyer.paymentSent=Il pagamento è iniziato portfolio.pending.step2_buyer.warn=Non hai ancora effettuato il tuo pagamento {0}!\nSi prega di notare che lo scambio è stato completato da {1}. portfolio.pending.step2_buyer.openForDispute=Non hai completato il pagamento!\nÈ trascorso il massimo periodo di scambio. Si prega di contattare il mediatore per assistenza. portfolio.pending.step2_buyer.paperReceipt.headline=Hai inviato la ricevuta cartacea al venditore BTC? @@ -948,8 +948,8 @@ support.chat=Chat support.closed=Chiuso support.open=Aperto support.process=Process -support.buyerOfferer=Acquirente/Maker BTC -support.sellerOfferer=Venditore/Maker BTC +support.buyerMaker=Acquirente/Maker BTC +support.sellerMaker=Venditore/Maker BTC support.buyerTaker=Acquirente/Taker BTC support.sellerTaker=Venditore/Taker BTC @@ -1494,8 +1494,8 @@ tradeDetailsWindow.headline=Scambio tradeDetailsWindow.disputedPayoutTxId=ID transazione di pagamento contestato: tradeDetailsWindow.tradeDate=Data di scambio tradeDetailsWindow.txFee=Commissione di mining -tradeDetailsWindow.tradingPeersOnion=Indirizzi onion peer di trading -tradeDetailsWindow.tradingPeersPubKeyHash=Trading peers pubkey hash +tradeDetailsWindow.tradePeersOnion=Indirizzi onion peer di trading +tradeDetailsWindow.tradePeersPubKeyHash=Trading peers pubkey hash tradeDetailsWindow.tradeState=Stato di scambio tradeDetailsWindow.agentAddresses=Arbitro/Mediatore tradeDetailsWindow.detailData=Detail data @@ -1684,7 +1684,7 @@ notification.ticket.headline=Biglietto di supporto per scambi con ID {0} notification.trade.completed=Il commercio è ora completato e puoi ritirare i tuoi fondi. notification.trade.accepted=La tua offerta è stata accettata da un BTC {0}. notification.trade.unlocked=Il tuo trade ha almeno una conferma blockchain.\nPuoi iniziare il pagamento ora. -notification.trade.paymentStarted=L'acquirente BTC ha avviato il pagamento. +notification.trade.paymentSent=L'acquirente BTC ha avviato il pagamento. notification.trade.selectTrade=Seleziona scambio notification.trade.peerOpenedDispute=Il tuo peer di trading ha aperto un {0}. notification.trade.disputeClosed={0} è stato chiuso. diff --git a/core/src/main/resources/i18n/displayStrings_ja.properties b/core/src/main/resources/i18n/displayStrings_ja.properties index da2705918e..e2e99805d1 100644 --- a/core/src/main/resources/i18n/displayStrings_ja.properties +++ b/core/src/main/resources/i18n/displayStrings_ja.properties @@ -554,7 +554,7 @@ portfolio.pending.invalidTx=There is an issue with a missing or invalid transact portfolio.pending.step1.waitForConf=ブロックチェーンの承認をお待ち下さい portfolio.pending.step2_buyer.startPayment=支払い開始 -portfolio.pending.step2_seller.waitPaymentStarted=支払いが始まるまでお待ち下さい +portfolio.pending.step2_seller.waitPaymentSent=支払いが始まるまでお待ち下さい portfolio.pending.step3_buyer.waitPaymentArrived=支払いが到着するまでお待ち下さい portfolio.pending.step3_seller.confirmPaymentReceived=支払いを受領したことを確認して下さい portfolio.pending.step5.completed=完了 @@ -624,7 +624,7 @@ portfolio.pending.step2_buyer.recipientsAccountData=受領者 {0} portfolio.pending.step2_buyer.amountToTransfer=振替金額 portfolio.pending.step2_buyer.sellersAddress=売り手の{0}アドレス portfolio.pending.step2_buyer.buyerAccount=使用されるあなたの支払いアカウント -portfolio.pending.step2_buyer.paymentStarted=支払いが開始されました +portfolio.pending.step2_buyer.paymentSent=支払いが開始されました portfolio.pending.step2_buyer.warn={0}の支払いはまだ完了していません!\nトレードは{1}までに完了しなければなりません。 portfolio.pending.step2_buyer.openForDispute=支払いを完了していません!\nトレードの最大期間が経過しました。助けを求めるには調停人に連絡してください。 portfolio.pending.step2_buyer.paperReceipt.headline=領収書をBTCの売り手へ送付しましたか? @@ -948,8 +948,8 @@ support.chat=Chat support.closed=クローズ support.open=オープン support.process=Process -support.buyerOfferer=BTC 買い手/メイカー -support.sellerOfferer=BTC 売り手/メイカー +support.buyerMaker=BTC 買い手/メイカー +support.sellerMaker=BTC 売り手/メイカー support.buyerTaker=BTC 買い手/テイカー support.sellerTaker=BTC 売り手/テイカー @@ -1494,8 +1494,8 @@ tradeDetailsWindow.headline=トレード tradeDetailsWindow.disputedPayoutTxId=係争中の支払い取引ID: tradeDetailsWindow.tradeDate=取引日 tradeDetailsWindow.txFee=マイニング手数料 -tradeDetailsWindow.tradingPeersOnion=トレード相手のonionアドレス -tradeDetailsWindow.tradingPeersPubKeyHash=トレードピアのパブリックキーハッシュ +tradeDetailsWindow.tradePeersOnion=トレード相手のonionアドレス +tradeDetailsWindow.tradePeersPubKeyHash=トレードピアのパブリックキーハッシュ tradeDetailsWindow.tradeState=トレード状態 tradeDetailsWindow.agentAddresses=仲裁者 / 調停人 tradeDetailsWindow.detailData=詳細データ @@ -1684,7 +1684,7 @@ notification.ticket.headline=ID {0}とのトレード用サポートチケット notification.trade.completed=これでトレードは完了し、資金を出金することができます。 notification.trade.accepted=あなたのオファーはBTC {0}によって承認されました。 notification.trade.unlocked=あなたのトレードには少なくとも1つのブロックチェーン承認があります。\nあなたは今、支払いを始めることができます。 -notification.trade.paymentStarted=BTCの買い手が支払いを開始しました。 +notification.trade.paymentSent=BTCの買い手が支払いを開始しました。 notification.trade.selectTrade=取引を選択 notification.trade.peerOpenedDispute=あなたの取引相手は{0}をオープンしました。 notification.trade.disputeClosed={0}は閉じられました。 diff --git a/core/src/main/resources/i18n/displayStrings_pt-br.properties b/core/src/main/resources/i18n/displayStrings_pt-br.properties index 0c6a070555..01df32aca7 100644 --- a/core/src/main/resources/i18n/displayStrings_pt-br.properties +++ b/core/src/main/resources/i18n/displayStrings_pt-br.properties @@ -557,7 +557,7 @@ portfolio.pending.invalidTx=There is an issue with a missing or invalid transact portfolio.pending.step1.waitForConf=Aguardar confirmação da blockchain portfolio.pending.step2_buyer.startPayment=Iniciar pagamento -portfolio.pending.step2_seller.waitPaymentStarted=Aguardar início do pagamento +portfolio.pending.step2_seller.waitPaymentSent=Aguardar início do pagamento portfolio.pending.step3_buyer.waitPaymentArrived=Aguardar recebimento do pagamento portfolio.pending.step3_seller.confirmPaymentReceived=Confirmar recebimento do pagamento portfolio.pending.step5.completed=Concluído @@ -627,7 +627,7 @@ portfolio.pending.step2_buyer.recipientsAccountData=Recipients {0} portfolio.pending.step2_buyer.amountToTransfer=Quantia a ser transferida portfolio.pending.step2_buyer.sellersAddress=Endereço {0} do vendedor portfolio.pending.step2_buyer.buyerAccount=A sua conta de pagamento a ser usada -portfolio.pending.step2_buyer.paymentStarted=Pagamento iniciado +portfolio.pending.step2_buyer.paymentSent=Pagamento iniciado portfolio.pending.step2_buyer.warn=Você ainda não realizou seu pagamento de {0}!\nEssa negociação deve ser completada até {1}. portfolio.pending.step2_buyer.openForDispute=Você ainda não completou o seu pagamento!\nO período máximo para a negociação já passou. Entre em contato com o mediador para pedir assistência. portfolio.pending.step2_buyer.paperReceipt.headline=Você enviou o comprovante de depósito para o vendedor de BTC? @@ -951,8 +951,8 @@ support.chat=Chat support.closed=Fechado support.open=Aberto support.process=Process -support.buyerOfferer=Comprador de BTC / Ofetante -support.sellerOfferer=Vendedor de BTC / Ofertante +support.buyerMaker=Comprador de BTC / Ofetante +support.sellerMaker=Vendedor de BTC / Ofertante support.buyerTaker=Comprador de BTC / Aceitador da oferta support.sellerTaker=Vendedor de BTC / Aceitador da oferta @@ -1499,8 +1499,8 @@ tradeDetailsWindow.headline=Negociação tradeDetailsWindow.disputedPayoutTxId=ID de transação do pagamento disputado: tradeDetailsWindow.tradeDate=Data da negociação tradeDetailsWindow.txFee=Taxa de mineração -tradeDetailsWindow.tradingPeersOnion=Endereço onion dos parceiros de negociação -tradeDetailsWindow.tradingPeersPubKeyHash=Trading peers pubkey hash +tradeDetailsWindow.tradePeersOnion=Endereço onion dos parceiros de negociação +tradeDetailsWindow.tradePeersPubKeyHash=Trading peers pubkey hash tradeDetailsWindow.tradeState=Estado da negociação tradeDetailsWindow.agentAddresses=Árbitro/Mediador tradeDetailsWindow.detailData=Detail data @@ -1692,7 +1692,7 @@ notification.ticket.headline=Ticket de suporte para a oferta com ID {0} notification.trade.completed=A negociação foi concluída e você já pode retirar seus fundos. notification.trade.accepted=Sua oferta foi aceita por um {0}. notification.trade.unlocked=Sua negociação tem pelo menos uma confirmação da blockchain.\nVocê já pode iniciar o pagamento. -notification.trade.paymentStarted=O comprador BTC iniciou o pagamento +notification.trade.paymentSent=O comprador BTC iniciou o pagamento notification.trade.selectTrade=Selecionar negociação notification.trade.peerOpenedDispute=Seu parceiro de negociação abriu um {0}. notification.trade.disputeClosed=A {0} foi fechada. diff --git a/core/src/main/resources/i18n/displayStrings_pt.properties b/core/src/main/resources/i18n/displayStrings_pt.properties index 1fb6e2bb55..30c1a6e27a 100644 --- a/core/src/main/resources/i18n/displayStrings_pt.properties +++ b/core/src/main/resources/i18n/displayStrings_pt.properties @@ -554,7 +554,7 @@ portfolio.pending.invalidTx=There is an issue with a missing or invalid transact portfolio.pending.step1.waitForConf=Esperando confirmação da blockchain portfolio.pending.step2_buyer.startPayment=Iniciar pagamento -portfolio.pending.step2_seller.waitPaymentStarted=Aguardar até que o pagamento inicie +portfolio.pending.step2_seller.waitPaymentSent=Aguardar até que o pagamento inicie portfolio.pending.step3_buyer.waitPaymentArrived=Aguardar até que o pagamento chegue portfolio.pending.step3_seller.confirmPaymentReceived=Confirmar pagamento recebido portfolio.pending.step5.completed=Concluído @@ -624,7 +624,7 @@ portfolio.pending.step2_buyer.recipientsAccountData=Recipients {0} portfolio.pending.step2_buyer.amountToTransfer=Quantia a transferir portfolio.pending.step2_buyer.sellersAddress=Endereço {0} do vendedor portfolio.pending.step2_buyer.buyerAccount=A sua conta de pagamento a ser usada -portfolio.pending.step2_buyer.paymentStarted=Pagamento iniciado +portfolio.pending.step2_buyer.paymentSent=Pagamento iniciado portfolio.pending.step2_buyer.warn=Você ainda não fez o seu pagamento de {0}!\nSaiba que o negócio tem de ser concluído até {1}. portfolio.pending.step2_buyer.openForDispute=Você não completou o seu pagamento!\nO período máx. para o negócio acabou. Por favor entre em contacto com o mediador para assistência. portfolio.pending.step2_buyer.paperReceipt.headline=Você enviou o recibo de papel para o vendedor de BTC? @@ -948,8 +948,8 @@ support.chat=Chat support.closed=Fechado support.open=Aberto support.process=Process -support.buyerOfferer=Comprador de BTC/Ofertante -support.sellerOfferer=Vendedor de BTC/Ofertante +support.buyerMaker=Comprador de BTC/Ofertante +support.sellerMaker=Vendedor de BTC/Ofertante support.buyerTaker=Comprador de BTC/Aceitador support.sellerTaker=Vendedor de BTC/Aceitador @@ -1492,8 +1492,8 @@ tradeDetailsWindow.headline=Negócio tradeDetailsWindow.disputedPayoutTxId=ID de transação do pagamento disputado: tradeDetailsWindow.tradeDate=Data de negócio tradeDetailsWindow.txFee=Taxa de mineração -tradeDetailsWindow.tradingPeersOnion=Endereço onion dos parceiros de negociação -tradeDetailsWindow.tradingPeersPubKeyHash=Trading peers pubkey hash +tradeDetailsWindow.tradePeersOnion=Endereço onion dos parceiros de negociação +tradeDetailsWindow.tradePeersPubKeyHash=Trading peers pubkey hash tradeDetailsWindow.tradeState=Estado de negócio tradeDetailsWindow.agentAddresses=Árbitro/Mediador tradeDetailsWindow.detailData=Detail data @@ -1682,7 +1682,7 @@ notification.ticket.headline=Bilhete de apoio para o negócio com ID {0} notification.trade.completed=O negócio completou e você já pode levantar seus fundos. notification.trade.accepted=Sua oferta foi aceite por um {0} de BTC. notification.trade.unlocked=Seu negócio tem pelo menos uma confirmação da blockchain.\nVocê pode começar o pagamento agora. -notification.trade.paymentStarted=O comprador de BTC iniciou o pagamento +notification.trade.paymentSent=O comprador de BTC iniciou o pagamento notification.trade.selectTrade=Selecionar negócio notification.trade.peerOpenedDispute=Seu par de negociação abriu um {0}. notification.trade.disputeClosed=A {0} foi fechada. diff --git a/core/src/main/resources/i18n/displayStrings_ru.properties b/core/src/main/resources/i18n/displayStrings_ru.properties index 0b63e2452e..795697cde4 100644 --- a/core/src/main/resources/i18n/displayStrings_ru.properties +++ b/core/src/main/resources/i18n/displayStrings_ru.properties @@ -554,7 +554,7 @@ portfolio.pending.invalidTx=There is an issue with a missing or invalid transact portfolio.pending.step1.waitForConf=Ожидание подтверждения в блокчейне portfolio.pending.step2_buyer.startPayment=Сделать платеж -portfolio.pending.step2_seller.waitPaymentStarted=Дождитесь начала платежа +portfolio.pending.step2_seller.waitPaymentSent=Дождитесь начала платежа portfolio.pending.step3_buyer.waitPaymentArrived=Дождитесь получения платежа portfolio.pending.step3_seller.confirmPaymentReceived=Подтвердите получение платежа portfolio.pending.step5.completed=Завершено @@ -624,7 +624,7 @@ portfolio.pending.step2_buyer.recipientsAccountData=Recipients {0} portfolio.pending.step2_buyer.amountToTransfer=Сумма для перевода portfolio.pending.step2_buyer.sellersAddress={0}-адрес продавца portfolio.pending.step2_buyer.buyerAccount=Используемый платёжный счет -portfolio.pending.step2_buyer.paymentStarted=Платёж начат +portfolio.pending.step2_buyer.paymentSent=Платёж начат portfolio.pending.step2_buyer.warn=You still have not done your {0} payment!\nPlease note that the trade has to be completed by {1}. portfolio.pending.step2_buyer.openForDispute=You have not completed your payment!\nThe max. period for the trade has elapsed.Please contact the mediator for assistance. portfolio.pending.step2_buyer.paperReceipt.headline=Вы отослали бумажную квитанцию продавцу ВТС? @@ -948,8 +948,8 @@ support.chat=Chat support.closed=Закрыто support.open=Открыто support.process=Process -support.buyerOfferer=Покупатель ВТС/мейкер -support.sellerOfferer=Продавец ВТС/мейкер +support.buyerMaker=Покупатель ВТС/мейкер +support.sellerMaker=Продавец ВТС/мейкер support.buyerTaker=Покупатель ВТС/тейкер support.sellerTaker=Продавец BTC/тейкер @@ -1494,8 +1494,8 @@ tradeDetailsWindow.headline=Сделка tradeDetailsWindow.disputedPayoutTxId=Идент. оспоренной транзакции выплаты: tradeDetailsWindow.tradeDate=Дата сделки tradeDetailsWindow.txFee=Комиссия майнера -tradeDetailsWindow.tradingPeersOnion=Оnion-адрес контрагента -tradeDetailsWindow.tradingPeersPubKeyHash=Trading peers pubkey hash +tradeDetailsWindow.tradePeersOnion=Оnion-адрес контрагента +tradeDetailsWindow.tradePeersPubKeyHash=Trading peers pubkey hash tradeDetailsWindow.tradeState=Статус сделки tradeDetailsWindow.agentAddresses=Arbitrator/Mediator tradeDetailsWindow.detailData=Detail data @@ -1578,7 +1578,7 @@ popup.warning.wrongVersion=Вероятно, у вас установлена н popup.warning.incompatibleDB=We detected incompatible data base files!\n\nThose database file(s) are not compatible with our current code base:\n{0}\n\nWe made a backup of the corrupted file(s) and applied the default values to a new database version.\n\nThe backup is located at:\n{1}/db/backup_of_corrupted_data.\n\nPlease check if you have the latest version of Bisq installed.\nYou can download it at: [HYPERLINK:https://bisq.network/downloads].\n\nPlease restart the application. popup.warning.startupFailed.twoInstances=Bisq уже запущен. Нельзя запустить два экземпляра Bisq. popup.warning.tradePeriod.halfReached=Половина макс. допустимого срока сделки с идентификатором {0} истекла, однако она до сих пор не завершена.\n\nСрок сделки заканчивается {1}\n\nДополнительную информацию о состоянии сделки можно узнать в разделе \«Сделки/Текущие сделки\». -popup.warning.tradePeriod.ended=Your trade with ID {0} has reached the max. allowed trading period and is not completed.\n\nThe trade period ended on {1}\n\nPlease check your trade at \"Portfolio/Open trades\" for contacting the mediator. +popup.warning.tradePeriod.ended=Your trade with ID {0} has reached the max. allowed trading period and is not completed.\n\nThe trade period ended on {1}\n\nPlease check your trade at \"Portfolio/Open trades\" for contacting the arbitrator. popup.warning.noTradingAccountSetup.headline=Вы не создали торговый счёт popup.warning.noTradingAccountSetup.msg=Перед созданием предложения необходимо создать счета в национальной валюте или альткойнах. \nСоздать счёт? popup.warning.noArbitratorsAvailable=Нет доступных арбитров. @@ -1684,7 +1684,7 @@ notification.ticket.headline=Запрос в службу поддержки д notification.trade.completed=Сделка завершена, и вы можете вывести свои средства. notification.trade.accepted=Ваше предложение принял {0} ВТС. notification.trade.unlocked=Ваша сделка была подтверждена в блокчейне не менее одного раза.\nМожете начать оплату. -notification.trade.paymentStarted=Покупатель ВТС начал оплату. +notification.trade.paymentSent=Покупатель ВТС начал оплату. notification.trade.selectTrade=Выбрать сделку notification.trade.peerOpenedDispute=Ваш контрагент открыл {0}. notification.trade.disputeClosed={0} закрыт. diff --git a/core/src/main/resources/i18n/displayStrings_th.properties b/core/src/main/resources/i18n/displayStrings_th.properties index 2e651b24b2..64484157a1 100644 --- a/core/src/main/resources/i18n/displayStrings_th.properties +++ b/core/src/main/resources/i18n/displayStrings_th.properties @@ -554,7 +554,7 @@ portfolio.pending.invalidTx=There is an issue with a missing or invalid transact portfolio.pending.step1.waitForConf=รอการยืนยันของบล็อกเชน portfolio.pending.step2_buyer.startPayment=เริ่มการชำระเงิน -portfolio.pending.step2_seller.waitPaymentStarted=รอจนกว่าการชำระเงินจะเริ่มขึ้น +portfolio.pending.step2_seller.waitPaymentSent=รอจนกว่าการชำระเงินจะเริ่มขึ้น portfolio.pending.step3_buyer.waitPaymentArrived=รอจนกว่าจะถึงการชำระเงิน portfolio.pending.step3_seller.confirmPaymentReceived=การยืนยันการชำระเงินที่ได้รับ portfolio.pending.step5.completed=เสร็จสิ้น @@ -624,7 +624,7 @@ portfolio.pending.step2_buyer.recipientsAccountData=Recipients {0} portfolio.pending.step2_buyer.amountToTransfer=จำนวนเงินที่จะโอน portfolio.pending.step2_buyer.sellersAddress=ที่อยู่ของผู้ขาย {0} portfolio.pending.step2_buyer.buyerAccount=บัญชีการชำระเงินที่ต้องการใข้งาน -portfolio.pending.step2_buyer.paymentStarted=การชำระเงินเริ่มต้นแล้ว +portfolio.pending.step2_buyer.paymentSent=การชำระเงินเริ่มต้นแล้ว portfolio.pending.step2_buyer.warn=You still have not done your {0} payment!\nPlease note that the trade has to be completed by {1}. portfolio.pending.step2_buyer.openForDispute=You have not completed your payment!\nThe max. period for the trade has elapsed.Please contact the mediator for assistance. portfolio.pending.step2_buyer.paperReceipt.headline=คุณได้ส่งใบเสร็จรับเงินให้กับผู้ขาย BTC หรือไม่? @@ -948,8 +948,8 @@ support.chat=Chat support.closed=ปิดแล้ว support.open=เปิด support.process=Process -support.buyerOfferer=BTC ผู้ซื้อ / ผู้สร้าง -support.sellerOfferer= BTC ผู้ขาย/ ผู้สร้าง +support.buyerMaker=BTC ผู้ซื้อ / ผู้สร้าง +support.sellerMaker= BTC ผู้ขาย/ ผู้สร้าง support.buyerTaker=BTC ผู้ซื้อ / ผู้รับ support.sellerTaker=BTC ผู้ขาย / ผู้รับ @@ -1494,8 +1494,8 @@ tradeDetailsWindow.headline=ซื้อขาย tradeDetailsWindow.disputedPayoutTxId=รหัส ID ธุรกรรมการจ่ายเงินที่พิพาท: tradeDetailsWindow.tradeDate=วันที่ซื้อขาย tradeDetailsWindow.txFee=ค่าธรรมเนียมการขุด -tradeDetailsWindow.tradingPeersOnion=ที่อยู่ของ onion คู่ค้า -tradeDetailsWindow.tradingPeersPubKeyHash=Trading peers pubkey hash +tradeDetailsWindow.tradePeersOnion=ที่อยู่ของ onion คู่ค้า +tradeDetailsWindow.tradePeersPubKeyHash=Trading peers pubkey hash tradeDetailsWindow.tradeState=สถานะการค้า tradeDetailsWindow.agentAddresses=Arbitrator/Mediator tradeDetailsWindow.detailData=Detail data @@ -1578,7 +1578,7 @@ popup.warning.wrongVersion=คุณอาจมีเวอร์ชั่น B popup.warning.incompatibleDB=We detected incompatible data base files!\n\nThose database file(s) are not compatible with our current code base:\n{0}\n\nWe made a backup of the corrupted file(s) and applied the default values to a new database version.\n\nThe backup is located at:\n{1}/db/backup_of_corrupted_data.\n\nPlease check if you have the latest version of Bisq installed.\nYou can download it at: [HYPERLINK:https://bisq.network/downloads].\n\nPlease restart the application. popup.warning.startupFailed.twoInstances=Bisq กำลังทำงานอยู่ คุณไม่สามารถเรียกใช้ Bisq พร้อมกันได้ popup.warning.tradePeriod.halfReached=การซื้อขายของคุณที่มีรหัส ID {0} ได้ถึงครึ่งหนึ่งของจำนวนสูงสุดแล้ว อนุญาตให้ซื้อขายได้และยังไม่สมบูรณ์\n\nช่วงเวลาการซื้อขายสิ้นสุดวันที่ {1} \n\nโปรดตรวจสอบสถานะการค้าของคุณที่ \"Portfolio (แฟ้มผลงาน) / เปิดการซื้อขาย \" สำหรับข้อมูลเพิ่มเติม -popup.warning.tradePeriod.ended=Your trade with ID {0} has reached the max. allowed trading period and is not completed.\n\nThe trade period ended on {1}\n\nPlease check your trade at \"Portfolio/Open trades\" for contacting the mediator. +popup.warning.tradePeriod.ended=Your trade with ID {0} has reached the max. allowed trading period and is not completed.\n\nThe trade period ended on {1}\n\nPlease check your trade at \"Portfolio/Open trades\" for contacting the arbitrator. popup.warning.noTradingAccountSetup.headline=คุณยังไม่ได้ตั้งค่าบัญชีการซื้อขาย popup.warning.noTradingAccountSetup.msg=คุณต้องตั้งค่าสกุลเงินประจำชาติหรือบัญชี altcoin (เหรียญทางเลือก) ก่อนจึงจะสามารถสร้างข้อเสนอได้\nคุณต้องการตั้งค่าบัญชีหรือไม่ popup.warning.noArbitratorsAvailable=ไม่มีผู้ไกล่เกลี่ยสำหรับทำการ @@ -1684,7 +1684,7 @@ notification.ticket.headline=ศูนย์ช่วยเหลือสนั notification.trade.completed=การค้าเสร็จสิ้นแล้วและคุณสามารถถอนเงินของคุณได้ notification.trade.accepted=ข้อเสนอของคุณได้รับการยอมรับจาก BTC {0} แล้ว notification.trade.unlocked=การซื้อขายของคุณมีการยืนยัน blockchain อย่างน้อยหนึ่งรายการ\nคุณสามารถเริ่มการชำระเงินได้เลย -notification.trade.paymentStarted=ผู้ซื้อ BTC ได้เริ่มการชำระเงินแล้ว +notification.trade.paymentSent=ผู้ซื้อ BTC ได้เริ่มการชำระเงินแล้ว notification.trade.selectTrade=เลือกการซื้อขาย notification.trade.peerOpenedDispute=เครือข่ายทางการค้าของคุณได้เริ่มต้นเปิดที่ {0} notification.trade.disputeClosed={0} ถูกปิดแล้ว diff --git a/core/src/main/resources/i18n/displayStrings_vi.properties b/core/src/main/resources/i18n/displayStrings_vi.properties index 62d35d7007..252684f1b9 100644 --- a/core/src/main/resources/i18n/displayStrings_vi.properties +++ b/core/src/main/resources/i18n/displayStrings_vi.properties @@ -554,7 +554,7 @@ portfolio.pending.invalidTx=There is an issue with a missing or invalid transact portfolio.pending.step1.waitForConf=Đợi xác nhận blockchain portfolio.pending.step2_buyer.startPayment=Bắt đầu thanh toán -portfolio.pending.step2_seller.waitPaymentStarted=Đợi đến khi bắt đầu thanh toán +portfolio.pending.step2_seller.waitPaymentSent=Đợi đến khi bắt đầu thanh toán portfolio.pending.step3_buyer.waitPaymentArrived=Đợi đến khi khoản thanh toán đến portfolio.pending.step3_seller.confirmPaymentReceived=Xác nhận đã nhận được thanh toán portfolio.pending.step5.completed=Hoàn thành @@ -624,7 +624,7 @@ portfolio.pending.step2_buyer.recipientsAccountData=Recipients {0} portfolio.pending.step2_buyer.amountToTransfer=Số tiền chuyển portfolio.pending.step2_buyer.sellersAddress=Địa chỉ của người bán {0} portfolio.pending.step2_buyer.buyerAccount=Tài khoản thanh toán sẽ sử dụng -portfolio.pending.step2_buyer.paymentStarted=Bắt đầu thanh toán +portfolio.pending.step2_buyer.paymentSent=Bắt đầu thanh toán portfolio.pending.step2_buyer.warn=You still have not done your {0} payment!\nPlease note that the trade has to be completed by {1}. portfolio.pending.step2_buyer.openForDispute=You have not completed your payment!\nThe max. period for the trade has elapsed.Please contact the mediator for assistance. portfolio.pending.step2_buyer.paperReceipt.headline=Bạn đã gửi giấy biên nhận cho người bán BTC chưa? @@ -950,8 +950,8 @@ support.chat=Chat support.closed=Đóng support.open=Mở support.process=Process -support.buyerOfferer=Người mua BTC/Người tạo -support.sellerOfferer=Người bán BTC/Người tạo +support.buyerMaker=Người mua BTC/Người tạo +support.sellerMaker=Người bán BTC/Người tạo support.buyerTaker=Người mua BTC/Người nhận support.sellerTaker=Người bán BTC/Người nhận @@ -1496,8 +1496,8 @@ tradeDetailsWindow.headline=giao dịch tradeDetailsWindow.disputedPayoutTxId=ID giao dịch hoàn tiền khiếu nại: tradeDetailsWindow.tradeDate=Ngày giao dịch tradeDetailsWindow.txFee=Phí đào -tradeDetailsWindow.tradingPeersOnion=Địa chỉ onion Đối tác giao dịch -tradeDetailsWindow.tradingPeersPubKeyHash=Trading peers pubkey hash +tradeDetailsWindow.tradePeersOnion=Địa chỉ onion Đối tác giao dịch +tradeDetailsWindow.tradePeersPubKeyHash=Trading peers pubkey hash tradeDetailsWindow.tradeState=Trạng thái giao dịch tradeDetailsWindow.agentAddresses=Arbitrator/Mediator tradeDetailsWindow.detailData=Detail data @@ -1580,7 +1580,7 @@ popup.warning.wrongVersion=Có thể máy tính của bạn có phiên bản Bis popup.warning.incompatibleDB=We detected incompatible data base files!\n\nThose database file(s) are not compatible with our current code base:\n{0}\n\nWe made a backup of the corrupted file(s) and applied the default values to a new database version.\n\nThe backup is located at:\n{1}/db/backup_of_corrupted_data.\n\nPlease check if you have the latest version of Bisq installed.\nYou can download it at: [HYPERLINK:https://bisq.network/downloads].\n\nPlease restart the application. popup.warning.startupFailed.twoInstances=Bisq đã chạy. Bạn không thể chạy hai chương trình Bisq. popup.warning.tradePeriod.halfReached=giao dịch của bạn với ID {0} đã qua một nửa thời gian giao dịch cho phép tối đa và vẫn chưa hoàn thành.\n\nThời gian giao dịch kết thúc vào {1}\n\nVui lòng kiểm tra trạng thái giao dịch của bạn tại \"Portfolio/Các giao dịch mở\" để biết thêm thông tin. -popup.warning.tradePeriod.ended=Your trade with ID {0} has reached the max. allowed trading period and is not completed.\n\nThe trade period ended on {1}\n\nPlease check your trade at \"Portfolio/Open trades\" for contacting the mediator. +popup.warning.tradePeriod.ended=Your trade with ID {0} has reached the max. allowed trading period and is not completed.\n\nThe trade period ended on {1}\n\nPlease check your trade at \"Portfolio/Open trades\" for contacting the arbitrator. popup.warning.noTradingAccountSetup.headline=Bạn chưa thiết lập tài khoản giao dịch popup.warning.noTradingAccountSetup.msg=Bạn cần thiết lập tiền tệ quốc gia hoặc tài khoản altcoin trước khi tạo Báo giá.\nDBạn có muốn thiết lập tài khoản? popup.warning.noArbitratorsAvailable=Hiện không có trọng tài nào @@ -1686,7 +1686,7 @@ notification.ticket.headline=Vé hỗ trợ cho giao dịch có ID {0} notification.trade.completed=giao dịch đã hoàn thành và bạn có thể rút tiền. notification.trade.accepted=Chào giá của bạn đã được chấp thuận bởi BTC {0}. notification.trade.unlocked=giao dịch của bạn có ít nhất một xác nhận blockchain.\nBạn có thể bắt đầu thanh toán bây giờ. -notification.trade.paymentStarted=Người mua BTC đã bắt đầu thanh toán. +notification.trade.paymentSent=Người mua BTC đã bắt đầu thanh toán. notification.trade.selectTrade=Lựa chọn giao dịch notification.trade.peerOpenedDispute=Đối tác giao dịch của bạn đã mở một {0}. notification.trade.disputeClosed={0} đã đóng. diff --git a/core/src/main/resources/i18n/displayStrings_zh-hans.properties b/core/src/main/resources/i18n/displayStrings_zh-hans.properties index 3bb63dfa20..f62af77b64 100644 --- a/core/src/main/resources/i18n/displayStrings_zh-hans.properties +++ b/core/src/main/resources/i18n/displayStrings_zh-hans.properties @@ -554,7 +554,7 @@ portfolio.pending.invalidTx=There is an issue with a missing or invalid transact portfolio.pending.step1.waitForConf=等待区块链确认 portfolio.pending.step2_buyer.startPayment=开始付款 -portfolio.pending.step2_seller.waitPaymentStarted=等待直到付款 +portfolio.pending.step2_seller.waitPaymentSent=等待直到付款 portfolio.pending.step3_buyer.waitPaymentArrived=等待直到付款到达 portfolio.pending.step3_seller.confirmPaymentReceived=确定收到付款 portfolio.pending.step5.completed=完成 @@ -624,7 +624,7 @@ portfolio.pending.step2_buyer.recipientsAccountData=接受 {0} portfolio.pending.step2_buyer.amountToTransfer=划转数量 portfolio.pending.step2_buyer.sellersAddress=卖家的 {0} 地址 portfolio.pending.step2_buyer.buyerAccount=您的付款帐户将被使用 -portfolio.pending.step2_buyer.paymentStarted=付款开始 +portfolio.pending.step2_buyer.paymentSent=付款开始 portfolio.pending.step2_buyer.warn=你还没有完成你的 {0} 付款!\n请注意,交易必须在 {1} 之前完成。 portfolio.pending.step2_buyer.openForDispute=您还没有完成您的付款!\n最大交易期限已过。请联系调解员寻求帮助。 portfolio.pending.step2_buyer.paperReceipt.headline=您是否将纸质收据发送给 BTC 卖家? @@ -948,8 +948,8 @@ support.chat=Chat support.closed=关闭 support.open=打开 support.process=Process -support.buyerOfferer=BTC 买家/挂单者 -support.sellerOfferer=BTC 卖家/挂单者 +support.buyerMaker=BTC 买家/挂单者 +support.sellerMaker=BTC 卖家/挂单者 support.buyerTaker=BTC 买家/买单者 support.sellerTaker=BTC 卖家/买单者 @@ -1495,8 +1495,8 @@ tradeDetailsWindow.headline=交易 tradeDetailsWindow.disputedPayoutTxId=纠纷支付交易 ID: tradeDetailsWindow.tradeDate=交易时间 tradeDetailsWindow.txFee=矿工手续费 -tradeDetailsWindow.tradingPeersOnion=交易伙伴匿名地址 -tradeDetailsWindow.tradingPeersPubKeyHash=交易伙伴公钥哈希值 +tradeDetailsWindow.tradePeersOnion=交易伙伴匿名地址 +tradeDetailsWindow.tradePeersPubKeyHash=交易伙伴公钥哈希值 tradeDetailsWindow.tradeState=交易状态 tradeDetailsWindow.agentAddresses=仲裁员/调解员 tradeDetailsWindow.detailData=详情数据 @@ -1688,7 +1688,7 @@ notification.ticket.headline=交易 ID {0} 的帮助话题 notification.trade.completed=交易现在完成,您可以提取资金。 notification.trade.accepted=您 BTC {0} 的报价被接受。 notification.trade.unlocked=您的交易至少有一个区块链确认。\n您现在可以开始付款。 -notification.trade.paymentStarted=BTC 买家已经开始付款。 +notification.trade.paymentSent=BTC 买家已经开始付款。 notification.trade.selectTrade=选择交易 notification.trade.peerOpenedDispute=您的交易对象创建了一个 {0}。 notification.trade.disputeClosed=这个 {0} 被关闭。 diff --git a/core/src/main/resources/i18n/displayStrings_zh-hant.properties b/core/src/main/resources/i18n/displayStrings_zh-hant.properties index 8bd600cc50..ab30b0a43d 100644 --- a/core/src/main/resources/i18n/displayStrings_zh-hant.properties +++ b/core/src/main/resources/i18n/displayStrings_zh-hant.properties @@ -554,7 +554,7 @@ portfolio.pending.invalidTx=There is an issue with a missing or invalid transact portfolio.pending.step1.waitForConf=等待區塊鏈確認 portfolio.pending.step2_buyer.startPayment=開始付款 -portfolio.pending.step2_seller.waitPaymentStarted=等待直到付款 +portfolio.pending.step2_seller.waitPaymentSent=等待直到付款 portfolio.pending.step3_buyer.waitPaymentArrived=等待直到付款到達 portfolio.pending.step3_seller.confirmPaymentReceived=確定收到付款 portfolio.pending.step5.completed=完成 @@ -624,7 +624,7 @@ portfolio.pending.step2_buyer.recipientsAccountData=接受 {0} portfolio.pending.step2_buyer.amountToTransfer=劃轉數量 portfolio.pending.step2_buyer.sellersAddress=賣家的 {0} 地址 portfolio.pending.step2_buyer.buyerAccount=您的付款帳户將被使用 -portfolio.pending.step2_buyer.paymentStarted=付款開始 +portfolio.pending.step2_buyer.paymentSent=付款開始 portfolio.pending.step2_buyer.warn=你還沒有完成你的 {0} 付款!\n請注意,交易必須在 {1} 之前完成。 portfolio.pending.step2_buyer.openForDispute=您還沒有完成您的付款!\n最大交易期限已過。請聯繫調解員尋求幫助。 portfolio.pending.step2_buyer.paperReceipt.headline=您是否將紙質收據發送給 BTC 賣家? @@ -948,8 +948,8 @@ support.chat=Chat support.closed=關閉 support.open=打開 support.process=Process -support.buyerOfferer=BTC 買家/掛單者 -support.sellerOfferer=BTC 賣家/掛單者 +support.buyerMaker=BTC 買家/掛單者 +support.sellerMaker=BTC 賣家/掛單者 support.buyerTaker=BTC 買家/買單者 support.sellerTaker=BTC 賣家/買單者 @@ -1495,8 +1495,8 @@ tradeDetailsWindow.headline=交易 tradeDetailsWindow.disputedPayoutTxId=糾紛支付交易 ID: tradeDetailsWindow.tradeDate=交易時間 tradeDetailsWindow.txFee=礦工手續費 -tradeDetailsWindow.tradingPeersOnion=交易夥伴匿名地址 -tradeDetailsWindow.tradingPeersPubKeyHash=交易夥伴公鑰哈希值 +tradeDetailsWindow.tradePeersOnion=交易夥伴匿名地址 +tradeDetailsWindow.tradePeersPubKeyHash=交易夥伴公鑰哈希值 tradeDetailsWindow.tradeState=交易狀態 tradeDetailsWindow.agentAddresses=仲裁員/調解員 tradeDetailsWindow.detailData=Detail data @@ -1684,7 +1684,7 @@ notification.ticket.headline=交易 ID {0} 的幫助話題 notification.trade.completed=交易現在完成,您可以提取資金。 notification.trade.accepted=您 BTC {0} 的報價被接受。 notification.trade.unlocked=您的交易至少有一個區塊鏈確認。\n您現在可以開始付款。 -notification.trade.paymentStarted=BTC 買家已經開始付款。 +notification.trade.paymentSent=BTC 買家已經開始付款。 notification.trade.selectTrade=選擇交易 notification.trade.peerOpenedDispute=您的交易對象創建了一個 {0}。 notification.trade.disputeClosed=這個 {0} 被關閉。 diff --git a/daemon/src/main/java/bisq/daemon/grpc/GrpcTradesService.java b/daemon/src/main/java/bisq/daemon/grpc/GrpcTradesService.java index cabd2833b4..dae89ff4ab 100644 --- a/daemon/src/main/java/bisq/daemon/grpc/GrpcTradesService.java +++ b/daemon/src/main/java/bisq/daemon/grpc/GrpcTradesService.java @@ -23,8 +23,8 @@ import bisq.core.trade.Trade; import bisq.proto.grpc.ConfirmPaymentReceivedReply; import bisq.proto.grpc.ConfirmPaymentReceivedRequest; -import bisq.proto.grpc.ConfirmPaymentStartedReply; -import bisq.proto.grpc.ConfirmPaymentStartedRequest; +import bisq.proto.grpc.ConfirmPaymentSentReply; +import bisq.proto.grpc.ConfirmPaymentSentRequest; import bisq.proto.grpc.GetChatMessagesReply; import bisq.proto.grpc.GetChatMessagesRequest; import bisq.proto.grpc.GetTradeReply; @@ -138,13 +138,13 @@ class GrpcTradesService extends TradesImplBase { } @Override - public void confirmPaymentStarted(ConfirmPaymentStartedRequest req, - StreamObserver responseObserver) { - GrpcErrorMessageHandler errorMessageHandler = new GrpcErrorMessageHandler(getConfirmPaymentStartedMethod().getFullMethodName(), responseObserver, exceptionHandler, log); + public void confirmPaymentSent(ConfirmPaymentSentRequest req, + StreamObserver responseObserver) { + GrpcErrorMessageHandler errorMessageHandler = new GrpcErrorMessageHandler(getConfirmPaymentSentMethod().getFullMethodName(), responseObserver, exceptionHandler, log); try { - coreApi.confirmPaymentStarted(req.getTradeId(), + coreApi.confirmPaymentSent(req.getTradeId(), () -> { - var reply = ConfirmPaymentStartedReply.newBuilder().build(); + var reply = ConfirmPaymentSentReply.newBuilder().build(); responseObserver.onNext(reply); responseObserver.onCompleted(); }, @@ -248,7 +248,7 @@ class GrpcTradesService extends TradesImplBase { put(getGetTradeMethod().getFullMethodName(), new GrpcCallRateMeter(30, SECONDS)); put(getGetTradesMethod().getFullMethodName(), new GrpcCallRateMeter(10, SECONDS)); put(getTakeOfferMethod().getFullMethodName(), new GrpcCallRateMeter(20, SECONDS)); - put(getConfirmPaymentStartedMethod().getFullMethodName(), new GrpcCallRateMeter(10, SECONDS)); + put(getConfirmPaymentSentMethod().getFullMethodName(), new GrpcCallRateMeter(10, SECONDS)); put(getConfirmPaymentReceivedMethod().getFullMethodName(), new GrpcCallRateMeter(10, SECONDS)); put(getCompleteTradeMethod().getFullMethodName(), new GrpcCallRateMeter(10, SECONDS)); put(getWithdrawFundsMethod().getFullMethodName(), new GrpcCallRateMeter(1, MINUTES)); diff --git a/desktop/src/main/java/bisq/desktop/main/offer/offerbook/OfferBookViewModel.java b/desktop/src/main/java/bisq/desktop/main/offer/offerbook/OfferBookViewModel.java index 01e2ab337b..3df76c1e5c 100644 --- a/desktop/src/main/java/bisq/desktop/main/offer/offerbook/OfferBookViewModel.java +++ b/desktop/src/main/java/bisq/desktop/main/offer/offerbook/OfferBookViewModel.java @@ -603,9 +603,9 @@ abstract class OfferBookViewModel extends ActivatableViewModel { return closedTradableManager.getTradableList().stream() .filter(e -> e instanceof Trade) // weed out canceled offers .filter(e -> { - final Optional tradingPeerNodeAddress = e.getOptionalTradingPeerNodeAddress(); - return tradingPeerNodeAddress.isPresent() && - tradingPeerNodeAddress.get().getFullAddress().equals(offer.getMakerNodeAddress().getFullAddress()); + final Optional tradePeerNodeAddress = e.getOptionalTradePeerNodeAddress(); + return tradePeerNodeAddress.isPresent() && + tradePeerNodeAddress.get().getFullAddress().equals(offer.getMakerNodeAddress().getFullAddress()); }) .collect(Collectors.toSet()) .size(); diff --git a/desktop/src/main/java/bisq/desktop/main/overlays/editor/PeerInfoWithTagEditor.java b/desktop/src/main/java/bisq/desktop/main/overlays/editor/PeerInfoWithTagEditor.java index a5b33a88cb..09b4740ffe 100644 --- a/desktop/src/main/java/bisq/desktop/main/overlays/editor/PeerInfoWithTagEditor.java +++ b/desktop/src/main/java/bisq/desktop/main/overlays/editor/PeerInfoWithTagEditor.java @@ -251,7 +251,7 @@ public class PeerInfoWithTagEditor extends Overlay { UserThread.runAfter(() -> { PubKeyRing peersPubKeyRing = null; if (trade != null) { - peersPubKeyRing = trade.getTradingPeer().getPubKeyRing(); + peersPubKeyRing = trade.getTradePeer().getPubKeyRing(); } else if (offer != null) { peersPubKeyRing = offer.getPubKeyRing(); } diff --git a/desktop/src/main/java/bisq/desktop/main/overlays/notifications/NotificationCenter.java b/desktop/src/main/java/bisq/desktop/main/overlays/notifications/NotificationCenter.java index f32d1766ca..a313becd76 100644 --- a/desktop/src/main/java/bisq/desktop/main/overlays/notifications/NotificationCenter.java +++ b/desktop/src/main/java/bisq/desktop/main/overlays/notifications/NotificationCenter.java @@ -22,11 +22,15 @@ import bisq.desktop.main.MainView; import bisq.desktop.main.portfolio.PortfolioView; import bisq.desktop.main.portfolio.pendingtrades.PendingTradesView; import bisq.desktop.main.support.SupportView; -import bisq.desktop.main.support.dispute.client.DisputeClientView; +import bisq.desktop.main.support.dispute.DisputeView; +import bisq.desktop.main.support.dispute.agent.arbitration.ArbitratorView; +import bisq.desktop.main.support.dispute.client.arbitration.ArbitrationClientView; import bisq.desktop.main.support.dispute.client.mediation.MediationClientView; import bisq.desktop.main.support.dispute.client.refund.RefundClientView; import bisq.core.locale.Res; +import bisq.core.support.dispute.Dispute; +import bisq.core.support.dispute.arbitration.ArbitrationManager; import bisq.core.support.dispute.mediation.MediationManager; import bisq.core.support.dispute.refund.RefundManager; import bisq.core.trade.BuyerTrade; @@ -81,6 +85,7 @@ public class NotificationCenter { /////////////////////////////////////////////////////////////////////////////////////////// private final TradeManager tradeManager; + private final ArbitrationManager arbitrationManager; private final MediationManager mediationManager; private final RefundManager refundManager; private final Navigation navigation; @@ -96,11 +101,13 @@ public class NotificationCenter { @Inject public NotificationCenter(TradeManager tradeManager, + ArbitrationManager arbitrationManager, MediationManager mediationManager, RefundManager refundManager, Preferences preferences, Navigation navigation) { this.tradeManager = tradeManager; + this.arbitrationManager = arbitrationManager; this.mediationManager = mediationManager; this.refundManager = refundManager; this.navigation = navigation; @@ -195,7 +202,7 @@ public class NotificationCenter { if (trade instanceof BuyerTrade && phase.ordinal() == Trade.Phase.DEPOSITS_UNLOCKED.ordinal()) message = Res.get("notification.trade.unlocked"); else if (trade instanceof SellerTrade && phase.ordinal() == Trade.Phase.PAYMENT_SENT.ordinal()) - message = Res.get("notification.trade.paymentStarted"); + message = Res.get("notification.trade.paymentSent"); } if (message != null) { @@ -228,7 +235,29 @@ public class NotificationCenter { private void onDisputeStateChanged(Trade trade, Trade.DisputeState disputeState) { String message = null; - if (refundManager.findDispute(trade.getId()).isPresent()) { + if (arbitrationManager.findDispute(trade.getId()).isPresent()) { + Dispute dispute = arbitrationManager.findDispute(trade.getId()).get(); + String disputeOrTicket = dispute.isSupportTicket() ? + Res.get("shared.supportTicket") : + Res.get("shared.dispute"); + switch (disputeState) { + case NO_DISPUTE: + break; + case DISPUTE_OPENED: + // notify if arbitrator or dispute opener (arbitrator's disputes are in context of each trader, so isOpener() doesn't apply) + if (trade.isArbitrator() || !dispute.isOpener()) message = Res.get("notification.trade.peerOpenedDispute", disputeOrTicket); + break; + case DISPUTE_CLOSED: + // skip notifying arbitrator + if (!trade.isArbitrator()) message = Res.get("notification.trade.disputeClosed", disputeOrTicket); + break; + default: + break; + } + if (message != null) { + goToSupport(trade, message, trade.isArbitrator() ? ArbitratorView.class : ArbitrationClientView.class); + } + }else if (refundManager.findDispute(trade.getId()).isPresent()) { String disputeOrTicket = refundManager.findDispute(trade.getId()).get().isSupportTicket() ? Res.get("shared.supportTicket") : Res.get("shared.dispute"); @@ -251,7 +280,7 @@ public class NotificationCenter { break; } if (message != null) { - goToSupport(trade, message, false); + goToSupport(trade, message, RefundClientView.class); } } else if (mediationManager.findDispute(trade.getId()).isPresent()) { String disputeOrTicket = mediationManager.findDispute(trade.getId()).get().isSupportTicket() ? @@ -275,16 +304,13 @@ public class NotificationCenter { break; } if (message != null) { - goToSupport(trade, message, true); + goToSupport(trade, message, MediationClientView.class); } } } - private void goToSupport(Trade trade, String message, boolean isMediation) { + private void goToSupport(Trade trade, String message, Class viewClass) { Notification notification = new Notification().disputeHeadLine(trade.getShortId()).message(message); - Class viewClass = isMediation ? - MediationClientView.class : - RefundClientView.class; if (navigation.getCurrentPath() != null && !navigation.getCurrentPath().contains(viewClass)) { notification.actionButtonTextWithGoTo("navigation.support") .onAction(() -> navigation.navigateTo(MainView.class, SupportView.class, viewClass)) diff --git a/desktop/src/main/java/bisq/desktop/main/overlays/windows/DisputeSummaryWindow.java b/desktop/src/main/java/bisq/desktop/main/overlays/windows/DisputeSummaryWindow.java index 835b398d11..6eaad1ed2e 100644 --- a/desktop/src/main/java/bisq/desktop/main/overlays/windows/DisputeSummaryWindow.java +++ b/desktop/src/main/java/bisq/desktop/main/overlays/windows/DisputeSummaryWindow.java @@ -267,9 +267,9 @@ public class DisputeSummaryWindow extends Overlay { addConfirmationLabelLabel(gridPane, ++rowIndex, Res.get("disputeSummaryWindow.openDate"), DisplayUtils.formatDateTime(dispute.getOpeningDate())); if (dispute.isDisputeOpenerIsMaker()) { if (dispute.isDisputeOpenerIsBuyer()) - role = Res.get("support.buyerOfferer"); + role = Res.get("support.buyerMaker"); else - role = Res.get("support.sellerOfferer"); + role = Res.get("support.sellerMaker"); } else { if (dispute.isDisputeOpenerIsBuyer()) role = Res.get("support.buyerTaker"); @@ -283,6 +283,14 @@ public class DisputeSummaryWindow extends Overlay { FormattingUtils.formatPrice(contract.getPrice())); addConfirmationLabelLabel(gridPane, ++rowIndex, Res.get("shared.tradeVolume"), VolumeUtil.formatVolumeWithCode(contract.getTradeVolume())); + String tradeFee = Res.getWithColAndCap("shared.buyer") + + " " + + formatter.formatCoinWithCode(trade.getBuyer() == trade.getMaker() ? trade.getMakerFee() : trade.getTakerFee()) + + " / " + + Res.getWithColAndCap("shared.seller") + + " " + + formatter.formatCoinWithCode(trade.getSeller() == trade.getMaker() ? trade.getMakerFee() : trade.getTakerFee()); + addConfirmationLabelLabel(gridPane, ++rowIndex, Res.get("shared.tradeFee"), tradeFee); String securityDeposit = Res.getWithColAndCap("shared.buyer") + " " + formatter.formatCoinWithCode(trade.getBuyerSecurityDeposit()) + diff --git a/desktop/src/main/java/bisq/desktop/main/overlays/windows/TradeDetailsWindow.java b/desktop/src/main/java/bisq/desktop/main/overlays/windows/TradeDetailsWindow.java index e2fdcffce7..063578a909 100644 --- a/desktop/src/main/java/bisq/desktop/main/overlays/windows/TradeDetailsWindow.java +++ b/desktop/src/main/java/bisq/desktop/main/overlays/windows/TradeDetailsWindow.java @@ -204,7 +204,7 @@ public class TradeDetailsWindow extends Overlay { rows++; if (trade.hasFailed()) rows += 2; - if (trade.getTradingPeerNodeAddress() != null) + if (trade.getTradePeerNodeAddress() != null) rows++; if (showXmrProofResult) rows++; @@ -235,12 +235,12 @@ public class TradeDetailsWindow extends Overlay { arbitratorNodeAddress.getFullAddress()); } - if (trade.getTradingPeerNodeAddress() != null) - addConfirmationLabelTextField(gridPane, ++rowIndex, Res.get("tradeDetailsWindow.tradingPeersOnion"), - trade.getTradingPeerNodeAddress().getFullAddress()); + if (trade.getTradePeerNodeAddress() != null) + addConfirmationLabelTextField(gridPane, ++rowIndex, Res.get("tradeDetailsWindow.tradePeersOnion"), + trade.getTradePeerNodeAddress().getFullAddress()); if (showXmrProofResult) { - // As the window is already overloaded we replace the tradingPeersPubKeyHash field with the auto-conf state + // As the window is already overloaded we replace the tradePeersPubKeyHash field with the auto-conf state // if XMR is the currency addConfirmationLabelTextField(gridPane, ++rowIndex, Res.get("portfolio.pending.step3_seller.autoConf.status.label"), diff --git a/desktop/src/main/java/bisq/desktop/main/portfolio/closedtrades/ClosedTradesView.java b/desktop/src/main/java/bisq/desktop/main/portfolio/closedtrades/ClosedTradesView.java index d36beb5ee3..47a8f1092a 100644 --- a/desktop/src/main/java/bisq/desktop/main/portfolio/closedtrades/ClosedTradesView.java +++ b/desktop/src/main/java/bisq/desktop/main/portfolio/closedtrades/ClosedTradesView.java @@ -501,9 +501,9 @@ public class ClosedTradesView extends ActivatableViewAndModel { UserThread.execute(() -> onPayoutStateChanged(state)); }); - messageStateSubscription = EasyBind.subscribe(trade.getProcessModel().getPaymentStartedMessageStateProperty(), this::onMessageStateChanged); + messageStateSubscription = EasyBind.subscribe(trade.getProcessModel().getPaymentSentMessageStateProperty(), this::onMessageStateChanged); } } @@ -215,7 +215,7 @@ public class PendingTradesViewModel extends ActivatableWithDataModel { if (e instanceof Trade) { Trade t = (Trade) e; - return t.getTradingPeerNodeAddress() != null && - trade.getTradingPeerNodeAddress() != null && - t.getTradingPeerNodeAddress().getFullAddress().equals(trade.getTradingPeerNodeAddress().getFullAddress()); + return t.getTradePeerNodeAddress() != null && + trade.getTradePeerNodeAddress() != null && + t.getTradePeerNodeAddress().getFullAddress().equals(trade.getTradePeerNodeAddress().getFullAddress()); } else return false; diff --git a/desktop/src/main/java/bisq/desktop/main/portfolio/pendingtrades/SellerSubView.java b/desktop/src/main/java/bisq/desktop/main/portfolio/pendingtrades/SellerSubView.java index ac1b53640f..a81d0fce7a 100644 --- a/desktop/src/main/java/bisq/desktop/main/portfolio/pendingtrades/SellerSubView.java +++ b/desktop/src/main/java/bisq/desktop/main/portfolio/pendingtrades/SellerSubView.java @@ -53,7 +53,7 @@ public class SellerSubView extends TradeSubView { @Override protected void addWizards() { step1 = new TradeWizardItem(SellerStep1View.class, Res.get("portfolio.pending.step1.waitForConf"), "1"); - step2 = new TradeWizardItem(SellerStep2View.class, Res.get("portfolio.pending.step2_seller.waitPaymentStarted"), "2"); + step2 = new TradeWizardItem(SellerStep2View.class, Res.get("portfolio.pending.step2_seller.waitPaymentSent"), "2"); step3 = new TradeWizardItem(SellerStep3View.class, Res.get("portfolio.pending.step3_seller.confirmPaymentReceived"), "3"); step4 = new TradeWizardItem(SellerStep4View.class, Res.get("portfolio.pending.step5.completed"), "4"); diff --git a/desktop/src/main/java/bisq/desktop/main/portfolio/pendingtrades/TradeStepInfo.java b/desktop/src/main/java/bisq/desktop/main/portfolio/pendingtrades/TradeStepInfo.java index 708d04988c..8cb1cf658a 100644 --- a/desktop/src/main/java/bisq/desktop/main/portfolio/pendingtrades/TradeStepInfo.java +++ b/desktop/src/main/java/bisq/desktop/main/portfolio/pendingtrades/TradeStepInfo.java @@ -116,18 +116,20 @@ public class TradeStepInfo { break; case IN_ARBITRATION_SELF_REQUESTED: // red button - titledGroupBg.setText(Res.get("portfolio.pending.arbitrationRequested")); + String text = trade.getDisputeState().isOpen() ? Res.get("portfolio.pending.supportTicketOpened") : Res.get("portfolio.pending.arbitrationRequested"); + titledGroupBg.setText(text); label.updateContent(Res.get("portfolio.pending.disputeOpenedByUser", Res.get("portfolio.pending.communicateWithArbitrator"))); - button.setText(Res.get("portfolio.pending.arbitrationRequested").toUpperCase()); + button.setText(text.toUpperCase()); button.setId("open-dispute-button"); button.getStyleClass().remove("action-button"); button.setDisable(true); break; case IN_ARBITRATION_PEER_REQUESTED: // red button - titledGroupBg.setText(Res.get("portfolio.pending.arbitrationRequested")); + text = trade.getDisputeState().isOpen() ? Res.get("portfolio.pending.supportTicketOpened") : Res.get("portfolio.pending.arbitrationRequested"); + titledGroupBg.setText(text); label.updateContent(Res.get("portfolio.pending.disputeOpenedByPeer", Res.get("portfolio.pending.communicateWithArbitrator"))); - button.setText(Res.get("portfolio.pending.arbitrationRequested").toUpperCase()); + button.setText(text.toUpperCase()); button.setId("open-dispute-button"); button.getStyleClass().remove("action-button"); button.setDisable(true); diff --git a/desktop/src/main/java/bisq/desktop/main/portfolio/pendingtrades/steps/TradeStepView.java b/desktop/src/main/java/bisq/desktop/main/portfolio/pendingtrades/steps/TradeStepView.java index b6bf86a438..8ec3a8d03b 100644 --- a/desktop/src/main/java/bisq/desktop/main/portfolio/pendingtrades/steps/TradeStepView.java +++ b/desktop/src/main/java/bisq/desktop/main/portfolio/pendingtrades/steps/TradeStepView.java @@ -637,7 +637,7 @@ public abstract class TradeStepView extends AnchorPane { } private boolean peerAccepted() { - return trade.getTradingPeer().getMediatedPayoutTxSignature() != null; + return trade.getTradePeer().getMediatedPayoutTxSignature() != null; } private void openMediationResultPopup(String headLine) { diff --git a/desktop/src/main/java/bisq/desktop/main/portfolio/pendingtrades/steps/buyer/BuyerStep2View.java b/desktop/src/main/java/bisq/desktop/main/portfolio/pendingtrades/steps/buyer/BuyerStep2View.java index c37d368bcc..75d9907326 100644 --- a/desktop/src/main/java/bisq/desktop/main/portfolio/pendingtrades/steps/buyer/BuyerStep2View.java +++ b/desktop/src/main/java/bisq/desktop/main/portfolio/pendingtrades/steps/buyer/BuyerStep2View.java @@ -71,17 +71,14 @@ import bisq.desktop.components.paymentmethods.UpiForm; import bisq.desktop.components.paymentmethods.VerseForm; import bisq.desktop.components.paymentmethods.WeChatPayForm; import bisq.desktop.components.paymentmethods.WesternUnionForm; -import bisq.desktop.main.MainView; import bisq.desktop.main.overlays.popups.Popup; import bisq.desktop.main.overlays.windows.SetXmrTxKeyWindow; import bisq.desktop.main.portfolio.pendingtrades.PendingTradesViewModel; import bisq.desktop.main.portfolio.pendingtrades.steps.TradeStepView; -import bisq.desktop.util.DisplayUtils; import bisq.desktop.util.Layout; import bisq.desktop.util.Transitions; import bisq.core.locale.Res; -import bisq.core.monetary.Volume; import bisq.core.network.MessageState; import bisq.core.offer.Offer; import bisq.core.payment.PaymentAccount; @@ -104,7 +101,6 @@ import bisq.core.util.VolumeUtil; import bisq.common.Timer; import bisq.common.UserThread; import bisq.common.app.DevEnv; -import bisq.common.util.Tuple2; import bisq.common.util.Tuple4; import javafx.scene.control.Button; @@ -429,12 +425,12 @@ public class BuyerStep2View extends TradeStepView { GridPane.setRowSpan(accountTitledGroupBg, gridRow - 1); Tuple4 tuple3 = addButtonBusyAnimationLabel(gridPane, ++gridRow, 0, - Res.get("portfolio.pending.step2_buyer.paymentStarted"), 10); + Res.get("portfolio.pending.step2_buyer.paymentSent"), 10); HBox hBox = tuple3.fourth; GridPane.setColumnSpan(hBox, 2); confirmButton = tuple3.first; - confirmButton.setOnAction(e -> onPaymentStarted()); + confirmButton.setOnAction(e -> onPaymentSent()); busyAnimation = tuple3.second; statusLabel = tuple3.third; } @@ -475,7 +471,7 @@ public class BuyerStep2View extends TradeStepView { // UI Handlers /////////////////////////////////////////////////////////////////////////////////////////// - private void onPaymentStarted() { + private void onPaymentSent() { if (!model.dataModel.isBootstrappedOrShowPopup()) { return; } @@ -492,13 +488,13 @@ public class BuyerStep2View extends TradeStepView { Popup popup = new Popup(); popup.headLine(Res.get("portfolio.pending.step2_buyer.paperReceipt.headline")) .feedback(Res.get("portfolio.pending.step2_buyer.paperReceipt.msg")) - .onAction(this::showConfirmPaymentStartedPopup) + .onAction(this::showConfirmPaymentSentPopup) .closeButtonText(Res.get("shared.no")) .onClose(popup::hide) .dontShowAgainId(key) .show(); } else { - showConfirmPaymentStartedPopup(); + showConfirmPaymentSentPopup(); } } else if (sellersPaymentAccountPayload instanceof WesternUnionAccountPayload) { String key = "westernUnionMTCNSent"; @@ -507,14 +503,14 @@ public class BuyerStep2View extends TradeStepView { Popup popup = new Popup(); popup.headLine(Res.get("portfolio.pending.step2_buyer.westernUnionMTCNInfo.headline")) .feedback(Res.get("portfolio.pending.step2_buyer.westernUnionMTCNInfo.msg", email)) - .onAction(this::showConfirmPaymentStartedPopup) + .onAction(this::showConfirmPaymentSentPopup) .actionButtonText(Res.get("shared.yes")) .closeButtonText(Res.get("shared.no")) .onClose(popup::hide) .dontShowAgainId(key) .show(); } else { - showConfirmPaymentStartedPopup(); + showConfirmPaymentSentPopup(); } } else if (sellersPaymentAccountPayload instanceof MoneyGramAccountPayload) { String key = "moneyGramMTCNSent"; @@ -523,14 +519,14 @@ public class BuyerStep2View extends TradeStepView { Popup popup = new Popup(); popup.headLine(Res.get("portfolio.pending.step2_buyer.moneyGramMTCNInfo.headline")) .feedback(Res.get("portfolio.pending.step2_buyer.moneyGramMTCNInfo.msg", email)) - .onAction(this::showConfirmPaymentStartedPopup) + .onAction(this::showConfirmPaymentSentPopup) .actionButtonText(Res.get("shared.yes")) .closeButtonText(Res.get("shared.no")) .onClose(popup::hide) .dontShowAgainId(key) .show(); } else { - showConfirmPaymentStartedPopup(); + showConfirmPaymentSentPopup(); } } else if (sellersPaymentAccountPayload instanceof HalCashAccountPayload) { String key = "halCashCodeInfo"; @@ -540,14 +536,14 @@ public class BuyerStep2View extends TradeStepView { popup.headLine(Res.get("portfolio.pending.step2_buyer.halCashInfo.headline")) .feedback(Res.get("portfolio.pending.step2_buyer.halCashInfo.msg", trade.getShortId(), mobileNr)) - .onAction(this::showConfirmPaymentStartedPopup) + .onAction(this::showConfirmPaymentSentPopup) .actionButtonText(Res.get("shared.yes")) .closeButtonText(Res.get("shared.no")) .onClose(popup::hide) .dontShowAgainId(key) .show(); } else { - showConfirmPaymentStartedPopup(); + showConfirmPaymentSentPopup(); } } else if (sellersPaymentAccountPayload instanceof AssetAccountPayload && isXmrTrade()) { SetXmrTxKeyWindow setXmrTxKeyWindow = new SetXmrTxKeyWindow(); @@ -565,13 +561,13 @@ public class BuyerStep2View extends TradeStepView { trade.setCounterCurrencyTxId(txHash); model.dataModel.getTradeManager().requestPersistence(); - showConfirmPaymentStartedPopup(); + showConfirmPaymentSentPopup(); }) .closeButtonText(Res.get("shared.cancel")) .onClose(setXmrTxKeyWindow::hide) .show(); } else { - showConfirmPaymentStartedPopup(); + showConfirmPaymentSentPopup(); } } @@ -581,35 +577,35 @@ public class BuyerStep2View extends TradeStepView { .confirmation(Res.get("portfolio.pending.step2_buyer.confirmStart.proof.noneProvided")) .width(700) .actionButtonText(Res.get("portfolio.pending.step2_buyer.confirmStart.warningButton")) - .onAction(this::showConfirmPaymentStartedPopup) + .onAction(this::showConfirmPaymentSentPopup) .closeButtonText(Res.get("shared.cancel")) .onClose(popup::hide) .show(); } - private void showConfirmPaymentStartedPopup() { - String key = "confirmPaymentStarted"; + private void showConfirmPaymentSentPopup() { + String key = "confirmPaymentSent"; if (!DevEnv.isDevMode() && DontShowAgainLookup.showAgain(key)) { Popup popup = new Popup(); popup.headLine(Res.get("portfolio.pending.step2_buyer.confirmStart.headline")) .confirmation(Res.get("portfolio.pending.step2_buyer.confirmStart.msg", getCurrencyName(trade))) .width(700) .actionButtonText(Res.get("portfolio.pending.step2_buyer.confirmStart.yes")) - .onAction(this::confirmPaymentStarted) + .onAction(this::confirmPaymentSent) .closeButtonText(Res.get("shared.no")) .onClose(popup::hide) .dontShowAgainId(key) .show(); } else { - confirmPaymentStarted(); + confirmPaymentSent(); } } - private void confirmPaymentStarted() { + private void confirmPaymentSent() { busyAnimation.play(); statusLabel.setText(Res.get("shared.sendingConfirmation")); - model.dataModel.onPaymentStarted(() -> { + model.dataModel.onPaymentSent(() -> { }, errorMessage -> { busyAnimation.stop(); new Popup().warning(Res.get("popup.warning.sendMsgFailed")).show(); diff --git a/desktop/src/main/java/bisq/desktop/main/portfolio/pendingtrades/steps/seller/SellerStep1View.java b/desktop/src/main/java/bisq/desktop/main/portfolio/pendingtrades/steps/seller/SellerStep1View.java index 997ef29242..b02a5801d8 100644 --- a/desktop/src/main/java/bisq/desktop/main/portfolio/pendingtrades/steps/seller/SellerStep1View.java +++ b/desktop/src/main/java/bisq/desktop/main/portfolio/pendingtrades/steps/seller/SellerStep1View.java @@ -35,8 +35,6 @@ public class SellerStep1View extends TradeStepView { @Override protected void onPendingTradesInitialized() { super.onPendingTradesInitialized(); - //validateDepositInputs(); - log.warn("Need to validate fee and/or deposit txs in SellerStep1View for XMR?"); // TODO (woodser): need to validate fee and/or deposit txs in SellerStep1View? checkForUnconfirmedTimeout(); } @@ -71,21 +69,6 @@ public class SellerStep1View extends TradeStepView { protected String getPeriodOverWarnText() { return Res.get("portfolio.pending.step1.openForDispute"); } - - /////////////////////////////////////////////////////////////////////////////////////////// - // Private - /////////////////////////////////////////////////////////////////////////////////////////// - -// // Verify that deposit tx inputs are matching the trade fee txs outputs. -// private void validateDepositInputs() { -// try { -// TradeDataValidation.validateDepositInputs(trade); -// } catch (TradeDataValidation.ValidationException e) { -// if (!model.dataModel.tradeManager.isAllowFaultyDelayedTxs()) { -// new Popup().warning(Res.get("portfolio.pending.invalidTx", e.getMessage())).show(); -// } -// } -// } } diff --git a/desktop/src/main/java/bisq/desktop/main/support/SupportView.java b/desktop/src/main/java/bisq/desktop/main/support/SupportView.java index 953018e613..99dd9f4050 100644 --- a/desktop/src/main/java/bisq/desktop/main/support/SupportView.java +++ b/desktop/src/main/java/bisq/desktop/main/support/SupportView.java @@ -112,11 +112,11 @@ public class SupportView extends ActivatableView { public void initialize() { tradersMediationDisputesTab = new Tab(); tradersMediationDisputesTab.setClosable(false); - root.getTabs().add(tradersMediationDisputesTab); + //root.getTabs().add(tradersMediationDisputesTab); // hidden since mediation and refunds are not used in haveno tradersRefundDisputesTab = new Tab(); tradersRefundDisputesTab.setClosable(false); - root.getTabs().add(tradersRefundDisputesTab); + //root.getTabs().add(tradersRefundDisputesTab); tradersArbitrationDisputesTab = new Tab(); tradersArbitrationDisputesTab.setClosable(false); @@ -126,8 +126,8 @@ public class SupportView extends ActivatableView { updateAgentTabs(); tradersMediationDisputesTab.setText(Res.get("support.tab.mediation.support").toUpperCase()); - tradersRefundDisputesTab.setText(Res.get("support.tab.arbitration.support").toUpperCase()); - tradersArbitrationDisputesTab.setText(Res.get("support.tab.legacyArbitration.support").toUpperCase()); + tradersRefundDisputesTab.setText(Res.get("support.tab.refund.support").toUpperCase()); + tradersArbitrationDisputesTab.setText(Res.get("support.tab.arbitration.support").toUpperCase()); navigationListener = (viewPath, data) -> { if (viewPath.size() == 3 && viewPath.indexOf(SupportView.class) == 1) diff --git a/proto/src/main/proto/grpc.proto b/proto/src/main/proto/grpc.proto index 6cf7454e4b..975253d99f 100644 --- a/proto/src/main/proto/grpc.proto +++ b/proto/src/main/proto/grpc.proto @@ -728,7 +728,7 @@ service Trades { } rpc TakeOffer (TakeOfferRequest) returns (TakeOfferReply) { } - rpc ConfirmPaymentStarted (ConfirmPaymentStartedRequest) returns (ConfirmPaymentStartedReply) { + rpc ConfirmPaymentSent (ConfirmPaymentSentRequest) returns (ConfirmPaymentSentReply) { } rpc ConfirmPaymentReceived (ConfirmPaymentReceivedRequest) returns (ConfirmPaymentReceivedReply) { } @@ -752,11 +752,11 @@ message TakeOfferReply { AvailabilityResultWithDescription failure_reason = 2; } -message ConfirmPaymentStartedRequest { +message ConfirmPaymentSentRequest { string trade_id = 1; } -message ConfirmPaymentStartedReply { +message ConfirmPaymentSentReply { } message ConfirmPaymentReceivedRequest { @@ -835,7 +835,7 @@ message TradeInfo { uint64 seller_security_deposit = 13; string price = 14; string arbitrator_node_address = 15; - string trading_peer_node_address = 16; + string trade_peer_node_address = 16; string state = 17; string phase = 18; string period_state = 19; diff --git a/proto/src/main/proto/pb.proto b/proto/src/main/proto/pb.proto index dbbe3b68f5..21ef33df13 100644 --- a/proto/src/main/proto/pb.proto +++ b/proto/src/main/proto/pb.proto @@ -1697,17 +1697,17 @@ message ProcessModel { int64 funds_needed_for_trade_as_long = 14; bytes my_multi_sig_pub_key = 15; reserved 16; // Not used anymore - string payment_started_message_state = 17; + string payment_sent_message_state = 17; bytes mediated_payout_tx_signature = 18; int64 buyer_payout_amount_from_mediation = 19; int64 seller_payout_amount_from_mediation = 20; bool deposits_confirmed_messages_delivered = 21; string maker_signature = 1001; - TradingPeer maker = 1002; - TradingPeer taker = 1003; - TradingPeer arbitrator = 1004; - NodeAddress temp_trading_peer_node_address = 1005; + TradePeer maker = 1002; + TradePeer taker = 1003; + TradePeer arbitrator = 1004; + NodeAddress temp_trade_peer_node_address = 1005; string multisig_address = 1006; PaymentSentMessage payment_sent_message = 1012; @@ -1715,7 +1715,7 @@ message ProcessModel { DisputeClosedMessage dispute_closed_message = 1014; } -message TradingPeer { +message TradePeer { NodeAddress node_address = 1; PubKeyRing pub_key_ring = 2; string account_id = 3;