mirror of
https://github.com/bisq-network/bisq-api-reference.git
synced 2026-01-27 17:43:33 +00:00
Add convenience for lgging combination of copy/paste CLI cmds for peer
This commit is contained in:
parent
dd2619bd3b
commit
dee8e5baa8
@ -552,7 +552,6 @@ public class BotUtils {
|
||||
log.warn(BANNER);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Log a CLI gettrade command for a simulated trading peer.
|
||||
*
|
||||
@ -574,6 +573,23 @@ public class BotUtils {
|
||||
log.warn(BANNER);
|
||||
}
|
||||
|
||||
/**
|
||||
* Log 1 or more CLI commands for a simulated trading peer.
|
||||
* Commands need to be separated by newlines to be legible.
|
||||
*
|
||||
* @param log calling bot's logger
|
||||
* @param description description of CLI commands
|
||||
* @param commands CLI commands separated by newlines.
|
||||
*/
|
||||
public static void printCliCommands(Logger log,
|
||||
String description,
|
||||
String commands) {
|
||||
log.warn(BANNER);
|
||||
log.warn(description);
|
||||
log.warn(commands);
|
||||
log.warn(BANNER);
|
||||
}
|
||||
|
||||
/**
|
||||
* Run a bash script to count down the given number of seconds, printing each character of output from stdout.
|
||||
* <p>
|
||||
|
||||
@ -105,12 +105,11 @@ public class RegtestTradePaymentSimulator extends AbstractBot {
|
||||
closeTrade(tradeId);
|
||||
log.info("You closed the trade here in the bot (mandatory, to move trades to history list).");
|
||||
|
||||
log.warn("##############################################################################");
|
||||
log.warn("Bob closes trade in the CLI (mandatory, to move trades to history list):");
|
||||
String copyPasteCliCommands = "./bisq-cli --password=xyz --port=9999 closetrade --trade-id=" + trade.getTradeId()
|
||||
String cliCommandDescription = "Trading peer inspects and closes trade in the CLI (mandatory, to move trades to history list):";
|
||||
String copyPasteCliCommands = "./bisq-cli --password=xyz --port=9999 gettrade --trade-id=" + trade.getTradeId()
|
||||
+ "\n" + "./bisq-cli --password=xyz --port=9999 closetrade --trade-id=" + trade.getTradeId()
|
||||
+ "\n" + "./bisq-cli --password=xyz --port=9999 gettrades --category=closed";
|
||||
log.warn(copyPasteCliCommands);
|
||||
log.warn("##############################################################################");
|
||||
printCliCommands(log, cliCommandDescription, copyPasteCliCommands);
|
||||
|
||||
log.debug("Closing {}'s gRPC channel.", this.getClass().getSimpleName());
|
||||
super.grpcStubs.close();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user