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

Fix base currency option handling #2063

Merged
merged 1 commit into from
Dec 5, 2018
Merged
Changes from all commits
Commits
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
8 changes: 6 additions & 2 deletions core/src/main/java/bisq/core/app/BisqExecutable.java
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,11 @@

import static bisq.core.app.BisqEnvironment.DEFAULT_APP_NAME;
import static bisq.core.app.BisqEnvironment.DEFAULT_USER_DATA_DIR;
import static bisq.core.btc.BaseCurrencyNetwork.BTC_MAINNET;
import static bisq.core.btc.BaseCurrencyNetwork.BTC_REGTEST;
import static bisq.core.btc.BaseCurrencyNetwork.BTC_TESTNET;
import static com.google.common.base.Preconditions.checkNotNull;
import static java.lang.String.format;

@Slf4j
public abstract class BisqExecutable implements GracefulShutDownHandler {
Expand Down Expand Up @@ -481,10 +485,10 @@ protected void customizeOptionParsing(OptionParser parser) {

//BtcOptionKeys
parser.accepts(BtcOptionKeys.BASE_CURRENCY_NETWORK,
"Base currency network")
format("Base currency network (default: %s)", BisqEnvironment.getDefaultBaseCurrencyNetwork().name()))
.withRequiredArg()
.ofType(String.class)
.defaultsTo(BisqEnvironment.getDefaultBaseCurrencyNetwork().name());
.describedAs(format("%s|%s|%s", BTC_MAINNET, BTC_TESTNET, BTC_REGTEST));

parser.accepts(BtcOptionKeys.REG_TEST_HOST)
.withRequiredArg()
Expand Down