rename all packages and other names from bisq to haveno

This commit is contained in:
woodser 2023-03-06 19:14:00 -05:00
parent ab0b9e3b77
commit 1a1fb130c0
1775 changed files with 14575 additions and 16767 deletions

View file

@ -15,11 +15,34 @@
* along with Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.cli;
import bisq.proto.grpc.OfferInfo;
import bisq.proto.grpc.TradeInfo;
package haveno.cli;
import haveno.proto.grpc.OfferInfo;
import haveno.proto.grpc.TradeInfo;
import haveno.cli.opts.ArgumentList;
import haveno.cli.opts.CancelOfferOptionParser;
import haveno.cli.opts.CreateCryptoCurrencyPaymentAcctOptionParser;
import haveno.cli.opts.CreateOfferOptionParser;
import haveno.cli.opts.CreatePaymentAcctOptionParser;
import haveno.cli.opts.GetAddressBalanceOptionParser;
import haveno.cli.opts.GetBTCMarketPriceOptionParser;
import haveno.cli.opts.GetBalanceOptionParser;
import haveno.cli.opts.GetOffersOptionParser;
import haveno.cli.opts.GetPaymentAcctFormOptionParser;
import haveno.cli.opts.GetTradeOptionParser;
import haveno.cli.opts.GetTradesOptionParser;
import haveno.cli.opts.GetTransactionOptionParser;
import haveno.cli.opts.OfferIdOptionParser;
import haveno.cli.opts.RegisterDisputeAgentOptionParser;
import haveno.cli.opts.RemoveWalletPasswordOptionParser;
import haveno.cli.opts.SendBtcOptionParser;
import haveno.cli.opts.SetTxFeeRateOptionParser;
import haveno.cli.opts.SetWalletPasswordOptionParser;
import haveno.cli.opts.SimpleMethodOptionParser;
import haveno.cli.opts.TakeOfferOptionParser;
import haveno.cli.opts.UnlockWalletOptionParser;
import haveno.cli.opts.WithdrawFundsOptionParser;
import haveno.cli.table.builder.TableBuilder;
import io.grpc.StatusRuntimeException;
import joptsimple.OptionParser;
@ -40,47 +63,20 @@ import java.util.List;
import lombok.extern.slf4j.Slf4j;
import static bisq.cli.CurrencyFormat.formatInternalFiatPrice;
import static bisq.cli.CurrencyFormat.toSatoshis;
import static bisq.cli.Method.*;
import static bisq.cli.opts.OptLabel.*;
import static bisq.cli.table.builder.TableType.*;
import static bisq.proto.grpc.GetTradesRequest.Category.CLOSED;
import static bisq.proto.grpc.GetTradesRequest.Category.OPEN;
import static haveno.proto.grpc.GetTradesRequest.Category.CLOSED;
import static haveno.proto.grpc.GetTradesRequest.Category.OPEN;
import static haveno.cli.CurrencyFormat.formatInternalFiatPrice;
import static haveno.cli.CurrencyFormat.toSatoshis;
import static haveno.cli.Method.*;
import static haveno.cli.opts.OptLabel.*;
import static haveno.cli.table.builder.TableType.*;
import static java.lang.String.format;
import static java.lang.System.err;
import static java.lang.System.exit;
import static java.lang.System.out;
import bisq.cli.opts.ArgumentList;
import bisq.cli.opts.CancelOfferOptionParser;
import bisq.cli.opts.CreateCryptoCurrencyPaymentAcctOptionParser;
import bisq.cli.opts.CreateOfferOptionParser;
import bisq.cli.opts.CreatePaymentAcctOptionParser;
import bisq.cli.opts.GetAddressBalanceOptionParser;
import bisq.cli.opts.GetBTCMarketPriceOptionParser;
import bisq.cli.opts.GetBalanceOptionParser;
import bisq.cli.opts.GetOffersOptionParser;
import bisq.cli.opts.GetPaymentAcctFormOptionParser;
import bisq.cli.opts.GetTradeOptionParser;
import bisq.cli.opts.GetTradesOptionParser;
import bisq.cli.opts.GetTransactionOptionParser;
import bisq.cli.opts.OfferIdOptionParser;
import bisq.cli.opts.RegisterDisputeAgentOptionParser;
import bisq.cli.opts.RemoveWalletPasswordOptionParser;
import bisq.cli.opts.SendBtcOptionParser;
import bisq.cli.opts.SetTxFeeRateOptionParser;
import bisq.cli.opts.SetWalletPasswordOptionParser;
import bisq.cli.opts.SimpleMethodOptionParser;
import bisq.cli.opts.TakeOfferOptionParser;
import bisq.cli.opts.UnlockWalletOptionParser;
import bisq.cli.opts.WithdrawFundsOptionParser;
import bisq.cli.table.builder.TableBuilder;
/**
* A command-line client for the Bisq gRPC API.
* A command-line client for the Haveno gRPC API.
*/
@Slf4j
public class CliMain {
@ -627,9 +623,9 @@ public class CliMain {
private static void printHelp(OptionParser parser, @SuppressWarnings("SameParameterValue") PrintStream stream) {
try {
stream.println("Bisq RPC Client");
stream.println("Haveno RPC Client");
stream.println();
stream.println("Usage: bisq-cli [options] <method> [params]");
stream.println("Usage: haveno-cli [options] <method> [params]");
stream.println();
parser.printHelpOn(stream);
stream.println();
@ -738,7 +734,7 @@ public class CliMain {
stream.println();
stream.format(rowFormat, stop.name(), "", "Shut down the server");
stream.println();
stream.println("Method Help Usage: bisq-cli [options] <method> --help");
stream.println("Method Help Usage: haveno-cli [options] <method> --help");
stream.println();
} catch (IOException ex) {
ex.printStackTrace(stream);

View file

@ -15,7 +15,7 @@
* along with Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.cli;
package haveno.cli;
import static com.google.common.base.Strings.padEnd;
import static com.google.common.base.Strings.padStart;

View file

@ -15,7 +15,7 @@
* along with Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.cli;
package haveno.cli;
import java.util.ArrayList;
import java.util.List;

View file

@ -15,7 +15,7 @@
* along with Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.cli;
package haveno.cli;
import com.google.common.annotations.VisibleForTesting;

View file

@ -15,14 +15,14 @@
* along with Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.cli;
package haveno.cli;
import bisq.proto.grpc.OfferInfo;
import haveno.proto.grpc.OfferInfo;
import java.util.List;
import java.util.function.Function;
import static bisq.cli.ColumnHeaderConstants.COL_HEADER_DIRECTION;
import static haveno.cli.ColumnHeaderConstants.COL_HEADER_DIRECTION;
import static java.lang.String.format;
import static protobuf.OfferDirection.BUY;
import static protobuf.OfferDirection.SELL;

View file

@ -15,19 +15,22 @@
* along with Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.cli;
import bisq.proto.grpc.AddressBalanceInfo;
import bisq.proto.grpc.BalancesInfo;
import bisq.proto.grpc.BtcBalanceInfo;
import bisq.proto.grpc.GetMethodHelpRequest;
import bisq.proto.grpc.GetTradesRequest;
import bisq.proto.grpc.GetVersionRequest;
import bisq.proto.grpc.OfferInfo;
import bisq.proto.grpc.RegisterDisputeAgentRequest;
import bisq.proto.grpc.StopRequest;
import bisq.proto.grpc.TradeInfo;
package haveno.cli;
import haveno.proto.grpc.AddressBalanceInfo;
import haveno.proto.grpc.BalancesInfo;
import haveno.proto.grpc.BtcBalanceInfo;
import haveno.proto.grpc.GetMethodHelpRequest;
import haveno.proto.grpc.GetTradesRequest;
import haveno.proto.grpc.GetVersionRequest;
import haveno.proto.grpc.OfferInfo;
import haveno.proto.grpc.RegisterDisputeAgentRequest;
import haveno.proto.grpc.StopRequest;
import haveno.proto.grpc.TradeInfo;
import haveno.cli.request.OffersServiceRequest;
import haveno.cli.request.PaymentAccountsServiceRequest;
import haveno.cli.request.TradesServiceRequest;
import haveno.cli.request.WalletsServiceRequest;
import protobuf.PaymentAccount;
import protobuf.PaymentAccountForm;
import protobuf.PaymentMethod;
@ -37,12 +40,6 @@ import java.util.List;
import lombok.extern.slf4j.Slf4j;
import bisq.cli.request.OffersServiceRequest;
import bisq.cli.request.PaymentAccountsServiceRequest;
import bisq.cli.request.TradesServiceRequest;
import bisq.cli.request.WalletsServiceRequest;
@SuppressWarnings("ResultOfMethodCallIgnored")
@Slf4j
public final class GrpcClient {

View file

@ -15,17 +15,17 @@
* along with Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.cli;
package haveno.cli;
import bisq.proto.grpc.DisputeAgentsGrpc;
import bisq.proto.grpc.GetVersionGrpc;
import bisq.proto.grpc.HelpGrpc;
import bisq.proto.grpc.OffersGrpc;
import bisq.proto.grpc.PaymentAccountsGrpc;
import bisq.proto.grpc.PriceGrpc;
import bisq.proto.grpc.ShutdownServerGrpc;
import bisq.proto.grpc.TradesGrpc;
import bisq.proto.grpc.WalletsGrpc;
import haveno.proto.grpc.DisputeAgentsGrpc;
import haveno.proto.grpc.GetVersionGrpc;
import haveno.proto.grpc.HelpGrpc;
import haveno.proto.grpc.OffersGrpc;
import haveno.proto.grpc.PaymentAccountsGrpc;
import haveno.proto.grpc.PriceGrpc;
import haveno.proto.grpc.ShutdownServerGrpc;
import haveno.proto.grpc.TradesGrpc;
import haveno.proto.grpc.WalletsGrpc;
import io.grpc.CallCredentials;
import io.grpc.ManagedChannelBuilder;

View file

@ -15,7 +15,7 @@
* along with Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.cli;
package haveno.cli;
/**
* Currently supported api methods.

View file

@ -15,7 +15,7 @@
* along with Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.cli;
package haveno.cli;
import io.grpc.CallCredentials;
import io.grpc.Metadata;

View file

@ -15,7 +15,7 @@
* along with Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.cli;
package haveno.cli;
import com.google.common.annotations.VisibleForTesting;

View file

@ -15,7 +15,7 @@
* along with Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.cli.opts;
package haveno.cli.opts;
import joptsimple.OptionException;
import joptsimple.OptionParser;
@ -28,7 +28,7 @@ import java.util.function.Predicate;
import lombok.Getter;
import static bisq.cli.opts.OptLabel.OPT_HELP;
import static haveno.cli.opts.OptLabel.OPT_HELP;
import static java.lang.String.format;
@SuppressWarnings("unchecked")

View file

@ -15,7 +15,7 @@
* along with Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.cli.opts;
package haveno.cli.opts;
import java.util.ArrayList;
import java.util.List;

View file

@ -15,7 +15,7 @@
* along with Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.cli.opts;
package haveno.cli.opts;
public class CancelOfferOptionParser extends OfferIdOptionParser implements MethodOpts {

View file

@ -15,16 +15,16 @@
* along with Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.cli.opts;
package haveno.cli.opts;
import joptsimple.OptionSpec;
import static bisq.cli.CryptoCurrencyUtil.apiDoesSupportCryptoCurrency;
import static bisq.cli.opts.OptLabel.OPT_ACCOUNT_NAME;
import static bisq.cli.opts.OptLabel.OPT_ADDRESS;
import static bisq.cli.opts.OptLabel.OPT_CURRENCY_CODE;
import static bisq.cli.opts.OptLabel.OPT_TRADE_INSTANT;
import static haveno.cli.CryptoCurrencyUtil.apiDoesSupportCryptoCurrency;
import static haveno.cli.opts.OptLabel.OPT_ACCOUNT_NAME;
import static haveno.cli.opts.OptLabel.OPT_ADDRESS;
import static haveno.cli.opts.OptLabel.OPT_CURRENCY_CODE;
import static haveno.cli.opts.OptLabel.OPT_TRADE_INSTANT;
import static java.lang.String.format;
public class CreateCryptoCurrencyPaymentAcctOptionParser extends AbstractMethodOptionParser implements MethodOpts {

View file

@ -15,12 +15,12 @@
* along with Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.cli.opts;
package haveno.cli.opts;
import joptsimple.OptionSpec;
import static bisq.cli.opts.OptLabel.*;
import static haveno.cli.opts.OptLabel.*;
import static joptsimple.internal.Strings.EMPTY;
public class CreateOfferOptionParser extends AbstractMethodOptionParser implements MethodOpts {

View file

@ -15,7 +15,7 @@
* along with Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.cli.opts;
package haveno.cli.opts;
import joptsimple.OptionSpec;
@ -23,7 +23,7 @@ import joptsimple.OptionSpec;
import java.nio.file.Path;
import java.nio.file.Paths;
import static bisq.cli.opts.OptLabel.OPT_PAYMENT_ACCOUNT_FORM;
import static haveno.cli.opts.OptLabel.OPT_PAYMENT_ACCOUNT_FORM;
import static java.lang.String.format;
public class CreatePaymentAcctOptionParser extends AbstractMethodOptionParser implements MethodOpts {

View file

@ -15,13 +15,13 @@
* along with Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.cli.opts;
package haveno.cli.opts;
import static haveno.cli.opts.OptLabel.OPT_ADDRESS;
import joptsimple.OptionSpec;
import static bisq.cli.opts.OptLabel.OPT_ADDRESS;
public class GetAddressBalanceOptionParser extends AbstractMethodOptionParser implements MethodOpts {
final OptionSpec<String> addressOpt = parser.accepts(OPT_ADDRESS, "wallet btc address")

View file

@ -15,13 +15,13 @@
* along with Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.cli.opts;
package haveno.cli.opts;
import static haveno.cli.opts.OptLabel.OPT_CURRENCY_CODE;
import joptsimple.OptionSpec;
import static bisq.cli.opts.OptLabel.OPT_CURRENCY_CODE;
public class GetBTCMarketPriceOptionParser extends AbstractMethodOptionParser implements MethodOpts {
final OptionSpec<String> currencyCodeOpt = parser.accepts(OPT_CURRENCY_CODE, "currency-code")

View file

@ -15,12 +15,12 @@
* along with Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.cli.opts;
package haveno.cli.opts;
import joptsimple.OptionSpec;
import static bisq.cli.opts.OptLabel.OPT_CURRENCY_CODE;
import static haveno.cli.opts.OptLabel.OPT_CURRENCY_CODE;
import static joptsimple.internal.Strings.EMPTY;
public class GetBalanceOptionParser extends AbstractMethodOptionParser implements MethodOpts {

View file

@ -15,13 +15,13 @@
* along with Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.cli.opts;
package haveno.cli.opts;
import static haveno.cli.opts.OptLabel.OPT_OFFER_ID;
import joptsimple.OptionSpec;
import static bisq.cli.opts.OptLabel.OPT_OFFER_ID;
public class GetOfferOptionParser extends AbstractMethodOptionParser implements MethodOpts {
final OptionSpec<String> offerIdOpt = parser.accepts(OPT_OFFER_ID, "id of offer to get")

View file

@ -15,14 +15,14 @@
* along with Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.cli.opts;
package haveno.cli.opts;
import static haveno.cli.opts.OptLabel.OPT_CURRENCY_CODE;
import static haveno.cli.opts.OptLabel.OPT_DIRECTION;
import joptsimple.OptionSpec;
import static bisq.cli.opts.OptLabel.OPT_CURRENCY_CODE;
import static bisq.cli.opts.OptLabel.OPT_DIRECTION;
public class GetOffersOptionParser extends AbstractMethodOptionParser implements MethodOpts {
final OptionSpec<String> directionOpt = parser.accepts(OPT_DIRECTION, "offer direction (buy|sell)")

View file

@ -15,13 +15,13 @@
* along with Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.cli.opts;
package haveno.cli.opts;
import static haveno.cli.opts.OptLabel.OPT_PAYMENT_METHOD_ID;
import joptsimple.OptionSpec;
import static bisq.cli.opts.OptLabel.OPT_PAYMENT_METHOD_ID;
public class GetPaymentAcctFormOptionParser extends AbstractMethodOptionParser implements MethodOpts {
final OptionSpec<String> paymentMethodIdOpt = parser.accepts(OPT_PAYMENT_METHOD_ID,

View file

@ -15,14 +15,14 @@
* along with Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.cli.opts;
package haveno.cli.opts;
import static haveno.cli.opts.OptLabel.OPT_SHOW_CONTRACT;
import static haveno.cli.opts.OptLabel.OPT_TRADE_ID;
import joptsimple.OptionSpec;
import static bisq.cli.opts.OptLabel.OPT_SHOW_CONTRACT;
import static bisq.cli.opts.OptLabel.OPT_TRADE_ID;
public class GetTradeOptionParser extends AbstractMethodOptionParser implements MethodOpts {
final OptionSpec<String> tradeIdOpt = parser.accepts(OPT_TRADE_ID, "id of trade")

View file

@ -15,19 +15,19 @@
* along with Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.cli.opts;
package haveno.cli.opts;
import bisq.proto.grpc.GetTradesRequest;
import haveno.proto.grpc.GetTradesRequest;
import joptsimple.OptionSpec;
import java.util.function.Predicate;
import static bisq.cli.opts.OptLabel.OPT_CATEGORY;
import static bisq.proto.grpc.GetTradesRequest.Category.CLOSED;
import static bisq.proto.grpc.GetTradesRequest.Category.FAILED;
import static bisq.proto.grpc.GetTradesRequest.Category.OPEN;
import static haveno.proto.grpc.GetTradesRequest.Category.CLOSED;
import static haveno.proto.grpc.GetTradesRequest.Category.FAILED;
import static haveno.proto.grpc.GetTradesRequest.Category.OPEN;
import static haveno.cli.opts.OptLabel.OPT_CATEGORY;
import static java.util.Arrays.stream;
public class GetTradesOptionParser extends AbstractMethodOptionParser implements MethodOpts {

View file

@ -15,13 +15,13 @@
* along with Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.cli.opts;
package haveno.cli.opts;
import static haveno.cli.opts.OptLabel.OPT_TRANSACTION_ID;
import joptsimple.OptionSpec;
import static bisq.cli.opts.OptLabel.OPT_TRANSACTION_ID;
public class GetTransactionOptionParser extends AbstractMethodOptionParser implements MethodOpts {
final OptionSpec<String> txIdOpt = parser.accepts(OPT_TRANSACTION_ID, "id of transaction")

View file

@ -15,7 +15,7 @@
* along with Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.cli.opts;
package haveno.cli.opts;
public interface MethodOpts {

View file

@ -15,13 +15,13 @@
* along with Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.cli.opts;
package haveno.cli.opts;
import static haveno.cli.opts.OptLabel.OPT_OFFER_ID;
import joptsimple.OptionSpec;
import static bisq.cli.opts.OptLabel.OPT_OFFER_ID;
/**
* Superclass for option parsers requiring an offer-id. Avoids a small amount of
* duplicated boilerplate.

View file

@ -15,7 +15,7 @@
* along with Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.cli.opts;
package haveno.cli.opts;
/**
* CLI opt label definitions.

View file

@ -15,14 +15,14 @@
* along with Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.cli.opts;
package haveno.cli.opts;
import static haveno.cli.opts.OptLabel.OPT_DISPUTE_AGENT_TYPE;
import static haveno.cli.opts.OptLabel.OPT_REGISTRATION_KEY;
import joptsimple.OptionSpec;
import static bisq.cli.opts.OptLabel.OPT_DISPUTE_AGENT_TYPE;
import static bisq.cli.opts.OptLabel.OPT_REGISTRATION_KEY;
public class RegisterDisputeAgentOptionParser extends AbstractMethodOptionParser implements MethodOpts {
final OptionSpec<String> disputeAgentTypeOpt = parser.accepts(OPT_DISPUTE_AGENT_TYPE, "dispute agent type")

View file

@ -15,16 +15,16 @@
* along with Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.cli.opts;
package haveno.cli.opts;
import static haveno.cli.opts.OptLabel.OPT_WALLET_PASSWORD;
import joptsimple.OptionSpec;
import static bisq.cli.opts.OptLabel.OPT_WALLET_PASSWORD;
public class RemoveWalletPasswordOptionParser extends AbstractMethodOptionParser implements MethodOpts {
final OptionSpec<String> passwordOpt = parser.accepts(OPT_WALLET_PASSWORD, "bisq wallet password")
final OptionSpec<String> passwordOpt = parser.accepts(OPT_WALLET_PASSWORD, "haveno wallet password")
.withRequiredArg();
public RemoveWalletPasswordOptionParser(String[] args) {

View file

@ -15,15 +15,15 @@
* along with Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.cli.opts;
package haveno.cli.opts;
import joptsimple.OptionSpec;
import static bisq.cli.opts.OptLabel.OPT_ADDRESS;
import static bisq.cli.opts.OptLabel.OPT_AMOUNT;
import static bisq.cli.opts.OptLabel.OPT_MEMO;
import static bisq.cli.opts.OptLabel.OPT_TX_FEE_RATE;
import static haveno.cli.opts.OptLabel.OPT_ADDRESS;
import static haveno.cli.opts.OptLabel.OPT_AMOUNT;
import static haveno.cli.opts.OptLabel.OPT_MEMO;
import static haveno.cli.opts.OptLabel.OPT_TX_FEE_RATE;
import static joptsimple.internal.Strings.EMPTY;
public class SendBtcOptionParser extends AbstractMethodOptionParser implements MethodOpts {

View file

@ -15,13 +15,13 @@
* along with Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.cli.opts;
package haveno.cli.opts;
import static haveno.cli.opts.OptLabel.OPT_TX_FEE_RATE;
import joptsimple.OptionSpec;
import static bisq.cli.opts.OptLabel.OPT_TX_FEE_RATE;
public class SetTxFeeRateOptionParser extends AbstractMethodOptionParser implements MethodOpts {
final OptionSpec<String> feeRateOpt = parser.accepts(OPT_TX_FEE_RATE,

View file

@ -15,21 +15,21 @@
* along with Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.cli.opts;
package haveno.cli.opts;
import joptsimple.OptionSpec;
import static bisq.cli.opts.OptLabel.OPT_NEW_WALLET_PASSWORD;
import static bisq.cli.opts.OptLabel.OPT_WALLET_PASSWORD;
import static haveno.cli.opts.OptLabel.OPT_NEW_WALLET_PASSWORD;
import static haveno.cli.opts.OptLabel.OPT_WALLET_PASSWORD;
import static joptsimple.internal.Strings.EMPTY;
public class SetWalletPasswordOptionParser extends AbstractMethodOptionParser implements MethodOpts {
final OptionSpec<String> passwordOpt = parser.accepts(OPT_WALLET_PASSWORD, "bisq wallet password")
final OptionSpec<String> passwordOpt = parser.accepts(OPT_WALLET_PASSWORD, "haveno wallet password")
.withRequiredArg();
final OptionSpec<String> newPasswordOpt = parser.accepts(OPT_NEW_WALLET_PASSWORD, "new bisq wallet password")
final OptionSpec<String> newPasswordOpt = parser.accepts(OPT_NEW_WALLET_PASSWORD, "new haveno wallet password")
.withOptionalArg()
.defaultsTo(EMPTY);

View file

@ -15,7 +15,7 @@
* along with Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.cli.opts;
package haveno.cli.opts;
public class SimpleMethodOptionParser extends AbstractMethodOptionParser implements MethodOpts {

View file

@ -15,14 +15,14 @@
* along with Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.cli.opts;
package haveno.cli.opts;
import static haveno.cli.opts.OptLabel.OPT_FEE_CURRENCY;
import static haveno.cli.opts.OptLabel.OPT_PAYMENT_ACCOUNT_ID;
import joptsimple.OptionSpec;
import static bisq.cli.opts.OptLabel.OPT_FEE_CURRENCY;
import static bisq.cli.opts.OptLabel.OPT_PAYMENT_ACCOUNT_ID;
public class TakeOfferOptionParser extends OfferIdOptionParser implements MethodOpts {
final OptionSpec<String> paymentAccountIdOpt = parser.accepts(OPT_PAYMENT_ACCOUNT_ID, "id of payment account used for trade")

View file

@ -15,17 +15,17 @@
* along with Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.cli.opts;
package haveno.cli.opts;
import static haveno.cli.opts.OptLabel.OPT_TIMEOUT;
import static haveno.cli.opts.OptLabel.OPT_WALLET_PASSWORD;
import joptsimple.OptionSpec;
import static bisq.cli.opts.OptLabel.OPT_TIMEOUT;
import static bisq.cli.opts.OptLabel.OPT_WALLET_PASSWORD;
public class UnlockWalletOptionParser extends AbstractMethodOptionParser implements MethodOpts {
final OptionSpec<String> passwordOpt = parser.accepts(OPT_WALLET_PASSWORD, "bisq wallet password")
final OptionSpec<String> passwordOpt = parser.accepts(OPT_WALLET_PASSWORD, "haveno wallet password")
.withRequiredArg();
final OptionSpec<Long> unlockTimeoutOpt = parser.accepts(OPT_TIMEOUT, "wallet unlock timeout (s)")

View file

@ -15,14 +15,14 @@
* along with Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.cli.opts;
package haveno.cli.opts;
import joptsimple.OptionSpec;
import static bisq.cli.opts.OptLabel.OPT_ADDRESS;
import static bisq.cli.opts.OptLabel.OPT_MEMO;
import static bisq.cli.opts.OptLabel.OPT_TRADE_ID;
import static haveno.cli.opts.OptLabel.OPT_ADDRESS;
import static haveno.cli.opts.OptLabel.OPT_MEMO;
import static haveno.cli.opts.OptLabel.OPT_TRADE_ID;
import static joptsimple.internal.Strings.EMPTY;
public class WithdrawFundsOptionParser extends AbstractMethodOptionParser implements MethodOpts {

View file

@ -15,15 +15,16 @@
* along with Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.cli.request;
package haveno.cli.request;
import bisq.proto.grpc.CancelOfferRequest;
import bisq.proto.grpc.PostOfferRequest;
import bisq.proto.grpc.GetMyOfferRequest;
import bisq.proto.grpc.GetMyOffersRequest;
import bisq.proto.grpc.GetOfferRequest;
import bisq.proto.grpc.GetOffersRequest;
import bisq.proto.grpc.OfferInfo;
import haveno.proto.grpc.CancelOfferRequest;
import haveno.proto.grpc.PostOfferRequest;
import haveno.cli.GrpcStubs;
import haveno.proto.grpc.GetMyOfferRequest;
import haveno.proto.grpc.GetMyOffersRequest;
import haveno.proto.grpc.GetOfferRequest;
import haveno.proto.grpc.GetOffersRequest;
import haveno.proto.grpc.OfferInfo;
import java.util.ArrayList;
import java.util.List;
@ -33,10 +34,6 @@ import static java.util.stream.Collectors.toList;
import static protobuf.OfferDirection.BUY;
import static protobuf.OfferDirection.SELL;
import bisq.cli.GrpcStubs;
public class OffersServiceRequest {
private final GrpcStubs grpcStubs;

View file

@ -15,16 +15,16 @@
* along with Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.cli.request;
import bisq.proto.grpc.CreateCryptoCurrencyPaymentAccountRequest;
import bisq.proto.grpc.CreatePaymentAccountRequest;
import bisq.proto.grpc.GetCryptoCurrencyPaymentMethodsRequest;
import bisq.proto.grpc.GetPaymentAccountFormAsJsonRequest;
import bisq.proto.grpc.GetPaymentAccountFormRequest;
import bisq.proto.grpc.GetPaymentAccountsRequest;
import bisq.proto.grpc.GetPaymentMethodsRequest;
package haveno.cli.request;
import haveno.proto.grpc.CreateCryptoCurrencyPaymentAccountRequest;
import haveno.proto.grpc.CreatePaymentAccountRequest;
import haveno.proto.grpc.GetCryptoCurrencyPaymentMethodsRequest;
import haveno.proto.grpc.GetPaymentAccountFormAsJsonRequest;
import haveno.proto.grpc.GetPaymentAccountFormRequest;
import haveno.proto.grpc.GetPaymentAccountsRequest;
import haveno.proto.grpc.GetPaymentMethodsRequest;
import haveno.cli.GrpcStubs;
import protobuf.PaymentAccount;
import protobuf.PaymentAccountForm;
import protobuf.PaymentMethod;
@ -33,10 +33,6 @@ import java.util.List;
import static java.lang.String.format;
import bisq.cli.GrpcStubs;
public class PaymentAccountsServiceRequest {
private final GrpcStubs grpcStubs;

View file

@ -15,25 +15,21 @@
* along with Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.cli.request;
import bisq.proto.grpc.ConfirmPaymentReceivedRequest;
import bisq.proto.grpc.ConfirmPaymentSentRequest;
import bisq.proto.grpc.GetTradeRequest;
import bisq.proto.grpc.GetTradesRequest;
import bisq.proto.grpc.TakeOfferReply;
import bisq.proto.grpc.TakeOfferRequest;
import bisq.proto.grpc.TradeInfo;
import bisq.proto.grpc.WithdrawFundsRequest;
package haveno.cli.request;
import haveno.proto.grpc.ConfirmPaymentReceivedRequest;
import haveno.proto.grpc.ConfirmPaymentSentRequest;
import haveno.proto.grpc.GetTradeRequest;
import haveno.proto.grpc.GetTradesRequest;
import haveno.proto.grpc.TakeOfferReply;
import haveno.proto.grpc.TakeOfferRequest;
import haveno.proto.grpc.TradeInfo;
import haveno.proto.grpc.WithdrawFundsRequest;
import haveno.cli.GrpcStubs;
import java.util.List;
import static bisq.proto.grpc.GetTradesRequest.Category.CLOSED;
import static bisq.proto.grpc.GetTradesRequest.Category.FAILED;
import bisq.cli.GrpcStubs;
import static haveno.proto.grpc.GetTradesRequest.Category.CLOSED;
import static haveno.proto.grpc.GetTradesRequest.Category.FAILED;
public class TradesServiceRequest {

View file

@ -15,27 +15,23 @@
* along with Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.cli.request;
import bisq.proto.grpc.AddressBalanceInfo;
import bisq.proto.grpc.BalancesInfo;
import bisq.proto.grpc.BtcBalanceInfo;
import bisq.proto.grpc.GetAddressBalanceRequest;
import bisq.proto.grpc.GetBalancesRequest;
import bisq.proto.grpc.GetFundingAddressesRequest;
import bisq.proto.grpc.LockWalletRequest;
import bisq.proto.grpc.MarketPriceRequest;
import bisq.proto.grpc.RemoveWalletPasswordRequest;
import bisq.proto.grpc.SendBtcRequest;
import bisq.proto.grpc.SetWalletPasswordRequest;
import bisq.proto.grpc.UnlockWalletRequest;
package haveno.cli.request;
import haveno.proto.grpc.AddressBalanceInfo;
import haveno.proto.grpc.BalancesInfo;
import haveno.proto.grpc.BtcBalanceInfo;
import haveno.proto.grpc.GetAddressBalanceRequest;
import haveno.proto.grpc.GetBalancesRequest;
import haveno.proto.grpc.GetFundingAddressesRequest;
import haveno.proto.grpc.LockWalletRequest;
import haveno.proto.grpc.MarketPriceRequest;
import haveno.proto.grpc.RemoveWalletPasswordRequest;
import haveno.proto.grpc.SendBtcRequest;
import haveno.proto.grpc.SetWalletPasswordRequest;
import haveno.proto.grpc.UnlockWalletRequest;
import haveno.cli.GrpcStubs;
import java.util.List;
import bisq.cli.GrpcStubs;
public class WalletsServiceRequest {
private final GrpcStubs grpcStubs;

View file

@ -15,21 +15,19 @@
* along with Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.cli.table;
package haveno.cli.table;
import java.io.ByteArrayOutputStream;
import java.io.PrintStream;
import java.util.stream.IntStream;
import static bisq.cli.table.column.Column.JUSTIFICATION.RIGHT;
import static com.google.common.base.Strings.padStart;
import static haveno.cli.table.column.Column.JUSTIFICATION.RIGHT;
import static java.lang.String.format;
import static java.nio.charset.StandardCharsets.UTF_8;
import bisq.cli.table.column.Column;
import haveno.cli.table.column.Column;
/**
* A simple table of formatted data for the CLI's output console. A table must be

View file

@ -15,17 +15,13 @@
* along with Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.cli.table.builder;
import bisq.proto.grpc.OfferInfo;
package haveno.cli.table.builder;
import haveno.proto.grpc.OfferInfo;
import haveno.cli.table.Table;
import java.util.List;
import java.util.function.Predicate;
import bisq.cli.table.Table;
/**
* Abstract superclass for TableBuilder implementations.
*/

View file

@ -15,11 +15,12 @@
* along with Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.cli.table.builder;
import bisq.proto.grpc.ContractInfo;
import bisq.proto.grpc.TradeInfo;
package haveno.cli.table.builder;
import haveno.proto.grpc.ContractInfo;
import haveno.proto.grpc.TradeInfo;
import haveno.cli.table.column.Column;
import haveno.cli.table.column.MixedTradeFeeColumn;
import java.math.BigDecimal;
import java.util.List;
@ -30,18 +31,13 @@ import java.util.stream.Collectors;
import javax.annotation.Nullable;
import static bisq.cli.CurrencyFormat.formatSatoshis;
import static bisq.cli.table.builder.TableBuilderConstants.COL_HEADER_BUYER_DEPOSIT;
import static bisq.cli.table.builder.TableBuilderConstants.COL_HEADER_SELLER_DEPOSIT;
import static bisq.cli.table.builder.TableType.TRADE_DETAIL_TBL;
import static haveno.cli.CurrencyFormat.formatSatoshis;
import static haveno.cli.table.builder.TableBuilderConstants.COL_HEADER_BUYER_DEPOSIT;
import static haveno.cli.table.builder.TableBuilderConstants.COL_HEADER_SELLER_DEPOSIT;
import static haveno.cli.table.builder.TableType.TRADE_DETAIL_TBL;
import static java.lang.String.format;
import static protobuf.OfferDirection.SELL;
import bisq.cli.table.column.Column;
import bisq.cli.table.column.MixedTradeFeeColumn;
abstract class AbstractTradeListBuilder extends AbstractTableBuilder {
protected final List<TradeInfo> trades;
@ -88,7 +84,7 @@ abstract class AbstractTradeListBuilder extends AbstractTableBuilder {
@Nullable
protected final Column<Boolean> colIsCompleted;
@Nullable
protected final Column<Long> colBisqTradeFee;
protected final Column<Long> colHavenoTradeFee;
@Nullable
protected final Column<String> colTradeCost;
@Nullable
@ -127,7 +123,7 @@ abstract class AbstractTradeListBuilder extends AbstractTableBuilder {
this.colIsDepositConfirmed = colSupplier.depositConfirmedColumn.get();
this.colIsPayoutPublished = colSupplier.payoutPublishedColumn.get();
this.colIsCompleted = colSupplier.fundsWithdrawnColumn.get();
this.colBisqTradeFee = colSupplier.bisqTradeDetailFeeColumn.get();
this.colHavenoTradeFee = colSupplier.havenoTradeDetailFeeColumn.get();
this.colTradeCost = colSupplier.tradeCostColumn.get();
this.colIsPaymentSentMessageSent = colSupplier.paymentSentMessageSentColumn.get();
this.colIsPaymentReceivedMessageSent = colSupplier.paymentReceivedMessageSentColumn.get();

View file

@ -15,32 +15,28 @@
* along with Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.cli.table.builder;
import bisq.proto.grpc.AddressBalanceInfo;
package haveno.cli.table.builder;
import haveno.proto.grpc.AddressBalanceInfo;
import haveno.cli.table.Table;
import haveno.cli.table.column.BooleanColumn;
import haveno.cli.table.column.Column;
import haveno.cli.table.column.LongColumn;
import haveno.cli.table.column.SatoshiColumn;
import haveno.cli.table.column.StringColumn;
import java.util.List;
import java.util.stream.Collectors;
import static bisq.cli.table.builder.TableBuilderConstants.COL_HEADER_ADDRESS;
import static bisq.cli.table.builder.TableBuilderConstants.COL_HEADER_AVAILABLE_BALANCE;
import static bisq.cli.table.builder.TableBuilderConstants.COL_HEADER_CONFIRMATIONS;
import static bisq.cli.table.builder.TableBuilderConstants.COL_HEADER_IS_USED_ADDRESS;
import static bisq.cli.table.builder.TableType.ADDRESS_BALANCE_TBL;
import static haveno.cli.table.builder.TableBuilderConstants.COL_HEADER_ADDRESS;
import static haveno.cli.table.builder.TableBuilderConstants.COL_HEADER_AVAILABLE_BALANCE;
import static haveno.cli.table.builder.TableBuilderConstants.COL_HEADER_CONFIRMATIONS;
import static haveno.cli.table.builder.TableBuilderConstants.COL_HEADER_IS_USED_ADDRESS;
import static haveno.cli.table.builder.TableType.ADDRESS_BALANCE_TBL;
import static java.lang.String.format;
import bisq.cli.table.Table;
import bisq.cli.table.column.BooleanColumn;
import bisq.cli.table.column.Column;
import bisq.cli.table.column.LongColumn;
import bisq.cli.table.column.SatoshiColumn;
import bisq.cli.table.column.StringColumn;
/**
* Builds a {@code bisq.cli.table.Table} from a List of
* {@code bisq.proto.grpc.AddressBalanceInfo} objects.
* Builds a {@code haveno.cli.table.Table} from a List of
* {@code haveno.proto.grpc.AddressBalanceInfo} objects.
*/
class AddressBalanceTableBuilder extends AbstractTableBuilder {

View file

@ -15,27 +15,23 @@
* along with Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.cli.table.builder;
package haveno.cli.table.builder;
import bisq.proto.grpc.BtcBalanceInfo;
import static haveno.cli.table.builder.TableBuilderConstants.COL_HEADER_AVAILABLE_BALANCE;
import static haveno.cli.table.builder.TableBuilderConstants.COL_HEADER_LOCKED_BALANCE;
import static haveno.cli.table.builder.TableBuilderConstants.COL_HEADER_RESERVED_BALANCE;
import static haveno.cli.table.builder.TableBuilderConstants.COL_HEADER_TOTAL_AVAILABLE_BALANCE;
import static haveno.cli.table.builder.TableType.BTC_BALANCE_TBL;
import haveno.proto.grpc.BtcBalanceInfo;
import haveno.cli.table.Table;
import haveno.cli.table.column.Column;
import haveno.cli.table.column.SatoshiColumn;
import java.util.List;
import static bisq.cli.table.builder.TableBuilderConstants.COL_HEADER_AVAILABLE_BALANCE;
import static bisq.cli.table.builder.TableBuilderConstants.COL_HEADER_LOCKED_BALANCE;
import static bisq.cli.table.builder.TableBuilderConstants.COL_HEADER_RESERVED_BALANCE;
import static bisq.cli.table.builder.TableBuilderConstants.COL_HEADER_TOTAL_AVAILABLE_BALANCE;
import static bisq.cli.table.builder.TableType.BTC_BALANCE_TBL;
import bisq.cli.table.Table;
import bisq.cli.table.column.Column;
import bisq.cli.table.column.SatoshiColumn;
/**
* Builds a {@code bisq.cli.table.Table} from a
* {@code bisq.proto.grpc.BtcBalanceInfo} object.
* Builds a {@code haveno.cli.table.Table} from a
* {@code haveno.proto.grpc.BtcBalanceInfo} object.
*/
class BtcBalanceTableBuilder extends AbstractTableBuilder {

View file

@ -15,16 +15,13 @@
* along with Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.cli.table.builder;
package haveno.cli.table.builder;
import static haveno.cli.table.builder.TableType.CLOSED_TRADES_TBL;
import haveno.cli.table.Table;
import java.util.List;
import static bisq.cli.table.builder.TableType.CLOSED_TRADES_TBL;
import bisq.cli.table.Table;
@SuppressWarnings("ConstantConditions")
class ClosedTradeTableBuilder extends AbstractTradeListBuilder {

View file

@ -15,18 +15,15 @@
* along with Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.cli.table.builder;
package haveno.cli.table.builder;
import static haveno.cli.table.builder.TableType.FAILED_TRADES_TBL;
import haveno.cli.table.Table;
import java.util.List;
import static bisq.cli.table.builder.TableType.FAILED_TRADES_TBL;
import bisq.cli.table.Table;
/**
* Builds a {@code bisq.cli.table.Table} from a list of {@code bisq.proto.grpc.TradeInfo} objects.
* Builds a {@code haveno.cli.table.Table} from a list of {@code haveno.proto.grpc.TradeInfo} objects.
*/
@SuppressWarnings("ConstantConditions")
class FailedTradeTableBuilder extends AbstractTradeListBuilder {

View file

@ -15,10 +15,15 @@
* along with Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.cli.table.builder;
import bisq.proto.grpc.OfferInfo;
package haveno.cli.table.builder;
import haveno.proto.grpc.OfferInfo;
import haveno.cli.table.Table;
import haveno.cli.table.column.Column;
import haveno.cli.table.column.Iso8601DateTimeColumn;
import haveno.cli.table.column.SatoshiColumn;
import haveno.cli.table.column.StringColumn;
import haveno.cli.table.column.ZippedStringColumns;
import java.util.List;
import java.util.function.Function;
import java.util.function.Supplier;
@ -26,28 +31,19 @@ import java.util.stream.Collectors;
import javax.annotation.Nullable;
import static bisq.cli.table.builder.TableBuilderConstants.*;
import static bisq.cli.table.builder.TableType.OFFER_TBL;
import static bisq.cli.table.column.Column.JUSTIFICATION.LEFT;
import static bisq.cli.table.column.Column.JUSTIFICATION.NONE;
import static bisq.cli.table.column.Column.JUSTIFICATION.RIGHT;
import static bisq.cli.table.column.ZippedStringColumns.DUPLICATION_MODE.EXCLUDE_DUPLICATES;
import static haveno.cli.table.builder.TableBuilderConstants.*;
import static haveno.cli.table.builder.TableType.OFFER_TBL;
import static haveno.cli.table.column.Column.JUSTIFICATION.LEFT;
import static haveno.cli.table.column.Column.JUSTIFICATION.NONE;
import static haveno.cli.table.column.Column.JUSTIFICATION.RIGHT;
import static haveno.cli.table.column.ZippedStringColumns.DUPLICATION_MODE.EXCLUDE_DUPLICATES;
import static java.lang.String.format;
import static protobuf.OfferDirection.BUY;
import static protobuf.OfferDirection.SELL;
import bisq.cli.table.Table;
import bisq.cli.table.column.Column;
import bisq.cli.table.column.Iso8601DateTimeColumn;
import bisq.cli.table.column.SatoshiColumn;
import bisq.cli.table.column.StringColumn;
import bisq.cli.table.column.ZippedStringColumns;
/**
* Builds a {@code bisq.cli.table.Table} from a List of
* {@code bisq.proto.grpc.OfferInfo} objects.
* Builds a {@code haveno.cli.table.Table} from a List of
* {@code haveno.proto.grpc.OfferInfo} objects.
*/
class OfferTableBuilder extends AbstractTableBuilder {

View file

@ -15,18 +15,15 @@
* along with Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.cli.table.builder;
package haveno.cli.table.builder;
import static haveno.cli.table.builder.TableType.OPEN_TRADES_TBL;
import haveno.cli.table.Table;
import java.util.List;
import static bisq.cli.table.builder.TableType.OPEN_TRADES_TBL;
import bisq.cli.table.Table;
/**
* Builds a {@code bisq.cli.table.Table} from a list of {@code bisq.proto.grpc.TradeInfo} objects.
* Builds a {@code haveno.cli.table.Table} from a list of {@code haveno.proto.grpc.TradeInfo} objects.
*/
@SuppressWarnings("ConstantConditions")
class OpenTradeTableBuilder extends AbstractTradeListBuilder {

View file

@ -15,27 +15,24 @@
* along with Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.cli.table.builder;
package haveno.cli.table.builder;
import protobuf.PaymentAccount;
import static haveno.cli.table.builder.TableBuilderConstants.COL_HEADER_CURRENCY;
import static haveno.cli.table.builder.TableBuilderConstants.COL_HEADER_NAME;
import static haveno.cli.table.builder.TableBuilderConstants.COL_HEADER_PAYMENT_METHOD;
import static haveno.cli.table.builder.TableBuilderConstants.COL_HEADER_UUID;
import static haveno.cli.table.builder.TableType.PAYMENT_ACCOUNT_TBL;
import haveno.cli.table.Table;
import haveno.cli.table.column.Column;
import haveno.cli.table.column.StringColumn;
import java.util.List;
import java.util.stream.Collectors;
import static bisq.cli.table.builder.TableBuilderConstants.COL_HEADER_CURRENCY;
import static bisq.cli.table.builder.TableBuilderConstants.COL_HEADER_NAME;
import static bisq.cli.table.builder.TableBuilderConstants.COL_HEADER_PAYMENT_METHOD;
import static bisq.cli.table.builder.TableBuilderConstants.COL_HEADER_UUID;
import static bisq.cli.table.builder.TableType.PAYMENT_ACCOUNT_TBL;
import bisq.cli.table.Table;
import bisq.cli.table.column.Column;
import bisq.cli.table.column.StringColumn;
/**
* Builds a {@code bisq.cli.table.Table} from a List of
* Builds a {@code haveno.cli.table.Table} from a List of
* {@code protobuf.PaymentAccount} objects.
*/
class PaymentAccountTableBuilder extends AbstractTableBuilder {

View file

@ -15,20 +15,18 @@
* along with Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.cli.table.builder;
package haveno.cli.table.builder;
import java.util.List;
import static java.util.Collections.singletonList;
import bisq.cli.table.Table;
import haveno.cli.table.Table;
/**
* Table builder factory. It is not conventionally named TableBuilderFactory because
* it has no static factory methods. The number of static fields and methods in the
* {@code bisq.cli.table} are kept to a minimum in an effort o reduce class load time
* {@code haveno.cli.table} are kept to a minimum in an effort o reduce class load time
* in the session-less CLI.
*/
public class TableBuilder extends AbstractTableBuilder {

View file

@ -15,7 +15,7 @@
* along with Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.cli.table.builder;
package haveno.cli.table.builder;
/**
* Table column name constants.

View file

@ -15,7 +15,7 @@
* along with Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.cli.table.builder;
package haveno.cli.table.builder;
/**
* Used as param in TableBuilder constructor instead of inspecting

View file

@ -15,24 +15,20 @@
* along with Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.cli.table.builder;
import bisq.proto.grpc.TradeInfo;
package haveno.cli.table.builder;
import haveno.proto.grpc.TradeInfo;
import haveno.cli.table.Table;
import haveno.cli.table.column.Column;
import java.util.ArrayList;
import java.util.List;
import java.util.function.Predicate;
import static bisq.cli.table.builder.TableType.TRADE_DETAIL_TBL;
import static haveno.cli.table.builder.TableType.TRADE_DETAIL_TBL;
import static java.lang.String.format;
import bisq.cli.table.Table;
import bisq.cli.table.column.Column;
/**
* Builds a {@code bisq.cli.table.Table} from a {@code bisq.proto.grpc.TradeInfo} object.
* Builds a {@code haveno.cli.table.Table} from a {@code haveno.proto.grpc.TradeInfo} object.
*/
@SuppressWarnings("ConstantConditions")
class TradeDetailTableBuilder extends AbstractTradeListBuilder {
@ -55,15 +51,15 @@ class TradeDetailTableBuilder extends AbstractTradeListBuilder {
}
private void populateColumns(TradeInfo trade) {
populateBisqV1TradeColumns(trade);
populateHavenoV1TradeColumns(trade);
}
private void populateBisqV1TradeColumns(TradeInfo trade) {
private void populateHavenoV1TradeColumns(TradeInfo trade) {
colTradeId.addRow(trade.getShortId());
colRole.addRow(trade.getRole());
colPrice.addRow(trade.getPrice());
colAmount.addRow(toTradeAmount.apply(trade));
colBisqTradeFee.addRow(toMyMakerOrTakerFee.apply(trade));
colHavenoTradeFee.addRow(toMyMakerOrTakerFee.apply(trade));
colIsDepositPublished.addRow(trade.getIsDepositsPublished());
colIsDepositConfirmed.addRow(trade.getIsDepositsUnlocked());
colTradeCost.addRow(toTradeVolumeAsString.apply(trade));
@ -76,16 +72,16 @@ class TradeDetailTableBuilder extends AbstractTradeListBuilder {
}
private List<Column<?>> defineColumnList(TradeInfo trade) {
return getBisqV1TradeColumnList();
return getHavenoV1TradeColumnList();
}
private List<Column<?>> getBisqV1TradeColumnList() {
private List<Column<?>> getHavenoV1TradeColumnList() {
List<Column<?>> columns = new ArrayList<>() {{
add(colTradeId);
add(colRole);
add(colPrice.justify());
add(colAmount.asStringColumn());
add(colBisqTradeFee.asStringColumn());
add(colHavenoTradeFee.asStringColumn());
add(colIsDepositPublished.asStringColumn());
add(colIsDepositConfirmed.asStringColumn());
add(colTradeCost.justify());

View file

@ -15,12 +15,19 @@
* along with Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.cli.table.builder;
import bisq.proto.grpc.ContractInfo;
import bisq.proto.grpc.OfferInfo;
import bisq.proto.grpc.TradeInfo;
package haveno.cli.table.builder;
import haveno.proto.grpc.ContractInfo;
import haveno.proto.grpc.OfferInfo;
import haveno.proto.grpc.TradeInfo;
import haveno.cli.table.column.AltcoinVolumeColumn;
import haveno.cli.table.column.BooleanColumn;
import haveno.cli.table.column.BtcColumn;
import haveno.cli.table.column.Column;
import haveno.cli.table.column.Iso8601DateTimeColumn;
import haveno.cli.table.column.MixedTradeFeeColumn;
import haveno.cli.table.column.SatoshiColumn;
import haveno.cli.table.column.StringColumn;
import java.util.List;
import java.util.function.Function;
import java.util.function.Predicate;
@ -31,28 +38,17 @@ import lombok.extern.slf4j.Slf4j;
import javax.annotation.Nullable;
import static bisq.cli.table.builder.TableBuilderConstants.*;
import static bisq.cli.table.builder.TableType.CLOSED_TRADES_TBL;
import static bisq.cli.table.builder.TableType.FAILED_TRADES_TBL;
import static bisq.cli.table.builder.TableType.OPEN_TRADES_TBL;
import static bisq.cli.table.builder.TableType.TRADE_DETAIL_TBL;
import static bisq.cli.table.column.AltcoinVolumeColumn.DISPLAY_MODE.ALTCOIN_VOLUME;
import static bisq.cli.table.column.AltcoinVolumeColumn.DISPLAY_MODE.BSQ_VOLUME;
import static bisq.cli.table.column.Column.JUSTIFICATION.LEFT;
import static bisq.cli.table.column.Column.JUSTIFICATION.RIGHT;
import static haveno.cli.table.builder.TableBuilderConstants.*;
import static haveno.cli.table.builder.TableType.CLOSED_TRADES_TBL;
import static haveno.cli.table.builder.TableType.FAILED_TRADES_TBL;
import static haveno.cli.table.builder.TableType.OPEN_TRADES_TBL;
import static haveno.cli.table.builder.TableType.TRADE_DETAIL_TBL;
import static haveno.cli.table.column.AltcoinVolumeColumn.DISPLAY_MODE.ALTCOIN_VOLUME;
import static haveno.cli.table.column.AltcoinVolumeColumn.DISPLAY_MODE.BSQ_VOLUME;
import static haveno.cli.table.column.Column.JUSTIFICATION.LEFT;
import static haveno.cli.table.column.Column.JUSTIFICATION.RIGHT;
import static java.lang.String.format;
import bisq.cli.table.column.AltcoinVolumeColumn;
import bisq.cli.table.column.BooleanColumn;
import bisq.cli.table.column.BtcColumn;
import bisq.cli.table.column.Column;
import bisq.cli.table.column.Iso8601DateTimeColumn;
import bisq.cli.table.column.MixedTradeFeeColumn;
import bisq.cli.table.column.SatoshiColumn;
import bisq.cli.table.column.StringColumn;
/**
* Convenience for supplying column definitions to
* open/closed/failed/detail trade table builders.
@ -186,7 +182,7 @@ class TradeTableColumnSupplier {
: null;
};
final Supplier<Column<Long>> bisqTradeDetailFeeColumn = () -> {
final Supplier<Column<Long>> havenoTradeDetailFeeColumn = () -> {
if (isTradeDetailTblBuilder.get()) {
TradeInfo t = firstRow.get();
String headerCurrencyCode = "XMR";

View file

@ -15,26 +15,23 @@
* along with Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.cli.table.builder;
package haveno.cli.table.builder;
import static haveno.cli.table.builder.TableBuilderConstants.*;
import static haveno.cli.table.builder.TableType.TRANSACTION_TBL;
import haveno.cli.table.Table;
import haveno.cli.table.column.BooleanColumn;
import haveno.cli.table.column.Column;
import haveno.cli.table.column.LongColumn;
import haveno.cli.table.column.SatoshiColumn;
import haveno.cli.table.column.StringColumn;
import java.util.List;
import javax.annotation.Nullable;
import static bisq.cli.table.builder.TableBuilderConstants.*;
import static bisq.cli.table.builder.TableType.TRANSACTION_TBL;
import bisq.cli.table.Table;
import bisq.cli.table.column.BooleanColumn;
import bisq.cli.table.column.Column;
import bisq.cli.table.column.LongColumn;
import bisq.cli.table.column.SatoshiColumn;
import bisq.cli.table.column.StringColumn;
/**
* Builds a {@code bisq.cli.table.Table} from a {@code bisq.proto.grpc.TxInfo} object.
* Builds a {@code haveno.cli.table.Table} from a {@code haveno.proto.grpc.TxInfo} object.
*/
class TransactionTableBuilder extends AbstractTableBuilder {

View file

@ -15,11 +15,11 @@
* along with Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.cli.table.column;
package haveno.cli.table.column;
import static bisq.cli.table.column.Column.JUSTIFICATION.RIGHT;
import static com.google.common.base.Strings.padEnd;
import static com.google.common.base.Strings.padStart;
import static haveno.cli.table.column.Column.JUSTIFICATION.RIGHT;
/**
* Partial implementation of the {@link Column} interface.

View file

@ -15,15 +15,15 @@
* along with Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.cli.table.column;
package haveno.cli.table.column;
import static haveno.cli.table.column.Column.JUSTIFICATION.RIGHT;
import java.math.BigDecimal;
import java.util.function.BiFunction;
import java.util.stream.IntStream;
import static bisq.cli.table.column.Column.JUSTIFICATION.RIGHT;
/**
* For displaying altcoin volume with appropriate precision.
*/

View file

@ -15,16 +15,16 @@
* along with Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.cli.table.column;
package haveno.cli.table.column;
import static haveno.cli.table.column.Column.JUSTIFICATION.LEFT;
import java.util.ArrayList;
import java.util.List;
import java.util.function.Predicate;
import java.util.stream.IntStream;
import static bisq.cli.table.column.Column.JUSTIFICATION.LEFT;
/**
* For displaying boolean values as YES, NO, or user's choice for 'true' and 'false'.
*/

View file

@ -1,9 +1,9 @@
package bisq.cli.table.column;
package haveno.cli.table.column;
import java.util.stream.IntStream;
import static bisq.cli.CurrencyFormat.formatBtc;
import static com.google.common.base.Strings.padEnd;
import static haveno.cli.CurrencyFormat.formatBtc;
import static java.util.Comparator.comparingInt;
public class BtcColumn extends SatoshiColumn {

View file

@ -15,7 +15,7 @@
* along with Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.cli.table.column;
package haveno.cli.table.column;
import java.util.List;

View file

@ -15,15 +15,15 @@
* along with Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.cli.table.column;
package haveno.cli.table.column;
import static haveno.cli.table.column.Column.JUSTIFICATION.RIGHT;
import java.util.ArrayList;
import java.util.List;
import java.util.function.Predicate;
import java.util.stream.IntStream;
import static bisq.cli.table.column.Column.JUSTIFICATION.RIGHT;
/**
* For displaying Double values.
*/

View file

@ -15,15 +15,15 @@
* along with Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.cli.table.column;
package haveno.cli.table.column;
import static haveno.cli.CurrencyFormat.formatFiatVolume;
import static haveno.cli.CurrencyFormat.formatPrice;
import static haveno.cli.table.column.Column.JUSTIFICATION.RIGHT;
import static haveno.cli.table.column.FiatColumn.DISPLAY_MODE.FIAT_PRICE;
import java.util.stream.IntStream;
import static bisq.cli.CurrencyFormat.formatFiatVolume;
import static bisq.cli.CurrencyFormat.formatPrice;
import static bisq.cli.table.column.Column.JUSTIFICATION.RIGHT;
import static bisq.cli.table.column.FiatColumn.DISPLAY_MODE.FIAT_PRICE;
/**
* For displaying fiat volume or price with appropriate precision.
*/

View file

@ -15,15 +15,15 @@
* along with Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.cli.table.column;
package haveno.cli.table.column;
import static haveno.cli.table.column.Column.JUSTIFICATION.RIGHT;
import java.util.ArrayList;
import java.util.List;
import java.util.function.Predicate;
import java.util.stream.IntStream;
import static bisq.cli.table.column.Column.JUSTIFICATION.RIGHT;
/**
* For displaying Integer values.
*/

View file

@ -15,16 +15,16 @@
* along with Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.cli.table.column;
package haveno.cli.table.column;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.stream.IntStream;
import static bisq.cli.table.column.Column.JUSTIFICATION.LEFT;
import static com.google.common.base.Strings.padEnd;
import static com.google.common.base.Strings.padStart;
import static haveno.cli.table.column.Column.JUSTIFICATION.LEFT;
import static java.lang.System.currentTimeMillis;
import static java.util.TimeZone.getTimeZone;

View file

@ -15,15 +15,15 @@
* along with Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.cli.table.column;
package haveno.cli.table.column;
import static haveno.cli.table.column.Column.JUSTIFICATION.RIGHT;
import java.util.ArrayList;
import java.util.List;
import java.util.function.Predicate;
import java.util.stream.IntStream;
import static bisq.cli.table.column.Column.JUSTIFICATION.RIGHT;
/**
* For displaying Long values.
*/

View file

@ -15,11 +15,11 @@
* along with Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.cli.table.column;
package haveno.cli.table.column;
import static bisq.cli.CurrencyFormat.formatBsq;
import static bisq.cli.CurrencyFormat.formatSatoshis;
import static bisq.cli.table.column.Column.JUSTIFICATION.RIGHT;
import static haveno.cli.CurrencyFormat.formatBsq;
import static haveno.cli.CurrencyFormat.formatSatoshis;
import static haveno.cli.table.column.Column.JUSTIFICATION.RIGHT;
/**
* For displaying a mix of BSQ and BTC trade fees with appropriate precision.

View file

@ -15,7 +15,7 @@
* along with Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.cli.table.column;
package haveno.cli.table.column;
/**
* Abstract superclass for numeric Columns.

View file

@ -15,11 +15,11 @@
* along with Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.cli.table.column;
package haveno.cli.table.column;
import static bisq.cli.CurrencyFormat.formatBsq;
import static bisq.cli.CurrencyFormat.formatSatoshis;
import static bisq.cli.table.column.Column.JUSTIFICATION.RIGHT;
import static haveno.cli.CurrencyFormat.formatBsq;
import static haveno.cli.CurrencyFormat.formatSatoshis;
import static haveno.cli.table.column.Column.JUSTIFICATION.RIGHT;
/**
* For displaying BTC or BSQ satoshi values with appropriate precision.

View file

@ -15,17 +15,17 @@
* along with Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.cli.table.column;
package haveno.cli.table.column;
import static haveno.cli.table.column.Column.JUSTIFICATION.LEFT;
import static haveno.cli.table.column.Column.JUSTIFICATION.RIGHT;
import java.util.ArrayList;
import java.util.List;
import java.util.function.Predicate;
import java.util.stream.IntStream;
import static bisq.cli.table.column.Column.JUSTIFICATION.LEFT;
import static bisq.cli.table.column.Column.JUSTIFICATION.RIGHT;
/**
* For displaying justified string values.
*/

View file

@ -15,21 +15,18 @@
* along with Haveno. If not, see <http://www.gnu.org/licenses/>.
*/
package bisq.cli.table.column;
package haveno.cli.table.column;
import static haveno.cli.table.column.ZippedStringColumns.DUPLICATION_MODE.EXCLUDE_DUPLICATES;
import static haveno.cli.table.column.ZippedStringColumns.DUPLICATION_MODE.INCLUDE_DUPLICATES;
import haveno.cli.table.column.Column.JUSTIFICATION;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.IntStream;
import javax.annotation.Nullable;
import static bisq.cli.table.column.ZippedStringColumns.DUPLICATION_MODE.EXCLUDE_DUPLICATES;
import static bisq.cli.table.column.ZippedStringColumns.DUPLICATION_MODE.INCLUDE_DUPLICATES;
import bisq.cli.table.column.Column.JUSTIFICATION;
/**
* For zipping multiple StringColumns into a single StringColumn.
* Useful for displaying amount and volume range values.

View file

@ -1,7 +1,9 @@
package bisq.cli;
import bisq.proto.grpc.OfferInfo;
package haveno.cli;
import haveno.proto.grpc.OfferInfo;
import haveno.cli.CliMain;
import haveno.cli.GrpcClient;
import haveno.cli.opts.ArgumentList;
import joptsimple.OptionParser;
import joptsimple.OptionSet;
@ -18,18 +20,15 @@ import java.util.stream.IntStream;
import lombok.extern.slf4j.Slf4j;
import static bisq.cli.opts.OptLabel.OPT_HOST;
import static bisq.cli.opts.OptLabel.OPT_PASSWORD;
import static bisq.cli.opts.OptLabel.OPT_PORT;
import static haveno.cli.opts.OptLabel.OPT_HOST;
import static haveno.cli.opts.OptLabel.OPT_PASSWORD;
import static haveno.cli.opts.OptLabel.OPT_PORT;
import static java.lang.System.out;
import static java.math.RoundingMode.HALF_UP;
import static java.util.Arrays.stream;
import static org.bitbucket.cowwoc.diffmatchpatch.DiffMatchPatch.Operation.DELETE;
import static org.bitbucket.cowwoc.diffmatchpatch.DiffMatchPatch.Operation.INSERT;
import bisq.cli.opts.ArgumentList;
import org.bitbucket.cowwoc.diffmatchpatch.DiffMatchPatch;
/**
@ -122,14 +121,14 @@ public abstract class AbstractCliTest {
protected List<OfferInfo> getMyAltcoinOffers(String currencyCode) {
String[] args = getMyOffersCommand("buy", currencyCode);
out.print(">>>>> bisq-cli ");
out.print(">>>>> haveno-cli ");
stream(args).forEach(a -> out.print(a + " "));
out.println();
CliMain.main(args);
out.println("<<<<<");
args = getMyOffersCommand("sell", currencyCode);
out.print(">>>>> bisq-cli ");
out.print(">>>>> haveno-cli ");
stream(args).forEach(a -> out.print(a + " "));
out.println();
CliMain.main(args);
@ -168,7 +167,7 @@ public abstract class AbstractCliTest {
"--market-price-margin=" + priceMargin,
"--enable=" + enable
};
out.print(">>>>> bisq-cli ");
out.print(">>>>> haveno-cli ");
stream(args).forEach(a -> out.print(a + " "));
out.println();
CliMain.main(args);
@ -184,7 +183,7 @@ public abstract class AbstractCliTest {
"--trigger-price=" + triggerPrice,
"--enable=" + enable
};
out.print(">>>>> bisq-cli ");
out.print(">>>>> haveno-cli ");
stream(args).forEach(a -> out.print(a + " "));
out.println();
CliMain.main(args);
@ -204,7 +203,7 @@ public abstract class AbstractCliTest {
"--trigger-price=" + triggerPrice,
"--enable=" + enable
};
out.print(">>>>> bisq-cli ");
out.print(">>>>> haveno-cli ");
stream(args).forEach(a -> out.print(a + " "));
out.println();
CliMain.main(args);
@ -220,7 +219,7 @@ public abstract class AbstractCliTest {
"--fixed-price=" + fixedPrice,
"--enable=" + enable
};
out.print(">>>>> bisq-cli ");
out.print(">>>>> haveno-cli ");
stream(args).forEach(a -> out.print(a + " "));
out.println();
CliMain.main(args);
@ -251,7 +250,7 @@ public abstract class AbstractCliTest {
"--offer-id=" + offer.getId(),
"--enable=" + enable
};
out.print(">>>>> bisq-cli ");
out.print(">>>>> haveno-cli ");
stream(args).forEach(a -> out.print(a + " "));
out.println();
CliMain.main(args);

View file

@ -1,15 +1,17 @@
package bisq.cli;
package haveno.cli;
import static java.lang.System.out;
import static java.util.Arrays.stream;
import haveno.cli.CliMain;
/**
Smoke tests for createoffer method. Useful for testing CLI command and examining the
format of its console output.
Prerequisites:
- Run `./bisq-apitest --apiPassword=xyz --supportingApps=bitcoind,seednode,arbdaemon,alicedaemon,bobdaemon --shutdownAfterTests=false --enableBisqDebugging=false`
- Run `./haveno-apitest --apiPassword=xyz --supportingApps=bitcoind,seednode,arbdaemon,alicedaemon,bobdaemon --shutdownAfterTests=false --enableHavenoDebugging=false`
Note: Test harness will not automatically generate BTC blocks to confirm transactions.
@ -26,21 +28,21 @@ public class CreateOfferSmokeTest extends AbstractCliTest {
private void createBsqSwapOffer(String direction) {
String[] args = createBsqSwapOfferCommand(direction, "0.01", "0.005", "0.00005");
out.print(">>>>> bisq-cli ");
out.print(">>>>> haveno-cli ");
stream(args).forEach(a -> out.print(a + " "));
out.println();
CliMain.main(args);
out.println("<<<<<");
args = getMyOffersCommand(direction, "bsq");
out.print(">>>>> bisq-cli ");
out.print(">>>>> haveno-cli ");
stream(args).forEach(a -> out.print(a + " "));
out.println();
CliMain.main(args);
out.println("<<<<<");
args = getAvailableOffersCommand(direction, "bsq");
out.print(">>>>> bisq-cli ");
out.print(">>>>> haveno-cli ");
stream(args).forEach(a -> out.print(a + " "));
out.println();
CliMain.main(args);

View file

@ -1,6 +1,6 @@
package bisq.cli;
package haveno.cli;
import bisq.proto.grpc.OfferInfo;
import haveno.proto.grpc.OfferInfo;
import java.util.List;
import java.util.Random;
@ -13,7 +13,7 @@ import static protobuf.OfferDirection.BUY;
Prerequisites:
- Run `./bisq-apitest --apiPassword=xyz --supportingApps=bitcoind,seednode,arbdaemon,alicedaemon,bobdesktop --shutdownAfterTests=false --enableBisqDebugging=false`
- Run `./haveno-apitest --apiPassword=xyz --supportingApps=bitcoind,seednode,arbdaemon,alicedaemon,bobdesktop --shutdownAfterTests=false --enableHavenoDebugging=false`
- Create some XMR offers with Alice's UI or CLI.

View file

@ -1,13 +1,15 @@
package bisq.cli;
package haveno.cli;
import static java.lang.System.out;
import haveno.cli.CliMain;
/**
Smoke tests for getoffers method. Useful for examining the format of the console output.
Prerequisites:
- Run `./bisq-daemon --apiPassword=xyz --appDataDir=$TESTDIR`
- Run `./haveno-daemon --apiPassword=xyz --appDataDir=$TESTDIR`
This can be run on mainnet.
*/

View file

@ -1,17 +1,14 @@
package bisq.cli;
import bisq.proto.grpc.TradeInfo;
package haveno.cli;
import haveno.proto.grpc.TradeInfo;
import haveno.cli.GrpcClient;
import haveno.cli.table.builder.TableBuilder;
import java.util.List;
import static bisq.cli.table.builder.TableType.TRADE_DETAIL_TBL;
import static bisq.proto.grpc.GetTradesRequest.Category.CLOSED;
import static haveno.proto.grpc.GetTradesRequest.Category.CLOSED;
import static haveno.cli.table.builder.TableType.TRADE_DETAIL_TBL;
import static java.lang.System.out;
import bisq.cli.table.builder.TableBuilder;
@SuppressWarnings("unused")
public class GetTradesSmokeTest extends AbstractCliTest {

View file

@ -1,16 +1,21 @@
package bisq.cli.opts;
package haveno.cli.opts;
import org.junit.jupiter.api.Test;
import static bisq.cli.Method.canceloffer;
import static bisq.cli.Method.createcryptopaymentacct;
import static bisq.cli.Method.createoffer;
import static bisq.cli.Method.createpaymentacct;
import static bisq.cli.opts.OptLabel.*;
import static haveno.cli.Method.canceloffer;
import static haveno.cli.Method.createcryptopaymentacct;
import static haveno.cli.Method.createoffer;
import static haveno.cli.Method.createpaymentacct;
import static haveno.cli.opts.OptLabel.*;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assertions.assertTrue;
import haveno.cli.opts.CancelOfferOptionParser;
import haveno.cli.opts.CreateCryptoCurrencyPaymentAcctOptionParser;
import haveno.cli.opts.CreateOfferOptionParser;
import haveno.cli.opts.CreatePaymentAcctOptionParser;
public class OptionParsersTest {

View file

@ -1,18 +1,14 @@
package bisq.cli.table;
import bisq.proto.grpc.AddressBalanceInfo;
package haveno.cli.table;
import haveno.proto.grpc.AddressBalanceInfo;
import haveno.cli.AbstractCliTest;
import haveno.cli.table.builder.TableBuilder;
import java.util.List;
import static bisq.cli.table.builder.TableType.ADDRESS_BALANCE_TBL;
import static haveno.cli.table.builder.TableType.ADDRESS_BALANCE_TBL;
import static java.lang.System.err;
import static java.util.Collections.singletonList;
import bisq.cli.AbstractCliTest;
import bisq.cli.table.builder.TableBuilder;
@SuppressWarnings("unused")
public class AddressCliOutputDiffTest extends AbstractCliTest {

View file

@ -1,11 +1,9 @@
package bisq.cli.table;
package haveno.cli.table;
import static bisq.cli.table.builder.TableType.BTC_BALANCE_TBL;
import static haveno.cli.table.builder.TableType.BTC_BALANCE_TBL;
import bisq.cli.AbstractCliTest;
import bisq.cli.table.builder.TableBuilder;
import haveno.cli.AbstractCliTest;
import haveno.cli.table.builder.TableBuilder;
@SuppressWarnings("unused")
public class GetBalanceCliOutputDiffTest extends AbstractCliTest {

View file

@ -1,20 +1,16 @@
package bisq.cli.table;
import bisq.proto.grpc.OfferInfo;
package haveno.cli.table;
import haveno.proto.grpc.OfferInfo;
import haveno.cli.AbstractCliTest;
import haveno.cli.table.builder.TableBuilder;
import java.util.List;
import lombok.extern.slf4j.Slf4j;
import static bisq.cli.table.builder.TableType.OFFER_TBL;
import static haveno.cli.table.builder.TableType.OFFER_TBL;
import static protobuf.OfferDirection.BUY;
import static protobuf.OfferDirection.SELL;
import bisq.cli.AbstractCliTest;
import bisq.cli.table.builder.TableBuilder;
@SuppressWarnings("unused")
@Slf4j
public class GetOffersCliOutputDiffTest extends AbstractCliTest {

View file

@ -1,15 +1,13 @@
package bisq.cli.table;
package haveno.cli.table;
import lombok.extern.slf4j.Slf4j;
import static bisq.cli.table.builder.TableType.TRADE_DETAIL_TBL;
import static haveno.cli.table.builder.TableType.TRADE_DETAIL_TBL;
import static java.lang.System.out;
import bisq.cli.AbstractCliTest;
import bisq.cli.GrpcClient;
import bisq.cli.table.builder.TableBuilder;
import haveno.cli.AbstractCliTest;
import haveno.cli.GrpcClient;
import haveno.cli.table.builder.TableBuilder;
@SuppressWarnings("unused")
@Slf4j

View file

@ -1,13 +1,11 @@
package bisq.cli.table;
package haveno.cli.table;
import lombok.extern.slf4j.Slf4j;
import static bisq.cli.table.builder.TableType.TRANSACTION_TBL;
import static haveno.cli.table.builder.TableType.TRANSACTION_TBL;
import bisq.cli.AbstractCliTest;
import bisq.cli.table.builder.TableBuilder;
import haveno.cli.AbstractCliTest;
import haveno.cli.table.builder.TableBuilder;
@SuppressWarnings("unused")
@Slf4j

View file

@ -1,13 +1,11 @@
package bisq.cli.table;
package haveno.cli.table;
import lombok.extern.slf4j.Slf4j;
import static bisq.cli.table.builder.TableType.PAYMENT_ACCOUNT_TBL;
import static haveno.cli.table.builder.TableType.PAYMENT_ACCOUNT_TBL;
import bisq.cli.AbstractCliTest;
import bisq.cli.table.builder.TableBuilder;
import haveno.cli.AbstractCliTest;
import haveno.cli.table.builder.TableBuilder;
@SuppressWarnings("unused")
@Slf4j