mirror of
https://github.com/boldsuck/haveno.git
synced 2024-12-22 03:59:22 +00:00
Removing star and unused imports with checkstyle
This commit is contained in:
parent
ce05710537
commit
3b8f19c4ce
1206 changed files with 5197 additions and 6620 deletions
6
.github/workflows/codeql-analysis.yml
vendored
6
.github/workflows/codeql-analysis.yml
vendored
|
@ -33,11 +33,11 @@ jobs:
|
|||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v1
|
||||
uses: github/codeql-action/init@v2
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||
|
@ -56,4 +56,4 @@ jobs:
|
|||
./gradlew build
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v1
|
||||
uses: github/codeql-action/analyze@v2
|
||||
|
|
|
@ -6,8 +6,9 @@
|
|||
<option name="HTML_ALIGN_ATTRIBUTES" value="false" />
|
||||
</HTMLCodeStyleSettings>
|
||||
<JavaCodeStyleSettings>
|
||||
<option name="LAYOUT_STATIC_IMPORTS_SEPARATELY" value="false" />
|
||||
<option name="CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND" value="99" />
|
||||
<option name="NAMES_COUNT_TO_USE_IMPORT_ON_DEMAND" value="5" />
|
||||
<option name="NAMES_COUNT_TO_USE_IMPORT_ON_DEMAND" value="99" />
|
||||
<option name="PACKAGES_TO_USE_IMPORT_ON_DEMAND">
|
||||
<value />
|
||||
</option>
|
||||
|
@ -169,7 +170,6 @@
|
|||
<emptyLine />
|
||||
<package name="org.junit" withSubpackages="true" static="false" />
|
||||
<emptyLine />
|
||||
<package name="" withSubpackages="true" static="true" />
|
||||
<emptyLine />
|
||||
<emptyLine />
|
||||
<emptyLine />
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<component name="ProjectCodeStyleConfiguration">
|
||||
<state>
|
||||
<option name="USE_PER_PROJECT_SETTINGS" value="true" />
|
||||
<option name="PREFERRED_PROJECT_CODE_STYLE" value="Default" />
|
||||
</state>
|
||||
</component>
|
|
@ -17,10 +17,11 @@
|
|||
|
||||
package haveno.apitest;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import haveno.apitest.config.ApiTestConfig;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import static haveno.apitest.Scaffold.EXIT_FAILURE;
|
||||
import static haveno.apitest.Scaffold.EXIT_SUCCESS;
|
||||
import static haveno.apitest.config.ApiTestRateMeterInterceptorConfig.appendCallRateMeteringConfigPathOpt;
|
||||
|
@ -29,8 +30,6 @@ import static haveno.apitest.config.ApiTestRateMeterInterceptorConfig.hasCallRat
|
|||
import static java.lang.System.err;
|
||||
import static java.lang.System.exit;
|
||||
|
||||
import haveno.apitest.config.ApiTestConfig;
|
||||
|
||||
/**
|
||||
* ApiTestMain is a placeholder for the gradle build file, which requires a valid
|
||||
* 'mainClassName' property in the :apitest subproject configuration.
|
||||
|
|
|
@ -26,15 +26,16 @@ import haveno.apitest.linux.LinuxProcess;
|
|||
import haveno.cli.GrpcClient;
|
||||
import haveno.common.config.HavenoHelpFormatter;
|
||||
import haveno.common.util.Utilities;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
import java.nio.file.attribute.PosixFilePermissions;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
import java.util.concurrent.CountDownLatch;
|
||||
|
@ -43,14 +44,16 @@ import java.util.concurrent.ExecutorService;
|
|||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.Future;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import static haveno.apitest.Scaffold.BitcoinCoreApp.bitcoind;
|
||||
import static haveno.apitest.config.ApiTestConfig.MEDIATOR;
|
||||
import static haveno.apitest.config.ApiTestConfig.REFUND_AGENT;
|
||||
import static haveno.apitest.config.HavenoAppConfig.*;
|
||||
import static haveno.apitest.config.HavenoAppConfig.alicedaemon;
|
||||
import static haveno.apitest.config.HavenoAppConfig.alicedesktop;
|
||||
import static haveno.apitest.config.HavenoAppConfig.arbdaemon;
|
||||
import static haveno.apitest.config.HavenoAppConfig.arbdesktop;
|
||||
import static haveno.apitest.config.HavenoAppConfig.bobdaemon;
|
||||
import static haveno.apitest.config.HavenoAppConfig.bobdesktop;
|
||||
import static haveno.apitest.config.HavenoAppConfig.seednode;
|
||||
import static haveno.common.app.DevEnv.DEV_PRIVILEGE_PRIV_KEY;
|
||||
import static java.lang.String.format;
|
||||
import static java.lang.System.exit;
|
||||
|
|
|
@ -17,19 +17,17 @@
|
|||
|
||||
package haveno.apitest;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import haveno.apitest.linux.LinuxProcess;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Objects;
|
||||
import java.util.concurrent.Callable;
|
||||
import java.util.concurrent.CountDownLatch;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import static java.lang.String.format;
|
||||
import static java.util.concurrent.TimeUnit.MILLISECONDS;
|
||||
|
||||
import haveno.apitest.linux.LinuxProcess;
|
||||
|
||||
@Slf4j
|
||||
public class SetupTask implements Callable<SetupTask.Status> {
|
||||
|
||||
|
|
|
@ -18,10 +18,10 @@
|
|||
package haveno.apitest;
|
||||
|
||||
import haveno.apitest.linux.BashCommand;
|
||||
import java.io.IOException;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
@Slf4j
|
||||
class SmokeTestBashCommand {
|
||||
|
||||
|
|
|
@ -17,14 +17,13 @@
|
|||
|
||||
package haveno.apitest;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import static java.lang.String.format;
|
||||
|
||||
import haveno.apitest.config.ApiTestConfig;
|
||||
import haveno.apitest.linux.BitcoinCli;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import static java.lang.String.format;
|
||||
|
||||
@Slf4j
|
||||
class SmokeTestBitcoind {
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
|
||||
package haveno.apitest.config;
|
||||
|
||||
import haveno.common.config.CompositeOptionSet;
|
||||
import joptsimple.AbstractOptionSpec;
|
||||
import joptsimple.ArgumentAcceptingOptionSpec;
|
||||
import joptsimple.HelpFormatter;
|
||||
|
@ -24,24 +25,20 @@ import joptsimple.OptionException;
|
|||
import joptsimple.OptionParser;
|
||||
import joptsimple.OptionSet;
|
||||
import joptsimple.OptionSpec;
|
||||
|
||||
import java.net.InetAddress;
|
||||
|
||||
import java.nio.file.Paths;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.io.UncheckedIOException;
|
||||
|
||||
import java.net.InetAddress;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.Properties;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import static java.lang.String.format;
|
||||
import static java.lang.System.getProperty;
|
||||
import static java.lang.System.getenv;
|
||||
|
@ -49,8 +46,6 @@ import static java.util.Arrays.asList;
|
|||
import static java.util.Arrays.stream;
|
||||
import static joptsimple.internal.Strings.EMPTY;
|
||||
|
||||
import haveno.common.config.CompositeOptionSet;
|
||||
|
||||
@Slf4j
|
||||
public class ApiTestConfig {
|
||||
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
package haveno.apitest.config;
|
||||
|
||||
import haveno.daemon.grpc.GrpcVersionService;
|
||||
import haveno.daemon.grpc.interceptor.GrpcServiceRateMeteringConfig;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import static haveno.apitest.config.ApiTestConfig.CALL_RATE_METERING_CONFIG_PATH;
|
||||
import static haveno.proto.grpc.DisputeAgentsGrpc.getRegisterDisputeAgentMethod;
|
||||
import static haveno.proto.grpc.GetVersionGrpc.getGetVersionMethod;
|
||||
import static haveno.apitest.config.ApiTestConfig.CALL_RATE_METERING_CONFIG_PATH;
|
||||
import static java.lang.System.arraycopy;
|
||||
import static java.util.Arrays.stream;
|
||||
import static java.util.concurrent.TimeUnit.MILLISECONDS;
|
||||
import static java.util.concurrent.TimeUnit.SECONDS;
|
||||
|
||||
import haveno.daemon.grpc.GrpcVersionService;
|
||||
import haveno.daemon.grpc.interceptor.GrpcServiceRateMeteringConfig;
|
||||
|
||||
public class ApiTestRateMeterInterceptorConfig {
|
||||
|
||||
public static File getTestRateMeterInterceptorConfig() {
|
||||
|
|
|
@ -17,22 +17,19 @@
|
|||
|
||||
package haveno.apitest.linux;
|
||||
|
||||
import java.nio.file.Paths;
|
||||
import haveno.apitest.config.ApiTestConfig;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
import java.nio.file.Paths;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import static haveno.apitest.linux.BashCommand.isAlive;
|
||||
import static java.lang.String.format;
|
||||
import static joptsimple.internal.Strings.EMPTY;
|
||||
|
||||
import haveno.apitest.config.ApiTestConfig;
|
||||
|
||||
@Slf4j
|
||||
abstract class AbstractLinuxProcess implements LinuxProcess {
|
||||
|
||||
|
|
|
@ -17,14 +17,12 @@
|
|||
|
||||
package haveno.apitest.linux;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import static haveno.apitest.config.ApiTestConfig.BASH_PATH_VALUE;
|
||||
import static java.lang.management.ManagementFactory.getRuntimeMXBean;
|
||||
|
|
|
@ -18,10 +18,10 @@
|
|||
package haveno.apitest.linux;
|
||||
|
||||
import haveno.apitest.config.ApiTestConfig;
|
||||
import java.io.IOException;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
@Slf4j
|
||||
public class BitcoinCli extends AbstractLinuxProcess implements LinuxProcess {
|
||||
|
||||
|
|
|
@ -17,17 +17,16 @@
|
|||
|
||||
package haveno.apitest.linux;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import haveno.apitest.config.ApiTestConfig;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import static haveno.apitest.linux.BashCommand.isAlive;
|
||||
import static java.lang.String.format;
|
||||
import static java.util.concurrent.TimeUnit.MILLISECONDS;
|
||||
import static joptsimple.internal.Strings.EMPTY;
|
||||
|
||||
import haveno.apitest.config.ApiTestConfig;
|
||||
|
||||
@Slf4j
|
||||
public class BitcoinDaemon extends AbstractLinuxProcess implements LinuxProcess {
|
||||
|
||||
|
|
|
@ -17,24 +17,21 @@
|
|||
|
||||
package haveno.apitest.linux;
|
||||
|
||||
import java.nio.file.Paths;
|
||||
import haveno.apitest.config.ApiTestConfig;
|
||||
import haveno.apitest.config.HavenoAppConfig;
|
||||
import haveno.daemon.app.HavenoDaemonMain;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
import java.nio.file.Paths;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import static haveno.apitest.linux.BashCommand.isAlive;
|
||||
import static java.lang.String.format;
|
||||
import static java.util.concurrent.TimeUnit.MILLISECONDS;
|
||||
|
||||
import haveno.apitest.config.ApiTestConfig;
|
||||
import haveno.apitest.config.HavenoAppConfig;
|
||||
import haveno.daemon.app.HavenoDaemonMain;
|
||||
|
||||
/**
|
||||
* Runs a regtest/dao Haveno application instance in the background.
|
||||
*/
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
package haveno.apitest.linux;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface LinuxProcess {
|
||||
|
|
|
@ -17,13 +17,12 @@
|
|||
|
||||
package haveno.apitest.linux;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* This class can be used to execute a system command from a Java application.
|
||||
* See the documentation for the public methods of this class for more
|
||||
|
|
|
@ -17,12 +17,12 @@
|
|||
|
||||
package haveno.apitest.linux;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* This class is intended to be used with the SystemCommandExecutor
|
||||
* class to let users execute system commands from Java applications.
|
||||
|
|
|
@ -17,18 +17,17 @@
|
|||
|
||||
package haveno.apitest;
|
||||
|
||||
import java.time.Duration;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import java.util.concurrent.ExecutionException;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import haveno.apitest.config.ApiTestConfig;
|
||||
import haveno.apitest.method.BitcoinCliHelper;
|
||||
import haveno.cli.GrpcClient;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.junit.jupiter.api.TestInfo;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import org.junit.jupiter.api.TestInfo;
|
||||
import java.io.IOException;
|
||||
import java.time.Duration;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static com.google.common.util.concurrent.Uninterruptibles.sleepUninterruptibly;
|
||||
import static haveno.apitest.config.ApiTestRateMeterInterceptorConfig.getTestRateMeterInterceptorConfig;
|
||||
|
@ -38,11 +37,6 @@ import static haveno.apitest.config.HavenoAppConfig.bobdaemon;
|
|||
import static java.net.InetAddress.getLoopbackAddress;
|
||||
import static java.util.Arrays.stream;
|
||||
|
||||
import haveno.apitest.Scaffold;
|
||||
import haveno.apitest.config.ApiTestConfig;
|
||||
import haveno.apitest.method.BitcoinCliHelper;
|
||||
import haveno.cli.GrpcClient;
|
||||
|
||||
/**
|
||||
* Base class for all test types: 'method', 'scenario' and 'e2e'.
|
||||
* <p>
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package haveno.apitest;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.junit.runner.Description;
|
||||
import org.junit.runner.JUnitCore;
|
||||
import org.junit.runner.Result;
|
||||
|
|
|
@ -17,14 +17,14 @@
|
|||
|
||||
package haveno.apitest.method;
|
||||
|
||||
import haveno.apitest.config.ApiTestConfig;
|
||||
import haveno.apitest.linux.BitcoinCli;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import static java.lang.String.format;
|
||||
import static org.junit.jupiter.api.Assertions.fail;
|
||||
|
||||
import haveno.apitest.config.ApiTestConfig;
|
||||
import haveno.apitest.linux.BitcoinCli;
|
||||
|
||||
public final class BitcoinCliHelper {
|
||||
|
||||
private final ApiTestConfig config;
|
||||
|
|
|
@ -18,9 +18,7 @@
|
|||
package haveno.apitest.method;
|
||||
|
||||
import io.grpc.StatusRuntimeException;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.junit.jupiter.api.AfterAll;
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
package haveno.apitest.method;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.junit.jupiter.api.AfterAll;
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
package haveno.apitest.method;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.junit.jupiter.api.AfterAll;
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
|
||||
package haveno.apitest.method;
|
||||
|
||||
import haveno.proto.grpc.BalancesInfo;
|
||||
import haveno.apitest.ApiTestCase;
|
||||
import haveno.apitest.linux.BashCommand;
|
||||
import haveno.cli.GrpcClient;
|
||||
|
@ -27,22 +26,19 @@ import haveno.core.api.model.PaymentAccountForm;
|
|||
import haveno.core.payment.F2FAccount;
|
||||
import haveno.core.payment.NationalBankAccount;
|
||||
import haveno.core.proto.CoreProtoResolver;
|
||||
import haveno.proto.grpc.BalancesInfo;
|
||||
import io.grpc.Status;
|
||||
import io.grpc.StatusRuntimeException;
|
||||
|
||||
import java.io.File;
|
||||
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;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.io.File;
|
||||
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 static haveno.apitest.config.ApiTestConfig.BTC;
|
||||
import static haveno.apitest.config.ApiTestRateMeterInterceptorConfig.getTestRateMeterInterceptorConfig;
|
||||
|
|
|
@ -18,9 +18,7 @@
|
|||
package haveno.apitest.method;
|
||||
|
||||
import io.grpc.StatusRuntimeException;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.junit.jupiter.api.AfterAll;
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
|
|
|
@ -17,24 +17,21 @@
|
|||
|
||||
package haveno.apitest.method.offer;
|
||||
|
||||
import haveno.proto.grpc.OfferInfo;
|
||||
import haveno.apitest.method.MethodTest;
|
||||
import haveno.cli.CliMain;
|
||||
import haveno.cli.table.builder.TableBuilder;
|
||||
import haveno.proto.grpc.OfferInfo;
|
||||
import lombok.Setter;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.junit.jupiter.api.AfterAll;
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import protobuf.PaymentAccount;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.MathContext;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.function.Function;
|
||||
|
||||
import lombok.Setter;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.junit.jupiter.api.AfterAll;
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
|
||||
import static haveno.apitest.Scaffold.BitcoinCoreApp.bitcoind;
|
||||
import static haveno.apitest.config.ApiTestConfig.XMR;
|
||||
import static haveno.apitest.config.HavenoAppConfig.alicedaemon;
|
||||
|
|
|
@ -17,19 +17,18 @@
|
|||
|
||||
package haveno.apitest.method.offer;
|
||||
|
||||
import haveno.proto.grpc.OfferInfo;
|
||||
import haveno.core.payment.PaymentAccount;
|
||||
import java.util.List;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
import haveno.proto.grpc.OfferInfo;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.MethodOrderer;
|
||||
import org.junit.jupiter.api.Order;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.TestMethodOrder;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static protobuf.OfferDirection.BUY;
|
||||
|
||||
|
|
|
@ -17,8 +17,8 @@
|
|||
|
||||
package haveno.apitest.method.offer;
|
||||
|
||||
import haveno.core.payment.PaymentAccount;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.MethodOrderer;
|
||||
import org.junit.jupiter.api.Order;
|
||||
|
@ -35,8 +35,6 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
|
|||
import static protobuf.OfferDirection.BUY;
|
||||
import static protobuf.OfferDirection.SELL;
|
||||
|
||||
import haveno.core.payment.PaymentAccount;
|
||||
|
||||
@Disabled
|
||||
@Slf4j
|
||||
@TestMethodOrder(MethodOrderer.OrderAnnotation.class)
|
||||
|
|
|
@ -17,20 +17,18 @@
|
|||
|
||||
package haveno.apitest.method.offer;
|
||||
|
||||
import haveno.proto.grpc.OfferInfo;
|
||||
import haveno.core.payment.PaymentAccount;
|
||||
import java.text.DecimalFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import haveno.proto.grpc.OfferInfo;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.MethodOrderer;
|
||||
import org.junit.jupiter.api.Order;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.TestMethodOrder;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.text.DecimalFormat;
|
||||
|
||||
import static haveno.apitest.config.ApiTestConfig.BTC;
|
||||
import static haveno.apitest.config.ApiTestConfig.USD;
|
||||
import static haveno.common.util.MathUtils.roundDouble;
|
||||
|
|
|
@ -18,11 +18,7 @@
|
|||
package haveno.apitest.method.offer;
|
||||
|
||||
import haveno.proto.grpc.OfferInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.MethodOrderer;
|
||||
|
@ -30,6 +26,8 @@ import org.junit.jupiter.api.Order;
|
|||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.TestMethodOrder;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static haveno.apitest.config.ApiTestConfig.BTC;
|
||||
import static haveno.apitest.config.ApiTestConfig.XMR;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
|
|
@ -17,24 +17,20 @@
|
|||
|
||||
package haveno.apitest.method.offer;
|
||||
|
||||
import haveno.core.payment.PaymentAccount;
|
||||
import io.grpc.StatusRuntimeException;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.MethodOrderer;
|
||||
import org.junit.jupiter.api.Order;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.TestMethodOrder;
|
||||
|
||||
import static haveno.apitest.config.ApiTestConfig.BTC;
|
||||
import static java.lang.String.format;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||
import static protobuf.OfferDirection.BUY;
|
||||
|
||||
import haveno.core.payment.PaymentAccount;
|
||||
|
||||
@Disabled
|
||||
@Slf4j
|
||||
@TestMethodOrder(MethodOrderer.OrderAnnotation.class)
|
||||
|
|
|
@ -10,13 +10,15 @@ import haveno.core.locale.FiatCurrency;
|
|||
import haveno.core.locale.Res;
|
||||
import haveno.core.locale.TradeCurrency;
|
||||
import haveno.core.payment.PaymentAccount;
|
||||
import java.nio.file.Paths;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.TestInfo;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStreamWriter;
|
||||
|
||||
import java.nio.file.Paths;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Comparator;
|
||||
|
@ -26,15 +28,14 @@ import java.util.Map;
|
|||
import java.util.Optional;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.TestInfo;
|
||||
|
||||
import static java.lang.String.format;
|
||||
import static java.lang.System.getProperty;
|
||||
import static java.nio.charset.StandardCharsets.UTF_8;
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
import static org.junit.jupiter.api.Assertions.assertArrayEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
import static org.junit.jupiter.api.Assertions.fail;
|
||||
|
||||
@Slf4j
|
||||
public class AbstractPaymentAccountTest extends MethodTest {
|
||||
|
|
|
@ -58,17 +58,7 @@ import haveno.core.payment.payload.SameBankAccountPayload;
|
|||
import haveno.core.payment.payload.SpecificBanksAccountPayload;
|
||||
import haveno.core.payment.payload.SwiftAccountPayload;
|
||||
import io.grpc.StatusRuntimeException;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.junit.jupiter.api.AfterAll;
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
|
@ -76,6 +66,13 @@ import org.junit.jupiter.api.Test;
|
|||
import org.junit.jupiter.api.TestInfo;
|
||||
import org.junit.jupiter.api.TestMethodOrder;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static haveno.apitest.Scaffold.BitcoinCoreApp.bitcoind;
|
||||
import static haveno.apitest.config.ApiTestConfig.EUR;
|
||||
import static haveno.apitest.config.ApiTestConfig.USD;
|
||||
|
@ -83,7 +80,37 @@ import static haveno.apitest.config.HavenoAppConfig.alicedaemon;
|
|||
import static haveno.cli.table.builder.TableType.PAYMENT_ACCOUNT_TBL;
|
||||
import static haveno.core.locale.CurrencyUtil.getAllSortedFiatCurrencies;
|
||||
import static haveno.core.locale.CurrencyUtil.getTradeCurrency;
|
||||
import static haveno.core.payment.payload.PaymentMethod.*;
|
||||
import static haveno.core.payment.payload.PaymentMethod.ADVANCED_CASH_ID;
|
||||
import static haveno.core.payment.payload.PaymentMethod.ALI_PAY_ID;
|
||||
import static haveno.core.payment.payload.PaymentMethod.AUSTRALIA_PAYID_ID;
|
||||
import static haveno.core.payment.payload.PaymentMethod.CAPITUAL_ID;
|
||||
import static haveno.core.payment.payload.PaymentMethod.CASH_DEPOSIT_ID;
|
||||
import static haveno.core.payment.payload.PaymentMethod.CLEAR_X_CHANGE_ID;
|
||||
import static haveno.core.payment.payload.PaymentMethod.F2F_ID;
|
||||
import static haveno.core.payment.payload.PaymentMethod.FASTER_PAYMENTS_ID;
|
||||
import static haveno.core.payment.payload.PaymentMethod.HAL_CASH_ID;
|
||||
import static haveno.core.payment.payload.PaymentMethod.INTERAC_E_TRANSFER_ID;
|
||||
import static haveno.core.payment.payload.PaymentMethod.JAPAN_BANK_ID;
|
||||
import static haveno.core.payment.payload.PaymentMethod.MONEY_BEAM_ID;
|
||||
import static haveno.core.payment.payload.PaymentMethod.MONEY_GRAM_ID;
|
||||
import static haveno.core.payment.payload.PaymentMethod.NATIONAL_BANK_ID;
|
||||
import static haveno.core.payment.payload.PaymentMethod.PAXUM_ID;
|
||||
import static haveno.core.payment.payload.PaymentMethod.PAYSERA_ID;
|
||||
import static haveno.core.payment.payload.PaymentMethod.PERFECT_MONEY_ID;
|
||||
import static haveno.core.payment.payload.PaymentMethod.POPMONEY_ID;
|
||||
import static haveno.core.payment.payload.PaymentMethod.PROMPT_PAY_ID;
|
||||
import static haveno.core.payment.payload.PaymentMethod.REVOLUT_ID;
|
||||
import static haveno.core.payment.payload.PaymentMethod.SAME_BANK_ID;
|
||||
import static haveno.core.payment.payload.PaymentMethod.SEPA_ID;
|
||||
import static haveno.core.payment.payload.PaymentMethod.SEPA_INSTANT_ID;
|
||||
import static haveno.core.payment.payload.PaymentMethod.SPECIFIC_BANKS_ID;
|
||||
import static haveno.core.payment.payload.PaymentMethod.SWIFT_ID;
|
||||
import static haveno.core.payment.payload.PaymentMethod.SWISH_ID;
|
||||
import static haveno.core.payment.payload.PaymentMethod.TRANSFERWISE_ID;
|
||||
import static haveno.core.payment.payload.PaymentMethod.UPHOLD_ID;
|
||||
import static haveno.core.payment.payload.PaymentMethod.US_POSTAL_MONEY_ORDER_ID;
|
||||
import static haveno.core.payment.payload.PaymentMethod.WECHAT_PAY_ID;
|
||||
import static haveno.core.payment.payload.PaymentMethod.WESTERN_UNION_ID;
|
||||
import static java.util.Comparator.comparing;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||
|
|
|
@ -1,12 +1,7 @@
|
|||
package haveno.apitest.method.payment;
|
||||
|
||||
import protobuf.PaymentMethod;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import haveno.apitest.method.MethodTest;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.junit.jupiter.api.AfterAll;
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
|
@ -14,14 +9,16 @@ import org.junit.jupiter.api.MethodOrderer;
|
|||
import org.junit.jupiter.api.Order;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.TestMethodOrder;
|
||||
import protobuf.PaymentMethod;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static haveno.apitest.Scaffold.BitcoinCoreApp.bitcoind;
|
||||
import static haveno.apitest.config.HavenoAppConfig.alicedaemon;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
import static org.junit.jupiter.api.Assertions.fail;
|
||||
|
||||
import haveno.apitest.method.MethodTest;
|
||||
|
||||
@Disabled
|
||||
@Slf4j
|
||||
@TestMethodOrder(MethodOrderer.OrderAnnotation.class)
|
||||
|
|
|
@ -1,31 +1,30 @@
|
|||
package haveno.apitest.method.trade;
|
||||
|
||||
import haveno.proto.grpc.TradeInfo;
|
||||
import haveno.apitest.method.offer.AbstractOfferTest;
|
||||
import haveno.cli.CliMain;
|
||||
import haveno.cli.GrpcClient;
|
||||
import haveno.cli.table.builder.TableBuilder;
|
||||
import haveno.proto.grpc.TradeInfo;
|
||||
import lombok.Getter;
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.junit.jupiter.api.TestInfo;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
import java.util.function.Function;
|
||||
import java.util.function.Predicate;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.junit.jupiter.api.TestInfo;
|
||||
|
||||
import static haveno.cli.table.builder.TableType.TRADE_DETAIL_TBL;
|
||||
import static haveno.core.trade.Trade.Phase.DEPOSITS_UNLOCKED;
|
||||
import static haveno.core.trade.Trade.Phase.PAYMENT_RECEIVED;
|
||||
import static haveno.core.trade.Trade.Phase.PAYMENT_SENT;
|
||||
import static haveno.core.trade.Trade.State.BUYER_SAW_ARRIVED_PAYMENT_SENT_MSG;
|
||||
import static haveno.core.trade.Trade.State.DEPOSIT_TXS_UNLOCKED_IN_BLOCKCHAIN;
|
||||
import static haveno.core.trade.Trade.State.SELLER_RECEIVED_PAYMENT_SENT_MSG;
|
||||
import static java.lang.String.format;
|
||||
import static java.lang.System.out;
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||
import static org.junit.jupiter.api.Assertions.fail;
|
||||
|
||||
public class AbstractTradeTest extends AbstractOfferTest {
|
||||
|
||||
|
|
|
@ -17,10 +17,9 @@
|
|||
|
||||
package haveno.apitest.method.trade;
|
||||
|
||||
import haveno.core.payment.PaymentAccount;
|
||||
import io.grpc.StatusRuntimeException;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.MethodOrderer;
|
||||
import org.junit.jupiter.api.Order;
|
||||
|
@ -36,8 +35,6 @@ import static org.junit.jupiter.api.Assertions.fail;
|
|||
import static protobuf.OfferDirection.BUY;
|
||||
import static protobuf.OpenOffer.State.AVAILABLE;
|
||||
|
||||
import haveno.core.payment.PaymentAccount;
|
||||
|
||||
@Disabled
|
||||
@Slf4j
|
||||
@TestMethodOrder(MethodOrderer.OrderAnnotation.class)
|
||||
|
|
|
@ -34,10 +34,10 @@
|
|||
|
||||
package haveno.apitest.method.trade;
|
||||
|
||||
import haveno.core.payment.PaymentAccount;
|
||||
import haveno.core.payment.payload.NationalBankAccountPayload;
|
||||
import io.grpc.StatusRuntimeException;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.MethodOrderer;
|
||||
|
@ -46,17 +46,17 @@ import org.junit.jupiter.api.Test;
|
|||
import org.junit.jupiter.api.TestInfo;
|
||||
import org.junit.jupiter.api.TestMethodOrder;
|
||||
|
||||
import static haveno.apitest.config.ApiTestConfig.BTC;
|
||||
import static haveno.core.trade.Trade.Phase.PAYMENT_RECEIVED;
|
||||
import static haveno.core.trade.Trade.State.SELLER_SAW_ARRIVED_PAYMENT_RECEIVED_MSG;
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertNotEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
import static org.junit.jupiter.api.Assertions.fail;
|
||||
import static protobuf.Offer.State.OFFER_FEE_RESERVED;
|
||||
import static protobuf.OfferDirection.BUY;
|
||||
import static protobuf.OpenOffer.State.AVAILABLE;
|
||||
|
||||
import haveno.core.payment.PaymentAccount;
|
||||
import haveno.core.payment.payload.NationalBankAccountPayload;
|
||||
|
||||
/**
|
||||
* Test case verifies trade can be made with national bank payment method,
|
||||
* and json contracts exclude bank acct details until deposit tx is confirmed.
|
||||
|
|
|
@ -17,10 +17,10 @@
|
|||
|
||||
package haveno.apitest.method.trade;
|
||||
|
||||
import haveno.apitest.method.offer.AbstractOfferTest;
|
||||
import haveno.cli.table.builder.TableBuilder;
|
||||
import io.grpc.StatusRuntimeException;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.MethodOrderer;
|
||||
|
@ -38,9 +38,6 @@ import static org.junit.jupiter.api.Assertions.fail;
|
|||
import static protobuf.Offer.State.OFFER_FEE_RESERVED;
|
||||
import static protobuf.OfferDirection.SELL;
|
||||
|
||||
import haveno.apitest.method.offer.AbstractOfferTest;
|
||||
import haveno.cli.table.builder.TableBuilder;
|
||||
|
||||
@Disabled
|
||||
@Slf4j
|
||||
@TestMethodOrder(MethodOrderer.OrderAnnotation.class)
|
||||
|
|
|
@ -17,10 +17,9 @@
|
|||
|
||||
package haveno.apitest.method.trade;
|
||||
|
||||
import haveno.core.payment.PaymentAccount;
|
||||
import io.grpc.StatusRuntimeException;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.MethodOrderer;
|
||||
import org.junit.jupiter.api.Order;
|
||||
|
@ -30,18 +29,13 @@ import org.junit.jupiter.api.TestMethodOrder;
|
|||
|
||||
import static haveno.apitest.config.ApiTestConfig.BTC;
|
||||
import static haveno.apitest.config.ApiTestConfig.USD;
|
||||
import static haveno.core.trade.Trade.Phase.COMPLETED;
|
||||
import static haveno.core.trade.Trade.Phase.PAYMENT_RECEIVED;
|
||||
import static haveno.core.trade.Trade.State.SELLER_SAW_ARRIVED_PAYMENT_RECEIVED_MSG;
|
||||
import static haveno.core.trade.Trade.State.TRADE_COMPLETED;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
import static org.junit.jupiter.api.Assertions.fail;
|
||||
import static protobuf.Offer.State.OFFER_FEE_RESERVED;
|
||||
import static protobuf.OfferDirection.SELL;
|
||||
|
||||
import haveno.core.payment.PaymentAccount;
|
||||
|
||||
@Disabled
|
||||
@Slf4j
|
||||
@TestMethodOrder(MethodOrderer.OrderAnnotation.class)
|
||||
|
|
|
@ -17,10 +17,10 @@
|
|||
|
||||
package haveno.apitest.method.trade;
|
||||
|
||||
import haveno.apitest.method.offer.AbstractOfferTest;
|
||||
import haveno.cli.table.builder.TableBuilder;
|
||||
import io.grpc.StatusRuntimeException;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.MethodOrderer;
|
||||
|
@ -38,9 +38,6 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
|||
import static org.junit.jupiter.api.Assertions.fail;
|
||||
import static protobuf.OfferDirection.BUY;
|
||||
|
||||
import haveno.apitest.method.offer.AbstractOfferTest;
|
||||
import haveno.cli.table.builder.TableBuilder;
|
||||
|
||||
@Disabled
|
||||
@Slf4j
|
||||
@TestMethodOrder(MethodOrderer.OrderAnnotation.class)
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
package haveno.apitest.method.wallet;
|
||||
|
||||
import haveno.proto.grpc.BtcBalanceInfo;
|
||||
import haveno.apitest.method.MethodTest;
|
||||
import haveno.cli.table.builder.TableBuilder;
|
||||
import haveno.proto.grpc.BtcBalanceInfo;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.junit.jupiter.api.AfterAll;
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
|
@ -22,8 +21,6 @@ import static haveno.apitest.method.wallet.WalletTestUtil.verifyBtcBalances;
|
|||
import static haveno.cli.table.builder.TableType.ADDRESS_BALANCE_TBL;
|
||||
import static haveno.cli.table.builder.TableType.BTC_BALANCE_TBL;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
import static org.junit.jupiter.api.MethodOrderer.OrderAnnotation;
|
||||
|
||||
@Disabled
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
package haveno.apitest.method.wallet;
|
||||
|
||||
import haveno.apitest.method.MethodTest;
|
||||
import io.grpc.StatusRuntimeException;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.junit.jupiter.api.AfterAll;
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
|
@ -18,8 +17,6 @@ import static org.junit.jupiter.api.Assertions.assertThrows;
|
|||
import static org.junit.jupiter.api.Assertions.fail;
|
||||
import static org.junit.jupiter.api.MethodOrderer.OrderAnnotation;
|
||||
|
||||
import haveno.apitest.method.MethodTest;
|
||||
|
||||
@SuppressWarnings("ResultOfMethodCallIgnored")
|
||||
@Disabled
|
||||
@Slf4j
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package haveno.apitest.method.wallet;
|
||||
|
||||
import haveno.proto.grpc.BtcBalanceInfo;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
|
|
@ -17,11 +17,10 @@
|
|||
|
||||
package haveno.apitest.scenario;
|
||||
|
||||
import haveno.proto.grpc.OfferInfo;
|
||||
import haveno.apitest.method.offer.AbstractOfferTest;
|
||||
import haveno.core.payment.PaymentAccount;
|
||||
import haveno.proto.grpc.OfferInfo;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.junit.jupiter.api.MethodOrderer;
|
||||
import org.junit.jupiter.api.Order;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
|
|
@ -17,8 +17,10 @@
|
|||
|
||||
package haveno.apitest.scenario;
|
||||
|
||||
import haveno.apitest.method.trade.AbstractTradeTest;
|
||||
import haveno.apitest.method.trade.TakeBuyBTCOfferTest;
|
||||
import haveno.apitest.method.trade.TakeSellBTCOfferTest;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.junit.jupiter.api.MethodOrderer;
|
||||
import org.junit.jupiter.api.Order;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
@ -28,10 +30,6 @@ import org.junit.jupiter.api.condition.EnabledIf;
|
|||
|
||||
import static java.lang.System.getenv;
|
||||
|
||||
import haveno.apitest.method.trade.AbstractTradeTest;
|
||||
import haveno.apitest.method.trade.TakeBuyBTCOfferTest;
|
||||
import haveno.apitest.method.trade.TakeSellBTCOfferTest;
|
||||
|
||||
@EnabledIf("envLongRunningTestEnabled")
|
||||
@Slf4j
|
||||
@TestMethodOrder(MethodOrderer.OrderAnnotation.class)
|
||||
|
|
|
@ -25,7 +25,6 @@ import haveno.apitest.method.offer.CreateOfferUsingMarketPriceMarginTest;
|
|||
import haveno.apitest.method.offer.CreateXMROffersTest;
|
||||
import haveno.apitest.method.offer.ValidateCreateOfferTest;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.junit.jupiter.api.MethodOrderer;
|
||||
import org.junit.jupiter.api.Order;
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
package haveno.apitest.scenario;
|
||||
|
||||
import haveno.apitest.method.payment.AbstractPaymentAccountTest;
|
||||
import haveno.apitest.method.payment.CreatePaymentAccountTest;
|
||||
import haveno.apitest.method.payment.GetPaymentMethodsTest;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.junit.jupiter.api.AfterAll;
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.junit.jupiter.api.MethodOrderer;
|
||||
|
@ -15,10 +17,6 @@ import static haveno.apitest.config.HavenoAppConfig.alicedaemon;
|
|||
import static haveno.apitest.config.HavenoAppConfig.seednode;
|
||||
import static org.junit.jupiter.api.Assertions.fail;
|
||||
|
||||
import haveno.apitest.method.payment.AbstractPaymentAccountTest;
|
||||
import haveno.apitest.method.payment.CreatePaymentAccountTest;
|
||||
import haveno.apitest.method.payment.GetPaymentMethodsTest;
|
||||
|
||||
@Slf4j
|
||||
@TestMethodOrder(MethodOrderer.OrderAnnotation.class)
|
||||
public class PaymentAccountTest extends AbstractPaymentAccountTest {
|
||||
|
|
|
@ -17,8 +17,14 @@
|
|||
|
||||
package haveno.apitest.scenario;
|
||||
|
||||
import haveno.apitest.config.ApiTestConfig;
|
||||
import haveno.apitest.method.BitcoinCliHelper;
|
||||
import haveno.apitest.scenario.bot.AbstractBotTest;
|
||||
import haveno.apitest.scenario.bot.BotClient;
|
||||
import haveno.apitest.scenario.bot.RobotBob;
|
||||
import haveno.apitest.scenario.bot.script.BashScriptGenerator;
|
||||
import haveno.apitest.scenario.bot.shutdown.ManualBotShutdownException;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.junit.jupiter.api.AfterAll;
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
|
@ -36,14 +42,6 @@ import static haveno.apitest.config.HavenoAppConfig.seednode;
|
|||
import static haveno.apitest.scenario.bot.shutdown.ManualShutdown.startShutdownTimer;
|
||||
import static org.junit.jupiter.api.Assertions.fail;
|
||||
|
||||
import haveno.apitest.config.ApiTestConfig;
|
||||
import haveno.apitest.method.BitcoinCliHelper;
|
||||
import haveno.apitest.scenario.bot.AbstractBotTest;
|
||||
import haveno.apitest.scenario.bot.BotClient;
|
||||
import haveno.apitest.scenario.bot.RobotBob;
|
||||
import haveno.apitest.scenario.bot.script.BashScriptGenerator;
|
||||
import haveno.apitest.scenario.bot.shutdown.ManualBotShutdownException;
|
||||
|
||||
// The test case is enabled if AbstractBotTest#botScriptExists() returns true.
|
||||
@EnabledIf("botScriptExists")
|
||||
@Slf4j
|
||||
|
|
|
@ -17,11 +17,12 @@
|
|||
|
||||
package haveno.apitest.scenario;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
import haveno.apitest.method.CallRateMeteringInterceptorTest;
|
||||
import haveno.apitest.method.GetMethodHelpTest;
|
||||
import haveno.apitest.method.GetVersionTest;
|
||||
import haveno.apitest.method.MethodTest;
|
||||
import haveno.apitest.method.RegisterDisputeAgentsTest;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.junit.jupiter.api.AfterAll;
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.junit.jupiter.api.MethodOrderer;
|
||||
|
@ -29,6 +30,9 @@ import org.junit.jupiter.api.Order;
|
|||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.TestMethodOrder;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
import static haveno.apitest.Scaffold.BitcoinCoreApp.bitcoind;
|
||||
import static haveno.apitest.config.ApiTestRateMeterInterceptorConfig.getTestRateMeterInterceptorConfig;
|
||||
import static haveno.apitest.config.HavenoAppConfig.alicedaemon;
|
||||
|
@ -37,12 +41,6 @@ import static haveno.apitest.config.HavenoAppConfig.seednode;
|
|||
import static haveno.common.file.FileUtil.deleteFileIfExists;
|
||||
import static org.junit.jupiter.api.Assertions.fail;
|
||||
|
||||
import haveno.apitest.method.CallRateMeteringInterceptorTest;
|
||||
import haveno.apitest.method.GetMethodHelpTest;
|
||||
import haveno.apitest.method.GetVersionTest;
|
||||
import haveno.apitest.method.MethodTest;
|
||||
import haveno.apitest.method.RegisterDisputeAgentsTest;
|
||||
|
||||
|
||||
@Slf4j
|
||||
@TestMethodOrder(MethodOrderer.OrderAnnotation.class)
|
||||
|
|
|
@ -24,7 +24,6 @@ import haveno.apitest.method.trade.TakeBuyXMROfferTest;
|
|||
import haveno.apitest.method.trade.TakeSellBTCOfferTest;
|
||||
import haveno.apitest.method.trade.TakeSellXMROfferTest;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.MethodOrderer;
|
||||
import org.junit.jupiter.api.Order;
|
||||
|
|
|
@ -17,8 +17,10 @@
|
|||
|
||||
package haveno.apitest.scenario;
|
||||
|
||||
import haveno.apitest.method.MethodTest;
|
||||
import haveno.apitest.method.wallet.BtcWalletTest;
|
||||
import haveno.apitest.method.wallet.WalletProtectionTest;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.junit.jupiter.api.AfterAll;
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.junit.jupiter.api.MethodOrderer;
|
||||
|
@ -33,10 +35,6 @@ import static haveno.apitest.config.HavenoAppConfig.arbdaemon;
|
|||
import static haveno.apitest.config.HavenoAppConfig.bobdaemon;
|
||||
import static haveno.apitest.config.HavenoAppConfig.seednode;
|
||||
|
||||
import haveno.apitest.method.MethodTest;
|
||||
import haveno.apitest.method.wallet.BtcWalletTest;
|
||||
import haveno.apitest.method.wallet.WalletProtectionTest;
|
||||
|
||||
@Slf4j
|
||||
@TestMethodOrder(MethodOrderer.OrderAnnotation.class)
|
||||
public class WalletTest extends MethodTest {
|
||||
|
|
|
@ -17,19 +17,17 @@
|
|||
|
||||
package haveno.apitest.scenario.bot;
|
||||
|
||||
import protobuf.PaymentAccount;
|
||||
|
||||
import com.google.gson.GsonBuilder;
|
||||
import haveno.apitest.method.MethodTest;
|
||||
import haveno.apitest.scenario.bot.script.BashScriptGenerator;
|
||||
import haveno.apitest.scenario.bot.script.BotScript;
|
||||
import haveno.core.locale.Country;
|
||||
import java.nio.file.Paths;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import protobuf.PaymentAccount;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import java.nio.file.Paths;
|
||||
|
||||
import static haveno.core.locale.CountryUtil.findCountryByCode;
|
||||
import static haveno.core.payment.payload.PaymentMethod.CLEAR_X_CHANGE_ID;
|
||||
|
|
|
@ -4,9 +4,8 @@ import haveno.apitest.method.BitcoinCliHelper;
|
|||
import haveno.apitest.scenario.bot.script.BashScriptGenerator;
|
||||
import haveno.apitest.scenario.bot.script.BotScript;
|
||||
import haveno.core.locale.Country;
|
||||
import protobuf.PaymentAccount;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import protobuf.PaymentAccount;
|
||||
|
||||
import static haveno.core.locale.CountryUtil.findCountryByCode;
|
||||
import static haveno.core.payment.payload.PaymentMethod.CLEAR_X_CHANGE_ID;
|
||||
|
|
|
@ -17,21 +17,18 @@
|
|||
|
||||
package haveno.apitest.scenario.bot;
|
||||
|
||||
import haveno.cli.GrpcClient;
|
||||
import haveno.proto.grpc.BalancesInfo;
|
||||
import haveno.proto.grpc.GetPaymentAccountsRequest;
|
||||
import haveno.proto.grpc.OfferInfo;
|
||||
import haveno.proto.grpc.TradeInfo;
|
||||
import haveno.cli.GrpcClient;
|
||||
import haveno.core.api.model.PaymentAccountForm;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import protobuf.PaymentAccount;
|
||||
|
||||
import java.text.DecimalFormat;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.function.BiPredicate;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import static org.apache.commons.lang3.StringUtils.capitalize;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,19 +1,17 @@
|
|||
package haveno.apitest.scenario.bot;
|
||||
|
||||
import protobuf.PaymentAccount;
|
||||
|
||||
import static haveno.core.payment.payload.PaymentMethod.CLEAR_X_CHANGE_ID;
|
||||
import static haveno.core.payment.payload.PaymentMethod.F2F_ID;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import haveno.core.api.model.PaymentAccountForm;
|
||||
import haveno.core.locale.Country;
|
||||
import java.io.File;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import protobuf.PaymentAccount;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Map;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import static haveno.core.payment.payload.PaymentMethod.CLEAR_X_CHANGE_ID;
|
||||
import static haveno.core.payment.payload.PaymentMethod.F2F_ID;
|
||||
|
||||
@Slf4j
|
||||
public class BotPaymentAccountGenerator {
|
||||
|
|
|
@ -18,20 +18,15 @@
|
|||
package haveno.apitest.scenario.bot;
|
||||
|
||||
import haveno.proto.grpc.OfferInfo;
|
||||
|
||||
import protobuf.PaymentAccount;
|
||||
|
||||
import java.security.SecureRandom;
|
||||
|
||||
import java.text.DecimalFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import protobuf.PaymentAccount;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.security.SecureRandom;
|
||||
import java.text.DecimalFormat;
|
||||
import java.util.Objects;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
import static haveno.apitest.method.offer.AbstractOfferTest.defaultBuyerSecurityDepositPct;
|
||||
import static haveno.cli.CurrencyFormat.formatInternalFiatPrice;
|
||||
|
|
|
@ -17,14 +17,6 @@
|
|||
|
||||
package haveno.apitest.scenario.bot;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import static haveno.apitest.scenario.bot.protocol.ProtocolStep.DONE;
|
||||
import static haveno.apitest.scenario.bot.shutdown.ManualShutdown.isShutdownCalled;
|
||||
import static haveno.cli.table.builder.TableType.BTC_BALANCE_TBL;
|
||||
import static java.util.concurrent.TimeUnit.SECONDS;
|
||||
|
||||
import haveno.apitest.method.BitcoinCliHelper;
|
||||
import haveno.apitest.scenario.bot.protocol.BotProtocol;
|
||||
import haveno.apitest.scenario.bot.protocol.MakerBotProtocol;
|
||||
|
@ -33,6 +25,13 @@ import haveno.apitest.scenario.bot.script.BashScriptGenerator;
|
|||
import haveno.apitest.scenario.bot.script.BotScript;
|
||||
import haveno.apitest.scenario.bot.shutdown.ManualBotShutdownException;
|
||||
import haveno.cli.table.builder.TableBuilder;
|
||||
import lombok.Getter;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import static haveno.apitest.scenario.bot.protocol.ProtocolStep.DONE;
|
||||
import static haveno.apitest.scenario.bot.shutdown.ManualShutdown.isShutdownCalled;
|
||||
import static haveno.cli.table.builder.TableType.BTC_BALANCE_TBL;
|
||||
import static java.util.concurrent.TimeUnit.SECONDS;
|
||||
|
||||
@Slf4j
|
||||
public
|
||||
|
|
|
@ -18,18 +18,18 @@
|
|||
package haveno.apitest.scenario.bot.protocol;
|
||||
|
||||
|
||||
import haveno.proto.grpc.TradeInfo;
|
||||
import haveno.apitest.method.BitcoinCliHelper;
|
||||
import haveno.apitest.scenario.bot.BotClient;
|
||||
import haveno.apitest.scenario.bot.script.BashScriptGenerator;
|
||||
import haveno.apitest.scenario.bot.shutdown.ManualBotShutdownException;
|
||||
import haveno.cli.table.builder.TableBuilder;
|
||||
import haveno.proto.grpc.TradeInfo;
|
||||
import lombok.Getter;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import protobuf.PaymentAccount;
|
||||
|
||||
import java.security.SecureRandom;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import java.security.SecureRandom;
|
||||
import java.util.Objects;
|
||||
import java.util.concurrent.atomic.AtomicLong;
|
||||
import java.util.function.Consumer;
|
||||
|
@ -38,10 +38,14 @@ import java.util.function.Predicate;
|
|||
import java.util.function.Supplier;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import static haveno.apitest.scenario.bot.protocol.ProtocolStep.*;
|
||||
import static haveno.apitest.scenario.bot.protocol.ProtocolStep.SEND_PAYMENT_RECEIVED_CONFIRMATION_MESSAGE;
|
||||
import static haveno.apitest.scenario.bot.protocol.ProtocolStep.SEND_PAYMENT_SENT_MESSAGE;
|
||||
import static haveno.apitest.scenario.bot.protocol.ProtocolStep.START;
|
||||
import static haveno.apitest.scenario.bot.protocol.ProtocolStep.WAIT_FOR_PAYMENT_RECEIVED_CONFIRMATION_MESSAGE;
|
||||
import static haveno.apitest.scenario.bot.protocol.ProtocolStep.WAIT_FOR_PAYMENT_SENT_MESSAGE;
|
||||
import static haveno.apitest.scenario.bot.protocol.ProtocolStep.WAIT_FOR_PAYOUT_TX;
|
||||
import static haveno.apitest.scenario.bot.protocol.ProtocolStep.WAIT_FOR_TAKER_DEPOSIT_TX_CONFIRMED;
|
||||
import static haveno.apitest.scenario.bot.protocol.ProtocolStep.WAIT_FOR_TAKER_DEPOSIT_TX_PUBLISHED;
|
||||
import static haveno.apitest.scenario.bot.shutdown.ManualShutdown.checkIfShutdownCalled;
|
||||
import static haveno.cli.table.builder.TableType.TRADE_DETAIL_TBL;
|
||||
import static java.lang.String.format;
|
||||
|
|
|
@ -1,23 +1,21 @@
|
|||
package haveno.apitest.scenario.bot.protocol;
|
||||
|
||||
import haveno.proto.grpc.OfferInfo;
|
||||
import haveno.proto.grpc.TradeInfo;
|
||||
import haveno.apitest.method.BitcoinCliHelper;
|
||||
import haveno.apitest.scenario.bot.BotClient;
|
||||
import haveno.apitest.scenario.bot.RandomOffer;
|
||||
import haveno.apitest.scenario.bot.script.BashScriptGenerator;
|
||||
import haveno.apitest.scenario.bot.shutdown.ManualBotShutdownException;
|
||||
import haveno.cli.table.builder.TableBuilder;
|
||||
import haveno.proto.grpc.OfferInfo;
|
||||
import haveno.proto.grpc.TradeInfo;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import protobuf.PaymentAccount;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import java.util.Optional;
|
||||
import java.util.function.Function;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import static haveno.apitest.scenario.bot.protocol.ProtocolStep.DONE;
|
||||
import static haveno.apitest.scenario.bot.protocol.ProtocolStep.WAIT_FOR_OFFER_TAKER;
|
||||
import static haveno.apitest.scenario.bot.shutdown.ManualShutdown.checkIfShutdownCalled;
|
||||
|
|
|
@ -1,22 +1,20 @@
|
|||
package haveno.apitest.scenario.bot.protocol;
|
||||
|
||||
import haveno.proto.grpc.OfferInfo;
|
||||
import haveno.proto.grpc.TradeInfo;
|
||||
import haveno.apitest.method.BitcoinCliHelper;
|
||||
import haveno.apitest.scenario.bot.BotClient;
|
||||
import haveno.apitest.scenario.bot.script.BashScriptGenerator;
|
||||
import haveno.apitest.scenario.bot.shutdown.ManualBotShutdownException;
|
||||
import haveno.cli.table.builder.TableBuilder;
|
||||
import haveno.proto.grpc.OfferInfo;
|
||||
import haveno.proto.grpc.TradeInfo;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import protobuf.PaymentAccount;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import java.util.Optional;
|
||||
import java.util.function.Function;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import static haveno.apitest.scenario.bot.protocol.ProtocolStep.DONE;
|
||||
import static haveno.apitest.scenario.bot.protocol.ProtocolStep.FIND_OFFER;
|
||||
import static haveno.apitest.scenario.bot.protocol.ProtocolStep.TAKE_OFFER;
|
||||
|
|
|
@ -17,23 +17,20 @@
|
|||
|
||||
package haveno.apitest.scenario.bot.script;
|
||||
|
||||
import haveno.proto.grpc.OfferInfo;
|
||||
import haveno.proto.grpc.TradeInfo;
|
||||
|
||||
import com.google.common.io.Files;
|
||||
import haveno.common.file.FileUtil;
|
||||
import java.nio.file.Paths;
|
||||
import haveno.proto.grpc.OfferInfo;
|
||||
import haveno.proto.grpc.TradeInfo;
|
||||
import lombok.Getter;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
import java.nio.file.Paths;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import static com.google.common.io.FileWriteMode.APPEND;
|
||||
import static java.lang.String.format;
|
||||
import static java.lang.System.getProperty;
|
||||
|
|
|
@ -23,14 +23,12 @@ import joptsimple.BuiltinHelpFormatter;
|
|||
import joptsimple.OptionParser;
|
||||
import joptsimple.OptionSet;
|
||||
import joptsimple.OptionSpec;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.PrintStream;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.PrintStream;
|
||||
|
||||
import static java.lang.System.err;
|
||||
import static java.lang.System.exit;
|
||||
|
|
|
@ -1,17 +1,15 @@
|
|||
package haveno.apitest.scenario.bot.shutdown;
|
||||
|
||||
import haveno.common.UserThread;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import static haveno.common.file.FileUtil.deleteFileIfExists;
|
||||
import static java.util.concurrent.TimeUnit.MILLISECONDS;
|
||||
|
||||
import haveno.common.UserThread;
|
||||
|
||||
@Slf4j
|
||||
public class ManualShutdown {
|
||||
|
||||
|
|
|
@ -19,11 +19,9 @@ package haveno.asset;
|
|||
|
||||
import org.bitcoinj.core.Utils;
|
||||
|
||||
import java.math.BigInteger;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.ByteOrder;
|
||||
|
||||
import java.math.BigInteger;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
|
||||
|
|
|
@ -22,10 +22,6 @@ import org.junit.Test;
|
|||
import static org.hamcrest.CoreMatchers.is;
|
||||
import static org.junit.Assert.assertThat;
|
||||
|
||||
import haveno.asset.AddressValidationResult;
|
||||
import haveno.asset.Asset;
|
||||
import haveno.asset.AssetRegistry;
|
||||
|
||||
/**
|
||||
* Abstract base class for all {@link Asset} unit tests. Subclasses must implement the
|
||||
* {@link #testValidAddresses()} and {@link #testInvalidAddresses()} methods, and are
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
package haveno.asset.coins;
|
||||
|
||||
import haveno.asset.AbstractAssetTest;
|
||||
import haveno.asset.coins.BitcoinCash;
|
||||
import org.junit.Test;
|
||||
|
||||
public class BitcoinCashTest extends AbstractAssetTest {
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
package haveno.asset.coins;
|
||||
|
||||
import haveno.asset.AbstractAssetTest;
|
||||
import haveno.asset.coins.Bitcoin;
|
||||
import org.junit.Test;
|
||||
|
||||
public class BitcoinTest extends AbstractAssetTest {
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
package haveno.asset.coins;
|
||||
|
||||
import haveno.asset.AbstractAssetTest;
|
||||
import haveno.asset.coins.Litecoin;
|
||||
import org.junit.Test;
|
||||
|
||||
public class LitecoinTest extends AbstractAssetTest {
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
package haveno.asset.coins;
|
||||
|
||||
import haveno.asset.AbstractAssetTest;
|
||||
import haveno.asset.coins.Monero;
|
||||
import org.junit.Test;
|
||||
|
||||
public class MoneroTest extends AbstractAssetTest {
|
||||
|
|
|
@ -27,6 +27,7 @@ configure(subprojects) {
|
|||
apply plugin: 'com.google.osdetector'
|
||||
// Apply the jacoco plugin to add support for test coverage
|
||||
apply plugin: 'jacoco'
|
||||
apply plugin: 'checkstyle'
|
||||
|
||||
sourceCompatibility = JavaVersion.VERSION_11
|
||||
|
||||
|
@ -95,6 +96,12 @@ configure(subprojects) {
|
|||
options.encoding = 'UTF-8'
|
||||
}
|
||||
|
||||
checkstyle {
|
||||
toolVersion = '10.8.1'
|
||||
// https://raw.githubusercontent.com/checkstyle/checkstyle/checkstyle-10.8.1/src/main/resources/google_checks.xml
|
||||
configFile = rootProject.file("${rootDir}/config/checkstyle.xml")
|
||||
}
|
||||
|
||||
jacocoTestReport {
|
||||
reports {
|
||||
xml.enabled true
|
||||
|
@ -105,7 +112,6 @@ configure(subprojects) {
|
|||
test.finalizedBy jacocoTestReport
|
||||
}
|
||||
|
||||
|
||||
configure([project(':cli'),
|
||||
project(':daemon'),
|
||||
project(':desktop'),
|
||||
|
|
|
@ -17,8 +17,6 @@
|
|||
|
||||
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;
|
||||
|
@ -31,45 +29,87 @@ 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 haveno.proto.grpc.OfferInfo;
|
||||
import io.grpc.StatusRuntimeException;
|
||||
|
||||
import joptsimple.OptionParser;
|
||||
import joptsimple.OptionSet;
|
||||
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.io.PrintStream;
|
||||
import java.io.PrintWriter;
|
||||
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
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 haveno.cli.Method.canceloffer;
|
||||
import static haveno.cli.Method.closetrade;
|
||||
import static haveno.cli.Method.confirmpaymentreceived;
|
||||
import static haveno.cli.Method.confirmpaymentsent;
|
||||
import static haveno.cli.Method.createcryptopaymentacct;
|
||||
import static haveno.cli.Method.createoffer;
|
||||
import static haveno.cli.Method.createpaymentacct;
|
||||
import static haveno.cli.Method.editoffer;
|
||||
import static haveno.cli.Method.failtrade;
|
||||
import static haveno.cli.Method.getaddressbalance;
|
||||
import static haveno.cli.Method.getbalance;
|
||||
import static haveno.cli.Method.getbtcprice;
|
||||
import static haveno.cli.Method.getfundingaddresses;
|
||||
import static haveno.cli.Method.getmyoffer;
|
||||
import static haveno.cli.Method.getmyoffers;
|
||||
import static haveno.cli.Method.getoffer;
|
||||
import static haveno.cli.Method.getoffers;
|
||||
import static haveno.cli.Method.getpaymentacctform;
|
||||
import static haveno.cli.Method.getpaymentaccts;
|
||||
import static haveno.cli.Method.getpaymentmethods;
|
||||
import static haveno.cli.Method.gettrade;
|
||||
import static haveno.cli.Method.gettrades;
|
||||
import static haveno.cli.Method.gettransaction;
|
||||
import static haveno.cli.Method.gettxfeerate;
|
||||
import static haveno.cli.Method.getunusedbsqaddress;
|
||||
import static haveno.cli.Method.getversion;
|
||||
import static haveno.cli.Method.lockwallet;
|
||||
import static haveno.cli.Method.sendbtc;
|
||||
import static haveno.cli.Method.settxfeerate;
|
||||
import static haveno.cli.Method.setwalletpassword;
|
||||
import static haveno.cli.Method.stop;
|
||||
import static haveno.cli.Method.takeoffer;
|
||||
import static haveno.cli.Method.unfailtrade;
|
||||
import static haveno.cli.Method.unlockwallet;
|
||||
import static haveno.cli.Method.unsettxfeerate;
|
||||
import static haveno.cli.Method.withdrawfunds;
|
||||
import static haveno.cli.opts.OptLabel.OPT_AMOUNT;
|
||||
import static haveno.cli.opts.OptLabel.OPT_HELP;
|
||||
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 haveno.cli.opts.OptLabel.OPT_TX_FEE_RATE;
|
||||
import static haveno.cli.table.builder.TableType.ADDRESS_BALANCE_TBL;
|
||||
import static haveno.cli.table.builder.TableType.BTC_BALANCE_TBL;
|
||||
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.OFFER_TBL;
|
||||
import static haveno.cli.table.builder.TableType.OPEN_TRADES_TBL;
|
||||
import static haveno.cli.table.builder.TableType.PAYMENT_ACCOUNT_TBL;
|
||||
import static haveno.cli.table.builder.TableType.TRADE_DETAIL_TBL;
|
||||
import static haveno.proto.grpc.GetTradesRequest.Category.CLOSED;
|
||||
import static haveno.proto.grpc.GetTradesRequest.Category.OPEN;
|
||||
import static java.lang.String.format;
|
||||
import static java.lang.System.err;
|
||||
import static java.lang.System.exit;
|
||||
|
|
|
@ -19,12 +19,10 @@ package haveno.cli;
|
|||
|
||||
import com.google.common.annotations.VisibleForTesting;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.text.DecimalFormat;
|
||||
import java.text.DecimalFormatSymbols;
|
||||
import java.text.NumberFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
import static java.lang.String.format;
|
||||
|
|
|
@ -17,6 +17,10 @@
|
|||
|
||||
package haveno.cli;
|
||||
|
||||
import haveno.cli.request.OffersServiceRequest;
|
||||
import haveno.cli.request.PaymentAccountsServiceRequest;
|
||||
import haveno.cli.request.TradesServiceRequest;
|
||||
import haveno.cli.request.WalletsServiceRequest;
|
||||
import haveno.proto.grpc.AddressBalanceInfo;
|
||||
import haveno.proto.grpc.BalancesInfo;
|
||||
import haveno.proto.grpc.BtcBalanceInfo;
|
||||
|
@ -27,18 +31,12 @@ 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 lombok.extern.slf4j.Slf4j;
|
||||
import protobuf.PaymentAccount;
|
||||
import protobuf.PaymentAccountForm;
|
||||
import protobuf.PaymentMethod;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
|
||||
@SuppressWarnings("ResultOfMethodCallIgnored")
|
||||
@Slf4j
|
||||
|
|
|
@ -26,7 +26,6 @@ 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;
|
||||
|
||||
|
|
|
@ -21,13 +21,12 @@ import joptsimple.OptionException;
|
|||
import joptsimple.OptionParser;
|
||||
import joptsimple.OptionSet;
|
||||
import joptsimple.OptionSpec;
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.function.Function;
|
||||
import java.util.function.Predicate;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
import static haveno.cli.opts.OptLabel.OPT_HELP;
|
||||
import static java.lang.String.format;
|
||||
|
||||
|
|
|
@ -20,7 +20,14 @@ package haveno.cli.opts;
|
|||
|
||||
import joptsimple.OptionSpec;
|
||||
|
||||
import static haveno.cli.opts.OptLabel.*;
|
||||
import static haveno.cli.opts.OptLabel.OPT_AMOUNT;
|
||||
import static haveno.cli.opts.OptLabel.OPT_CURRENCY_CODE;
|
||||
import static haveno.cli.opts.OptLabel.OPT_DIRECTION;
|
||||
import static haveno.cli.opts.OptLabel.OPT_FIXED_PRICE;
|
||||
import static haveno.cli.opts.OptLabel.OPT_MIN_AMOUNT;
|
||||
import static haveno.cli.opts.OptLabel.OPT_MKT_PRICE_MARGIN;
|
||||
import static haveno.cli.opts.OptLabel.OPT_PAYMENT_ACCOUNT_ID;
|
||||
import static haveno.cli.opts.OptLabel.OPT_SECURITY_DEPOSIT;
|
||||
import static joptsimple.internal.Strings.EMPTY;
|
||||
|
||||
public class CreateOfferOptionParser extends AbstractMethodOptionParser implements MethodOpts {
|
||||
|
|
|
@ -18,10 +18,10 @@
|
|||
package haveno.cli.opts;
|
||||
|
||||
|
||||
import static haveno.cli.opts.OptLabel.OPT_ADDRESS;
|
||||
|
||||
import joptsimple.OptionSpec;
|
||||
|
||||
import static haveno.cli.opts.OptLabel.OPT_ADDRESS;
|
||||
|
||||
public class GetAddressBalanceOptionParser extends AbstractMethodOptionParser implements MethodOpts {
|
||||
|
||||
final OptionSpec<String> addressOpt = parser.accepts(OPT_ADDRESS, "wallet btc address")
|
||||
|
|
|
@ -18,10 +18,10 @@
|
|||
package haveno.cli.opts;
|
||||
|
||||
|
||||
import static haveno.cli.opts.OptLabel.OPT_CURRENCY_CODE;
|
||||
|
||||
import joptsimple.OptionSpec;
|
||||
|
||||
import static haveno.cli.opts.OptLabel.OPT_CURRENCY_CODE;
|
||||
|
||||
public class GetBTCMarketPriceOptionParser extends AbstractMethodOptionParser implements MethodOpts {
|
||||
|
||||
final OptionSpec<String> currencyCodeOpt = parser.accepts(OPT_CURRENCY_CODE, "currency-code")
|
||||
|
|
|
@ -18,10 +18,10 @@
|
|||
package haveno.cli.opts;
|
||||
|
||||
|
||||
import static haveno.cli.opts.OptLabel.OPT_OFFER_ID;
|
||||
|
||||
import joptsimple.OptionSpec;
|
||||
|
||||
import static haveno.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")
|
||||
|
|
|
@ -18,11 +18,11 @@
|
|||
package haveno.cli.opts;
|
||||
|
||||
|
||||
import joptsimple.OptionSpec;
|
||||
|
||||
import static haveno.cli.opts.OptLabel.OPT_CURRENCY_CODE;
|
||||
import static haveno.cli.opts.OptLabel.OPT_DIRECTION;
|
||||
|
||||
import joptsimple.OptionSpec;
|
||||
|
||||
public class GetOffersOptionParser extends AbstractMethodOptionParser implements MethodOpts {
|
||||
|
||||
final OptionSpec<String> directionOpt = parser.accepts(OPT_DIRECTION, "offer direction (buy|sell)")
|
||||
|
|
|
@ -18,10 +18,10 @@
|
|||
package haveno.cli.opts;
|
||||
|
||||
|
||||
import static haveno.cli.opts.OptLabel.OPT_PAYMENT_METHOD_ID;
|
||||
|
||||
import joptsimple.OptionSpec;
|
||||
|
||||
import static haveno.cli.opts.OptLabel.OPT_PAYMENT_METHOD_ID;
|
||||
|
||||
public class GetPaymentAcctFormOptionParser extends AbstractMethodOptionParser implements MethodOpts {
|
||||
|
||||
final OptionSpec<String> paymentMethodIdOpt = parser.accepts(OPT_PAYMENT_METHOD_ID,
|
||||
|
|
|
@ -18,11 +18,11 @@
|
|||
package haveno.cli.opts;
|
||||
|
||||
|
||||
import joptsimple.OptionSpec;
|
||||
|
||||
import static haveno.cli.opts.OptLabel.OPT_SHOW_CONTRACT;
|
||||
import static haveno.cli.opts.OptLabel.OPT_TRADE_ID;
|
||||
|
||||
import joptsimple.OptionSpec;
|
||||
|
||||
public class GetTradeOptionParser extends AbstractMethodOptionParser implements MethodOpts {
|
||||
|
||||
final OptionSpec<String> tradeIdOpt = parser.accepts(OPT_TRADE_ID, "id of trade")
|
||||
|
|
|
@ -19,15 +19,14 @@ package haveno.cli.opts;
|
|||
|
||||
|
||||
import haveno.proto.grpc.GetTradesRequest;
|
||||
|
||||
import joptsimple.OptionSpec;
|
||||
|
||||
import java.util.function.Predicate;
|
||||
|
||||
import static haveno.cli.opts.OptLabel.OPT_CATEGORY;
|
||||
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 {
|
||||
|
|
|
@ -18,10 +18,10 @@
|
|||
package haveno.cli.opts;
|
||||
|
||||
|
||||
import static haveno.cli.opts.OptLabel.OPT_TRANSACTION_ID;
|
||||
|
||||
import joptsimple.OptionSpec;
|
||||
|
||||
import static haveno.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")
|
||||
|
|
|
@ -18,10 +18,10 @@
|
|||
package haveno.cli.opts;
|
||||
|
||||
|
||||
import static haveno.cli.opts.OptLabel.OPT_OFFER_ID;
|
||||
|
||||
import joptsimple.OptionSpec;
|
||||
|
||||
import static haveno.cli.opts.OptLabel.OPT_OFFER_ID;
|
||||
|
||||
/**
|
||||
* Superclass for option parsers requiring an offer-id. Avoids a small amount of
|
||||
* duplicated boilerplate.
|
||||
|
|
|
@ -18,11 +18,11 @@
|
|||
package haveno.cli.opts;
|
||||
|
||||
|
||||
import joptsimple.OptionSpec;
|
||||
|
||||
import static haveno.cli.opts.OptLabel.OPT_DISPUTE_AGENT_TYPE;
|
||||
import static haveno.cli.opts.OptLabel.OPT_REGISTRATION_KEY;
|
||||
|
||||
import joptsimple.OptionSpec;
|
||||
|
||||
public class RegisterDisputeAgentOptionParser extends AbstractMethodOptionParser implements MethodOpts {
|
||||
|
||||
final OptionSpec<String> disputeAgentTypeOpt = parser.accepts(OPT_DISPUTE_AGENT_TYPE, "dispute agent type")
|
||||
|
|
|
@ -18,10 +18,10 @@
|
|||
package haveno.cli.opts;
|
||||
|
||||
|
||||
import static haveno.cli.opts.OptLabel.OPT_WALLET_PASSWORD;
|
||||
|
||||
import joptsimple.OptionSpec;
|
||||
|
||||
import static haveno.cli.opts.OptLabel.OPT_WALLET_PASSWORD;
|
||||
|
||||
public class RemoveWalletPasswordOptionParser extends AbstractMethodOptionParser implements MethodOpts {
|
||||
|
||||
final OptionSpec<String> passwordOpt = parser.accepts(OPT_WALLET_PASSWORD, "haveno wallet password")
|
||||
|
|
|
@ -18,10 +18,10 @@
|
|||
package haveno.cli.opts;
|
||||
|
||||
|
||||
import static haveno.cli.opts.OptLabel.OPT_TX_FEE_RATE;
|
||||
|
||||
import joptsimple.OptionSpec;
|
||||
|
||||
import static haveno.cli.opts.OptLabel.OPT_TX_FEE_RATE;
|
||||
|
||||
public class SetTxFeeRateOptionParser extends AbstractMethodOptionParser implements MethodOpts {
|
||||
|
||||
final OptionSpec<String> feeRateOpt = parser.accepts(OPT_TX_FEE_RATE,
|
||||
|
|
|
@ -18,11 +18,10 @@
|
|||
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 haveno.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")
|
||||
|
|
|
@ -18,11 +18,11 @@
|
|||
package haveno.cli.opts;
|
||||
|
||||
|
||||
import joptsimple.OptionSpec;
|
||||
|
||||
import static haveno.cli.opts.OptLabel.OPT_TIMEOUT;
|
||||
import static haveno.cli.opts.OptLabel.OPT_WALLET_PASSWORD;
|
||||
|
||||
import joptsimple.OptionSpec;
|
||||
|
||||
public class UnlockWalletOptionParser extends AbstractMethodOptionParser implements MethodOpts {
|
||||
|
||||
final OptionSpec<String> passwordOpt = parser.accepts(OPT_WALLET_PASSWORD, "haveno wallet password")
|
||||
|
|
|
@ -17,14 +17,14 @@
|
|||
|
||||
package haveno.cli.request;
|
||||
|
||||
import haveno.proto.grpc.CancelOfferRequest;
|
||||
import haveno.proto.grpc.PostOfferRequest;
|
||||
import haveno.cli.GrpcStubs;
|
||||
import haveno.proto.grpc.CancelOfferRequest;
|
||||
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 haveno.proto.grpc.PostOfferRequest;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
|
|
@ -17,16 +17,14 @@
|
|||
|
||||
package haveno.cli.request;
|
||||
|
||||
import haveno.cli.GrpcStubs;
|
||||
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;
|
||||
|
||||
import java.util.List;
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
|
||||
package haveno.cli.request;
|
||||
|
||||
import haveno.cli.GrpcStubs;
|
||||
import haveno.proto.grpc.ConfirmPaymentReceivedRequest;
|
||||
import haveno.proto.grpc.ConfirmPaymentSentRequest;
|
||||
import haveno.proto.grpc.GetTradeRequest;
|
||||
|
@ -25,7 +26,7 @@ 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 haveno.proto.grpc.GetTradesRequest.Category.CLOSED;
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
|
||||
package haveno.cli.request;
|
||||
|
||||
import haveno.cli.GrpcStubs;
|
||||
import haveno.proto.grpc.AddressBalanceInfo;
|
||||
import haveno.proto.grpc.BalancesInfo;
|
||||
import haveno.proto.grpc.BtcBalanceInfo;
|
||||
|
@ -26,10 +27,9 @@ 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;
|
||||
|
||||
public class WalletsServiceRequest {
|
||||
|
|
|
@ -17,9 +17,10 @@
|
|||
|
||||
package haveno.cli.table;
|
||||
|
||||
import haveno.cli.table.column.Column;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.PrintStream;
|
||||
|
||||
import java.util.stream.IntStream;
|
||||
|
||||
import static com.google.common.base.Strings.padStart;
|
||||
|
@ -27,8 +28,6 @@ import static haveno.cli.table.column.Column.JUSTIFICATION.RIGHT;
|
|||
import static java.lang.String.format;
|
||||
import static java.nio.charset.StandardCharsets.UTF_8;
|
||||
|
||||
import haveno.cli.table.column.Column;
|
||||
|
||||
/**
|
||||
* A simple table of formatted data for the CLI's output console. A table must be
|
||||
* created with at least one populated column, and each column passed to the constructor
|
||||
|
|
|
@ -17,8 +17,9 @@
|
|||
|
||||
package haveno.cli.table.builder;
|
||||
|
||||
import haveno.proto.grpc.OfferInfo;
|
||||
import haveno.cli.table.Table;
|
||||
import haveno.proto.grpc.OfferInfo;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.function.Predicate;
|
||||
|
||||
|
|
|
@ -17,20 +17,19 @@
|
|||
|
||||
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 haveno.proto.grpc.ContractInfo;
|
||||
import haveno.proto.grpc.TradeInfo;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
import java.util.function.Function;
|
||||
import java.util.function.Predicate;
|
||||
import java.util.function.Supplier;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
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;
|
||||
|
|
|
@ -17,13 +17,14 @@
|
|||
|
||||
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 haveno.proto.grpc.AddressBalanceInfo;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
|
|
@ -17,18 +17,19 @@
|
|||
|
||||
package haveno.cli.table.builder;
|
||||
|
||||
import haveno.cli.table.Table;
|
||||
import haveno.cli.table.column.Column;
|
||||
import haveno.cli.table.column.SatoshiColumn;
|
||||
import haveno.proto.grpc.BtcBalanceInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
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;
|
||||
|
||||
/**
|
||||
* Builds a {@code haveno.cli.table.Table} from a
|
||||
* {@code haveno.proto.grpc.BtcBalanceInfo} object.
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue