Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify meaning of API/Offer related % fields [#6] #6065

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
6f1057a
Include unmerged API NPE fix to FeeService class (see PR #6052)
ghubstan Feb 17, 2022
4596960
Prepare API Offers .proto defs for significant changes
ghubstan Feb 17, 2022
ddd3ec3
Fix comment about changing "all" number fields to string
ghubstan Feb 17, 2022
135a42b
Delete deprecated CLI console output formatting classes
ghubstan Feb 17, 2022
461edff
Change OfferInfo proto's 'price' field type to string
ghubstan Feb 17, 2022
3405dbf
Adjust cli module to OfferInfo.price field change to string type
ghubstan Feb 17, 2022
89267e5
Fix typo in comment
ghubstan Feb 17, 2022
1d70b1b
Adjust apitest cases to OfferInfo.price proto field type to string
ghubstan Feb 17, 2022
18888f4
Fix 'unnecessary use of fully qualified name'.
ghubstan Feb 17, 2022
62a0a14
Change existing `uint64 triggerPrice` field type in grpc.proto to `st…
ghubstan Feb 18, 2022
fafe416
Adjust to `string triggerPrice` change in API core classes.
ghubstan Feb 18, 2022
68450c4
Adjust to `string triggerPrice` change in API cli classes
ghubstan Feb 18, 2022
2af3ac2
Adjust to `string triggerPrice` change in API test cases
ghubstan Feb 18, 2022
d42c580
Change OfferInfo proto's volume fields' type to string
ghubstan Feb 18, 2022
2056e26
Adjust cli module to grpc.proto::volume field type change (string)
ghubstan Feb 18, 2022
31c8fbb
Remove some dead code
ghubstan Feb 18, 2022
15f75ee
Add some asserts on volume/min-volume strings from server
ghubstan Feb 18, 2022
1a3622b
Merge branch 'master' into 4-change-grpc-proto-volume-to-string
ghubstan Feb 18, 2022
3b22aee
Change TradeInfo .proto's price & volume fields to string
ghubstan Feb 19, 2022
a0b68bc
Adjust .proto wrappers to price & volume type change
ghubstan Feb 19, 2022
e49ab16
Adjust cli to TradeInfo .proto's price & volume type change
ghubstan Feb 19, 2022
543c573
Adjust apitest cases to TradeInfo .proto's price & volume type change
ghubstan Feb 19, 2022
5cc928a
Disambiguate grpc.proto offer pct literal field names
ghubstan Feb 20, 2022
8408c09
Adjust GrpcOffersService to new .proto *Pct field names
ghubstan Feb 20, 2022
66c04bd
Adjust core.api to new .proto *Pct field names
ghubstan Feb 20, 2022
d2ba39b
Adjust cli module to new .proto *Pct field names
ghubstan Feb 20, 2022
2febe6b
Adjust apitest cases to new .proto *Pct field names
ghubstan Feb 20, 2022
8f93c27
Fix CLI gettrades' Deviation column value format (do nothing)
ghubstan Feb 20, 2022
2330318
Change mktPriceMarginOpt name to mktPriceMarginPctOpt
ghubstan Feb 20, 2022
fade8bc
Show CLI gettrades' Deviation col-value with precision=2 (do something)
ghubstan Feb 20, 2022
5acef13
Delete dead code
ghubstan Feb 20, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions apitest/src/test/java/bisq/apitest/method/MethodTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@
import java.io.IOException;
import java.io.PrintWriter;

import java.math.BigDecimal;

import java.util.function.Function;
import java.util.function.Supplier;
import java.util.stream.Collectors;

import org.slf4j.Logger;
Expand All @@ -42,6 +45,7 @@
import static bisq.apitest.config.ApiTestRateMeterInterceptorConfig.getTestRateMeterInterceptorConfig;
import static bisq.cli.table.builder.TableType.BSQ_BALANCE_TBL;
import static bisq.cli.table.builder.TableType.BTC_BALANCE_TBL;
import static bisq.core.btc.wallet.Restrictions.getDefaultBuyerSecurityDepositAsPercent;
import static java.lang.String.format;
import static java.nio.charset.StandardCharsets.UTF_8;
import static java.util.Arrays.stream;
Expand Down Expand Up @@ -162,6 +166,17 @@ protected final bisq.core.payment.PaymentAccount createPaymentAccount(GrpcClient
return bisq.core.payment.PaymentAccount.fromProto(paymentAccount, CORE_PROTO_RESOLVER);
}

public static final Supplier<Double> defaultBuyerSecurityDepositPct = () -> {
var defaultPct = BigDecimal.valueOf(getDefaultBuyerSecurityDepositAsPercent());
if (defaultPct.precision() != 2)
throw new IllegalStateException(format(
"Unexpected decimal precision, expected 2 but actual is %d%n."
+ "Check for changes to Restrictions.getDefaultBuyerSecurityDepositAsPercent()",
defaultPct.precision()));

return defaultPct.movePointRight(2).doubleValue();
};

public static String formatBalancesTbls(BalancesInfo allBalances) {
StringBuilder balances = new StringBuilder(BTC).append("\n");
balances.append(new TableBuilder(BTC_BALANCE_TBL, allBalances.getBtc()).build());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
import protobuf.PaymentAccount;

import java.math.BigDecimal;
import java.math.MathContext;

import java.util.ArrayList;
import java.util.List;
import java.util.function.BiFunction;
import java.util.function.Function;

import lombok.Setter;
Expand All @@ -44,7 +44,6 @@
import static bisq.apitest.config.BisqAppConfig.bobdaemon;
import static bisq.apitest.config.BisqAppConfig.seednode;
import static bisq.cli.table.builder.TableType.OFFER_TBL;
import static bisq.common.util.MathUtils.exactMultiply;
import static java.lang.String.format;
import static java.lang.System.out;
import static org.junit.jupiter.api.Assertions.assertEquals;
Expand All @@ -62,7 +61,7 @@ public abstract class AbstractOfferTest extends MethodTest {

protected static final int ACTIVATE_OFFER = 1;
protected static final int DEACTIVATE_OFFER = 0;
protected static final long NO_TRIGGER_PRICE = 0;
protected static final String NO_TRIGGER_PRICE = "0";

@Setter
protected static boolean isLongRunningTest;
Expand All @@ -78,57 +77,35 @@ public abstract class AbstractOfferTest extends MethodTest {

@BeforeAll
public static void setUp() {
setUp(false);
}

public static void setUp(boolean startSupportingAppsInDebugMode) {
startSupportingApps(true,
false,
startSupportingAppsInDebugMode,
bitcoind,
seednode,
arbdaemon,
alicedaemon,
bobdaemon);

initSwapPaymentAccounts();
createLegacyBsqPaymentAccounts();
}

// Mkt Price Margin value of offer returned from server is scaled down by 10^-2.
protected final Function<Double, Double> scaledDownMktPriceMargin = (mktPriceMargin) ->
exactMultiply(mktPriceMargin, 0.01);

// Price value of fiat offer returned from server will be scaled up by 10^4.
protected final Function<BigDecimal, Long> scaledUpFiatOfferPrice = (price) -> {
BigDecimal factor = new BigDecimal(10).pow(4);
return price.multiply(factor).longValue();
};

// Price value of altcoin offer returned from server will be scaled up by 10^8.
protected final Function<String, Long> scaledUpAltcoinOfferPrice = (altcoinPriceAsString) -> {
BigDecimal factor = new BigDecimal(10).pow(8);
BigDecimal priceAsBigDecimal = new BigDecimal(altcoinPriceAsString);
return priceAsBigDecimal.multiply(factor).longValue();
};

protected final BiFunction<Double, Double, Long> calcFiatTriggerPriceAsLong = (base, delta) -> {
var priceAsDouble = new BigDecimal(base).add(new BigDecimal(delta)).doubleValue();
return Double.valueOf(exactMultiply(priceAsDouble, 10_000)).longValue();
};

protected final BiFunction<Double, Double, Long> calcAltcoinTriggerPriceAsLong = (base, delta) -> {
var priceAsDouble = new BigDecimal(base).add(new BigDecimal(delta)).doubleValue();
return Double.valueOf(exactMultiply(priceAsDouble, 100_000_000)).longValue();
};

protected final BiFunction<Double, Double, String> calcPriceAsString = (base, delta) -> {
var priceAsBigDecimal = new BigDecimal(Double.toString(base))
.add(new BigDecimal(Double.toString(delta)));
return priceAsBigDecimal.toPlainString();
};

protected final Function<OfferInfo, String> toOfferTable = (offer) ->
protected static final Function<OfferInfo, String> toOfferTable = (offer) ->
new TableBuilder(OFFER_TBL, offer).build().toString();

protected final Function<List<OfferInfo>, String> toOffersTable = (offers) ->
protected static final Function<List<OfferInfo>, String> toOffersTable = (offers) ->
new TableBuilder(OFFER_TBL, offers).build().toString();

protected static String calcPriceAsString(double base, double delta, int precision) {
var mathContext = new MathContext(precision);
var priceAsBigDecimal = new BigDecimal(Double.toString(base), mathContext)
.add(new BigDecimal(Double.toString(delta), mathContext))
.round(mathContext);
return format("%." + precision + "f", priceAsBigDecimal.doubleValue());
}

protected OfferInfo getAvailableBsqSwapOffer(GrpcClient client,
OfferDirection direction,
boolean checkForLoggedExceptions) {
Expand Down Expand Up @@ -183,12 +160,12 @@ public static void createXmrPaymentAccounts() {
XMR,
"44G4jWmSvTEfifSUZzTDnJVLPvYATmq9XhhtDqUof1BGCLceG82EQsVYG9Q9GN4bJcjbAJEc1JD1m5G7iK4UPZqACubV4Mq",
false);
log.debug("Alices XMR Account: {}", alicesXmrAcct);
log.trace("Alices XMR Account: {}", alicesXmrAcct);
bobsXmrAcct = bobClient.createCryptoCurrencyPaymentAccount("Bob's XMR Account",
XMR,
"4BDRhdSBKZqAXs3PuNTbMtaXBNqFj5idC2yMVnQj8Rm61AyKY8AxLTt9vGRJ8pwcG4EtpyD8YpGqdZWCZ2VZj6yVBN2RVKs",
false);
log.debug("Bob's XMR Account: {}", bobsXmrAcct);
log.trace("Bob's XMR Account: {}", bobsXmrAcct);
}

@AfterAll
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,13 +113,15 @@ private void createBsqSwapOffer() {
1_000_000L,
1_000_000L,
"0.00005");
log.debug("BsqSwap Sell BSQ (Buy BTC) OFFER:\n{}", bsqSwapOffer);
log.debug("BsqSwap SELL BSQ (BUY BTC) Offer:\n{}", toOfferTable.apply(bsqSwapOffer));
var newOfferId = bsqSwapOffer.getId();
assertNotEquals("", newOfferId);
assertEquals(BUY.name(), bsqSwapOffer.getDirection());
assertEquals(5_000, bsqSwapOffer.getPrice());
assertEquals("0.00005000", bsqSwapOffer.getPrice());
assertEquals(1_000_000L, bsqSwapOffer.getAmount());
assertEquals(1_000_000L, bsqSwapOffer.getMinAmount());
assertEquals("200.00", bsqSwapOffer.getVolume());
assertEquals("200.00", bsqSwapOffer.getMinVolume());
assertEquals(BSQ, bsqSwapOffer.getBaseCurrencyCode());
assertEquals(BTC, bsqSwapOffer.getCounterCurrencyCode());

Expand All @@ -142,7 +144,7 @@ private void testGetMyBsqSwapOffer(OfferInfo bsqSwapOffer) {
if (numFetchAttempts >= 9)
fail(format("Alice giving up on fetching her (my) bsq swap offer after %d attempts.", numFetchAttempts), ex);

sleep(1000);
sleep(1500);
}
}
}
Expand All @@ -162,7 +164,7 @@ private void testGetBsqSwapOffer(OfferInfo bsqSwapOffer) {
if (numFetchAttempts > 9)
fail(format("Bob gave up on fetching available bsq swap offer after %d attempts.", numFetchAttempts), ex);

sleep(1000);
sleep(1500);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
import org.junit.jupiter.api.TestMethodOrder;

import static bisq.apitest.config.ApiTestConfig.BSQ;
import static bisq.core.btc.wallet.Restrictions.getDefaultBuyerSecurityDepositAsPercent;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static protobuf.OfferDirection.BUY;

Expand All @@ -52,7 +51,7 @@ public class CancelOfferTest extends AbstractOfferTest {
10000000L,
10000000L,
0.00,
getDefaultBuyerSecurityDepositAsPercent(),
defaultBuyerSecurityDepositPct.get(),
paymentAccountId,
BSQ,
NO_TRIGGER_PRICE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@

import static bisq.apitest.config.ApiTestConfig.BSQ;
import static bisq.apitest.config.ApiTestConfig.BTC;
import static bisq.core.btc.wallet.Restrictions.getDefaultBuyerSecurityDepositAsPercent;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertNotEquals;
Expand Down Expand Up @@ -63,20 +62,22 @@ public void testCreateBuy1BTCFor20KBSQOffer() {
100_000_000L,
100_000_000L,
"0.00005", // FIXED PRICE IN BTC (satoshis) FOR 1 BSQ
getDefaultBuyerSecurityDepositAsPercent(),
defaultBuyerSecurityDepositPct.get(),
alicesLegacyBsqAcct.getId(),
MAKER_FEE_CURRENCY_CODE);
log.debug("Sell BSQ (Buy BTC) OFFER:\n{}", toOfferTable.apply(newOffer));
log.debug("Sell BSQ (Buy BTC) Offer:\n{}", toOfferTable.apply(newOffer));
assertTrue(newOffer.getIsMyOffer());
assertTrue(newOffer.getIsMyPendingOffer());

String newOfferId = newOffer.getId();
assertNotEquals("", newOfferId);
assertEquals(BUY.name(), newOffer.getDirection());
assertFalse(newOffer.getUseMarketBasedPrice());
assertEquals(5_000, newOffer.getPrice());
assertEquals("0.00005000", newOffer.getPrice());
assertEquals(100_000_000L, newOffer.getAmount());
assertEquals(100_000_000L, newOffer.getMinAmount());
assertEquals("20000.00", newOffer.getVolume());
assertEquals("20000.00", newOffer.getMinVolume());
assertEquals(15_000_000, newOffer.getBuyerSecurityDeposit());
assertEquals(alicesLegacyBsqAcct.getId(), newOffer.getPaymentAccountId());
assertEquals(BSQ, newOffer.getBaseCurrencyCode());
Expand All @@ -91,9 +92,11 @@ public void testCreateBuy1BTCFor20KBSQOffer() {
assertEquals(newOfferId, newOffer.getId());
assertEquals(BUY.name(), newOffer.getDirection());
assertFalse(newOffer.getUseMarketBasedPrice());
assertEquals(5_000, newOffer.getPrice());
assertEquals("0.00005000", newOffer.getPrice());
assertEquals(100_000_000L, newOffer.getAmount());
assertEquals(100_000_000L, newOffer.getMinAmount());
assertEquals("20000.00", newOffer.getVolume());
assertEquals("20000.00", newOffer.getMinVolume());
assertEquals(15_000_000, newOffer.getBuyerSecurityDeposit());
assertEquals(alicesLegacyBsqAcct.getId(), newOffer.getPaymentAccountId());
assertEquals(BSQ, newOffer.getBaseCurrencyCode());
Expand All @@ -110,20 +113,22 @@ public void testCreateSell1BTCFor20KBSQOffer() {
100_000_000L,
100_000_000L,
"0.00005", // FIXED PRICE IN BTC (satoshis) FOR 1 BSQ
getDefaultBuyerSecurityDepositAsPercent(),
defaultBuyerSecurityDepositPct.get(),
alicesLegacyBsqAcct.getId(),
MAKER_FEE_CURRENCY_CODE);
log.debug("SELL 20K BSQ OFFER:\n{}", toOfferTable.apply(newOffer));
log.debug("SELL 20K BSQ Offer:\n{}", toOfferTable.apply(newOffer));
assertTrue(newOffer.getIsMyOffer());
assertTrue(newOffer.getIsMyPendingOffer());

String newOfferId = newOffer.getId();
assertNotEquals("", newOfferId);
assertEquals(SELL.name(), newOffer.getDirection());
assertFalse(newOffer.getUseMarketBasedPrice());
assertEquals(5_000, newOffer.getPrice());
assertEquals("0.00005000", newOffer.getPrice());
assertEquals(100_000_000L, newOffer.getAmount());
assertEquals(100_000_000L, newOffer.getMinAmount());
assertEquals("20000.00", newOffer.getVolume());
assertEquals("20000.00", newOffer.getMinVolume());
assertEquals(15_000_000, newOffer.getBuyerSecurityDeposit());
assertEquals(alicesLegacyBsqAcct.getId(), newOffer.getPaymentAccountId());
assertEquals(BSQ, newOffer.getBaseCurrencyCode());
Expand All @@ -138,9 +143,11 @@ public void testCreateSell1BTCFor20KBSQOffer() {
assertEquals(newOfferId, newOffer.getId());
assertEquals(SELL.name(), newOffer.getDirection());
assertFalse(newOffer.getUseMarketBasedPrice());
assertEquals(5_000, newOffer.getPrice());
assertEquals("0.00005000", newOffer.getPrice());
assertEquals(100_000_000L, newOffer.getAmount());
assertEquals(100_000_000L, newOffer.getMinAmount());
assertEquals("20000.00", newOffer.getVolume());
assertEquals("20000.00", newOffer.getMinVolume());
assertEquals(15_000_000, newOffer.getBuyerSecurityDeposit());
assertEquals(alicesLegacyBsqAcct.getId(), newOffer.getPaymentAccountId());
assertEquals(BSQ, newOffer.getBaseCurrencyCode());
Expand All @@ -157,20 +164,22 @@ public void testCreateBuyBTCWith1To2KBSQOffer() {
10_000_000L,
5_000_000L,
"0.00005", // FIXED PRICE IN BTC sats FOR 1 BSQ
getDefaultBuyerSecurityDepositAsPercent(),
defaultBuyerSecurityDepositPct.get(),
alicesLegacyBsqAcct.getId(),
MAKER_FEE_CURRENCY_CODE);
log.debug("BUY 1-2K BSQ OFFER:\n{}", toOfferTable.apply(newOffer));
log.debug("BUY 1-2K BSQ Offer:\n{}", toOfferTable.apply(newOffer));
assertTrue(newOffer.getIsMyOffer());
assertTrue(newOffer.getIsMyPendingOffer());

String newOfferId = newOffer.getId();
assertNotEquals("", newOfferId);
assertEquals(BUY.name(), newOffer.getDirection());
assertFalse(newOffer.getUseMarketBasedPrice());
assertEquals(5_000, newOffer.getPrice());
assertEquals("0.00005000", newOffer.getPrice());
assertEquals(10_000_000L, newOffer.getAmount());
assertEquals(5_000_000L, newOffer.getMinAmount());
assertEquals("2000.00", newOffer.getVolume());
assertEquals("1000.00", newOffer.getMinVolume());
assertEquals(1_500_000, newOffer.getBuyerSecurityDeposit());
assertEquals(alicesLegacyBsqAcct.getId(), newOffer.getPaymentAccountId());
assertEquals(BSQ, newOffer.getBaseCurrencyCode());
Expand All @@ -185,9 +194,11 @@ public void testCreateBuyBTCWith1To2KBSQOffer() {
assertEquals(newOfferId, newOffer.getId());
assertEquals(BUY.name(), newOffer.getDirection());
assertFalse(newOffer.getUseMarketBasedPrice());
assertEquals(5_000, newOffer.getPrice());
assertEquals("0.00005000", newOffer.getPrice());
assertEquals(10_000_000L, newOffer.getAmount());
assertEquals(5_000_000L, newOffer.getMinAmount());
assertEquals("2000.00", newOffer.getVolume());
assertEquals("1000.00", newOffer.getMinVolume());
assertEquals(1_500_000, newOffer.getBuyerSecurityDeposit());
assertEquals(alicesLegacyBsqAcct.getId(), newOffer.getPaymentAccountId());
assertEquals(BSQ, newOffer.getBaseCurrencyCode());
Expand All @@ -204,20 +215,22 @@ public void testCreateSellBTCFor5To10KBSQOffer() {
50_000_000L,
25_000_000L,
"0.00005", // FIXED PRICE IN BTC sats FOR 1 BSQ
getDefaultBuyerSecurityDepositAsPercent(),
defaultBuyerSecurityDepositPct.get(),
alicesLegacyBsqAcct.getId(),
MAKER_FEE_CURRENCY_CODE);
log.debug("SELL 5-10K BSQ OFFER:\n{}", toOfferTable.apply(newOffer));
log.debug("SELL 5-10K BSQ Offer:\n{}", toOfferTable.apply(newOffer));
assertTrue(newOffer.getIsMyOffer());
assertTrue(newOffer.getIsMyPendingOffer());

String newOfferId = newOffer.getId();
assertNotEquals("", newOfferId);
assertEquals(SELL.name(), newOffer.getDirection());
assertFalse(newOffer.getUseMarketBasedPrice());
assertEquals(5_000, newOffer.getPrice());
assertEquals("0.00005000", newOffer.getPrice());
assertEquals(50_000_000L, newOffer.getAmount());
assertEquals(25_000_000L, newOffer.getMinAmount());
assertEquals("10000.00", newOffer.getVolume());
assertEquals("5000.00", newOffer.getMinVolume());
assertEquals(7_500_000, newOffer.getBuyerSecurityDeposit());
assertEquals(alicesLegacyBsqAcct.getId(), newOffer.getPaymentAccountId());
assertEquals(BSQ, newOffer.getBaseCurrencyCode());
Expand All @@ -232,9 +245,11 @@ public void testCreateSellBTCFor5To10KBSQOffer() {
assertEquals(newOfferId, newOffer.getId());
assertEquals(SELL.name(), newOffer.getDirection());
assertFalse(newOffer.getUseMarketBasedPrice());
assertEquals(5_000, newOffer.getPrice());
assertEquals("0.00005000", newOffer.getPrice());
assertEquals(50_000_000L, newOffer.getAmount());
assertEquals(25_000_000L, newOffer.getMinAmount());
assertEquals("10000.00", newOffer.getVolume());
assertEquals("5000.00", newOffer.getMinVolume());
assertEquals(7_500_000, newOffer.getBuyerSecurityDeposit());
assertEquals(alicesLegacyBsqAcct.getId(), newOffer.getPaymentAccountId());
assertEquals(BSQ, newOffer.getBaseCurrencyCode());
Expand All @@ -246,7 +261,7 @@ public void testCreateSellBTCFor5To10KBSQOffer() {
@Order(5)
public void testGetAllMyBsqOffers() {
List<OfferInfo> offers = aliceClient.getMyCryptoCurrencyOffersSortedByDate(BSQ);
log.debug("ALL ALICE'S BSQ OFFERS:\n{}", toOffersTable.apply(offers));
log.debug("All Alice's BSQ Offers:\n{}", toOffersTable.apply(offers));
assertEquals(4, offers.size());
log.debug("ALICE'S BALANCES\n{}", formatBalancesTbls(aliceClient.getBalances()));
}
Expand All @@ -255,7 +270,7 @@ public void testGetAllMyBsqOffers() {
@Order(6)
public void testGetAvailableBsqOffers() {
List<OfferInfo> offers = bobClient.getCryptoCurrencyOffersSortedByDate(BSQ);
log.debug("ALL BOB'S AVAILABLE BSQ OFFERS:\n{}", toOffersTable.apply(offers));
log.debug("All Bob's Available BSQ Offers:\n{}", toOffersTable.apply(offers));
assertEquals(4, offers.size());
log.debug("BOB'S BALANCES\n{}", formatBalancesTbls(bobClient.getBalances()));
}
Expand All @@ -264,6 +279,6 @@ private void genBtcBlockAndWaitForOfferPreparation() {
// Extra time is needed for the OfferUtils#isBsqForMakerFeeAvailable, which
// can sometimes return an incorrect false value if the BsqWallet's
// available confirmed balance is temporarily = zero during BSQ offer prep.
genBtcBlocksThenWait(1, 5000);
genBtcBlocksThenWait(1, 5_000);
}
}
Loading