Print trade info to console after successful trade

This commit is contained in:
ghubstan 2021-03-14 13:40:34 -03:00 committed by Christoph Atteneder
parent 39cda43208
commit e963391a87
No known key found for this signature in database
GPG Key ID: CD5DC1C529CDFD3B
3 changed files with 15 additions and 5 deletions

View File

@ -50,6 +50,10 @@ import static org.junit.jupiter.api.Assertions.fail;
import static protobuf.Offer.State.OFFER_FEE_PAID;
import static protobuf.OpenOffer.State.AVAILABLE;
import bisq.cli.TradeFormat;
@Disabled
@Slf4j
@TestMethodOrder(MethodOrderer.OrderAnnotation.class)
@ -266,9 +270,10 @@ public class TakeBuyBTCOfferTest extends AbstractTradeTest {
verifyExpectedProtocolStatus(trade);
logTrade(log, testInfo, "Alice's view after keeping funds", trade);
BtcBalanceInfo currentBalance = aliceClient.getBtcBalances();
log.info("{} Alice's current available balance: {} BTC",
log.info("{} Alice's current available balance: {} BTC. Last trade:\n{}",
testName(testInfo),
formatSatoshis(currentBalance.getAvailableBalance()));
formatSatoshis(currentBalance.getAvailableBalance()),
TradeFormat.format(aliceClient.getTrade(tradeId)));
} catch (StatusRuntimeException e) {
fail(e);
}

View File

@ -47,6 +47,10 @@ import static org.junit.jupiter.api.Assertions.fail;
import static protobuf.Offer.State.OFFER_FEE_PAID;
import static protobuf.OpenOffer.State.AVAILABLE;
import bisq.cli.TradeFormat;
@Disabled
@Slf4j
@TestMethodOrder(MethodOrderer.OrderAnnotation.class)
@ -263,9 +267,10 @@ public class TakeSellBTCOfferTest extends AbstractTradeTest {
verifyExpectedProtocolStatus(trade);
logTrade(log, testInfo, "Bob's view after withdrawing funds to external wallet", trade);
BtcBalanceInfo currentBalance = bobClient.getBtcBalances();
log.info("{} Bob's current available balance: {} BTC",
log.info("{} Bob's current available balance: {} BTC. Last trade:\n{}",
testName(testInfo),
formatSatoshis(currentBalance.getAvailableBalance()));
formatSatoshis(currentBalance.getAvailableBalance()),
TradeFormat.format(bobClient.getTrade(tradeId)));
} catch (StatusRuntimeException e) {
fail(e);
}

View File

@ -41,7 +41,7 @@ public class LongRunningTradesTest extends AbstractTradeTest {
@Test
@Order(1)
public void testTradeLoop(final TestInfo testInfo) {
public void TradeLoop(final TestInfo testInfo) {
int numTrades = 0;
while (numTrades < 50) {