From c4898a8ec07b1daf83fcf101f0c1c528a1f2063b Mon Sep 17 00:00:00 2001 From: woodser Date: Tue, 11 Jul 2023 09:57:22 -0400 Subject: [PATCH] Revert "Support for open JDK 20 by updating dependencies" This reverts commit 5923a34ef9c9ff23b37195ba1c95108e8ac175ef. --- .github/workflows/build.yml | 4 +- .github/workflows/codeql-analysis.yml | 7 - .github/workflows/label.yml | 2 +- build.gradle | 6 +- .../main/java/haveno/common/ClockWatcher.java | 5 +- .../java/haveno/common/crypto/KeyRing.java | 11 +- .../java/haveno/common/crypto/KeyStorage.java | 16 +- .../file/CorruptedStorageFileHandler.java | 7 +- .../persistence/PersistenceManager.java | 16 +- .../account/sign/SignedWitnessService.java | 11 +- .../sign/SignedWitnessStorageService.java | 7 +- .../witness/AccountAgeWitnessService.java | 14 +- .../AccountAgeWitnessStorageService.java | 7 +- .../java/haveno/core/alert/AlertManager.java | 14 +- .../alert/PrivateNotificationManager.java | 24 +-- .../haveno/core/api/CoreAccountService.java | 14 +- .../main/java/haveno/core/api/CoreApi.java | 17 +- .../java/haveno/core/api/CoreContext.java | 5 +- .../core/api/CoreDisputeAgentsService.java | 24 +-- .../haveno/core/api/CoreDisputesService.java | 12 +- .../java/haveno/core/api/CoreHelpService.java | 10 +- .../api/CoreMoneroConnectionsService.java | 17 +- .../core/api/CoreMoneroNodeService.java | 11 +- .../core/api/CoreNotificationService.java | 7 +- .../haveno/core/api/CoreOffersService.java | 24 +-- .../core/api/CorePaymentAccountsService.java | 16 +- .../haveno/core/api/CorePriceService.java | 7 +- .../haveno/core/api/CoreTradesService.java | 14 +- .../haveno/core/api/CoreWalletsService.java | 26 +-- .../java/haveno/core/app/AppStartupState.java | 5 +- .../core/app/AvoidStandbyModeService.java | 19 ++- .../haveno/core/app/DomainInitialisation.java | 3 +- .../java/haveno/core/app/HavenoSetup.java | 33 ++-- .../java/haveno/core/app/P2PNetworkSetup.java | 9 +- .../main/java/haveno/core/app/TorSetup.java | 14 +- .../java/haveno/core/app/WalletAppSetup.java | 12 +- .../java/haveno/core/app/misc/AppSetup.java | 3 +- .../haveno/core/app/misc/AppSetupWithP2P.java | 5 +- .../core/app/misc/AppSetupWithP2PAndDAO.java | 3 +- .../haveno/core/filter/FilterManager.java | 22 +-- .../haveno/core/network/CoreBanFilter.java | 7 +- .../inventory/GetInventoryRequestHandler.java | 7 +- .../inventory/GetInventoryRequestManager.java | 5 +- .../p2p/seed/DefaultSeedNodeRepository.java | 7 +- .../MobileMessageEncryption.java | 11 +- .../core/notifications/MobileModel.java | 9 +- .../MobileNotificationService.java | 12 +- .../MobileNotificationValidator.java | 5 +- .../alerts/DisputeMsgEvents.java | 7 +- .../alerts/MyOfferTakenEvents.java | 7 +- .../notifications/alerts/TradeEvents.java | 9 +- .../alerts/market/MarketAlerts.java | 7 +- .../alerts/price/PriceAlert.java | 5 +- .../haveno/core/offer/CreateOfferService.java | 7 +- .../haveno/core/offer/OfferBookService.java | 17 +- .../haveno/core/offer/OfferFilterService.java | 13 +- .../java/haveno/core/offer/OfferUtil.java | 44 ++--- .../haveno/core/offer/OpenOfferManager.java | 44 ++--- .../core/offer/TriggerPriceService.java | 14 +- .../core/offer/takeoffer/TakeOfferModel.java | 16 +- .../haveno/core/payment/ChargeBackRisk.java | 3 +- .../java/haveno/core/payment/TradeLimits.java | 9 +- .../validation/AdvancedCashValidator.java | 3 +- .../AustraliaPayidAccountNameValidator.java | 3 +- .../payment/validation/CapitualValidator.java | 3 +- .../validation/FiatVolumeValidator.java | 3 +- .../InteracETransferAnswerValidator.java | 3 +- .../InteracETransferQuestionValidator.java | 3 +- .../validation/InteracETransferValidator.java | 3 +- .../JapanBankAccountNameValidator.java | 3 +- .../JapanBankBranchNameValidator.java | 3 +- .../validation/SecurityDepositValidator.java | 3 +- .../validation/TransferwiseValidator.java | 3 +- .../core/payment/validation/XmrValidator.java | 9 +- .../presentation/BalancePresentation.java | 3 +- .../SupportTicketsPresentation.java | 3 +- .../core/presentation/TradePresentation.java | 3 +- .../network/CoreNetworkProtoResolver.java | 7 +- .../CorePersistenceProtoResolver.java | 5 +- .../haveno/core/provider/FeeHttpClient.java | 5 +- .../core/provider/MempoolHttpClient.java | 7 +- .../haveno/core/provider/PriceHttpClient.java | 5 +- .../core/provider/ProvidersRepository.java | 10 +- .../core/provider/mempool/MempoolService.java | 11 +- .../ArbitrationDisputeListService.java | 5 +- .../arbitrator/ArbitratorManager.java | 7 +- .../arbitrator/ArbitratorService.java | 3 +- .../MediationDisputeListService.java | 5 +- .../mediation/mediator/MediatorManager.java | 5 +- .../mediation/mediator/MediatorService.java | 5 +- .../refund/RefundDisputeListService.java | 5 +- .../refundagent/RefundAgentManager.java | 7 +- .../refundagent/RefundAgentService.java | 3 +- .../support/traderchat/TraderChatManager.java | 9 +- .../core/trade/CleanupMailboxMessages.java | 5 +- .../trade/CleanupMailboxMessagesService.java | 5 +- .../core/trade/ClosedTradableFormatter.java | 20 ++- .../java/haveno/core/trade/TradeManager.java | 51 +++--- .../java/haveno/core/trade/TradeUtil.java | 20 ++- .../protocol/ProcessModelServiceProvider.java | 3 +- .../trade/statistics/ReferralIdService.java | 5 +- .../TradeStatistics3StorageService.java | 9 +- .../statistics/TradeStatisticsManager.java | 13 +- .../java/haveno/core/user/Preferences.java | 30 ++-- core/src/main/java/haveno/core/user/User.java | 22 +-- .../main/java/haveno/core/util/PriceUtil.java | 12 +- .../util/coin/ImmutableCoinFormatter.java | 3 +- .../util/validation/BtcAddressValidator.java | 3 +- .../util/validation/FiatPriceValidator.java | 2 +- .../util/validation/MonetaryValidator.java | 3 +- .../validation/NonFiatPriceValidator.java | 2 +- .../main/java/haveno/core/xmr/Balances.java | 9 +- .../xmr/model/EncryptedConnectionList.java | 11 +- .../core/xmr/nodes/LocalBitcoinNode.java | 9 +- .../core/xmr/wallet/BtcWalletService.java | 22 +-- .../core/xmr/wallet/NonBsqCoinSelector.java | 3 +- .../core/xmr/wallet/TradeWalletService.java | 16 +- .../haveno/core/xmr/wallet/WalletService.java | 28 ++-- .../core/xmr/wallet/XmrWalletService.java | 64 ++++---- .../daemon/grpc/GrpcAccountService.java | 26 +-- .../daemon/grpc/GrpcDisputeAgentsService.java | 14 +- .../daemon/grpc/GrpcDisputesService.java | 20 ++- .../daemon/grpc/GrpcExceptionHandler.java | 12 +- .../grpc/GrpcGetTradeStatisticsService.java | 14 +- .../haveno/daemon/grpc/GrpcHelpService.java | 12 +- .../grpc/GrpcMoneroConnectionsService.java | 36 ++-- .../daemon/grpc/GrpcMoneroNodeService.java | 20 ++- .../daemon/grpc/GrpcNotificationsService.java | 16 +- .../haveno/daemon/grpc/GrpcOffersService.java | 26 +-- .../grpc/GrpcPaymentAccountsService.java | 22 +-- .../haveno/daemon/grpc/GrpcPriceService.java | 12 +- .../java/haveno/daemon/grpc/GrpcServer.java | 10 +- .../daemon/grpc/GrpcShutdownService.java | 6 +- .../haveno/daemon/grpc/GrpcTradesService.java | 22 +-- .../daemon/grpc/GrpcVersionService.java | 12 +- .../daemon/grpc/GrpcWalletsService.java | 28 ++-- .../interceptor/PasswordAuthInterceptor.java | 10 +- .../main/java/haveno/desktop/Navigation.java | 11 +- .../desktop/common/fxml/FxmlViewLoader.java | 12 +- .../common/view/CachingViewLoader.java | 4 +- .../view/guice/InjectorViewFactory.java | 3 +- .../java/haveno/desktop/main/MainView.java | 20 ++- .../desktop/main/account/AccountView.java | 5 +- .../account/content/backup/BackupView.java | 22 +-- .../cryptoaccounts/CryptoAccountsView.java | 20 ++- .../MobileNotificationsView.java | 22 +-- .../content/password/PasswordView.java | 14 +- .../content/seedwords/SeedWordsView.java | 32 ++-- .../TraditionalAccountsView.java | 28 ++-- .../content/walletinfo/WalletInfoView.java | 14 +- .../ArbitratorRegistrationView.java | 5 +- .../mediator/MediatorRegistrationView.java | 5 +- .../RefundAgentRegistrationView.java | 5 +- .../account/register/signing/SigningView.java | 3 +- .../haveno/desktop/main/debug/DebugView.java | 8 +- .../haveno/desktop/main/funds/FundsView.java | 3 +- .../main/funds/deposit/DepositView.java | 24 +-- .../desktop/main/funds/locked/LockedView.java | 15 +- .../main/funds/reserved/ReservedView.java | 15 +- .../DisplayedTransactionsFactory.java | 5 +- .../transactions/TradableRepository.java | 5 +- .../TransactionAwareTradableFactory.java | 5 +- .../TransactionListItemFactory.java | 9 +- .../funds/transactions/TransactionsView.java | 7 +- .../main/funds/withdrawal/WithdrawalView.java | 16 +- .../desktop/main/market/MarketView.java | 9 +- .../market/offerbook/OfferBookChartView.java | 20 ++- .../main/market/spread/SpreadView.java | 9 +- .../main/market/spread/SpreadViewModel.java | 17 +- .../spread/SpreadViewPaymentMethod.java | 8 +- .../main/market/trades/TradesChartsView.java | 24 +-- .../desktop/main/offer/BuyOfferView.java | 3 +- .../main/offer/MutableOfferDataModel.java | 26 +-- .../main/offer/MutableOfferViewModel.java | 14 +- .../desktop/main/offer/SellOfferView.java | 3 +- .../createoffer/CreateOfferDataModel.java | 3 +- .../offer/createoffer/CreateOfferView.java | 7 +- .../createoffer/CreateOfferViewModel.java | 5 +- .../main/offer/offerbook/OfferBook.java | 14 +- .../offer/offerbook/OtherOfferBookView.java | 5 +- .../offerbook/OtherOfferBookViewModel.java | 9 +- .../offerbook/TopCryptoOfferBookView.java | 5 +- .../TopCryptoOfferBookViewModel.java | 7 +- .../offer/offerbook/XmrOfferBookView.java | 5 +- .../offerbook/XmrOfferBookViewModel.java | 7 +- .../offer/signedoffer/SignedOfferView.java | 54 +++--- .../main/offer/takeoffer/TakeOfferView.java | 44 ++--- .../offer/takeoffer/TakeOfferViewModel.java | 14 +- .../notifications/NotificationCenter.java | 15 +- .../windows/ClosedTradesSummaryWindow.java | 10 +- .../main/overlays/windows/ContractWindow.java | 22 +-- .../main/overlays/windows/FilterWindow.java | 20 ++- .../overlays/windows/OfferDetailsWindow.java | 25 +-- .../windows/SelectDepositTxWindow.java | 12 +- .../windows/SendAlertMessageWindow.java | 12 +- .../windows/SignPaymentAccountsWindow.java | 38 +++-- .../windows/SignSpecificWitnessWindow.java | 16 +- .../windows/SignUnsignedPubKeysWindow.java | 16 +- .../windows/TorNetworkSettingsWindow.java | 26 +-- .../overlays/windows/TradeDetailsWindow.java | 18 +- .../windows/WalletPasswordWindow.java | 30 ++-- .../desktop/main/portfolio/PortfolioView.java | 5 +- .../closedtrades/ClosedTradesView.java | 12 +- .../DuplicateOfferDataModel.java | 3 +- .../duplicateoffer/DuplicateOfferView.java | 3 +- .../DuplicateOfferViewModel.java | 5 +- .../editoffer/EditOfferDataModel.java | 3 +- .../portfolio/editoffer/EditOfferView.java | 6 +- .../editoffer/EditOfferViewModel.java | 5 +- .../failedtrades/FailedTradesView.java | 7 +- .../failedtrades/FailedTradesViewModel.java | 3 +- .../portfolio/openoffer/OpenOffersView.java | 17 +- .../openoffer/OpenOffersViewModel.java | 6 +- .../pendingtrades/PendingTradesDataModel.java | 16 +- .../pendingtrades/PendingTradesView.java | 11 +- .../pendingtrades/PendingTradesViewModel.java | 26 +-- .../presentation/AccountPresentation.java | 5 +- .../presentation/MarketPricePresentation.java | 13 +- .../presentation/SettingsPresentation.java | 5 +- .../desktop/main/settings/SettingsView.java | 3 +- .../main/settings/about/AboutView.java | 12 +- .../settings/network/NetworkSettingsView.java | 14 +- .../settings/preferences/PreferencesView.java | 40 ++--- .../desktop/main/support/SupportView.java | 5 +- .../agent/arbitration/ArbitratorView.java | 5 +- .../dispute/agent/mediation/MediatorView.java | 5 +- .../dispute/agent/refund/RefundAgentView.java | 5 +- .../arbitration/ArbitrationClientView.java | 5 +- .../client/mediation/MediationClientView.java | 5 +- .../client/refund/RefundClientView.java | 5 +- .../java/haveno/desktop/util/Transitions.java | 5 +- docs/installing.md | 6 +- gradle/README.md | 4 +- gradle/verification-metadata.xml | 155 +++++++++++------- gradle/wrapper/gradle-wrapper.jar | Bin 63375 -> 59536 bytes gradle/wrapper/gradle-wrapper.properties | 6 +- gradlew | 30 +--- gradlew.bat | 15 +- .../haveno/network/Socks5ProxyProvider.java | 7 +- .../network/crypto/EncryptionService.java | 10 +- .../haveno/network/http/HttpClientImpl.java | 32 ++-- .../network/p2p/NetworkNodeProvider.java | 16 +- .../p2p/mailbox/IgnoredMailboxService.java | 5 +- .../p2p/mailbox/MailboxMessageService.java | 18 +- .../network/p2p/network/Connection.java | 56 ++++--- .../haveno/network/p2p/peers/Broadcaster.java | 20 ++- .../haveno/network/p2p/peers/PeerManager.java | 14 +- .../p2p/peers/getdata/RequestDataManager.java | 12 +- .../p2p/peers/keepalive/KeepAliveManager.java | 7 +- .../peerexchange/PeerExchangeManager.java | 7 +- .../network/p2p/storage/P2PDataStorage.java | 126 +++++++------- .../AppendOnlyDataStoreService.java | 11 +- .../ProtectedDataStoreService.java | 5 +- .../persistence/RemovedPayloadsService.java | 5 +- .../persistence/ResourceDataStoreService.java | 5 +- scripts/install_java.bat | 4 +- scripts/install_java.sh | 18 +- 257 files changed, 1875 insertions(+), 1479 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5c3322306f..bf12e778f8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,10 +17,10 @@ jobs: - uses: actions/checkout@v3 with: lfs: true - - name: Set up JDK 20 + - name: Set up JDK 11 uses: actions/setup-java@v3 with: - java-version: '20' + java-version: '11' distribution: 'adopt' cache: gradle - name: Build with Gradle diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 972fd2da3a..2cebc57e9e 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -35,13 +35,6 @@ jobs: - name: Checkout repository uses: actions/checkout@v3 - - name: Set up JDK 20 - uses: actions/setup-java@v3 - with: - java-version: '20' - distribution: 'adopt' - cache: gradle - # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL uses: github/codeql-action/init@v2 diff --git a/.github/workflows/label.yml b/.github/workflows/label.yml index a43fe881e7..66f702c248 100644 --- a/.github/workflows/label.yml +++ b/.github/workflows/label.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Bounty explanation - uses: peter-evans/create-or-update-comment@v3 + uses: peter-evans/create-or-update-comment@v2 if: github.event.label.name == '💰bounty' with: token: ${{ secrets.GITHUB_TOKEN }} diff --git a/build.gradle b/build.gradle index 77127f7cef..cccf3de77c 100644 --- a/build.gradle +++ b/build.gradle @@ -10,7 +10,7 @@ buildscript { classpath 'com.google.gradle:osdetector-gradle-plugin:1.7.3' classpath 'com.github.johnrengelman:shadow:8.1.1' classpath 'org.springframework.boot:spring-boot-gradle-plugin:2.6.3' - classpath 'com.gradle:gradle-enterprise-gradle-plugin:3.13.4' // added for windows build verification-metadata.xml error + classpath 'com.gradle:gradle-enterprise-gradle-plugin:3.12.4' // added for windows build verification-metadata.xml error } } @@ -46,8 +46,8 @@ configure(subprojects) { fontawesomefxMaterialdesignfontVersion = '2.0.26-9.1.2' grpcVersion = '1.42.1' gsonVersion = '2.8.5' - guavaVersion = '32.1.1-jre' - guiceVersion = '7.0.0' + guavaVersion = '30.1.1-jre' + guiceVersion = '4.2.2' moneroJavaVersion = '0.7.16' httpclient5Version = '5.0' hamcrestVersion = '2.2' diff --git a/common/src/main/java/haveno/common/ClockWatcher.java b/common/src/main/java/haveno/common/ClockWatcher.java index 047b0b1d39..b810b367a5 100644 --- a/common/src/main/java/haveno/common/ClockWatcher.java +++ b/common/src/main/java/haveno/common/ClockWatcher.java @@ -17,11 +17,12 @@ package haveno.common; -import com.google.inject.Singleton; +import lombok.extern.slf4j.Slf4j; + +import javax.inject.Singleton; import java.util.LinkedList; import java.util.List; import java.util.concurrent.TimeUnit; -import lombok.extern.slf4j.Slf4j; // Helps configure listener objects that are run by the `UserThread` each second // and can do per second, per minute and delayed second actions. Also detects when we were in standby, and logs it. diff --git a/common/src/main/java/haveno/common/crypto/KeyRing.java b/common/src/main/java/haveno/common/crypto/KeyRing.java index b103d76cd9..e03fc1969a 100644 --- a/common/src/main/java/haveno/common/crypto/KeyRing.java +++ b/common/src/main/java/haveno/common/crypto/KeyRing.java @@ -17,15 +17,16 @@ package haveno.common.crypto; -import com.google.inject.Inject; -import com.google.inject.Singleton; -import java.security.KeyPair; -import javax.annotation.Nullable; -import javax.crypto.SecretKey; import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.extern.slf4j.Slf4j; +import javax.annotation.Nullable; +import javax.crypto.SecretKey; +import javax.inject.Inject; +import javax.inject.Singleton; +import java.security.KeyPair; + @Getter @EqualsAndHashCode @Slf4j diff --git a/common/src/main/java/haveno/common/crypto/KeyStorage.java b/common/src/main/java/haveno/common/crypto/KeyStorage.java index b5b81dcfec..4acc01662a 100644 --- a/common/src/main/java/haveno/common/crypto/KeyStorage.java +++ b/common/src/main/java/haveno/common/crypto/KeyStorage.java @@ -18,11 +18,15 @@ package haveno.common.crypto; import com.google.inject.Inject; -import com.google.inject.Singleton; -import com.google.inject.name.Named; import haveno.common.config.Config; import haveno.common.file.FileUtil; -import static haveno.common.util.Preconditions.checkDir; +import org.jetbrains.annotations.NotNull; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import javax.crypto.SecretKey; +import javax.inject.Named; +import javax.inject.Singleton; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; @@ -44,10 +48,8 @@ import java.security.spec.InvalidKeySpecException; import java.security.spec.KeySpec; import java.security.spec.PKCS8EncodedKeySpec; import java.security.spec.RSAPublicKeySpec; -import javax.crypto.SecretKey; -import org.jetbrains.annotations.NotNull; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; + +import static haveno.common.util.Preconditions.checkDir; /** * KeyStorage uses password protection to save a symmetric key in PKCS#12 format. diff --git a/common/src/main/java/haveno/common/file/CorruptedStorageFileHandler.java b/common/src/main/java/haveno/common/file/CorruptedStorageFileHandler.java index 25db77e7ad..76cce42779 100644 --- a/common/src/main/java/haveno/common/file/CorruptedStorageFileHandler.java +++ b/common/src/main/java/haveno/common/file/CorruptedStorageFileHandler.java @@ -17,12 +17,13 @@ package haveno.common.file; -import com.google.inject.Inject; -import com.google.inject.Singleton; +import lombok.extern.slf4j.Slf4j; + +import javax.inject.Inject; +import javax.inject.Singleton; import java.util.ArrayList; import java.util.List; import java.util.Optional; -import lombok.extern.slf4j.Slf4j; @Slf4j @Singleton diff --git a/common/src/main/java/haveno/common/persistence/PersistenceManager.java b/common/src/main/java/haveno/common/persistence/PersistenceManager.java index 42d0adbb7a..7bdb4cb1e7 100644 --- a/common/src/main/java/haveno/common/persistence/PersistenceManager.java +++ b/common/src/main/java/haveno/common/persistence/PersistenceManager.java @@ -17,9 +17,7 @@ package haveno.common.persistence; -import static com.google.common.base.Preconditions.checkNotNull; import com.google.inject.Inject; -import com.google.inject.name.Named; import haveno.common.Timer; import haveno.common.UserThread; import haveno.common.app.DevEnv; @@ -32,9 +30,13 @@ import haveno.common.file.FileUtil; import haveno.common.handlers.ResultHandler; import haveno.common.proto.persistable.PersistableEnvelope; import haveno.common.proto.persistable.PersistenceProtoResolver; -import haveno.common.util.GcUtil; -import static haveno.common.util.Preconditions.checkDir; import haveno.common.util.SingleThreadExecutorUtils; +import haveno.common.util.GcUtil; +import lombok.Getter; +import lombok.extern.slf4j.Slf4j; + +import javax.annotation.Nullable; +import javax.inject.Named; import java.io.ByteArrayInputStream; import java.io.File; import java.io.FileInputStream; @@ -49,9 +51,9 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; import java.util.function.Consumer; -import javax.annotation.Nullable; -import lombok.Getter; -import lombok.extern.slf4j.Slf4j; + +import static com.google.common.base.Preconditions.checkNotNull; +import static haveno.common.util.Preconditions.checkDir; /** * Responsible for reading persisted data and writing it on disk. We read usually only at start-up and keep data in RAM. diff --git a/core/src/main/java/haveno/core/account/sign/SignedWitnessService.java b/core/src/main/java/haveno/core/account/sign/SignedWitnessService.java index e88142a2af..b40a7fb0e8 100644 --- a/core/src/main/java/haveno/core/account/sign/SignedWitnessService.java +++ b/core/src/main/java/haveno/core/account/sign/SignedWitnessService.java @@ -19,7 +19,6 @@ package haveno.core.account.sign; import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Charsets; -import com.google.inject.Inject; import haveno.common.UserThread; import haveno.common.crypto.CryptoException; import haveno.common.crypto.Hash; @@ -35,6 +34,12 @@ import haveno.network.p2p.BootstrapListener; import haveno.network.p2p.P2PService; import haveno.network.p2p.storage.P2PDataStorage; import haveno.network.p2p.storage.persistence.AppendOnlyDataStoreService; +import lombok.extern.slf4j.Slf4j; +import org.bitcoinj.core.Coin; +import org.bitcoinj.core.ECKey; +import org.bitcoinj.core.Utils; + +import javax.inject.Inject; import java.math.BigInteger; import java.security.PublicKey; import java.security.SignatureException; @@ -52,10 +57,6 @@ import java.util.Optional; import java.util.Set; import java.util.Stack; import java.util.stream.Collectors; -import lombok.extern.slf4j.Slf4j; -import org.bitcoinj.core.Coin; -import org.bitcoinj.core.ECKey; -import org.bitcoinj.core.Utils; @Slf4j public class SignedWitnessService { diff --git a/core/src/main/java/haveno/core/account/sign/SignedWitnessStorageService.java b/core/src/main/java/haveno/core/account/sign/SignedWitnessStorageService.java index f8a7c57251..304ff09759 100644 --- a/core/src/main/java/haveno/core/account/sign/SignedWitnessStorageService.java +++ b/core/src/main/java/haveno/core/account/sign/SignedWitnessStorageService.java @@ -17,16 +17,17 @@ package haveno.core.account.sign; -import com.google.inject.Inject; -import com.google.inject.name.Named; import haveno.common.config.Config; import haveno.common.persistence.PersistenceManager; import haveno.network.p2p.storage.P2PDataStorage; import haveno.network.p2p.storage.payload.PersistableNetworkPayload; import haveno.network.p2p.storage.persistence.MapStoreService; +import lombok.extern.slf4j.Slf4j; + +import javax.inject.Inject; +import javax.inject.Named; import java.io.File; import java.util.Map; -import lombok.extern.slf4j.Slf4j; @Slf4j public class SignedWitnessStorageService extends MapStoreService { diff --git a/core/src/main/java/haveno/core/account/witness/AccountAgeWitnessService.java b/core/src/main/java/haveno/core/account/witness/AccountAgeWitnessService.java index fa1f61e94a..27560f1576 100644 --- a/core/src/main/java/haveno/core/account/witness/AccountAgeWitnessService.java +++ b/core/src/main/java/haveno/core/account/witness/AccountAgeWitnessService.java @@ -18,8 +18,6 @@ package haveno.core.account.witness; import com.google.common.annotations.VisibleForTesting; -import static com.google.common.base.Preconditions.checkNotNull; -import com.google.inject.Inject; import haveno.common.UserThread; import haveno.common.crypto.CryptoException; import haveno.common.crypto.Hash; @@ -53,6 +51,12 @@ import haveno.network.p2p.BootstrapListener; import haveno.network.p2p.P2PService; import haveno.network.p2p.storage.P2PDataStorage; import haveno.network.p2p.storage.persistence.AppendOnlyDataStoreService; +import lombok.Getter; +import lombok.extern.slf4j.Slf4j; +import org.bitcoinj.core.ECKey; +import org.bitcoinj.core.Utils; + +import javax.inject.Inject; import java.math.BigInteger; import java.security.PublicKey; import java.time.Clock; @@ -70,10 +74,8 @@ import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.TimeUnit; import java.util.stream.Collectors; import java.util.stream.Stream; -import lombok.Getter; -import lombok.extern.slf4j.Slf4j; -import org.bitcoinj.core.ECKey; -import org.bitcoinj.core.Utils; + +import static com.google.common.base.Preconditions.checkNotNull; @Slf4j public class AccountAgeWitnessService { diff --git a/core/src/main/java/haveno/core/account/witness/AccountAgeWitnessStorageService.java b/core/src/main/java/haveno/core/account/witness/AccountAgeWitnessStorageService.java index 180f216635..2c4c95287c 100644 --- a/core/src/main/java/haveno/core/account/witness/AccountAgeWitnessStorageService.java +++ b/core/src/main/java/haveno/core/account/witness/AccountAgeWitnessStorageService.java @@ -17,15 +17,16 @@ package haveno.core.account.witness; -import com.google.inject.Inject; -import com.google.inject.name.Named; import haveno.common.config.Config; import haveno.common.persistence.PersistenceManager; import haveno.network.p2p.storage.payload.PersistableNetworkPayload; import haveno.network.p2p.storage.persistence.HistoricalDataStoreService; -import java.io.File; import lombok.extern.slf4j.Slf4j; +import javax.inject.Inject; +import javax.inject.Named; +import java.io.File; + @Slf4j public class AccountAgeWitnessStorageService extends HistoricalDataStoreService { private static final String FILE_NAME = "AccountAgeWitnessStore"; diff --git a/core/src/main/java/haveno/core/alert/AlertManager.java b/core/src/main/java/haveno/core/alert/AlertManager.java index ac9f5f4b73..7aab57301c 100644 --- a/core/src/main/java/haveno/core/alert/AlertManager.java +++ b/core/src/main/java/haveno/core/alert/AlertManager.java @@ -18,8 +18,6 @@ package haveno.core.alert; import com.google.common.base.Charsets; -import com.google.inject.Inject; -import com.google.inject.name.Named; import haveno.common.app.DevEnv; import haveno.common.config.Config; import haveno.common.crypto.KeyRing; @@ -28,18 +26,22 @@ import haveno.network.p2p.P2PService; import haveno.network.p2p.storage.HashMapChangedListener; import haveno.network.p2p.storage.payload.ProtectedStorageEntry; import haveno.network.p2p.storage.payload.ProtectedStoragePayload; -import java.math.BigInteger; -import java.security.SignatureException; -import java.util.Collection; import javafx.beans.property.ObjectProperty; import javafx.beans.property.ReadOnlyObjectProperty; import javafx.beans.property.SimpleObjectProperty; import org.bitcoinj.core.ECKey; import org.bitcoinj.core.Utils; -import static org.bitcoinj.core.Utils.HEX; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import javax.inject.Inject; +import javax.inject.Named; +import java.math.BigInteger; +import java.security.SignatureException; +import java.util.Collection; + +import static org.bitcoinj.core.Utils.HEX; + public class AlertManager { private static final Logger log = LoggerFactory.getLogger(AlertManager.class); diff --git a/core/src/main/java/haveno/core/alert/PrivateNotificationManager.java b/core/src/main/java/haveno/core/alert/PrivateNotificationManager.java index c42aec6ed0..ef0d885b0e 100644 --- a/core/src/main/java/haveno/core/alert/PrivateNotificationManager.java +++ b/core/src/main/java/haveno/core/alert/PrivateNotificationManager.java @@ -22,8 +22,6 @@ import com.google.common.util.concurrent.FutureCallback; import com.google.common.util.concurrent.Futures; import com.google.common.util.concurrent.MoreExecutors; import com.google.common.util.concurrent.SettableFuture; -import com.google.inject.Inject; -import com.google.inject.name.Named; import haveno.common.app.DevEnv; import haveno.common.config.Config; import haveno.common.crypto.KeyRing; @@ -39,21 +37,25 @@ import haveno.network.p2p.network.MessageListener; import haveno.network.p2p.network.NetworkNode; import haveno.network.p2p.peers.keepalive.messages.Ping; import haveno.network.p2p.peers.keepalive.messages.Pong; +import javafx.beans.property.ObjectProperty; +import javafx.beans.property.ReadOnlyObjectProperty; +import javafx.beans.property.SimpleObjectProperty; +import org.bitcoinj.core.ECKey; +import org.bitcoinj.core.Utils; +import org.jetbrains.annotations.NotNull; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import javax.annotation.Nullable; +import javax.inject.Inject; +import javax.inject.Named; import java.math.BigInteger; import java.security.SignatureException; import java.util.Random; import java.util.UUID; import java.util.function.Consumer; -import javafx.beans.property.ObjectProperty; -import javafx.beans.property.ReadOnlyObjectProperty; -import javafx.beans.property.SimpleObjectProperty; -import javax.annotation.Nullable; -import org.bitcoinj.core.ECKey; -import org.bitcoinj.core.Utils; + import static org.bitcoinj.core.Utils.HEX; -import org.jetbrains.annotations.NotNull; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; public class PrivateNotificationManager implements MessageListener { private static final Logger log = LoggerFactory.getLogger(PrivateNotificationManager.class); diff --git a/core/src/main/java/haveno/core/api/CoreAccountService.java b/core/src/main/java/haveno/core/api/CoreAccountService.java index 77ed597eee..7f24c06c38 100644 --- a/core/src/main/java/haveno/core/api/CoreAccountService.java +++ b/core/src/main/java/haveno/core/api/CoreAccountService.java @@ -17,9 +17,6 @@ package haveno.core.api; -import static com.google.common.base.Preconditions.checkState; -import com.google.inject.Inject; -import com.google.inject.Singleton; import haveno.common.config.Config; import haveno.common.crypto.IncorrectPasswordException; import haveno.common.crypto.KeyRing; @@ -27,6 +24,12 @@ import haveno.common.crypto.KeyStorage; import haveno.common.file.FileUtil; import haveno.common.persistence.PersistenceManager; import haveno.common.util.ZipUtils; +import lombok.Getter; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; + +import javax.inject.Inject; +import javax.inject.Singleton; import java.io.File; import java.io.InputStream; import java.io.PipedInputStream; @@ -34,9 +37,8 @@ import java.io.PipedOutputStream; import java.util.ArrayList; import java.util.List; import java.util.function.Consumer; -import lombok.Getter; -import lombok.extern.slf4j.Slf4j; -import org.apache.commons.lang3.StringUtils; + +import static com.google.common.base.Preconditions.checkState; /** * Manages the account state. A created account must have a password which encrypts diff --git a/core/src/main/java/haveno/core/api/CoreApi.java b/core/src/main/java/haveno/core/api/CoreApi.java index 1bd40ce25d..99515019ca 100644 --- a/core/src/main/java/haveno/core/api/CoreApi.java +++ b/core/src/main/java/haveno/core/api/CoreApi.java @@ -17,8 +17,6 @@ package haveno.core.api; -import com.google.inject.Inject; -import com.google.inject.Singleton; import haveno.common.app.Version; import haveno.common.config.Config; import haveno.common.crypto.IncorrectPasswordException; @@ -47,6 +45,15 @@ import haveno.core.trade.statistics.TradeStatistics3; import haveno.core.trade.statistics.TradeStatisticsManager; import haveno.core.xmr.MoneroNodeSettings; import haveno.proto.grpc.NotificationMessage; +import lombok.Getter; +import lombok.extern.slf4j.Slf4j; +import monero.common.MoneroRpcConnection; +import monero.wallet.model.MoneroDestination; +import monero.wallet.model.MoneroTxWallet; +import org.bitcoinj.core.Transaction; + +import javax.inject.Inject; +import javax.inject.Singleton; import java.io.IOException; import java.io.InputStream; import java.math.BigInteger; @@ -56,12 +63,6 @@ import java.util.Set; import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeoutException; import java.util.function.Consumer; -import lombok.Getter; -import lombok.extern.slf4j.Slf4j; -import monero.common.MoneroRpcConnection; -import monero.wallet.model.MoneroDestination; -import monero.wallet.model.MoneroTxWallet; -import org.bitcoinj.core.Transaction; /** * Provides high level interface to functionality of core Haveno features. diff --git a/core/src/main/java/haveno/core/api/CoreContext.java b/core/src/main/java/haveno/core/api/CoreContext.java index 3d6d036602..c22a10705c 100644 --- a/core/src/main/java/haveno/core/api/CoreContext.java +++ b/core/src/main/java/haveno/core/api/CoreContext.java @@ -17,12 +17,13 @@ package haveno.core.api; -import com.google.inject.Inject; -import com.google.inject.Singleton; import lombok.Getter; import lombok.Setter; import lombok.extern.slf4j.Slf4j; +import javax.inject.Inject; +import javax.inject.Singleton; + @Singleton @Slf4j public class CoreContext { diff --git a/core/src/main/java/haveno/core/api/CoreDisputeAgentsService.java b/core/src/main/java/haveno/core/api/CoreDisputeAgentsService.java index 9bae2d68a4..c069268583 100644 --- a/core/src/main/java/haveno/core/api/CoreDisputeAgentsService.java +++ b/core/src/main/java/haveno/core/api/CoreDisputeAgentsService.java @@ -17,17 +17,11 @@ package haveno.core.api; -import com.google.inject.Inject; -import com.google.inject.Singleton; import haveno.common.config.Config; import haveno.common.crypto.KeyRing; import haveno.common.handlers.ErrorMessageHandler; import haveno.common.handlers.ResultHandler; import haveno.core.support.SupportType; -import static haveno.core.support.SupportType.ARBITRATION; -import static haveno.core.support.SupportType.MEDIATION; -import static haveno.core.support.SupportType.REFUND; -import static haveno.core.support.SupportType.TRADE; import haveno.core.support.dispute.arbitration.arbitrator.Arbitrator; import haveno.core.support.dispute.arbitration.arbitrator.ArbitratorManager; import haveno.core.support.dispute.mediation.mediator.Mediator; @@ -38,16 +32,24 @@ import haveno.core.user.User; import haveno.core.xmr.wallet.XmrWalletService; import haveno.network.p2p.NodeAddress; import haveno.network.p2p.P2PService; -import static java.lang.String.format; -import static java.net.InetAddress.getLoopbackAddress; +import lombok.extern.slf4j.Slf4j; +import org.bitcoinj.core.ECKey; + +import javax.inject.Inject; +import javax.inject.Singleton; import java.util.ArrayList; -import static java.util.Arrays.asList; import java.util.Date; import java.util.List; import java.util.Objects; import java.util.Optional; -import lombok.extern.slf4j.Slf4j; -import org.bitcoinj.core.ECKey; + +import static haveno.core.support.SupportType.ARBITRATION; +import static haveno.core.support.SupportType.MEDIATION; +import static haveno.core.support.SupportType.REFUND; +import static haveno.core.support.SupportType.TRADE; +import static java.lang.String.format; +import static java.net.InetAddress.getLoopbackAddress; +import static java.util.Arrays.asList; @Singleton @Slf4j diff --git a/core/src/main/java/haveno/core/api/CoreDisputesService.java b/core/src/main/java/haveno/core/api/CoreDisputesService.java index 7e66cc2fb9..ed4813e041 100644 --- a/core/src/main/java/haveno/core/api/CoreDisputesService.java +++ b/core/src/main/java/haveno/core/api/CoreDisputesService.java @@ -1,8 +1,5 @@ package haveno.core.api; -import static com.google.common.base.Preconditions.checkNotNull; -import com.google.inject.Inject; -import com.google.inject.Singleton; import com.google.inject.name.Named; import haveno.common.crypto.KeyRing; import haveno.common.crypto.PubKeyRing; @@ -26,13 +23,18 @@ import haveno.core.trade.TradeManager; import haveno.core.util.FormattingUtils; import haveno.core.util.coin.CoinFormatter; import haveno.core.xmr.wallet.XmrWalletService; -import static java.lang.String.format; +import lombok.extern.slf4j.Slf4j; + +import javax.inject.Inject; +import javax.inject.Singleton; import java.math.BigInteger; import java.util.ArrayList; import java.util.Date; import java.util.List; import java.util.Optional; -import lombok.extern.slf4j.Slf4j; + +import static com.google.common.base.Preconditions.checkNotNull; +import static java.lang.String.format; @Singleton diff --git a/core/src/main/java/haveno/core/api/CoreHelpService.java b/core/src/main/java/haveno/core/api/CoreHelpService.java index 2002313a8e..e56ccd48d6 100644 --- a/core/src/main/java/haveno/core/api/CoreHelpService.java +++ b/core/src/main/java/haveno/core/api/CoreHelpService.java @@ -17,16 +17,18 @@ package haveno.core.api; -import com.google.inject.Inject; -import com.google.inject.Singleton; +import lombok.extern.slf4j.Slf4j; + +import javax.inject.Inject; +import javax.inject.Singleton; import java.io.BufferedReader; -import static java.io.File.separator; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; + +import static java.io.File.separator; import static java.lang.String.format; import static java.lang.System.out; -import lombok.extern.slf4j.Slf4j; @Singleton @Slf4j diff --git a/core/src/main/java/haveno/core/api/CoreMoneroConnectionsService.java b/core/src/main/java/haveno/core/api/CoreMoneroConnectionsService.java index 22c67f10ea..1b6401bf32 100644 --- a/core/src/main/java/haveno/core/api/CoreMoneroConnectionsService.java +++ b/core/src/main/java/haveno/core/api/CoreMoneroConnectionsService.java @@ -1,24 +1,18 @@ package haveno.core.api; -import com.google.inject.Inject; -import com.google.inject.Singleton; import haveno.common.app.DevEnv; import haveno.common.config.Config; import haveno.core.trade.HavenoUtils; import haveno.core.user.Preferences; import haveno.core.xmr.model.EncryptedConnectionList; import haveno.core.xmr.nodes.XmrNodes; -import haveno.core.xmr.nodes.XmrNodes.XmrNode; import haveno.core.xmr.nodes.XmrNodesSetupPreferences; +import haveno.core.xmr.nodes.XmrNodes.XmrNode; import haveno.core.xmr.setup.DownloadListener; import haveno.core.xmr.setup.WalletsSetup; import haveno.network.Socks5ProxyProvider; import haveno.network.p2p.P2PService; import haveno.network.p2p.P2PServiceListener; -import java.util.ArrayList; -import java.util.List; -import java.util.Optional; -import java.util.stream.Collectors; import javafx.beans.property.IntegerProperty; import javafx.beans.property.LongProperty; import javafx.beans.property.ObjectProperty; @@ -38,6 +32,13 @@ import monero.daemon.MoneroDaemonRpc; import monero.daemon.model.MoneroDaemonInfo; import monero.daemon.model.MoneroPeer; +import javax.inject.Inject; +import javax.inject.Singleton; +import java.util.ArrayList; +import java.util.List; +import java.util.Optional; +import java.util.stream.Collectors; + @Slf4j @Singleton public final class CoreMoneroConnectionsService { @@ -554,7 +555,7 @@ public final class CoreMoneroConnectionsService { // numPeers.set(peers.get().size()); numPeers.set(lastInfo.getNumOutgoingConnections() + lastInfo.getNumIncomingConnections()); peers.set(new ArrayList()); - + // log recovery message if (lastErrorTimestamp != null) { log.info("Successfully fetched daemon info after previous error"); diff --git a/core/src/main/java/haveno/core/api/CoreMoneroNodeService.java b/core/src/main/java/haveno/core/api/CoreMoneroNodeService.java index 6dd103c9d5..23530ae728 100644 --- a/core/src/main/java/haveno/core/api/CoreMoneroNodeService.java +++ b/core/src/main/java/haveno/core/api/CoreMoneroNodeService.java @@ -16,22 +16,23 @@ */ package haveno.core.api; -import com.google.inject.Inject; -import com.google.inject.Singleton; import haveno.common.config.BaseCurrencyNetwork; import haveno.common.config.Config; import haveno.common.util.Utilities; import haveno.core.trade.HavenoUtils; import haveno.core.user.Preferences; import haveno.core.xmr.MoneroNodeSettings; +import lombok.extern.slf4j.Slf4j; +import monero.common.MoneroUtils; +import monero.daemon.MoneroDaemonRpc; + +import javax.inject.Inject; +import javax.inject.Singleton; import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import lombok.extern.slf4j.Slf4j; -import monero.common.MoneroUtils; -import monero.daemon.MoneroDaemonRpc; /** * Start and stop or connect to a local Monero node. diff --git a/core/src/main/java/haveno/core/api/CoreNotificationService.java b/core/src/main/java/haveno/core/api/CoreNotificationService.java index fe7d345958..f7646a5758 100644 --- a/core/src/main/java/haveno/core/api/CoreNotificationService.java +++ b/core/src/main/java/haveno/core/api/CoreNotificationService.java @@ -1,16 +1,17 @@ package haveno.core.api; -import com.google.inject.Singleton; import haveno.core.api.model.TradeInfo; import haveno.core.support.messages.ChatMessage; import haveno.core.trade.Trade; import haveno.proto.grpc.NotificationMessage; import haveno.proto.grpc.NotificationMessage.NotificationType; +import lombok.NonNull; +import lombok.extern.slf4j.Slf4j; + +import javax.inject.Singleton; import java.util.Iterator; import java.util.LinkedList; import java.util.List; -import lombok.NonNull; -import lombok.extern.slf4j.Slf4j; @Singleton @Slf4j diff --git a/core/src/main/java/haveno/core/api/CoreOffersService.java b/core/src/main/java/haveno/core/api/CoreOffersService.java index e79d8193bc..bfc087f870 100644 --- a/core/src/main/java/haveno/core/api/CoreOffersService.java +++ b/core/src/main/java/haveno/core/api/CoreOffersService.java @@ -17,13 +17,8 @@ package haveno.core.api; -import com.google.inject.Inject; -import com.google.inject.Singleton; import haveno.common.crypto.KeyRing; import haveno.common.handlers.ErrorMessageHandler; -import static haveno.common.util.MathUtils.exactMultiply; -import static haveno.common.util.MathUtils.roundDoubleToLong; -import static haveno.common.util.MathUtils.scaleUpByPowerOf10; import haveno.core.locale.CurrencyUtil; import haveno.core.monetary.CryptoMoney; import haveno.core.monetary.Price; @@ -32,30 +27,37 @@ import haveno.core.offer.CreateOfferService; import haveno.core.offer.Offer; import haveno.core.offer.OfferBookService; import haveno.core.offer.OfferDirection; -import static haveno.core.offer.OfferDirection.BUY; import haveno.core.offer.OfferFilterService; import haveno.core.offer.OfferFilterService.Result; import haveno.core.offer.OfferUtil; import haveno.core.offer.OpenOffer; import haveno.core.offer.OpenOfferManager; import haveno.core.payment.PaymentAccount; -import static haveno.core.payment.PaymentAccountUtil.isPaymentAccountValidForOffer; import haveno.core.user.User; import haveno.core.util.PriceUtil; -import static java.lang.String.format; +import lombok.extern.slf4j.Slf4j; +import org.bitcoinj.core.Transaction; + +import javax.inject.Inject; +import javax.inject.Singleton; import java.math.BigDecimal; import java.math.BigInteger; import java.util.ArrayList; import java.util.Comparator; -import static java.util.Comparator.comparing; import java.util.HashSet; import java.util.List; import java.util.Set; import java.util.function.Consumer; import java.util.function.Supplier; import java.util.stream.Collectors; -import lombok.extern.slf4j.Slf4j; -import org.bitcoinj.core.Transaction; + +import static haveno.common.util.MathUtils.exactMultiply; +import static haveno.common.util.MathUtils.roundDoubleToLong; +import static haveno.common.util.MathUtils.scaleUpByPowerOf10; +import static haveno.core.offer.OfferDirection.BUY; +import static haveno.core.payment.PaymentAccountUtil.isPaymentAccountValidForOffer; +import static java.lang.String.format; +import static java.util.Comparator.comparing; @Singleton @Slf4j diff --git a/core/src/main/java/haveno/core/api/CorePaymentAccountsService.java b/core/src/main/java/haveno/core/api/CorePaymentAccountsService.java index 73ab2a6a0a..6a6f2e87bb 100644 --- a/core/src/main/java/haveno/core/api/CorePaymentAccountsService.java +++ b/core/src/main/java/haveno/core/api/CorePaymentAccountsService.java @@ -17,18 +17,13 @@ package haveno.core.api; -import com.google.inject.Inject; -import com.google.inject.Singleton; import haveno.asset.Asset; import haveno.asset.AssetRegistry; -import static haveno.common.config.Config.baseCurrencyNetwork; import haveno.core.account.witness.AccountAgeWitnessService; import haveno.core.api.model.PaymentAccountForm; import haveno.core.api.model.PaymentAccountFormField; import haveno.core.locale.CryptoCurrency; import haveno.core.locale.CurrencyUtil; -import static haveno.core.locale.CurrencyUtil.findAsset; -import static haveno.core.locale.CurrencyUtil.getCryptoCurrency; import haveno.core.locale.TradeCurrency; import haveno.core.payment.AssetAccount; import haveno.core.payment.CryptoCurrencyAccount; @@ -37,14 +32,21 @@ import haveno.core.payment.PaymentAccount; import haveno.core.payment.PaymentAccountFactory; import haveno.core.payment.payload.PaymentMethod; import haveno.core.user.User; +import lombok.extern.slf4j.Slf4j; + +import javax.inject.Inject; +import javax.inject.Singleton; import java.io.File; -import static java.lang.String.format; import java.util.Comparator; import java.util.List; import java.util.Optional; import java.util.Set; import java.util.stream.Collectors; -import lombok.extern.slf4j.Slf4j; + +import static haveno.common.config.Config.baseCurrencyNetwork; +import static haveno.core.locale.CurrencyUtil.findAsset; +import static haveno.core.locale.CurrencyUtil.getCryptoCurrency; +import static java.lang.String.format; @Singleton @Slf4j diff --git a/core/src/main/java/haveno/core/api/CorePriceService.java b/core/src/main/java/haveno/core/api/CorePriceService.java index 99c8326411..27cf3b46aa 100644 --- a/core/src/main/java/haveno/core/api/CorePriceService.java +++ b/core/src/main/java/haveno/core/api/CorePriceService.java @@ -18,8 +18,6 @@ package haveno.core.api; import com.google.common.math.LongMath; -import com.google.inject.Inject; -import com.google.inject.Singleton; import haveno.core.api.model.MarketDepthInfo; import haveno.core.api.model.MarketPriceInfo; import haveno.core.locale.CurrencyUtil; @@ -29,13 +27,16 @@ import haveno.core.offer.OfferBookService; import haveno.core.offer.OfferDirection; import haveno.core.provider.price.PriceFeedService; import haveno.core.trade.HavenoUtils; +import lombok.extern.slf4j.Slf4j; + +import javax.inject.Inject; +import javax.inject.Singleton; import java.util.Comparator; import java.util.LinkedHashMap; import java.util.List; import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeoutException; import java.util.stream.Collectors; -import lombok.extern.slf4j.Slf4j; @Singleton diff --git a/core/src/main/java/haveno/core/api/CoreTradesService.java b/core/src/main/java/haveno/core/api/CoreTradesService.java index bb130abba8..db9f066641 100644 --- a/core/src/main/java/haveno/core/api/CoreTradesService.java +++ b/core/src/main/java/haveno/core/api/CoreTradesService.java @@ -17,8 +17,6 @@ package haveno.core.api; -import com.google.inject.Inject; -import com.google.inject.Singleton; import haveno.common.handlers.ErrorMessageHandler; import haveno.common.handlers.ResultHandler; import haveno.core.offer.Offer; @@ -36,16 +34,20 @@ import haveno.core.trade.protocol.SellerProtocol; import haveno.core.user.User; import haveno.core.util.validation.BtcAddressValidator; import haveno.core.xmr.model.AddressEntry; -import static haveno.core.xmr.model.AddressEntry.Context.TRADE_PAYOUT; import haveno.core.xmr.wallet.BtcWalletService; -import static java.lang.String.format; +import lombok.extern.slf4j.Slf4j; +import org.bitcoinj.core.Coin; + +import javax.inject.Inject; +import javax.inject.Singleton; import java.math.BigInteger; import java.util.ArrayList; import java.util.List; import java.util.Optional; import java.util.function.Consumer; -import lombok.extern.slf4j.Slf4j; -import org.bitcoinj.core.Coin; + +import static haveno.core.xmr.model.AddressEntry.Context.TRADE_PAYOUT; +import static java.lang.String.format; @Singleton @Slf4j diff --git a/core/src/main/java/haveno/core/api/CoreWalletsService.java b/core/src/main/java/haveno/core/api/CoreWalletsService.java index 5f0f615ce1..65513de865 100644 --- a/core/src/main/java/haveno/core/api/CoreWalletsService.java +++ b/core/src/main/java/haveno/core/api/CoreWalletsService.java @@ -20,9 +20,6 @@ package haveno.core.api; import com.google.common.cache.CacheBuilder; import com.google.common.cache.CacheLoader; import com.google.common.cache.LoadingCache; -import com.google.inject.Inject; -import com.google.inject.Singleton; -import com.google.inject.name.Named; import haveno.common.Timer; import haveno.common.UserThread; import haveno.core.api.model.AddressBalanceInfo; @@ -32,22 +29,13 @@ import haveno.core.api.model.XmrBalanceInfo; import haveno.core.app.AppStartupState; import haveno.core.user.Preferences; import haveno.core.util.FormattingUtils; -import static haveno.core.util.ParsingUtils.parseToCoin; import haveno.core.util.coin.CoinFormatter; import haveno.core.xmr.Balances; import haveno.core.xmr.model.AddressEntry; import haveno.core.xmr.setup.WalletsSetup; import haveno.core.xmr.wallet.BtcWalletService; -import static haveno.core.xmr.wallet.Restrictions.getMinNonDustOutput; import haveno.core.xmr.wallet.WalletsManager; import haveno.core.xmr.wallet.XmrWalletService; -import static java.lang.String.format; -import java.util.List; -import java.util.Optional; -import static java.util.concurrent.TimeUnit.SECONDS; -import java.util.function.Function; -import java.util.stream.Collectors; -import javax.annotation.Nullable; import lombok.extern.slf4j.Slf4j; import monero.wallet.model.MoneroDestination; import monero.wallet.model.MoneroTxWallet; @@ -59,6 +47,20 @@ import org.bitcoinj.core.TransactionConfidence; import org.bitcoinj.crypto.KeyCrypterScrypt; import org.bouncycastle.crypto.params.KeyParameter; +import javax.annotation.Nullable; +import javax.inject.Inject; +import javax.inject.Named; +import javax.inject.Singleton; +import java.util.List; +import java.util.Optional; +import java.util.function.Function; +import java.util.stream.Collectors; + +import static haveno.core.util.ParsingUtils.parseToCoin; +import static haveno.core.xmr.wallet.Restrictions.getMinNonDustOutput; +import static java.lang.String.format; +import static java.util.concurrent.TimeUnit.SECONDS; + @Singleton @Slf4j class CoreWalletsService { diff --git a/core/src/main/java/haveno/core/app/AppStartupState.java b/core/src/main/java/haveno/core/app/AppStartupState.java index 503795f051..94767beb0e 100644 --- a/core/src/main/java/haveno/core/app/AppStartupState.java +++ b/core/src/main/java/haveno/core/app/AppStartupState.java @@ -17,8 +17,6 @@ package haveno.core.app; -import com.google.inject.Inject; -import com.google.inject.Singleton; import haveno.core.api.CoreMoneroConnectionsService; import haveno.core.api.CoreNotificationService; import haveno.network.p2p.BootstrapListener; @@ -30,6 +28,9 @@ import lombok.extern.slf4j.Slf4j; import org.fxmisc.easybind.EasyBind; import org.fxmisc.easybind.monadic.MonadicBinding; +import javax.inject.Inject; +import javax.inject.Singleton; + /** * We often need to wait until network and wallet is ready or other combination of startup states. * To avoid those repeated checks for the state or setting of listeners on different domains we provide here a diff --git a/core/src/main/java/haveno/core/app/AvoidStandbyModeService.java b/core/src/main/java/haveno/core/app/AvoidStandbyModeService.java index 410772cffa..d1f1c49369 100644 --- a/core/src/main/java/haveno/core/app/AvoidStandbyModeService.java +++ b/core/src/main/java/haveno/core/app/AvoidStandbyModeService.java @@ -17,13 +17,21 @@ package haveno.core.app; -import com.google.inject.Inject; -import com.google.inject.Singleton; import haveno.common.config.Config; import haveno.common.file.FileUtil; import haveno.common.file.ResourceNotFoundException; import haveno.common.util.Utilities; import haveno.core.user.Preferences; +import lombok.extern.slf4j.Slf4j; + +import javax.inject.Inject; +import javax.inject.Singleton; +import javax.sound.sampled.AudioFormat; +import javax.sound.sampled.AudioInputStream; +import javax.sound.sampled.AudioSystem; +import javax.sound.sampled.DataLine; +import javax.sound.sampled.LineUnavailableException; +import javax.sound.sampled.SourceDataLine; import java.io.File; import java.io.IOException; import java.nio.file.Paths; @@ -35,13 +43,6 @@ import java.util.concurrent.CountDownLatch; import java.util.function.Function; import java.util.function.Predicate; import java.util.function.Supplier; -import javax.sound.sampled.AudioFormat; -import javax.sound.sampled.AudioInputStream; -import javax.sound.sampled.AudioSystem; -import javax.sound.sampled.DataLine; -import javax.sound.sampled.LineUnavailableException; -import javax.sound.sampled.SourceDataLine; -import lombok.extern.slf4j.Slf4j; /** * Prevents that Haveno gets hibernated from the OS. On OSX there is a tool called caffeinate but it seems it does not diff --git a/core/src/main/java/haveno/core/app/DomainInitialisation.java b/core/src/main/java/haveno/core/app/DomainInitialisation.java index 6383999dc7..7918ebc739 100644 --- a/core/src/main/java/haveno/core/app/DomainInitialisation.java +++ b/core/src/main/java/haveno/core/app/DomainInitialisation.java @@ -17,7 +17,6 @@ package haveno.core.app; -import com.google.inject.Inject; import haveno.common.ClockWatcher; import haveno.common.persistence.PersistenceManager; import haveno.core.account.sign.SignedWitnessService; @@ -52,6 +51,8 @@ import haveno.core.user.User; import haveno.core.xmr.Balances; import haveno.network.p2p.P2PService; import haveno.network.p2p.mailbox.MailboxMessageService; + +import javax.inject.Inject; import java.util.List; import java.util.function.Consumer; import java.util.stream.Collectors; diff --git a/core/src/main/java/haveno/core/app/HavenoSetup.java b/core/src/main/java/haveno/core/app/HavenoSetup.java index 9679ed51e2..d25e4ffed9 100644 --- a/core/src/main/java/haveno/core/app/HavenoSetup.java +++ b/core/src/main/java/haveno/core/app/HavenoSetup.java @@ -17,9 +17,6 @@ package haveno.core.app; -import com.google.inject.Inject; -import com.google.inject.Singleton; -import com.google.inject.name.Named; import haveno.common.Timer; import haveno.common.UserThread; import haveno.common.app.DevEnv; @@ -65,6 +62,23 @@ import haveno.network.p2p.NodeAddress; import haveno.network.p2p.P2PService; import haveno.network.p2p.storage.payload.PersistableNetworkPayload; import haveno.network.utils.Utils; +import javafx.beans.property.BooleanProperty; +import javafx.beans.property.DoubleProperty; +import javafx.beans.property.SimpleBooleanProperty; +import javafx.beans.property.StringProperty; +import javafx.beans.value.ChangeListener; +import javafx.collections.SetChangeListener; +import lombok.Getter; +import lombok.Setter; +import lombok.extern.slf4j.Slf4j; +import org.bitcoinj.core.Coin; +import org.fxmisc.easybind.EasyBind; +import org.fxmisc.easybind.monadic.MonadicBinding; + +import javax.annotation.Nullable; +import javax.inject.Inject; +import javax.inject.Named; +import javax.inject.Singleton; import java.io.File; import java.io.FileNotFoundException; import java.io.FileWriter; @@ -79,19 +93,6 @@ import java.util.Set; import java.util.concurrent.TimeUnit; import java.util.function.BiConsumer; import java.util.function.Consumer; -import javafx.beans.property.BooleanProperty; -import javafx.beans.property.DoubleProperty; -import javafx.beans.property.SimpleBooleanProperty; -import javafx.beans.property.StringProperty; -import javafx.beans.value.ChangeListener; -import javafx.collections.SetChangeListener; -import javax.annotation.Nullable; -import lombok.Getter; -import lombok.Setter; -import lombok.extern.slf4j.Slf4j; -import org.bitcoinj.core.Coin; -import org.fxmisc.easybind.EasyBind; -import org.fxmisc.easybind.monadic.MonadicBinding; @Slf4j @Singleton diff --git a/core/src/main/java/haveno/core/app/P2PNetworkSetup.java b/core/src/main/java/haveno/core/app/P2PNetworkSetup.java index 6c9a8e521c..bd52aab41c 100644 --- a/core/src/main/java/haveno/core/app/P2PNetworkSetup.java +++ b/core/src/main/java/haveno/core/app/P2PNetworkSetup.java @@ -17,8 +17,6 @@ package haveno.core.app; -import com.google.inject.Inject; -import com.google.inject.Singleton; import haveno.common.UserThread; import haveno.core.api.CoreMoneroConnectionsService; import haveno.core.locale.Res; @@ -29,17 +27,20 @@ import haveno.network.p2p.P2PServiceListener; import haveno.network.p2p.network.CloseConnectionReason; import haveno.network.p2p.network.Connection; import haveno.network.p2p.network.ConnectionListener; -import java.util.function.Consumer; import javafx.beans.property.BooleanProperty; import javafx.beans.property.SimpleBooleanProperty; import javafx.beans.property.SimpleStringProperty; import javafx.beans.property.StringProperty; -import javax.annotation.Nullable; import lombok.Getter; import lombok.extern.slf4j.Slf4j; import org.fxmisc.easybind.EasyBind; import org.fxmisc.easybind.monadic.MonadicBinding; +import javax.annotation.Nullable; +import javax.inject.Inject; +import javax.inject.Singleton; +import java.util.function.Consumer; + @Singleton @Slf4j public class P2PNetworkSetup { diff --git a/core/src/main/java/haveno/core/app/TorSetup.java b/core/src/main/java/haveno/core/app/TorSetup.java index 51f453e961..8976a10e04 100644 --- a/core/src/main/java/haveno/core/app/TorSetup.java +++ b/core/src/main/java/haveno/core/app/TorSetup.java @@ -17,18 +17,20 @@ package haveno.core.app; -import com.google.inject.Inject; -import com.google.inject.Singleton; -import com.google.inject.name.Named; import haveno.common.config.Config; import haveno.common.file.FileUtil; import haveno.common.handlers.ErrorMessageHandler; -import static haveno.common.util.Preconditions.checkDir; +import lombok.extern.slf4j.Slf4j; + +import javax.annotation.Nullable; +import javax.inject.Inject; +import javax.inject.Named; +import javax.inject.Singleton; import java.io.File; import java.io.IOException; import java.nio.file.Paths; -import javax.annotation.Nullable; -import lombok.extern.slf4j.Slf4j; + +import static haveno.common.util.Preconditions.checkDir; @Slf4j @Singleton diff --git a/core/src/main/java/haveno/core/app/WalletAppSetup.java b/core/src/main/java/haveno/core/app/WalletAppSetup.java index 768e541c4f..cc8959ebd8 100644 --- a/core/src/main/java/haveno/core/app/WalletAppSetup.java +++ b/core/src/main/java/haveno/core/app/WalletAppSetup.java @@ -17,8 +17,6 @@ package haveno.core.app; -import com.google.inject.Inject; -import com.google.inject.Singleton; import haveno.common.UserThread; import haveno.common.config.Config; import haveno.core.api.CoreContext; @@ -32,8 +30,6 @@ import haveno.core.xmr.exceptions.InvalidHostException; import haveno.core.xmr.exceptions.RejectedTxException; import haveno.core.xmr.setup.WalletsSetup; import haveno.core.xmr.wallet.WalletsManager; -import java.util.concurrent.TimeoutException; -import java.util.function.Consumer; import javafx.beans.property.BooleanProperty; import javafx.beans.property.DoubleProperty; import javafx.beans.property.ObjectProperty; @@ -42,10 +38,10 @@ import javafx.beans.property.SimpleDoubleProperty; import javafx.beans.property.SimpleObjectProperty; import javafx.beans.property.SimpleStringProperty; import javafx.beans.property.StringProperty; -import javax.annotation.Nullable; import lombok.Getter; import lombok.extern.slf4j.Slf4j; import monero.daemon.model.MoneroDaemonInfo; + import org.bitcoinj.core.RejectMessage; import org.bitcoinj.core.VersionMessage; import org.bitcoinj.store.BlockStoreException; @@ -53,6 +49,12 @@ import org.bitcoinj.store.ChainFileLockedException; import org.fxmisc.easybind.EasyBind; import org.fxmisc.easybind.monadic.MonadicBinding; +import javax.annotation.Nullable; +import javax.inject.Inject; +import javax.inject.Singleton; +import java.util.concurrent.TimeoutException; +import java.util.function.Consumer; + @Slf4j @Singleton public class WalletAppSetup { diff --git a/core/src/main/java/haveno/core/app/misc/AppSetup.java b/core/src/main/java/haveno/core/app/misc/AppSetup.java index b3b9f550d2..8ba2e88326 100644 --- a/core/src/main/java/haveno/core/app/misc/AppSetup.java +++ b/core/src/main/java/haveno/core/app/misc/AppSetup.java @@ -17,11 +17,12 @@ package haveno.core.app.misc; -import com.google.inject.Inject; import haveno.common.app.Version; import haveno.common.config.Config; import lombok.extern.slf4j.Slf4j; +import javax.inject.Inject; + @Slf4j public abstract class AppSetup { protected final Config config; diff --git a/core/src/main/java/haveno/core/app/misc/AppSetupWithP2P.java b/core/src/main/java/haveno/core/app/misc/AppSetupWithP2P.java index bab66d605a..87e1100b90 100644 --- a/core/src/main/java/haveno/core/app/misc/AppSetupWithP2P.java +++ b/core/src/main/java/haveno/core/app/misc/AppSetupWithP2P.java @@ -17,7 +17,6 @@ package haveno.core.app.misc; -import com.google.inject.Inject; import haveno.common.config.Config; import haveno.common.persistence.PersistenceManager; import haveno.common.proto.persistable.PersistedDataHost; @@ -32,11 +31,13 @@ import haveno.network.p2p.network.Connection; import haveno.network.p2p.network.ConnectionListener; import haveno.network.p2p.peers.PeerManager; import haveno.network.p2p.storage.P2PDataStorage; -import java.util.ArrayList; import javafx.beans.property.BooleanProperty; import javafx.beans.property.SimpleBooleanProperty; import lombok.extern.slf4j.Slf4j; +import javax.inject.Inject; +import java.util.ArrayList; + @Slf4j public class AppSetupWithP2P extends AppSetup { protected final P2PService p2PService; diff --git a/core/src/main/java/haveno/core/app/misc/AppSetupWithP2PAndDAO.java b/core/src/main/java/haveno/core/app/misc/AppSetupWithP2PAndDAO.java index 07b44a13cb..292085ecc8 100644 --- a/core/src/main/java/haveno/core/app/misc/AppSetupWithP2PAndDAO.java +++ b/core/src/main/java/haveno/core/app/misc/AppSetupWithP2PAndDAO.java @@ -17,7 +17,6 @@ package haveno.core.app.misc; -import com.google.inject.Inject; import haveno.common.config.Config; import haveno.core.account.sign.SignedWitnessService; import haveno.core.account.witness.AccountAgeWitnessService; @@ -28,6 +27,8 @@ import haveno.network.p2p.peers.PeerManager; import haveno.network.p2p.storage.P2PDataStorage; import lombok.extern.slf4j.Slf4j; +import javax.inject.Inject; + @Slf4j public class AppSetupWithP2PAndDAO extends AppSetupWithP2P { diff --git a/core/src/main/java/haveno/core/filter/FilterManager.java b/core/src/main/java/haveno/core/filter/FilterManager.java index 00e17c5a29..169b209443 100644 --- a/core/src/main/java/haveno/core/filter/FilterManager.java +++ b/core/src/main/java/haveno/core/filter/FilterManager.java @@ -17,9 +17,6 @@ package haveno.core.filter; -import static com.google.common.base.Preconditions.checkNotNull; -import com.google.inject.Inject; -import com.google.inject.name.Named; import haveno.common.app.DevEnv; import haveno.common.app.Version; import haveno.common.config.Config; @@ -38,6 +35,16 @@ import haveno.network.p2p.P2PServiceListener; import haveno.network.p2p.network.BanFilter; import haveno.network.p2p.storage.HashMapChangedListener; import haveno.network.p2p.storage.payload.ProtectedStorageEntry; +import javafx.beans.property.ObjectProperty; +import javafx.beans.property.SimpleObjectProperty; +import lombok.extern.slf4j.Slf4j; +import org.bitcoinj.core.ECKey; +import org.bitcoinj.core.Sha256Hash; +import org.bouncycastle.util.encoders.Base64; + +import javax.annotation.Nullable; +import javax.inject.Inject; +import javax.inject.Named; import java.lang.reflect.Method; import java.math.BigInteger; import java.nio.charset.StandardCharsets; @@ -51,14 +58,9 @@ import java.util.List; import java.util.Set; import java.util.concurrent.CopyOnWriteArrayList; import java.util.function.Consumer; -import javafx.beans.property.ObjectProperty; -import javafx.beans.property.SimpleObjectProperty; -import javax.annotation.Nullable; -import lombok.extern.slf4j.Slf4j; -import org.bitcoinj.core.ECKey; -import org.bitcoinj.core.Sha256Hash; + +import static com.google.common.base.Preconditions.checkNotNull; import static org.bitcoinj.core.Utils.HEX; -import org.bouncycastle.util.encoders.Base64; /** * We only support one active filter, if we receive multiple we use the one with the more recent creationDate. diff --git a/core/src/main/java/haveno/core/network/CoreBanFilter.java b/core/src/main/java/haveno/core/network/CoreBanFilter.java index e5ebc9a4d9..ef4406d114 100644 --- a/core/src/main/java/haveno/core/network/CoreBanFilter.java +++ b/core/src/main/java/haveno/core/network/CoreBanFilter.java @@ -17,16 +17,17 @@ package haveno.core.network; -import com.google.inject.Inject; -import com.google.inject.name.Named; import haveno.common.config.Config; import haveno.network.p2p.NodeAddress; import haveno.network.p2p.network.BanFilter; +import lombok.extern.slf4j.Slf4j; + +import javax.inject.Inject; +import javax.inject.Named; import java.util.HashSet; import java.util.List; import java.util.Set; import java.util.function.Predicate; -import lombok.extern.slf4j.Slf4j; @Slf4j public class CoreBanFilter implements BanFilter { diff --git a/core/src/main/java/haveno/core/network/p2p/inventory/GetInventoryRequestHandler.java b/core/src/main/java/haveno/core/network/p2p/inventory/GetInventoryRequestHandler.java index b923e655af..7d343a179d 100644 --- a/core/src/main/java/haveno/core/network/p2p/inventory/GetInventoryRequestHandler.java +++ b/core/src/main/java/haveno/core/network/p2p/inventory/GetInventoryRequestHandler.java @@ -20,8 +20,6 @@ package haveno.core.network.p2p.inventory; import com.google.common.base.Enums; import com.google.common.base.Joiner; import com.google.common.base.Optional; -import com.google.inject.Inject; -import com.google.inject.name.Named; import haveno.common.app.Version; import haveno.common.config.Config; import haveno.common.proto.network.NetworkEnvelope; @@ -39,10 +37,13 @@ import haveno.network.p2p.network.Statistic; import haveno.network.p2p.peers.PeerManager; import haveno.network.p2p.storage.P2PDataStorage; import haveno.network.p2p.storage.payload.ProtectedStorageEntry; +import lombok.extern.slf4j.Slf4j; + +import javax.inject.Inject; +import javax.inject.Named; import java.lang.management.ManagementFactory; import java.util.HashMap; import java.util.Map; -import lombok.extern.slf4j.Slf4j; @Slf4j public class GetInventoryRequestHandler implements MessageListener { diff --git a/core/src/main/java/haveno/core/network/p2p/inventory/GetInventoryRequestManager.java b/core/src/main/java/haveno/core/network/p2p/inventory/GetInventoryRequestManager.java index d3c3c1cf40..6b109c89bc 100644 --- a/core/src/main/java/haveno/core/network/p2p/inventory/GetInventoryRequestManager.java +++ b/core/src/main/java/haveno/core/network/p2p/inventory/GetInventoryRequestManager.java @@ -17,15 +17,16 @@ package haveno.core.network.p2p.inventory; -import com.google.inject.Inject; import haveno.common.handlers.ErrorMessageHandler; import haveno.core.network.p2p.inventory.model.InventoryItem; import haveno.network.p2p.NodeAddress; import haveno.network.p2p.network.NetworkNode; +import lombok.extern.slf4j.Slf4j; + +import javax.inject.Inject; import java.util.HashMap; import java.util.Map; import java.util.function.Consumer; -import lombok.extern.slf4j.Slf4j; @Slf4j public class GetInventoryRequestManager { diff --git a/core/src/main/java/haveno/core/network/p2p/seed/DefaultSeedNodeRepository.java b/core/src/main/java/haveno/core/network/p2p/seed/DefaultSeedNodeRepository.java index 48dfd1dc44..ce2e1be653 100644 --- a/core/src/main/java/haveno/core/network/p2p/seed/DefaultSeedNodeRepository.java +++ b/core/src/main/java/haveno/core/network/p2p/seed/DefaultSeedNodeRepository.java @@ -17,11 +17,13 @@ package haveno.core.network.p2p.seed; -import com.google.inject.Inject; -import com.google.inject.Singleton; import haveno.common.config.Config; import haveno.network.p2p.NodeAddress; import haveno.network.p2p.seed.SeedNodeRepository; +import lombok.extern.slf4j.Slf4j; + +import javax.inject.Inject; +import javax.inject.Singleton; import java.io.BufferedReader; import java.io.InputStream; import java.io.InputStreamReader; @@ -33,7 +35,6 @@ import java.util.Optional; import java.util.regex.Matcher; import java.util.regex.Pattern; import java.util.stream.Collectors; -import lombok.extern.slf4j.Slf4j; // If a new BaseCurrencyNetwork type gets added we need to add the resource file for it as well! @Slf4j diff --git a/core/src/main/java/haveno/core/notifications/MobileMessageEncryption.java b/core/src/main/java/haveno/core/notifications/MobileMessageEncryption.java index 594343fab0..a2afc95e37 100644 --- a/core/src/main/java/haveno/core/notifications/MobileMessageEncryption.java +++ b/core/src/main/java/haveno/core/notifications/MobileMessageEncryption.java @@ -18,15 +18,16 @@ package haveno.core.notifications; import com.google.common.base.Charsets; -import com.google.inject.Inject; -import com.google.inject.Singleton; -import java.security.NoSuchAlgorithmException; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.codec.binary.Base64; + import javax.crypto.Cipher; import javax.crypto.NoSuchPaddingException; import javax.crypto.spec.IvParameterSpec; import javax.crypto.spec.SecretKeySpec; -import lombok.extern.slf4j.Slf4j; -import org.apache.commons.codec.binary.Base64; +import javax.inject.Inject; +import javax.inject.Singleton; +import java.security.NoSuchAlgorithmException; @Slf4j @Singleton diff --git a/core/src/main/java/haveno/core/notifications/MobileModel.java b/core/src/main/java/haveno/core/notifications/MobileModel.java index b424911fbe..6adf318db1 100644 --- a/core/src/main/java/haveno/core/notifications/MobileModel.java +++ b/core/src/main/java/haveno/core/notifications/MobileModel.java @@ -18,14 +18,15 @@ package haveno.core.notifications; import com.google.common.annotations.VisibleForTesting; -import com.google.inject.Inject; -import com.google.inject.Singleton; -import java.util.Arrays; -import javax.annotation.Nullable; import lombok.Data; import lombok.Getter; import lombok.extern.slf4j.Slf4j; +import javax.annotation.Nullable; +import javax.inject.Inject; +import javax.inject.Singleton; +import java.util.Arrays; + @Data @Slf4j @Singleton diff --git a/core/src/main/java/haveno/core/notifications/MobileNotificationService.java b/core/src/main/java/haveno/core/notifications/MobileNotificationService.java index d65fdbe82e..c222f3b704 100644 --- a/core/src/main/java/haveno/core/notifications/MobileNotificationService.java +++ b/core/src/main/java/haveno/core/notifications/MobileNotificationService.java @@ -17,8 +17,6 @@ package haveno.core.notifications; -import static com.google.common.base.Preconditions.checkArgument; -import static com.google.common.base.Preconditions.checkNotNull; import com.google.common.util.concurrent.FutureCallback; import com.google.common.util.concurrent.Futures; import com.google.common.util.concurrent.ListenableFuture; @@ -27,15 +25,12 @@ import com.google.common.util.concurrent.MoreExecutors; import com.google.gson.Gson; import com.google.inject.Inject; import com.google.inject.Singleton; -import com.google.inject.name.Named; import haveno.common.UserThread; import haveno.common.app.Version; import haveno.common.config.Config; import haveno.common.util.Utilities; import haveno.core.user.Preferences; import haveno.network.http.HttpClient; -import java.util.UUID; -import java.util.function.Consumer; import javafx.beans.property.BooleanProperty; import javafx.beans.property.SimpleBooleanProperty; import lombok.Getter; @@ -43,6 +38,13 @@ import lombok.extern.slf4j.Slf4j; import org.apache.commons.codec.binary.Hex; import org.jetbrains.annotations.NotNull; +import javax.inject.Named; +import java.util.UUID; +import java.util.function.Consumer; + +import static com.google.common.base.Preconditions.checkArgument; +import static com.google.common.base.Preconditions.checkNotNull; + @Slf4j @Singleton public class MobileNotificationService { diff --git a/core/src/main/java/haveno/core/notifications/MobileNotificationValidator.java b/core/src/main/java/haveno/core/notifications/MobileNotificationValidator.java index 456cf17f30..0004defa41 100644 --- a/core/src/main/java/haveno/core/notifications/MobileNotificationValidator.java +++ b/core/src/main/java/haveno/core/notifications/MobileNotificationValidator.java @@ -17,10 +17,11 @@ package haveno.core.notifications; -import com.google.inject.Inject; -import com.google.inject.Singleton; import lombok.extern.slf4j.Slf4j; +import javax.inject.Inject; +import javax.inject.Singleton; + @Slf4j @Singleton public class MobileNotificationValidator { diff --git a/core/src/main/java/haveno/core/notifications/alerts/DisputeMsgEvents.java b/core/src/main/java/haveno/core/notifications/alerts/DisputeMsgEvents.java index ea9a73e9b1..41e890edbd 100644 --- a/core/src/main/java/haveno/core/notifications/alerts/DisputeMsgEvents.java +++ b/core/src/main/java/haveno/core/notifications/alerts/DisputeMsgEvents.java @@ -17,8 +17,6 @@ package haveno.core.notifications.alerts; -import com.google.inject.Inject; -import com.google.inject.Singleton; import haveno.core.locale.Res; import haveno.core.notifications.MobileMessage; import haveno.core.notifications.MobileMessageType; @@ -29,11 +27,14 @@ import haveno.core.support.dispute.mediation.MediationManager; import haveno.core.support.dispute.refund.RefundManager; import haveno.core.support.messages.ChatMessage; import haveno.network.p2p.P2PService; -import java.util.UUID; import javafx.collections.ListChangeListener; import javafx.collections.ObservableList; import lombok.extern.slf4j.Slf4j; +import javax.inject.Inject; +import javax.inject.Singleton; +import java.util.UUID; + @Slf4j @Singleton public class DisputeMsgEvents { diff --git a/core/src/main/java/haveno/core/notifications/alerts/MyOfferTakenEvents.java b/core/src/main/java/haveno/core/notifications/alerts/MyOfferTakenEvents.java index 431e34804c..1424be3ef1 100644 --- a/core/src/main/java/haveno/core/notifications/alerts/MyOfferTakenEvents.java +++ b/core/src/main/java/haveno/core/notifications/alerts/MyOfferTakenEvents.java @@ -17,18 +17,19 @@ package haveno.core.notifications.alerts; -import com.google.inject.Inject; -import com.google.inject.Singleton; import haveno.core.locale.Res; import haveno.core.notifications.MobileMessage; import haveno.core.notifications.MobileMessageType; import haveno.core.notifications.MobileNotificationService; import haveno.core.offer.OpenOffer; import haveno.core.offer.OpenOfferManager; -import java.util.UUID; import javafx.collections.ListChangeListener; import lombok.extern.slf4j.Slf4j; +import javax.inject.Inject; +import javax.inject.Singleton; +import java.util.UUID; + @Slf4j @Singleton public class MyOfferTakenEvents { diff --git a/core/src/main/java/haveno/core/notifications/alerts/TradeEvents.java b/core/src/main/java/haveno/core/notifications/alerts/TradeEvents.java index 92c0c9760c..aa9d8eeb69 100644 --- a/core/src/main/java/haveno/core/notifications/alerts/TradeEvents.java +++ b/core/src/main/java/haveno/core/notifications/alerts/TradeEvents.java @@ -17,8 +17,6 @@ package haveno.core.notifications.alerts; -import com.google.inject.Inject; -import com.google.inject.Singleton; import haveno.common.crypto.PubKeyRingProvider; import haveno.core.locale.Res; import haveno.core.notifications.MobileMessage; @@ -26,11 +24,14 @@ import haveno.core.notifications.MobileMessageType; import haveno.core.notifications.MobileNotificationService; import haveno.core.trade.Trade; import haveno.core.trade.TradeManager; +import javafx.collections.ListChangeListener; +import lombok.extern.slf4j.Slf4j; + +import javax.inject.Inject; +import javax.inject.Singleton; import java.util.ArrayList; import java.util.List; import java.util.UUID; -import javafx.collections.ListChangeListener; -import lombok.extern.slf4j.Slf4j; @Slf4j @Singleton diff --git a/core/src/main/java/haveno/core/notifications/alerts/market/MarketAlerts.java b/core/src/main/java/haveno/core/notifications/alerts/market/MarketAlerts.java index 1790fc56db..07fc7fb848 100644 --- a/core/src/main/java/haveno/core/notifications/alerts/market/MarketAlerts.java +++ b/core/src/main/java/haveno/core/notifications/alerts/market/MarketAlerts.java @@ -17,8 +17,6 @@ package haveno.core.notifications.alerts.market; -import com.google.inject.Inject; -import com.google.inject.Singleton; import haveno.common.crypto.KeyRing; import haveno.common.util.MathUtils; import haveno.core.locale.CurrencyUtil; @@ -36,9 +34,12 @@ import haveno.core.provider.price.MarketPrice; import haveno.core.provider.price.PriceFeedService; import haveno.core.user.User; import haveno.core.util.FormattingUtils; +import lombok.extern.slf4j.Slf4j; + +import javax.inject.Inject; +import javax.inject.Singleton; import java.util.List; import java.util.UUID; -import lombok.extern.slf4j.Slf4j; @Slf4j @Singleton diff --git a/core/src/main/java/haveno/core/notifications/alerts/price/PriceAlert.java b/core/src/main/java/haveno/core/notifications/alerts/price/PriceAlert.java index 7f369c11da..684533a498 100644 --- a/core/src/main/java/haveno/core/notifications/alerts/price/PriceAlert.java +++ b/core/src/main/java/haveno/core/notifications/alerts/price/PriceAlert.java @@ -17,8 +17,6 @@ package haveno.core.notifications.alerts.price; -import com.google.inject.Inject; -import com.google.inject.Singleton; import haveno.common.util.MathUtils; import haveno.core.locale.CurrencyUtil; import haveno.core.locale.Res; @@ -33,6 +31,9 @@ import haveno.core.user.User; import haveno.core.util.FormattingUtils; import lombok.extern.slf4j.Slf4j; +import javax.inject.Inject; +import javax.inject.Singleton; + @Slf4j @Singleton public class PriceAlert { diff --git a/core/src/main/java/haveno/core/offer/CreateOfferService.java b/core/src/main/java/haveno/core/offer/CreateOfferService.java index 141a7e2b9c..2b60736099 100644 --- a/core/src/main/java/haveno/core/offer/CreateOfferService.java +++ b/core/src/main/java/haveno/core/offer/CreateOfferService.java @@ -17,8 +17,6 @@ package haveno.core.offer; -import com.google.inject.Inject; -import com.google.inject.Singleton; import haveno.common.app.Version; import haveno.common.crypto.PubKeyRingProvider; import haveno.common.util.Utilities; @@ -40,12 +38,15 @@ import haveno.core.xmr.wallet.Restrictions; import haveno.core.xmr.wallet.XmrWalletService; import haveno.network.p2p.NodeAddress; import haveno.network.p2p.P2PService; +import lombok.extern.slf4j.Slf4j; + +import javax.inject.Inject; +import javax.inject.Singleton; import java.math.BigInteger; import java.util.Date; import java.util.List; import java.util.Map; import java.util.UUID; -import lombok.extern.slf4j.Slf4j; @Slf4j @Singleton diff --git a/core/src/main/java/haveno/core/offer/OfferBookService.java b/core/src/main/java/haveno/core/offer/OfferBookService.java index 4668717fac..42f07ad71c 100644 --- a/core/src/main/java/haveno/core/offer/OfferBookService.java +++ b/core/src/main/java/haveno/core/offer/OfferBookService.java @@ -17,8 +17,6 @@ package haveno.core.offer; -import com.google.inject.Inject; -import com.google.inject.name.Named; import common.utils.GenUtils; import haveno.common.UserThread; import haveno.common.config.Config; @@ -36,6 +34,15 @@ import haveno.network.p2p.BootstrapListener; import haveno.network.p2p.P2PService; import haveno.network.p2p.storage.HashMapChangedListener; import haveno.network.p2p.storage.payload.ProtectedStorageEntry; +import monero.common.MoneroConnectionManagerListener; +import monero.common.MoneroRpcConnection; +import monero.daemon.model.MoneroKeyImageSpentStatus; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import javax.annotation.Nullable; +import javax.inject.Inject; +import javax.inject.Named; import java.io.File; import java.util.Collection; import java.util.LinkedList; @@ -43,12 +50,6 @@ import java.util.List; import java.util.Map; import java.util.Objects; import java.util.stream.Collectors; -import javax.annotation.Nullable; -import monero.common.MoneroConnectionManagerListener; -import monero.common.MoneroRpcConnection; -import monero.daemon.model.MoneroKeyImageSpentStatus; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; /** * Handles storage and retrieval of offers. diff --git a/core/src/main/java/haveno/core/offer/OfferFilterService.java b/core/src/main/java/haveno/core/offer/OfferFilterService.java index 5949ba9be0..1339f315c8 100644 --- a/core/src/main/java/haveno/core/offer/OfferFilterService.java +++ b/core/src/main/java/haveno/core/offer/OfferFilterService.java @@ -17,8 +17,6 @@ package haveno.core.offer; -import com.google.inject.Inject; -import com.google.inject.Singleton; import haveno.common.app.Version; import haveno.core.account.witness.AccountAgeWitnessService; import haveno.core.filter.FilterManager; @@ -30,15 +28,18 @@ import haveno.core.user.Preferences; import haveno.core.user.User; import haveno.network.p2p.NodeAddress; import haveno.network.p2p.P2PService; +import javafx.collections.SetChangeListener; +import lombok.Getter; +import lombok.extern.slf4j.Slf4j; +import org.bitcoinj.core.Coin; + +import javax.inject.Inject; +import javax.inject.Singleton; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Optional; import java.util.stream.Collectors; -import javafx.collections.SetChangeListener; -import lombok.Getter; -import lombok.extern.slf4j.Slf4j; -import org.bitcoinj.core.Coin; @Slf4j @Singleton diff --git a/core/src/main/java/haveno/core/offer/OfferUtil.java b/core/src/main/java/haveno/core/offer/OfferUtil.java index 1c74683d86..64e9f9b25c 100644 --- a/core/src/main/java/haveno/core/offer/OfferUtil.java +++ b/core/src/main/java/haveno/core/offer/OfferUtil.java @@ -17,15 +17,9 @@ package haveno.core.offer; -import static com.google.common.base.Preconditions.checkArgument; -import static com.google.common.base.Preconditions.checkNotNull; -import com.google.inject.Inject; -import com.google.inject.Singleton; import haveno.common.app.Capabilities; import haveno.common.app.Version; import haveno.common.util.MathUtils; -import static haveno.common.util.MathUtils.roundDoubleToLong; -import static haveno.common.util.MathUtils.scaleUpByPowerOf10; import haveno.common.util.Utilities; import haveno.core.account.witness.AccountAgeWitnessService; import haveno.core.filter.FilterManager; @@ -34,16 +28,8 @@ import haveno.core.locale.Res; import haveno.core.monetary.Price; import haveno.core.monetary.TraditionalMoney; import haveno.core.monetary.Volume; -import static haveno.core.offer.OfferPayload.ACCOUNT_AGE_WITNESS_HASH; -import static haveno.core.offer.OfferPayload.CAPABILITIES; -import static haveno.core.offer.OfferPayload.F2F_CITY; -import static haveno.core.offer.OfferPayload.F2F_EXTRA_INFO; -import static haveno.core.offer.OfferPayload.PAY_BY_MAIL_EXTRA_INFO; -import static haveno.core.offer.OfferPayload.REFERRAL_ID; -import static haveno.core.offer.OfferPayload.XMR_AUTO_CONF; -import static haveno.core.offer.OfferPayload.XMR_AUTO_CONF_ENABLED_VALUE; -import haveno.core.payment.F2FAccount; import haveno.core.payment.PayByMailAccount; +import haveno.core.payment.F2FAccount; import haveno.core.payment.PaymentAccount; import haveno.core.provider.price.MarketPrice; import haveno.core.provider.price.PriceFeedService; @@ -52,18 +38,34 @@ import haveno.core.user.AutoConfirmSettings; import haveno.core.user.Preferences; import haveno.core.util.coin.CoinFormatter; import haveno.core.xmr.wallet.BtcWalletService; -import static haveno.core.xmr.wallet.Restrictions.getMaxBuyerSecurityDepositAsPercent; -import static haveno.core.xmr.wallet.Restrictions.getMinBuyerSecurityDepositAsPercent; import haveno.network.p2p.P2PService; +import lombok.extern.slf4j.Slf4j; +import org.bitcoinj.core.Transaction; +import org.bitcoinj.core.TransactionInput; +import org.bitcoinj.core.TransactionOutput; + +import javax.inject.Inject; +import javax.inject.Singleton; import java.math.BigInteger; import java.util.HashMap; import java.util.Map; import java.util.Optional; import java.util.UUID; -import lombok.extern.slf4j.Slf4j; -import org.bitcoinj.core.Transaction; -import org.bitcoinj.core.TransactionInput; -import org.bitcoinj.core.TransactionOutput; + +import static com.google.common.base.Preconditions.checkArgument; +import static com.google.common.base.Preconditions.checkNotNull; +import static haveno.common.util.MathUtils.roundDoubleToLong; +import static haveno.common.util.MathUtils.scaleUpByPowerOf10; +import static haveno.core.offer.OfferPayload.ACCOUNT_AGE_WITNESS_HASH; +import static haveno.core.offer.OfferPayload.CAPABILITIES; +import static haveno.core.offer.OfferPayload.PAY_BY_MAIL_EXTRA_INFO; +import static haveno.core.offer.OfferPayload.F2F_CITY; +import static haveno.core.offer.OfferPayload.F2F_EXTRA_INFO; +import static haveno.core.offer.OfferPayload.REFERRAL_ID; +import static haveno.core.offer.OfferPayload.XMR_AUTO_CONF; +import static haveno.core.offer.OfferPayload.XMR_AUTO_CONF_ENABLED_VALUE; +import static haveno.core.xmr.wallet.Restrictions.getMaxBuyerSecurityDepositAsPercent; +import static haveno.core.xmr.wallet.Restrictions.getMinBuyerSecurityDepositAsPercent; /** * This class holds utility methods for creating, editing and taking an Offer. diff --git a/core/src/main/java/haveno/core/offer/OpenOfferManager.java b/core/src/main/java/haveno/core/offer/OpenOfferManager.java index b7f8eb4a61..29f0cbb7bc 100644 --- a/core/src/main/java/haveno/core/offer/OpenOfferManager.java +++ b/core/src/main/java/haveno/core/offer/OpenOfferManager.java @@ -17,8 +17,6 @@ package haveno.core.offer; -import static com.google.common.base.Preconditions.checkNotNull; -import com.google.inject.Inject; import common.utils.GenUtils; import haveno.common.Timer; import haveno.common.UserThread; @@ -74,22 +72,8 @@ import haveno.network.p2p.P2PService; import haveno.network.p2p.SendDirectMessageListener; import haveno.network.p2p.peers.Broadcaster; import haveno.network.p2p.peers.PeerManager; -import java.math.BigInteger; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Optional; -import java.util.Set; -import java.util.UUID; -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.TimeUnit; -import java.util.stream.Collectors; import javafx.collections.FXCollections; import javafx.collections.ObservableList; -import javax.annotation.Nullable; import lombok.Getter; import monero.common.MoneroConnectionManagerListener; import monero.common.MoneroRpcConnection; @@ -106,6 +90,24 @@ import org.jetbrains.annotations.NotNull; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import javax.annotation.Nullable; +import javax.inject.Inject; +import java.math.BigInteger; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Optional; +import java.util.Set; +import java.util.UUID; +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.TimeUnit; +import java.util.stream.Collectors; + +import static com.google.common.base.Preconditions.checkNotNull; + public class OpenOfferManager implements PeerManager.Listener, DecryptedDirectMessageListener, PersistedDataHost { private static final Logger log = LoggerFactory.getLogger(OpenOfferManager.class); @@ -800,13 +802,13 @@ public class OpenOfferManager implements PeerManager.Listener, DecryptedDirectMe resultHandler.handleResult(null); return; } - + // get offer reserve amount BigInteger offerReserveAmount = openOffer.getOffer().getReserveAmount(); - + // handle split output offer if (openOffer.isSplitOutput()) { - + // get tx to fund split output MoneroTxWallet splitOutputTx = findSplitOutputFundingTx(openOffers, openOffer); if (openOffer.getScheduledTxHashes() == null && splitOutputTx != null) { @@ -839,7 +841,7 @@ public class OpenOfferManager implements PeerManager.Listener, DecryptedDirectMe } } } else { - + // handle sufficient balance boolean hasSufficientBalance = xmrWalletService.getWallet().getUnlockedBalance(0).compareTo(offerReserveAmount) >= 0; if (hasSufficientBalance) { @@ -849,7 +851,7 @@ public class OpenOfferManager implements PeerManager.Listener, DecryptedDirectMe scheduleOfferWithEarliestTxs(openOffers, openOffer); } } - + // handle result resultHandler.handleResult(null); } catch (Exception e) { diff --git a/core/src/main/java/haveno/core/offer/TriggerPriceService.java b/core/src/main/java/haveno/core/offer/TriggerPriceService.java index 578140d9bf..37ebdaaf4f 100644 --- a/core/src/main/java/haveno/core/offer/TriggerPriceService.java +++ b/core/src/main/java/haveno/core/offer/TriggerPriceService.java @@ -17,11 +17,7 @@ package haveno.core.offer; -import com.google.inject.Inject; -import com.google.inject.Singleton; import haveno.common.util.MathUtils; -import static haveno.common.util.MathUtils.roundDoubleToLong; -import static haveno.common.util.MathUtils.scaleUpByPowerOf10; import haveno.core.locale.CurrencyUtil; import haveno.core.monetary.CryptoMoney; import haveno.core.monetary.Price; @@ -31,14 +27,20 @@ import haveno.core.provider.price.MarketPrice; import haveno.core.provider.price.PriceFeedService; import haveno.network.p2p.BootstrapListener; import haveno.network.p2p.P2PService; +import javafx.collections.ListChangeListener; +import lombok.extern.slf4j.Slf4j; + +import javax.inject.Inject; +import javax.inject.Singleton; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Objects; import java.util.Set; -import javafx.collections.ListChangeListener; -import lombok.extern.slf4j.Slf4j; + +import static haveno.common.util.MathUtils.roundDoubleToLong; +import static haveno.common.util.MathUtils.scaleUpByPowerOf10; @Slf4j @Singleton diff --git a/core/src/main/java/haveno/core/offer/takeoffer/TakeOfferModel.java b/core/src/main/java/haveno/core/offer/takeoffer/TakeOfferModel.java index 4df367d4a1..f97839c944 100644 --- a/core/src/main/java/haveno/core/offer/takeoffer/TakeOfferModel.java +++ b/core/src/main/java/haveno/core/offer/takeoffer/TakeOfferModel.java @@ -17,29 +17,31 @@ package haveno.core.offer.takeoffer; -import static com.google.common.base.Preconditions.checkArgument; -import static com.google.common.base.Preconditions.checkNotNull; -import com.google.inject.Inject; import haveno.common.taskrunner.Model; import haveno.core.account.witness.AccountAgeWitnessService; import haveno.core.monetary.Price; import haveno.core.monetary.Volume; import haveno.core.offer.Offer; -import static haveno.core.offer.OfferDirection.SELL; import haveno.core.offer.OfferUtil; import haveno.core.payment.PaymentAccount; import haveno.core.provider.price.PriceFeedService; import haveno.core.trade.HavenoUtils; import haveno.core.util.VolumeUtil; import haveno.core.xmr.model.XmrAddressEntry; -import static haveno.core.xmr.model.XmrAddressEntry.Context.OFFER_FUNDING; import haveno.core.xmr.wallet.XmrWalletService; -import java.math.BigInteger; -import java.util.Objects; import lombok.Getter; import lombok.extern.slf4j.Slf4j; import org.jetbrains.annotations.NotNull; +import javax.inject.Inject; +import java.math.BigInteger; +import java.util.Objects; + +import static com.google.common.base.Preconditions.checkArgument; +import static com.google.common.base.Preconditions.checkNotNull; +import static haveno.core.offer.OfferDirection.SELL; +import static haveno.core.xmr.model.XmrAddressEntry.Context.OFFER_FUNDING; + @Slf4j public class TakeOfferModel implements Model { // Immutable diff --git a/core/src/main/java/haveno/core/payment/ChargeBackRisk.java b/core/src/main/java/haveno/core/payment/ChargeBackRisk.java index 99f12d37fc..ec35030b73 100644 --- a/core/src/main/java/haveno/core/payment/ChargeBackRisk.java +++ b/core/src/main/java/haveno/core/payment/ChargeBackRisk.java @@ -17,9 +17,10 @@ package haveno.core.payment; -import com.google.inject.Singleton; import haveno.core.payment.payload.PaymentMethod; +import javax.inject.Singleton; + @Singleton public class ChargeBackRisk { public boolean hasChargebackRisk(String id, String currencyCode) { diff --git a/core/src/main/java/haveno/core/payment/TradeLimits.java b/core/src/main/java/haveno/core/payment/TradeLimits.java index 7acee5d4bc..e41ec8423f 100644 --- a/core/src/main/java/haveno/core/payment/TradeLimits.java +++ b/core/src/main/java/haveno/core/payment/TradeLimits.java @@ -18,15 +18,16 @@ package haveno.core.payment; import com.google.common.annotations.VisibleForTesting; -import com.google.inject.Inject; -import com.google.inject.Singleton; import haveno.common.util.MathUtils; import haveno.core.trade.HavenoUtils; -import java.math.BigInteger; -import javax.annotation.Nullable; import lombok.Getter; import lombok.extern.slf4j.Slf4j; +import javax.annotation.Nullable; +import javax.inject.Inject; +import javax.inject.Singleton; +import java.math.BigInteger; + @Slf4j @Singleton public class TradeLimits { diff --git a/core/src/main/java/haveno/core/payment/validation/AdvancedCashValidator.java b/core/src/main/java/haveno/core/payment/validation/AdvancedCashValidator.java index cce112b189..b6504d351c 100644 --- a/core/src/main/java/haveno/core/payment/validation/AdvancedCashValidator.java +++ b/core/src/main/java/haveno/core/payment/validation/AdvancedCashValidator.java @@ -1,10 +1,11 @@ package haveno.core.payment.validation; -import com.google.inject.Inject; import haveno.core.locale.Res; import haveno.core.util.validation.InputValidator; import haveno.core.util.validation.RegexValidator; +import javax.inject.Inject; + public class AdvancedCashValidator extends InputValidator { private EmailValidator emailValidator; private RegexValidator regexValidator; diff --git a/core/src/main/java/haveno/core/payment/validation/AustraliaPayidAccountNameValidator.java b/core/src/main/java/haveno/core/payment/validation/AustraliaPayidAccountNameValidator.java index b8c1964e19..2a91270bc5 100644 --- a/core/src/main/java/haveno/core/payment/validation/AustraliaPayidAccountNameValidator.java +++ b/core/src/main/java/haveno/core/payment/validation/AustraliaPayidAccountNameValidator.java @@ -18,10 +18,11 @@ package haveno.core.payment.validation; -import com.google.inject.Inject; import haveno.core.util.validation.InputValidator; import haveno.core.util.validation.RegexValidator; +import javax.inject.Inject; + public final class AustraliaPayidAccountNameValidator extends InputValidator { @Override public ValidationResult validate(String input) { diff --git a/core/src/main/java/haveno/core/payment/validation/CapitualValidator.java b/core/src/main/java/haveno/core/payment/validation/CapitualValidator.java index e18ef0f733..a156193fce 100644 --- a/core/src/main/java/haveno/core/payment/validation/CapitualValidator.java +++ b/core/src/main/java/haveno/core/payment/validation/CapitualValidator.java @@ -1,10 +1,11 @@ package haveno.core.payment.validation; -import com.google.inject.Inject; import haveno.core.locale.Res; import haveno.core.util.validation.InputValidator; import haveno.core.util.validation.RegexValidator; +import javax.inject.Inject; + public class CapitualValidator extends InputValidator { private final RegexValidator regexValidator; diff --git a/core/src/main/java/haveno/core/payment/validation/FiatVolumeValidator.java b/core/src/main/java/haveno/core/payment/validation/FiatVolumeValidator.java index 2950b0faf2..48f81024a2 100644 --- a/core/src/main/java/haveno/core/payment/validation/FiatVolumeValidator.java +++ b/core/src/main/java/haveno/core/payment/validation/FiatVolumeValidator.java @@ -17,9 +17,10 @@ package haveno.core.payment.validation; -import com.google.inject.Inject; import haveno.core.util.validation.MonetaryValidator; +import javax.inject.Inject; + public class FiatVolumeValidator extends MonetaryValidator { @Override public double getMinValue() { diff --git a/core/src/main/java/haveno/core/payment/validation/InteracETransferAnswerValidator.java b/core/src/main/java/haveno/core/payment/validation/InteracETransferAnswerValidator.java index 4bae615941..47841dcc9b 100644 --- a/core/src/main/java/haveno/core/payment/validation/InteracETransferAnswerValidator.java +++ b/core/src/main/java/haveno/core/payment/validation/InteracETransferAnswerValidator.java @@ -1,10 +1,11 @@ package haveno.core.payment.validation; -import com.google.inject.Inject; import haveno.core.locale.Res; import haveno.core.util.validation.InputValidator; import haveno.core.util.validation.RegexValidator; +import javax.inject.Inject; + public class InteracETransferAnswerValidator extends InputValidator { private LengthValidator lengthValidator; private RegexValidator regexValidator; diff --git a/core/src/main/java/haveno/core/payment/validation/InteracETransferQuestionValidator.java b/core/src/main/java/haveno/core/payment/validation/InteracETransferQuestionValidator.java index 2fa0cf8550..6fd7c865f9 100644 --- a/core/src/main/java/haveno/core/payment/validation/InteracETransferQuestionValidator.java +++ b/core/src/main/java/haveno/core/payment/validation/InteracETransferQuestionValidator.java @@ -1,10 +1,11 @@ package haveno.core.payment.validation; -import com.google.inject.Inject; import haveno.core.locale.Res; import haveno.core.util.validation.InputValidator; import haveno.core.util.validation.RegexValidator; +import javax.inject.Inject; + public class InteracETransferQuestionValidator extends InputValidator { private LengthValidator lengthValidator; private RegexValidator regexValidator; diff --git a/core/src/main/java/haveno/core/payment/validation/InteracETransferValidator.java b/core/src/main/java/haveno/core/payment/validation/InteracETransferValidator.java index 7af54e8255..973f62af60 100644 --- a/core/src/main/java/haveno/core/payment/validation/InteracETransferValidator.java +++ b/core/src/main/java/haveno/core/payment/validation/InteracETransferValidator.java @@ -17,11 +17,12 @@ package haveno.core.payment.validation; -import com.google.inject.Inject; import haveno.core.locale.Res; import haveno.core.util.validation.InputValidator; import org.apache.commons.lang3.StringUtils; +import javax.inject.Inject; + /* * Interac e-Transfer requires a mail address or Canadian (mobile) phone number * diff --git a/core/src/main/java/haveno/core/payment/validation/JapanBankAccountNameValidator.java b/core/src/main/java/haveno/core/payment/validation/JapanBankAccountNameValidator.java index f8c71ace9f..1ec805b9f4 100644 --- a/core/src/main/java/haveno/core/payment/validation/JapanBankAccountNameValidator.java +++ b/core/src/main/java/haveno/core/payment/validation/JapanBankAccountNameValidator.java @@ -17,11 +17,12 @@ package haveno.core.payment.validation; -import com.google.inject.Inject; import haveno.core.payment.JapanBankData; import haveno.core.util.validation.InputValidator; import haveno.core.util.validation.RegexValidator; +import javax.inject.Inject; + public final class JapanBankAccountNameValidator extends InputValidator { @Override diff --git a/core/src/main/java/haveno/core/payment/validation/JapanBankBranchNameValidator.java b/core/src/main/java/haveno/core/payment/validation/JapanBankBranchNameValidator.java index 95573d679e..79650acb53 100644 --- a/core/src/main/java/haveno/core/payment/validation/JapanBankBranchNameValidator.java +++ b/core/src/main/java/haveno/core/payment/validation/JapanBankBranchNameValidator.java @@ -17,11 +17,12 @@ package haveno.core.payment.validation; -import com.google.inject.Inject; import haveno.core.payment.JapanBankData; import haveno.core.util.validation.InputValidator; import haveno.core.util.validation.RegexValidator; +import javax.inject.Inject; + public final class JapanBankBranchNameValidator extends InputValidator { @Override diff --git a/core/src/main/java/haveno/core/payment/validation/SecurityDepositValidator.java b/core/src/main/java/haveno/core/payment/validation/SecurityDepositValidator.java index 702030074a..212b8fbd5c 100644 --- a/core/src/main/java/haveno/core/payment/validation/SecurityDepositValidator.java +++ b/core/src/main/java/haveno/core/payment/validation/SecurityDepositValidator.java @@ -17,7 +17,6 @@ package haveno.core.payment.validation; -import com.google.inject.Inject; import haveno.core.locale.Res; import haveno.core.payment.PaymentAccount; import haveno.core.util.FormattingUtils; @@ -25,6 +24,8 @@ import haveno.core.util.ParsingUtils; import haveno.core.util.validation.NumberValidator; import haveno.core.xmr.wallet.Restrictions; +import javax.inject.Inject; + public class SecurityDepositValidator extends NumberValidator { private PaymentAccount paymentAccount; diff --git a/core/src/main/java/haveno/core/payment/validation/TransferwiseValidator.java b/core/src/main/java/haveno/core/payment/validation/TransferwiseValidator.java index e322aa0ae6..ecf0948730 100644 --- a/core/src/main/java/haveno/core/payment/validation/TransferwiseValidator.java +++ b/core/src/main/java/haveno/core/payment/validation/TransferwiseValidator.java @@ -17,9 +17,10 @@ package haveno.core.payment.validation; -import com.google.inject.Inject; import haveno.core.util.validation.InputValidator; +import javax.inject.Inject; + public final class TransferwiseValidator extends InputValidator { private final EmailValidator emailValidator; diff --git a/core/src/main/java/haveno/core/payment/validation/XmrValidator.java b/core/src/main/java/haveno/core/payment/validation/XmrValidator.java index 28d513668e..1fa3c1cbc9 100644 --- a/core/src/main/java/haveno/core/payment/validation/XmrValidator.java +++ b/core/src/main/java/haveno/core/payment/validation/XmrValidator.java @@ -17,16 +17,17 @@ package haveno.core.payment.validation; -import com.google.inject.Inject; import haveno.core.locale.Res; import haveno.core.trade.HavenoUtils; import haveno.core.util.validation.NumberValidator; -import java.math.BigDecimal; -import java.math.BigInteger; -import javax.annotation.Nullable; import lombok.Getter; import lombok.Setter; +import javax.annotation.Nullable; +import javax.inject.Inject; +import java.math.BigDecimal; +import java.math.BigInteger; + public class XmrValidator extends NumberValidator { @Nullable diff --git a/core/src/main/java/haveno/core/presentation/BalancePresentation.java b/core/src/main/java/haveno/core/presentation/BalancePresentation.java index ea9cc3a4a0..2ef1a22c7e 100644 --- a/core/src/main/java/haveno/core/presentation/BalancePresentation.java +++ b/core/src/main/java/haveno/core/presentation/BalancePresentation.java @@ -17,7 +17,6 @@ package haveno.core.presentation; -import com.google.inject.Inject; import haveno.common.UserThread; import haveno.core.trade.HavenoUtils; import haveno.core.xmr.Balances; @@ -26,6 +25,8 @@ import javafx.beans.property.StringProperty; import lombok.Getter; import lombok.extern.slf4j.Slf4j; +import javax.inject.Inject; + @Slf4j public class BalancePresentation { diff --git a/core/src/main/java/haveno/core/presentation/SupportTicketsPresentation.java b/core/src/main/java/haveno/core/presentation/SupportTicketsPresentation.java index 8db7e0e307..652dbf246b 100644 --- a/core/src/main/java/haveno/core/presentation/SupportTicketsPresentation.java +++ b/core/src/main/java/haveno/core/presentation/SupportTicketsPresentation.java @@ -17,7 +17,6 @@ package haveno.core.presentation; -import com.google.inject.Inject; import haveno.core.support.dispute.arbitration.ArbitrationManager; import haveno.core.support.dispute.mediation.MediationManager; import haveno.core.support.dispute.refund.RefundManager; @@ -27,6 +26,8 @@ import javafx.beans.property.SimpleStringProperty; import javafx.beans.property.StringProperty; import lombok.Getter; +import javax.inject.Inject; + public class SupportTicketsPresentation { @Getter private final StringProperty numOpenSupportTickets = new SimpleStringProperty(); diff --git a/core/src/main/java/haveno/core/presentation/TradePresentation.java b/core/src/main/java/haveno/core/presentation/TradePresentation.java index ccb28ddf51..a1d745f497 100644 --- a/core/src/main/java/haveno/core/presentation/TradePresentation.java +++ b/core/src/main/java/haveno/core/presentation/TradePresentation.java @@ -17,7 +17,6 @@ package haveno.core.presentation; -import com.google.inject.Inject; import haveno.common.UserThread; import haveno.core.trade.TradeManager; import javafx.beans.property.BooleanProperty; @@ -26,6 +25,8 @@ import javafx.beans.property.SimpleStringProperty; import javafx.beans.property.StringProperty; import lombok.Getter; +import javax.inject.Inject; + public class TradePresentation { @Getter private final StringProperty numPendingTrades = new SimpleStringProperty(); diff --git a/core/src/main/java/haveno/core/proto/network/CoreNetworkProtoResolver.java b/core/src/main/java/haveno/core/proto/network/CoreNetworkProtoResolver.java index 4b947ff1bb..3443b150c2 100644 --- a/core/src/main/java/haveno/core/proto/network/CoreNetworkProtoResolver.java +++ b/core/src/main/java/haveno/core/proto/network/CoreNetworkProtoResolver.java @@ -17,8 +17,6 @@ package haveno.core.proto.network; -import com.google.inject.Inject; -import com.google.inject.Singleton; import haveno.common.proto.ProtobufferException; import haveno.common.proto.ProtobufferRuntimeException; import haveno.common.proto.network.NetworkEnvelope; @@ -71,9 +69,12 @@ import haveno.network.p2p.storage.messages.RemoveMailboxDataMessage; import haveno.network.p2p.storage.payload.MailboxStoragePayload; import haveno.network.p2p.storage.payload.ProtectedMailboxStorageEntry; import haveno.network.p2p.storage.payload.ProtectedStorageEntry; -import java.time.Clock; import lombok.extern.slf4j.Slf4j; +import javax.inject.Inject; +import javax.inject.Singleton; +import java.time.Clock; + // TODO Use ProtobufferException instead of ProtobufferRuntimeException @Slf4j @Singleton diff --git a/core/src/main/java/haveno/core/proto/persistable/CorePersistenceProtoResolver.java b/core/src/main/java/haveno/core/proto/persistable/CorePersistenceProtoResolver.java index 733872ce9b..53bd30a2be 100644 --- a/core/src/main/java/haveno/core/proto/persistable/CorePersistenceProtoResolver.java +++ b/core/src/main/java/haveno/core/proto/persistable/CorePersistenceProtoResolver.java @@ -17,9 +17,7 @@ package haveno.core.proto.persistable; -import com.google.inject.Inject; import com.google.inject.Provider; -import com.google.inject.Singleton; import haveno.common.proto.ProtobufferRuntimeException; import haveno.common.proto.network.NetworkProtoResolver; import haveno.common.proto.persistable.NavigationPath; @@ -49,6 +47,9 @@ import haveno.network.p2p.storage.persistence.RemovedPayloadsMap; import haveno.network.p2p.storage.persistence.SequenceNumberMap; import lombok.extern.slf4j.Slf4j; +import javax.inject.Inject; +import javax.inject.Singleton; + // TODO Use ProtobufferException instead of ProtobufferRuntimeException @Slf4j @Singleton diff --git a/core/src/main/java/haveno/core/provider/FeeHttpClient.java b/core/src/main/java/haveno/core/provider/FeeHttpClient.java index dc6dc2a155..8ca15c3cab 100644 --- a/core/src/main/java/haveno/core/provider/FeeHttpClient.java +++ b/core/src/main/java/haveno/core/provider/FeeHttpClient.java @@ -17,11 +17,12 @@ package haveno.core.provider; -import com.google.inject.Inject; -import com.google.inject.Singleton; import haveno.network.Socks5ProxyProvider; import haveno.network.http.HttpClientImpl; + import javax.annotation.Nullable; +import javax.inject.Inject; +import javax.inject.Singleton; @Singleton public class FeeHttpClient extends HttpClientImpl { diff --git a/core/src/main/java/haveno/core/provider/MempoolHttpClient.java b/core/src/main/java/haveno/core/provider/MempoolHttpClient.java index 25e2a196f3..70695fdff4 100644 --- a/core/src/main/java/haveno/core/provider/MempoolHttpClient.java +++ b/core/src/main/java/haveno/core/provider/MempoolHttpClient.java @@ -17,13 +17,14 @@ package haveno.core.provider; -import com.google.inject.Inject; -import com.google.inject.Singleton; import haveno.common.app.Version; import haveno.network.Socks5ProxyProvider; import haveno.network.http.HttpClientImpl; -import java.io.IOException; + import javax.annotation.Nullable; +import javax.inject.Inject; +import javax.inject.Singleton; +import java.io.IOException; @Singleton public class MempoolHttpClient extends HttpClientImpl { diff --git a/core/src/main/java/haveno/core/provider/PriceHttpClient.java b/core/src/main/java/haveno/core/provider/PriceHttpClient.java index f59b118711..2041fe0aa7 100644 --- a/core/src/main/java/haveno/core/provider/PriceHttpClient.java +++ b/core/src/main/java/haveno/core/provider/PriceHttpClient.java @@ -17,11 +17,12 @@ package haveno.core.provider; -import com.google.inject.Inject; -import com.google.inject.Singleton; import haveno.network.Socks5ProxyProvider; import haveno.network.http.HttpClientImpl; + import javax.annotation.Nullable; +import javax.inject.Inject; +import javax.inject.Singleton; @Singleton public class PriceHttpClient extends HttpClientImpl { diff --git a/core/src/main/java/haveno/core/provider/ProvidersRepository.java b/core/src/main/java/haveno/core/provider/ProvidersRepository.java index 1e8ffd1477..99d7ed767a 100644 --- a/core/src/main/java/haveno/core/provider/ProvidersRepository.java +++ b/core/src/main/java/haveno/core/provider/ProvidersRepository.java @@ -18,15 +18,17 @@ package haveno.core.provider; import com.google.inject.Inject; -import com.google.inject.name.Named; import haveno.common.config.Config; +import lombok.Getter; +import lombok.extern.slf4j.Slf4j; + +import javax.annotation.Nullable; +import javax.inject.Named; + import java.util.Arrays; import java.util.Collections; import java.util.List; import java.util.stream.Collectors; -import javax.annotation.Nullable; -import lombok.Getter; -import lombok.extern.slf4j.Slf4j; @Slf4j public class ProvidersRepository { diff --git a/core/src/main/java/haveno/core/provider/mempool/MempoolService.java b/core/src/main/java/haveno/core/provider/mempool/MempoolService.java index 7f4360a684..d92dea000f 100644 --- a/core/src/main/java/haveno/core/provider/mempool/MempoolService.java +++ b/core/src/main/java/haveno/core/provider/mempool/MempoolService.java @@ -22,7 +22,6 @@ import com.google.common.util.concurrent.Futures; import com.google.common.util.concurrent.MoreExecutors; import com.google.common.util.concurrent.SettableFuture; import com.google.inject.Inject; -import com.google.inject.Singleton; import haveno.common.UserThread; import haveno.common.config.Config; import haveno.core.filter.FilterManager; @@ -30,14 +29,16 @@ import haveno.core.offer.OfferPayload; import haveno.core.trade.Trade; import haveno.core.user.Preferences; import haveno.network.Socks5ProxyProvider; +import lombok.Getter; +import lombok.extern.slf4j.Slf4j; +import org.bitcoinj.core.Coin; + +import javax.annotation.Nullable; +import javax.inject.Singleton; import java.util.ArrayList; import java.util.List; import java.util.Optional; import java.util.function.Consumer; -import javax.annotation.Nullable; -import lombok.Getter; -import lombok.extern.slf4j.Slf4j; -import org.bitcoinj.core.Coin; @Slf4j @Singleton diff --git a/core/src/main/java/haveno/core/support/dispute/arbitration/ArbitrationDisputeListService.java b/core/src/main/java/haveno/core/support/dispute/arbitration/ArbitrationDisputeListService.java index f151d630e2..2d9f11756b 100644 --- a/core/src/main/java/haveno/core/support/dispute/arbitration/ArbitrationDisputeListService.java +++ b/core/src/main/java/haveno/core/support/dispute/arbitration/ArbitrationDisputeListService.java @@ -17,11 +17,12 @@ package haveno.core.support.dispute.arbitration; -import com.google.inject.Inject; -import com.google.inject.Singleton; import haveno.common.persistence.PersistenceManager; import haveno.core.support.dispute.DisputeListService; +import javax.inject.Inject; +import javax.inject.Singleton; + @Singleton public final class ArbitrationDisputeListService extends DisputeListService { diff --git a/core/src/main/java/haveno/core/support/dispute/arbitration/arbitrator/ArbitratorManager.java b/core/src/main/java/haveno/core/support/dispute/arbitration/arbitrator/ArbitratorManager.java index 9426b9dc5c..3f507e0a49 100644 --- a/core/src/main/java/haveno/core/support/dispute/arbitration/arbitrator/ArbitratorManager.java +++ b/core/src/main/java/haveno/core/support/dispute/arbitration/arbitrator/ArbitratorManager.java @@ -17,17 +17,18 @@ package haveno.core.support.dispute.arbitration.arbitrator; -import com.google.inject.Inject; -import com.google.inject.Singleton; import haveno.common.config.Config; import haveno.common.crypto.KeyRing; import haveno.core.filter.FilterManager; import haveno.core.support.dispute.agent.DisputeAgentManager; import haveno.core.user.User; import haveno.network.p2p.storage.payload.ProtectedStorageEntry; +import lombok.extern.slf4j.Slf4j; + +import javax.inject.Inject; +import javax.inject.Singleton; import java.util.ArrayList; import java.util.List; -import lombok.extern.slf4j.Slf4j; @Slf4j @Singleton diff --git a/core/src/main/java/haveno/core/support/dispute/arbitration/arbitrator/ArbitratorService.java b/core/src/main/java/haveno/core/support/dispute/arbitration/arbitrator/ArbitratorService.java index 4467fc4d3b..46b35a7ed6 100644 --- a/core/src/main/java/haveno/core/support/dispute/arbitration/arbitrator/ArbitratorService.java +++ b/core/src/main/java/haveno/core/support/dispute/arbitration/arbitrator/ArbitratorService.java @@ -17,12 +17,13 @@ package haveno.core.support.dispute.arbitration.arbitrator; -import com.google.inject.Inject; import com.google.inject.Singleton; import haveno.core.filter.FilterManager; import haveno.core.support.dispute.agent.DisputeAgentService; import haveno.network.p2p.NodeAddress; import haveno.network.p2p.P2PService; + +import javax.inject.Inject; import java.util.ArrayList; import java.util.List; import java.util.Map; diff --git a/core/src/main/java/haveno/core/support/dispute/mediation/MediationDisputeListService.java b/core/src/main/java/haveno/core/support/dispute/mediation/MediationDisputeListService.java index db39b914f4..37021b9974 100644 --- a/core/src/main/java/haveno/core/support/dispute/mediation/MediationDisputeListService.java +++ b/core/src/main/java/haveno/core/support/dispute/mediation/MediationDisputeListService.java @@ -17,11 +17,12 @@ package haveno.core.support.dispute.mediation; -import com.google.inject.Inject; -import com.google.inject.Singleton; import haveno.common.persistence.PersistenceManager; import haveno.core.support.dispute.DisputeListService; +import javax.inject.Inject; +import javax.inject.Singleton; + @Singleton public final class MediationDisputeListService extends DisputeListService { diff --git a/core/src/main/java/haveno/core/support/dispute/mediation/mediator/MediatorManager.java b/core/src/main/java/haveno/core/support/dispute/mediation/mediator/MediatorManager.java index 06db577f1f..095d80f58f 100644 --- a/core/src/main/java/haveno/core/support/dispute/mediation/mediator/MediatorManager.java +++ b/core/src/main/java/haveno/core/support/dispute/mediation/mediator/MediatorManager.java @@ -17,13 +17,14 @@ package haveno.core.support.dispute.mediation.mediator; -import com.google.inject.Inject; -import com.google.inject.Singleton; import haveno.common.crypto.KeyRing; import haveno.core.filter.FilterManager; import haveno.core.support.dispute.agent.DisputeAgentManager; import haveno.core.user.User; import haveno.network.p2p.storage.payload.ProtectedStorageEntry; + +import javax.inject.Inject; +import javax.inject.Singleton; import java.util.List; @Singleton diff --git a/core/src/main/java/haveno/core/support/dispute/mediation/mediator/MediatorService.java b/core/src/main/java/haveno/core/support/dispute/mediation/mediator/MediatorService.java index a0c9f0acea..e70ec66bf7 100644 --- a/core/src/main/java/haveno/core/support/dispute/mediation/mediator/MediatorService.java +++ b/core/src/main/java/haveno/core/support/dispute/mediation/mediator/MediatorService.java @@ -17,18 +17,19 @@ package haveno.core.support.dispute.mediation.mediator; -import com.google.inject.Inject; import com.google.inject.Singleton; import haveno.core.filter.FilterManager; import haveno.core.support.dispute.agent.DisputeAgentService; import haveno.network.p2p.NodeAddress; import haveno.network.p2p.P2PService; +import lombok.extern.slf4j.Slf4j; + +import javax.inject.Inject; import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.Set; import java.util.stream.Collectors; -import lombok.extern.slf4j.Slf4j; @Slf4j diff --git a/core/src/main/java/haveno/core/support/dispute/refund/RefundDisputeListService.java b/core/src/main/java/haveno/core/support/dispute/refund/RefundDisputeListService.java index 70b30f15a2..1eca8d6924 100644 --- a/core/src/main/java/haveno/core/support/dispute/refund/RefundDisputeListService.java +++ b/core/src/main/java/haveno/core/support/dispute/refund/RefundDisputeListService.java @@ -17,11 +17,12 @@ package haveno.core.support.dispute.refund; -import com.google.inject.Inject; -import com.google.inject.Singleton; import haveno.common.persistence.PersistenceManager; import haveno.core.support.dispute.DisputeListService; +import javax.inject.Inject; +import javax.inject.Singleton; + @Singleton public final class RefundDisputeListService extends DisputeListService { diff --git a/core/src/main/java/haveno/core/support/dispute/refund/refundagent/RefundAgentManager.java b/core/src/main/java/haveno/core/support/dispute/refund/refundagent/RefundAgentManager.java index 22628af4f1..9281234c11 100644 --- a/core/src/main/java/haveno/core/support/dispute/refund/refundagent/RefundAgentManager.java +++ b/core/src/main/java/haveno/core/support/dispute/refund/refundagent/RefundAgentManager.java @@ -17,16 +17,17 @@ package haveno.core.support.dispute.refund.refundagent; -import com.google.inject.Inject; -import com.google.inject.Singleton; import haveno.common.crypto.KeyRing; import haveno.core.filter.FilterManager; import haveno.core.support.dispute.agent.DisputeAgentManager; import haveno.core.user.User; import haveno.network.p2p.storage.payload.ProtectedStorageEntry; -import java.util.List; import lombok.extern.slf4j.Slf4j; +import javax.inject.Inject; +import javax.inject.Singleton; +import java.util.List; + @Slf4j @Singleton public class RefundAgentManager extends DisputeAgentManager { diff --git a/core/src/main/java/haveno/core/support/dispute/refund/refundagent/RefundAgentService.java b/core/src/main/java/haveno/core/support/dispute/refund/refundagent/RefundAgentService.java index 6e26706396..6324445bd7 100644 --- a/core/src/main/java/haveno/core/support/dispute/refund/refundagent/RefundAgentService.java +++ b/core/src/main/java/haveno/core/support/dispute/refund/refundagent/RefundAgentService.java @@ -17,12 +17,13 @@ package haveno.core.support.dispute.refund.refundagent; -import com.google.inject.Inject; import com.google.inject.Singleton; import haveno.core.filter.FilterManager; import haveno.core.support.dispute.agent.DisputeAgentService; import haveno.network.p2p.NodeAddress; import haveno.network.p2p.P2PService; + +import javax.inject.Inject; import java.util.ArrayList; import java.util.List; import java.util.Map; diff --git a/core/src/main/java/haveno/core/support/traderchat/TraderChatManager.java b/core/src/main/java/haveno/core/support/traderchat/TraderChatManager.java index 14a20d1469..048f529a64 100644 --- a/core/src/main/java/haveno/core/support/traderchat/TraderChatManager.java +++ b/core/src/main/java/haveno/core/support/traderchat/TraderChatManager.java @@ -17,8 +17,6 @@ package haveno.core.support.traderchat; -import com.google.inject.Inject; -import com.google.inject.Singleton; import haveno.common.crypto.PubKeyRing; import haveno.common.crypto.PubKeyRingProvider; import haveno.core.api.CoreMoneroConnectionsService; @@ -33,11 +31,14 @@ import haveno.core.trade.TradeManager; import haveno.network.p2p.AckMessageSourceType; import haveno.network.p2p.NodeAddress; import haveno.network.p2p.P2PService; -import java.util.List; -import java.util.stream.Collectors; import javafx.collections.ObservableList; import lombok.extern.slf4j.Slf4j; +import javax.inject.Inject; +import javax.inject.Singleton; +import java.util.List; +import java.util.stream.Collectors; + @Slf4j @Singleton public class TraderChatManager extends SupportManager { diff --git a/core/src/main/java/haveno/core/trade/CleanupMailboxMessages.java b/core/src/main/java/haveno/core/trade/CleanupMailboxMessages.java index 04249b7481..5fdb2dbd73 100644 --- a/core/src/main/java/haveno/core/trade/CleanupMailboxMessages.java +++ b/core/src/main/java/haveno/core/trade/CleanupMailboxMessages.java @@ -17,7 +17,6 @@ package haveno.core.trade; -import com.google.inject.Inject; import haveno.common.crypto.PubKeyRing; import haveno.common.proto.network.NetworkEnvelope; import haveno.core.trade.messages.TradeMessage; @@ -28,9 +27,11 @@ import haveno.network.p2p.DecryptedMessageWithPubKey; import haveno.network.p2p.P2PService; import haveno.network.p2p.mailbox.MailboxMessage; import haveno.network.p2p.mailbox.MailboxMessageService; -import java.util.List; import lombok.extern.slf4j.Slf4j; +import javax.inject.Inject; +import java.util.List; + //TODO with the redesign of mailbox messages that is not required anymore. We leave it for now as we want to minimize // changes for the 1.5.0 release but we should clean up afterwards... diff --git a/core/src/main/java/haveno/core/trade/CleanupMailboxMessagesService.java b/core/src/main/java/haveno/core/trade/CleanupMailboxMessagesService.java index 824aefd3a1..eab604b6f6 100644 --- a/core/src/main/java/haveno/core/trade/CleanupMailboxMessagesService.java +++ b/core/src/main/java/haveno/core/trade/CleanupMailboxMessagesService.java @@ -17,7 +17,6 @@ package haveno.core.trade; -import com.google.inject.Inject; import haveno.common.crypto.PubKeyRing; import haveno.common.proto.network.NetworkEnvelope; import haveno.core.trade.messages.TradeMessage; @@ -28,9 +27,11 @@ import haveno.network.p2p.DecryptedMessageWithPubKey; import haveno.network.p2p.P2PService; import haveno.network.p2p.mailbox.MailboxMessage; import haveno.network.p2p.mailbox.MailboxMessageService; -import java.util.List; import lombok.extern.slf4j.Slf4j; +import javax.inject.Inject; +import java.util.List; + //TODO with the redesign of mailbox messages that is not required anymore. We leave it for now as we want to minimize // changes for the 1.5.0 release but we should clean up afterwards... diff --git a/core/src/main/java/haveno/core/trade/ClosedTradableFormatter.java b/core/src/main/java/haveno/core/trade/ClosedTradableFormatter.java index 9074032ba0..5f8ca1211e 100644 --- a/core/src/main/java/haveno/core/trade/ClosedTradableFormatter.java +++ b/core/src/main/java/haveno/core/trade/ClosedTradableFormatter.java @@ -17,14 +17,23 @@ package haveno.core.trade; -import com.google.inject.Inject; -import com.google.inject.Singleton; import haveno.core.locale.CurrencyUtil; import haveno.core.locale.Res; import haveno.core.monetary.CryptoMoney; import haveno.core.monetary.TraditionalMoney; import haveno.core.monetary.Volume; import haveno.core.offer.OpenOffer; +import haveno.core.util.FormattingUtils; +import lombok.extern.slf4j.Slf4j; +import org.bitcoinj.core.Monetary; + +import javax.inject.Inject; +import javax.inject.Singleton; +import java.math.BigInteger; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + import static haveno.core.trade.ClosedTradableUtil.castToTrade; import static haveno.core.trade.ClosedTradableUtil.getTotalTxFee; import static haveno.core.trade.ClosedTradableUtil.getTotalVolumeByCurrency; @@ -33,17 +42,10 @@ import static haveno.core.trade.ClosedTradableUtil.isOpenOffer; import static haveno.core.trade.Trade.DisputeState.DISPUTE_CLOSED; import static haveno.core.trade.Trade.DisputeState.MEDIATION_CLOSED; import static haveno.core.trade.Trade.DisputeState.REFUND_REQUEST_CLOSED; -import haveno.core.util.FormattingUtils; import static haveno.core.util.FormattingUtils.formatPercentagePrice; import static haveno.core.util.FormattingUtils.formatToPercentWithSymbol; import static haveno.core.util.VolumeUtil.formatVolume; import static haveno.core.util.VolumeUtil.formatVolumeWithCode; -import java.math.BigInteger; -import java.util.List; -import java.util.Map; -import java.util.stream.Collectors; -import lombok.extern.slf4j.Slf4j; -import org.bitcoinj.core.Monetary; @Slf4j @Singleton diff --git a/core/src/main/java/haveno/core/trade/TradeManager.java b/core/src/main/java/haveno/core/trade/TradeManager.java index 798887be66..52bfdad392 100644 --- a/core/src/main/java/haveno/core/trade/TradeManager.java +++ b/core/src/main/java/haveno/core/trade/TradeManager.java @@ -17,10 +17,8 @@ package haveno.core.trade; -import static com.google.common.base.Preconditions.checkArgument; -import static com.google.common.base.Preconditions.checkNotNull; import com.google.common.collect.ImmutableList; -import com.google.inject.Inject; + import common.utils.GenUtils; import haveno.common.ClockWatcher; import haveno.common.crypto.KeyRing; @@ -76,6 +74,25 @@ import haveno.network.p2p.DecryptedMessageWithPubKey; import haveno.network.p2p.NodeAddress; import haveno.network.p2p.P2PService; import haveno.network.p2p.network.TorNetworkNode; +import javafx.beans.property.BooleanProperty; +import javafx.beans.property.LongProperty; +import javafx.beans.property.SimpleBooleanProperty; +import javafx.beans.property.SimpleLongProperty; +import javafx.collections.ListChangeListener; +import javafx.collections.ObservableList; +import lombok.Getter; +import lombok.Setter; +import monero.daemon.model.MoneroTx; +import monero.wallet.model.MoneroOutputQuery; +import org.bitcoinj.core.Coin; +import org.bouncycastle.crypto.params.KeyParameter; +import org.fxmisc.easybind.EasyBind; +import org.fxmisc.easybind.Subscription; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import javax.annotation.Nullable; +import javax.inject.Inject; import java.math.BigInteger; import java.util.ArrayList; import java.util.Date; @@ -89,23 +106,9 @@ import java.util.UUID; import java.util.concurrent.atomic.AtomicReference; import java.util.stream.Collectors; import java.util.stream.Stream; -import javafx.beans.property.BooleanProperty; -import javafx.beans.property.LongProperty; -import javafx.beans.property.SimpleBooleanProperty; -import javafx.beans.property.SimpleLongProperty; -import javafx.collections.ListChangeListener; -import javafx.collections.ObservableList; -import javax.annotation.Nullable; -import lombok.Getter; -import lombok.Setter; -import monero.daemon.model.MoneroTx; -import monero.wallet.model.MoneroOutputQuery; -import org.bitcoinj.core.Coin; -import org.bouncycastle.crypto.params.KeyParameter; -import org.fxmisc.easybind.EasyBind; -import org.fxmisc.easybind.Subscription; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; + +import static com.google.common.base.Preconditions.checkArgument; +import static com.google.common.base.Preconditions.checkNotNull; public class TradeManager implements PersistedDataHost, DecryptedDirectMessageListener { @@ -407,7 +410,7 @@ public class TradeManager implements PersistedDataHost, DecryptedDirectMessageLi for (Trade trade : trades) { tasks.add(() -> { try { - + // check for duplicate uid if (!uids.add(trade.getUid())) { log.warn("Found trade with duplicate uid, skipping. That should never happen. {} {}, uid={}", trade.getClass().getSimpleName(), trade.getId(), trade.getUid()); @@ -439,10 +442,10 @@ public class TradeManager implements PersistedDataHost, DecryptedDirectMessageLi for (Trade trade : trades) { if (trade.isIdling()) HavenoUtils.submitTask(() -> trade.syncWallet()); } - + getObservableList().addListener((ListChangeListener) change -> onTradesChanged()); onTradesChanged(); - + xmrWalletService.setTradeManager(this); // process after all wallets initialized @@ -470,7 +473,7 @@ public class TradeManager implements PersistedDataHost, DecryptedDirectMessageLi // notify that persisted trades initialized persistedTradesInitialized.set(true); - + // We do not include failed trades as they should not be counted anyway in the trade statistics // TODO: remove stats? Set nonFailedTrades = new HashSet<>(closedTradableManager.getClosedTrades()); diff --git a/core/src/main/java/haveno/core/trade/TradeUtil.java b/core/src/main/java/haveno/core/trade/TradeUtil.java index 761d203400..ba57166bba 100644 --- a/core/src/main/java/haveno/core/trade/TradeUtil.java +++ b/core/src/main/java/haveno/core/trade/TradeUtil.java @@ -17,22 +17,24 @@ package haveno.core.trade; -import static com.google.common.base.Preconditions.checkNotNull; -import com.google.inject.Inject; -import com.google.inject.Singleton; import haveno.common.crypto.KeyRing; import haveno.common.util.Tuple2; -import static haveno.core.locale.CurrencyUtil.getCurrencyPair; -import static haveno.core.locale.CurrencyUtil.isTraditionalCurrency; import haveno.core.locale.Res; import haveno.core.offer.Offer; -import static haveno.core.util.FormattingUtils.formatDurationAsWords; import haveno.core.xmr.wallet.BtcWalletService; -import static java.lang.String.format; +import lombok.extern.slf4j.Slf4j; + +import javax.annotation.Nullable; +import javax.inject.Inject; +import javax.inject.Singleton; import java.util.Date; import java.util.Objects; -import javax.annotation.Nullable; -import lombok.extern.slf4j.Slf4j; + +import static com.google.common.base.Preconditions.checkNotNull; +import static haveno.core.locale.CurrencyUtil.getCurrencyPair; +import static haveno.core.locale.CurrencyUtil.isTraditionalCurrency; +import static haveno.core.util.FormattingUtils.formatDurationAsWords; +import static java.lang.String.format; /** * This class contains trade utility methods. diff --git a/core/src/main/java/haveno/core/trade/protocol/ProcessModelServiceProvider.java b/core/src/main/java/haveno/core/trade/protocol/ProcessModelServiceProvider.java index 3447d803f2..ce5103a702 100644 --- a/core/src/main/java/haveno/core/trade/protocol/ProcessModelServiceProvider.java +++ b/core/src/main/java/haveno/core/trade/protocol/ProcessModelServiceProvider.java @@ -17,7 +17,6 @@ package haveno.core.trade.protocol; -import com.google.inject.Inject; import haveno.common.crypto.KeyRing; import haveno.core.account.witness.AccountAgeWitnessService; import haveno.core.filter.FilterManager; @@ -34,6 +33,8 @@ import haveno.core.xmr.wallet.XmrWalletService; import haveno.network.p2p.P2PService; import lombok.Getter; +import javax.inject.Inject; + @Getter public class ProcessModelServiceProvider { private final OpenOfferManager openOfferManager; diff --git a/core/src/main/java/haveno/core/trade/statistics/ReferralIdService.java b/core/src/main/java/haveno/core/trade/statistics/ReferralIdService.java index 61369115c7..976432b9cc 100644 --- a/core/src/main/java/haveno/core/trade/statistics/ReferralIdService.java +++ b/core/src/main/java/haveno/core/trade/statistics/ReferralIdService.java @@ -17,11 +17,12 @@ package haveno.core.trade.statistics; -import com.google.inject.Inject; import haveno.core.user.Preferences; + +import javax.annotation.Nullable; +import javax.inject.Inject; import java.util.Arrays; import java.util.Optional; -import javax.annotation.Nullable; public class ReferralIdService { private final Preferences preferences; diff --git a/core/src/main/java/haveno/core/trade/statistics/TradeStatistics3StorageService.java b/core/src/main/java/haveno/core/trade/statistics/TradeStatistics3StorageService.java index 76bc90dc67..deb01a1482 100644 --- a/core/src/main/java/haveno/core/trade/statistics/TradeStatistics3StorageService.java +++ b/core/src/main/java/haveno/core/trade/statistics/TradeStatistics3StorageService.java @@ -17,16 +17,17 @@ package haveno.core.trade.statistics; -import com.google.inject.Inject; -import com.google.inject.Singleton; -import com.google.inject.name.Named; import haveno.common.config.Config; import haveno.common.persistence.PersistenceManager; import haveno.network.p2p.storage.payload.PersistableNetworkPayload; import haveno.network.p2p.storage.persistence.HistoricalDataStoreService; -import java.io.File; import lombok.extern.slf4j.Slf4j; +import javax.inject.Inject; +import javax.inject.Named; +import javax.inject.Singleton; +import java.io.File; + @Singleton @Slf4j public class TradeStatistics3StorageService extends HistoricalDataStoreService { diff --git a/core/src/main/java/haveno/core/trade/statistics/TradeStatisticsManager.java b/core/src/main/java/haveno/core/trade/statistics/TradeStatisticsManager.java index fc3e60a4e0..9e762a8e43 100644 --- a/core/src/main/java/haveno/core/trade/statistics/TradeStatisticsManager.java +++ b/core/src/main/java/haveno/core/trade/statistics/TradeStatisticsManager.java @@ -18,8 +18,6 @@ package haveno.core.trade.statistics; import com.google.inject.Inject; -import com.google.inject.Singleton; -import com.google.inject.name.Named; import haveno.common.config.Config; import haveno.common.file.JsonFileManager; import haveno.core.locale.CurrencyTuple; @@ -32,6 +30,13 @@ import haveno.core.util.JsonUtil; import haveno.network.p2p.P2PService; import haveno.network.p2p.storage.P2PDataStorage; import haveno.network.p2p.storage.persistence.AppendOnlyDataStoreService; +import javafx.collections.FXCollections; +import javafx.collections.ObservableSet; +import lombok.extern.slf4j.Slf4j; + +import javax.annotation.Nullable; +import javax.inject.Named; +import javax.inject.Singleton; import java.io.File; import java.time.Instant; import java.util.ArrayList; @@ -39,10 +44,6 @@ import java.util.List; import java.util.Set; import java.util.concurrent.TimeUnit; import java.util.stream.Collectors; -import javafx.collections.FXCollections; -import javafx.collections.ObservableSet; -import javax.annotation.Nullable; -import lombok.extern.slf4j.Slf4j; @Singleton @Slf4j diff --git a/core/src/main/java/haveno/core/user/Preferences.java b/core/src/main/java/haveno/core/user/Preferences.java index 481280b44c..8cccce0e0d 100644 --- a/core/src/main/java/haveno/core/user/Preferences.java +++ b/core/src/main/java/haveno/core/user/Preferences.java @@ -17,10 +17,6 @@ package haveno.core.user; -import static com.google.common.base.Preconditions.checkNotNull; -import com.google.inject.Inject; -import com.google.inject.Singleton; -import com.google.inject.name.Named; import haveno.common.config.BaseCurrencyNetwork; import haveno.common.config.Config; import haveno.common.persistence.PersistenceManager; @@ -30,23 +26,16 @@ import haveno.core.locale.Country; import haveno.core.locale.CountryUtil; import haveno.core.locale.CryptoCurrency; import haveno.core.locale.CurrencyUtil; +import haveno.core.locale.TraditionalCurrency; import haveno.core.locale.GlobalSettings; import haveno.core.locale.TradeCurrency; -import haveno.core.locale.TraditionalCurrency; import haveno.core.payment.PaymentAccount; import haveno.core.payment.PaymentAccountUtil; import haveno.core.xmr.MoneroNodeSettings; -import haveno.core.xmr.nodes.LocalBitcoinNode; import haveno.core.xmr.nodes.XmrNodes; +import haveno.core.xmr.nodes.LocalBitcoinNode; import haveno.core.xmr.wallet.Restrictions; import haveno.network.p2p.network.BridgeAddressProvider; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Locale; -import java.util.Map; -import java.util.Optional; -import java.util.stream.Collectors; import javafx.beans.property.BooleanProperty; import javafx.beans.property.IntegerProperty; import javafx.beans.property.SimpleBooleanProperty; @@ -55,13 +44,26 @@ import javafx.collections.FXCollections; import javafx.collections.ListChangeListener; import javafx.collections.ObservableList; import javafx.collections.ObservableMap; -import javax.annotation.Nullable; import lombok.Getter; import lombok.Setter; import lombok.experimental.Delegate; import lombok.extern.slf4j.Slf4j; import org.jetbrains.annotations.NotNull; +import javax.annotation.Nullable; +import javax.inject.Inject; +import javax.inject.Named; +import javax.inject.Singleton; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Locale; +import java.util.Map; +import java.util.Optional; +import java.util.stream.Collectors; + +import static com.google.common.base.Preconditions.checkNotNull; + @Slf4j @Singleton public final class Preferences implements PersistedDataHost, BridgeAddressProvider { diff --git a/core/src/main/java/haveno/core/user/User.java b/core/src/main/java/haveno/core/user/User.java index 626272cea1..4a5e6cd56f 100644 --- a/core/src/main/java/haveno/core/user/User.java +++ b/core/src/main/java/haveno/core/user/User.java @@ -17,9 +17,6 @@ package haveno.core.user; -import static com.google.common.base.Preconditions.checkNotNull; -import com.google.inject.Inject; -import com.google.inject.Singleton; import haveno.common.crypto.KeyRing; import haveno.common.persistence.PersistenceManager; import haveno.common.proto.persistable.PersistedDataHost; @@ -34,22 +31,27 @@ import haveno.core.support.dispute.arbitration.arbitrator.Arbitrator; import haveno.core.support.dispute.mediation.mediator.Mediator; import haveno.core.support.dispute.refund.refundagent.RefundAgent; import haveno.network.p2p.NodeAddress; -import java.util.Collection; -import java.util.HashSet; -import java.util.List; -import java.util.Optional; -import java.util.Set; -import java.util.stream.Collectors; import javafx.beans.property.ObjectProperty; import javafx.beans.property.ReadOnlyObjectProperty; import javafx.beans.property.SimpleObjectProperty; import javafx.collections.FXCollections; import javafx.collections.ObservableSet; import javafx.collections.SetChangeListener; -import javax.annotation.Nullable; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; +import javax.annotation.Nullable; +import javax.inject.Inject; +import javax.inject.Singleton; +import java.util.Collection; +import java.util.HashSet; +import java.util.List; +import java.util.Optional; +import java.util.Set; +import java.util.stream.Collectors; + +import static com.google.common.base.Preconditions.checkNotNull; + /** * The User is persisted locally. * It must never be transmitted over the wire (messageKeyPair contains private key!). diff --git a/core/src/main/java/haveno/core/util/PriceUtil.java b/core/src/main/java/haveno/core/util/PriceUtil.java index f4a5abbad3..c1892fc0a5 100644 --- a/core/src/main/java/haveno/core/util/PriceUtil.java +++ b/core/src/main/java/haveno/core/util/PriceUtil.java @@ -17,9 +17,6 @@ package haveno.core.util; -import static com.google.common.base.Preconditions.checkNotNull; -import com.google.inject.Inject; -import com.google.inject.Singleton; import haveno.common.util.MathUtils; import haveno.core.locale.CurrencyUtil; import haveno.core.locale.Res; @@ -32,13 +29,18 @@ import haveno.core.provider.price.MarketPrice; import haveno.core.provider.price.PriceFeedService; import haveno.core.trade.statistics.TradeStatisticsManager; import haveno.core.user.Preferences; +import haveno.core.util.validation.NonFiatPriceValidator; import haveno.core.util.validation.FiatPriceValidator; import haveno.core.util.validation.InputValidator; import haveno.core.util.validation.MonetaryValidator; -import haveno.core.util.validation.NonFiatPriceValidator; -import java.util.Optional; import lombok.extern.slf4j.Slf4j; +import javax.inject.Inject; +import javax.inject.Singleton; +import java.util.Optional; + +import static com.google.common.base.Preconditions.checkNotNull; + @Slf4j @Singleton public class PriceUtil { diff --git a/core/src/main/java/haveno/core/util/coin/ImmutableCoinFormatter.java b/core/src/main/java/haveno/core/util/coin/ImmutableCoinFormatter.java index ca8999eea8..a685efab10 100644 --- a/core/src/main/java/haveno/core/util/coin/ImmutableCoinFormatter.java +++ b/core/src/main/java/haveno/core/util/coin/ImmutableCoinFormatter.java @@ -17,13 +17,14 @@ package haveno.core.util.coin; -import com.google.inject.Inject; import haveno.core.util.FormattingUtils; import lombok.Getter; import lombok.extern.slf4j.Slf4j; import org.bitcoinj.core.Coin; import org.bitcoinj.utils.MonetaryFormat; +import javax.inject.Inject; + @Slf4j public class ImmutableCoinFormatter implements CoinFormatter { diff --git a/core/src/main/java/haveno/core/util/validation/BtcAddressValidator.java b/core/src/main/java/haveno/core/util/validation/BtcAddressValidator.java index 7085ab0c1f..c187a7f199 100644 --- a/core/src/main/java/haveno/core/util/validation/BtcAddressValidator.java +++ b/core/src/main/java/haveno/core/util/validation/BtcAddressValidator.java @@ -17,12 +17,13 @@ package haveno.core.util.validation; -import com.google.inject.Inject; import haveno.common.config.Config; import haveno.core.locale.Res; import org.bitcoinj.core.Address; import org.bitcoinj.core.AddressFormatException; +import javax.inject.Inject; + public final class BtcAddressValidator extends InputValidator { @Inject diff --git a/core/src/main/java/haveno/core/util/validation/FiatPriceValidator.java b/core/src/main/java/haveno/core/util/validation/FiatPriceValidator.java index 5192b234d7..d14db6fa92 100644 --- a/core/src/main/java/haveno/core/util/validation/FiatPriceValidator.java +++ b/core/src/main/java/haveno/core/util/validation/FiatPriceValidator.java @@ -17,7 +17,7 @@ package haveno.core.util.validation; -import com.google.inject.Inject; +import javax.inject.Inject; public class FiatPriceValidator extends MonetaryValidator { @Override diff --git a/core/src/main/java/haveno/core/util/validation/MonetaryValidator.java b/core/src/main/java/haveno/core/util/validation/MonetaryValidator.java index 516ddeb58c..a28e6cbbf0 100644 --- a/core/src/main/java/haveno/core/util/validation/MonetaryValidator.java +++ b/core/src/main/java/haveno/core/util/validation/MonetaryValidator.java @@ -17,9 +17,10 @@ package haveno.core.util.validation; -import com.google.inject.Inject; import haveno.core.locale.Res; +import javax.inject.Inject; + public abstract class MonetaryValidator extends NumberValidator { public abstract double getMinValue(); diff --git a/core/src/main/java/haveno/core/util/validation/NonFiatPriceValidator.java b/core/src/main/java/haveno/core/util/validation/NonFiatPriceValidator.java index 2db07e9db1..6e154c8bf7 100644 --- a/core/src/main/java/haveno/core/util/validation/NonFiatPriceValidator.java +++ b/core/src/main/java/haveno/core/util/validation/NonFiatPriceValidator.java @@ -17,7 +17,7 @@ package haveno.core.util.validation; -import com.google.inject.Inject; +import javax.inject.Inject; public class NonFiatPriceValidator extends MonetaryValidator { @Override diff --git a/core/src/main/java/haveno/core/xmr/Balances.java b/core/src/main/java/haveno/core/xmr/Balances.java index c097187119..be607c0268 100644 --- a/core/src/main/java/haveno/core/xmr/Balances.java +++ b/core/src/main/java/haveno/core/xmr/Balances.java @@ -17,7 +17,6 @@ package haveno.core.xmr; -import com.google.inject.Inject; import haveno.core.offer.OfferPayload; import haveno.core.offer.OpenOffer; import haveno.core.offer.OpenOfferManager; @@ -30,9 +29,6 @@ import haveno.core.trade.failed.FailedTradesManager; import haveno.core.xmr.listeners.XmrBalanceListener; import haveno.core.xmr.wallet.XmrWalletService; import haveno.network.p2p.P2PService; -import java.math.BigInteger; -import java.util.List; -import java.util.stream.Collectors; import javafx.beans.property.ObjectProperty; import javafx.beans.property.SimpleObjectProperty; import javafx.collections.ListChangeListener; @@ -44,6 +40,11 @@ import monero.wallet.model.MoneroOutputWallet; import monero.wallet.model.MoneroTxQuery; import monero.wallet.model.MoneroTxWallet; +import javax.inject.Inject; +import java.math.BigInteger; +import java.util.List; +import java.util.stream.Collectors; + @Slf4j public class Balances { private final TradeManager tradeManager; diff --git a/core/src/main/java/haveno/core/xmr/model/EncryptedConnectionList.java b/core/src/main/java/haveno/core/xmr/model/EncryptedConnectionList.java index 472abe4001..9ace577e6b 100644 --- a/core/src/main/java/haveno/core/xmr/model/EncryptedConnectionList.java +++ b/core/src/main/java/haveno/core/xmr/model/EncryptedConnectionList.java @@ -1,6 +1,5 @@ package haveno.core.xmr.model; -import com.google.inject.Inject; import com.google.protobuf.ByteString; import com.google.protobuf.Message; import haveno.common.crypto.CryptoException; @@ -11,6 +10,12 @@ import haveno.common.proto.persistable.PersistableEnvelope; import haveno.common.proto.persistable.PersistedDataHost; import haveno.core.api.CoreAccountService; import haveno.core.api.model.EncryptedConnection; +import lombok.NonNull; +import monero.common.MoneroRpcConnection; +import org.bitcoinj.crypto.KeyCrypterScrypt; + +import javax.crypto.SecretKey; +import javax.inject.Inject; import java.nio.charset.StandardCharsets; import java.security.SecureRandom; import java.util.HashMap; @@ -23,10 +28,6 @@ import java.util.concurrent.locks.ReadWriteLock; import java.util.concurrent.locks.ReentrantReadWriteLock; import java.util.function.Function; import java.util.stream.Collectors; -import javax.crypto.SecretKey; -import lombok.NonNull; -import monero.common.MoneroRpcConnection; -import org.bitcoinj.crypto.KeyCrypterScrypt; /** diff --git a/core/src/main/java/haveno/core/xmr/nodes/LocalBitcoinNode.java b/core/src/main/java/haveno/core/xmr/nodes/LocalBitcoinNode.java index 7a3997f2da..6d17da513f 100644 --- a/core/src/main/java/haveno/core/xmr/nodes/LocalBitcoinNode.java +++ b/core/src/main/java/haveno/core/xmr/nodes/LocalBitcoinNode.java @@ -1,15 +1,16 @@ package haveno.core.xmr.nodes; -import com.google.inject.Inject; -import com.google.inject.Singleton; import haveno.common.config.BaseCurrencyNetwork; import haveno.common.config.Config; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import javax.inject.Inject; +import javax.inject.Singleton; import java.io.IOException; import java.net.InetAddress; import java.net.InetSocketAddress; import java.net.Socket; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; /** * Detects whether a Bitcoin node is running on localhost and contains logic for when to diff --git a/core/src/main/java/haveno/core/xmr/wallet/BtcWalletService.java b/core/src/main/java/haveno/core/xmr/wallet/BtcWalletService.java index 243a2519e2..b7a884dae4 100644 --- a/core/src/main/java/haveno/core/xmr/wallet/BtcWalletService.java +++ b/core/src/main/java/haveno/core/xmr/wallet/BtcWalletService.java @@ -18,9 +18,6 @@ package haveno.core.xmr.wallet; import com.google.common.base.Preconditions; -import static com.google.common.base.Preconditions.checkArgument; -import static com.google.common.base.Preconditions.checkNotNull; -import com.google.inject.Inject; import haveno.common.util.Tuple2; import haveno.core.user.Preferences; import haveno.core.xmr.exceptions.AddressEntryException; @@ -30,13 +27,6 @@ import haveno.core.xmr.exceptions.WalletException; import haveno.core.xmr.model.AddressEntry; import haveno.core.xmr.model.AddressEntryList; import haveno.core.xmr.setup.WalletsSetup; -import java.util.Arrays; -import java.util.List; -import java.util.Optional; -import java.util.Set; -import java.util.stream.Collectors; -import java.util.stream.Stream; -import javax.annotation.Nullable; import org.bitcoinj.core.Address; import org.bitcoinj.core.AddressFormatException; import org.bitcoinj.core.Coin; @@ -56,6 +46,18 @@ import org.jetbrains.annotations.NotNull; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import javax.annotation.Nullable; +import javax.inject.Inject; +import java.util.Arrays; +import java.util.List; +import java.util.Optional; +import java.util.Set; +import java.util.stream.Collectors; +import java.util.stream.Stream; + +import static com.google.common.base.Preconditions.checkArgument; +import static com.google.common.base.Preconditions.checkNotNull; + public class BtcWalletService extends WalletService { private static final Logger log = LoggerFactory.getLogger(BtcWalletService.class); diff --git a/core/src/main/java/haveno/core/xmr/wallet/NonBsqCoinSelector.java b/core/src/main/java/haveno/core/xmr/wallet/NonBsqCoinSelector.java index 4edaf9ef37..8f3f5eeb0e 100644 --- a/core/src/main/java/haveno/core/xmr/wallet/NonBsqCoinSelector.java +++ b/core/src/main/java/haveno/core/xmr/wallet/NonBsqCoinSelector.java @@ -17,7 +17,6 @@ package haveno.core.xmr.wallet; -import com.google.inject.Inject; import haveno.core.user.Preferences; import lombok.Setter; import lombok.extern.slf4j.Slf4j; @@ -25,6 +24,8 @@ import org.bitcoinj.core.Transaction; import org.bitcoinj.core.TransactionConfidence; import org.bitcoinj.core.TransactionOutput; +import javax.inject.Inject; + /** * We use a specialized version of the CoinSelector based on the DefaultCoinSelector implementation. * We lookup for spendable outputs which matches our address of our address. diff --git a/core/src/main/java/haveno/core/xmr/wallet/TradeWalletService.java b/core/src/main/java/haveno/core/xmr/wallet/TradeWalletService.java index 089d9f7dd3..12dac1aa9f 100644 --- a/core/src/main/java/haveno/core/xmr/wallet/TradeWalletService.java +++ b/core/src/main/java/haveno/core/xmr/wallet/TradeWalletService.java @@ -17,10 +17,7 @@ package haveno.core.xmr.wallet; -import static com.google.common.base.Preconditions.checkArgument; -import static com.google.common.base.Preconditions.checkNotNull; import com.google.common.collect.ImmutableList; -import com.google.inject.Inject; import haveno.common.config.Config; import haveno.common.util.Tuple2; import haveno.core.user.Preferences; @@ -32,10 +29,6 @@ import haveno.core.xmr.model.PreparedDepositTxAndMakerInputs; import haveno.core.xmr.model.RawTransactionInput; import haveno.core.xmr.setup.WalletConfig; import haveno.core.xmr.setup.WalletsSetup; -import java.util.ArrayList; -import java.util.List; -import java.util.stream.Collectors; -import javax.annotation.Nullable; import org.bitcoinj.core.Address; import org.bitcoinj.core.AddressFormatException; import org.bitcoinj.core.Coin; @@ -62,6 +55,15 @@ import org.jetbrains.annotations.NotNull; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import javax.annotation.Nullable; +import javax.inject.Inject; +import java.util.ArrayList; +import java.util.List; +import java.util.stream.Collectors; + +import static com.google.common.base.Preconditions.checkArgument; +import static com.google.common.base.Preconditions.checkNotNull; + public class TradeWalletService { diff --git a/core/src/main/java/haveno/core/xmr/wallet/WalletService.java b/core/src/main/java/haveno/core/xmr/wallet/WalletService.java index 31b98a0d6b..ed4bc13f4f 100644 --- a/core/src/main/java/haveno/core/xmr/wallet/WalletService.java +++ b/core/src/main/java/haveno/core/xmr/wallet/WalletService.java @@ -17,13 +17,10 @@ package haveno.core.xmr.wallet; -import static com.google.common.base.Preconditions.checkNotNull; -import static com.google.common.base.Preconditions.checkState; import com.google.common.collect.ImmutableMultiset; import com.google.common.collect.ImmutableSetMultimap; import com.google.common.collect.Multiset; import com.google.common.collect.SetMultimap; -import com.google.inject.Inject; import haveno.common.config.Config; import haveno.core.user.Preferences; import haveno.core.xmr.exceptions.TransactionVerificationException; @@ -32,18 +29,8 @@ import haveno.core.xmr.listeners.AddressConfidenceListener; import haveno.core.xmr.listeners.BalanceListener; import haveno.core.xmr.listeners.TxConfidenceListener; import haveno.core.xmr.setup.WalletsSetup; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; -import java.util.Set; -import java.util.concurrent.CopyOnWriteArraySet; -import java.util.concurrent.atomic.AtomicReference; -import java.util.function.Function; -import java.util.stream.Collectors; -import java.util.stream.Stream; import javafx.beans.property.IntegerProperty; import javafx.beans.property.SimpleIntegerProperty; -import javax.annotation.Nullable; import lombok.Getter; import lombok.extern.slf4j.Slf4j; import monero.wallet.MoneroWallet; @@ -86,6 +73,21 @@ import org.bitcoinj.wallet.listeners.WalletReorganizeEventListener; import org.bouncycastle.crypto.params.KeyParameter; import org.jetbrains.annotations.NotNull; +import javax.annotation.Nullable; +import javax.inject.Inject; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.Set; +import java.util.concurrent.CopyOnWriteArraySet; +import java.util.concurrent.atomic.AtomicReference; +import java.util.function.Function; +import java.util.stream.Collectors; +import java.util.stream.Stream; + +import static com.google.common.base.Preconditions.checkNotNull; +import static com.google.common.base.Preconditions.checkState; + /** * Abstract base class for BTC wallet. Provides all non-trade specific functionality. */ diff --git a/core/src/main/java/haveno/core/xmr/wallet/XmrWalletService.java b/core/src/main/java/haveno/core/xmr/wallet/XmrWalletService.java index 19628e67ea..2abe6a8da7 100644 --- a/core/src/main/java/haveno/core/xmr/wallet/XmrWalletService.java +++ b/core/src/main/java/haveno/core/xmr/wallet/XmrWalletService.java @@ -1,9 +1,8 @@ package haveno.core.xmr.wallet; -import static com.google.common.base.Preconditions.checkState; import com.google.common.util.concurrent.Service.State; -import com.google.inject.Inject; import com.google.inject.name.Named; + import common.utils.GenUtils; import common.utils.JsonUtils; import haveno.common.UserThread; @@ -26,25 +25,6 @@ import haveno.core.xmr.model.XmrAddressEntry; import haveno.core.xmr.model.XmrAddressEntryList; import haveno.core.xmr.setup.MoneroWalletRpcManager; import haveno.core.xmr.setup.WalletsSetup; -import java.io.File; -import java.math.BigDecimal; -import java.math.BigInteger; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collection; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Optional; -import java.util.Set; -import java.util.concurrent.Callable; -import java.util.concurrent.CopyOnWriteArraySet; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; -import java.util.concurrent.Future; -import java.util.stream.Collectors; -import java.util.stream.Stream; import monero.common.MoneroError; import monero.common.MoneroRpcConnection; import monero.common.MoneroRpcError; @@ -70,10 +50,34 @@ import monero.wallet.model.MoneroTxWallet; import monero.wallet.model.MoneroWalletConfig; import monero.wallet.model.MoneroWalletListener; import monero.wallet.model.MoneroWalletListenerI; + import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import javax.inject.Inject; +import java.io.File; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import java.util.Set; +import java.util.concurrent.Callable; +import java.util.concurrent.CopyOnWriteArraySet; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; +import java.util.concurrent.Future; +import java.util.stream.Collectors; +import java.util.stream.Stream; + +import static com.google.common.base.Preconditions.checkState; + public class XmrWalletService { private static final Logger log = LoggerFactory.getLogger(XmrWalletService.class); @@ -691,7 +695,7 @@ public class XmrWalletService { int maxAttempts = 2; while (!HavenoUtils.havenoSetup.getWalletInitialized().get()) { try { - + // sync main wallet log.info("Syncing main wallet"); long time = System.currentTimeMillis(); @@ -702,12 +706,12 @@ public class XmrWalletService { // TODO: using this to signify both daemon and wallet synced, use separate sync handlers connectionsService.doneDownload(); - + // notify setup that main wallet is initialized // TODO: app fully initializes after this is set to true, even though wallet might not be initialized if unconnected. wallet will be created when connection detected // refactor startup to call this and sync off main thread? but the calls to e.g. getBalance() fail with 'wallet and network is not yet initialized' HavenoUtils.havenoSetup.getWalletInitialized().set(true); - + // save but skip backup on initialization saveMainWallet(false); } catch (Exception e) { @@ -724,7 +728,7 @@ public class XmrWalletService { } } } - + // register internal listener to notify external listeners wallet.addListener(new XmrWalletListener()); } @@ -743,10 +747,10 @@ public class XmrWalletService { // start monero-wallet-rpc instance walletRpc = startWalletRpcInstance(port); walletRpc.getRpcConnection().setPrintStackTrace(PRINT_STACK_TRACE); - + // prevent wallet rpc from syncing walletRpc.stopSyncing(); - + // create wallet log.info("Creating wallet " + config.getPath() + " connected to daemon " + connection.getUri()); long time = System.currentTimeMillis(); @@ -768,10 +772,10 @@ public class XmrWalletService { // start monero-wallet-rpc instance walletRpc = startWalletRpcInstance(port); walletRpc.getRpcConnection().setPrintStackTrace(PRINT_STACK_TRACE); - + // prevent wallet rpc from syncing walletRpc.stopSyncing(); - + // open wallet log.info("Opening wallet " + config.getPath()); walletRpc.openWallet(config.setServer(connectionsService.getConnection())); @@ -926,7 +930,7 @@ public class XmrWalletService { log.warn("Error getting new address entry based on incoming transactions"); e.printStackTrace(); } - + // create new entry return getNewAddressEntryAux(offerId, context); } diff --git a/daemon/src/main/java/haveno/daemon/grpc/GrpcAccountService.java b/daemon/src/main/java/haveno/daemon/grpc/GrpcAccountService.java index 6bb5a1ebeb..14ce7c2157 100644 --- a/daemon/src/main/java/haveno/daemon/grpc/GrpcAccountService.java +++ b/daemon/src/main/java/haveno/daemon/grpc/GrpcAccountService.java @@ -17,25 +17,14 @@ package haveno.daemon.grpc; import com.google.common.annotations.VisibleForTesting; -import com.google.inject.Inject; import com.google.protobuf.ByteString; import haveno.common.crypto.IncorrectPasswordException; import haveno.core.api.CoreApi; import haveno.daemon.grpc.interceptor.CallRateMeteringInterceptor; import haveno.daemon.grpc.interceptor.GrpcCallRateMeter; -import static haveno.daemon.grpc.interceptor.GrpcServiceRateMeteringConfig.getCustomRateMeteringInterceptor; import haveno.proto.grpc.AccountExistsReply; import haveno.proto.grpc.AccountExistsRequest; import haveno.proto.grpc.AccountGrpc.AccountImplBase; -import static haveno.proto.grpc.AccountGrpc.getAccountExistsMethod; -import static haveno.proto.grpc.AccountGrpc.getBackupAccountMethod; -import static haveno.proto.grpc.AccountGrpc.getChangePasswordMethod; -import static haveno.proto.grpc.AccountGrpc.getCloseAccountMethod; -import static haveno.proto.grpc.AccountGrpc.getCreateAccountMethod; -import static haveno.proto.grpc.AccountGrpc.getDeleteAccountMethod; -import static haveno.proto.grpc.AccountGrpc.getIsAccountOpenMethod; -import static haveno.proto.grpc.AccountGrpc.getOpenAccountMethod; -import static haveno.proto.grpc.AccountGrpc.getRestoreAccountMethod; import haveno.proto.grpc.BackupAccountReply; import haveno.proto.grpc.BackupAccountRequest; import haveno.proto.grpc.ChangePasswordReply; @@ -56,12 +45,25 @@ import haveno.proto.grpc.RestoreAccountReply; import haveno.proto.grpc.RestoreAccountRequest; import io.grpc.ServerInterceptor; import io.grpc.stub.StreamObserver; +import lombok.extern.slf4j.Slf4j; + +import javax.inject.Inject; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.util.HashMap; import java.util.Optional; + +import static haveno.daemon.grpc.interceptor.GrpcServiceRateMeteringConfig.getCustomRateMeteringInterceptor; +import static haveno.proto.grpc.AccountGrpc.getAccountExistsMethod; +import static haveno.proto.grpc.AccountGrpc.getBackupAccountMethod; +import static haveno.proto.grpc.AccountGrpc.getChangePasswordMethod; +import static haveno.proto.grpc.AccountGrpc.getCloseAccountMethod; +import static haveno.proto.grpc.AccountGrpc.getCreateAccountMethod; +import static haveno.proto.grpc.AccountGrpc.getDeleteAccountMethod; +import static haveno.proto.grpc.AccountGrpc.getIsAccountOpenMethod; +import static haveno.proto.grpc.AccountGrpc.getOpenAccountMethod; +import static haveno.proto.grpc.AccountGrpc.getRestoreAccountMethod; import static java.util.concurrent.TimeUnit.SECONDS; -import lombok.extern.slf4j.Slf4j; @VisibleForTesting @Slf4j diff --git a/daemon/src/main/java/haveno/daemon/grpc/GrpcDisputeAgentsService.java b/daemon/src/main/java/haveno/daemon/grpc/GrpcDisputeAgentsService.java index 75d1eef40c..99ca4fa868 100644 --- a/daemon/src/main/java/haveno/daemon/grpc/GrpcDisputeAgentsService.java +++ b/daemon/src/main/java/haveno/daemon/grpc/GrpcDisputeAgentsService.java @@ -1,23 +1,25 @@ package haveno.daemon.grpc; -import com.google.inject.Inject; import haveno.core.api.CoreApi; import haveno.daemon.grpc.interceptor.CallRateMeteringInterceptor; import haveno.daemon.grpc.interceptor.GrpcCallRateMeter; -import static haveno.daemon.grpc.interceptor.GrpcServiceRateMeteringConfig.getCustomRateMeteringInterceptor; -import static haveno.proto.grpc.DisputeAgentsGrpc.DisputeAgentsImplBase; -import static haveno.proto.grpc.DisputeAgentsGrpc.getRegisterDisputeAgentMethod; -import static haveno.proto.grpc.DisputeAgentsGrpc.getUnregisterDisputeAgentMethod; import haveno.proto.grpc.RegisterDisputeAgentReply; import haveno.proto.grpc.RegisterDisputeAgentRequest; import haveno.proto.grpc.UnregisterDisputeAgentReply; import haveno.proto.grpc.UnregisterDisputeAgentRequest; import io.grpc.ServerInterceptor; import io.grpc.stub.StreamObserver; +import lombok.extern.slf4j.Slf4j; + +import javax.inject.Inject; import java.util.HashMap; import java.util.Optional; + +import static haveno.daemon.grpc.interceptor.GrpcServiceRateMeteringConfig.getCustomRateMeteringInterceptor; +import static haveno.proto.grpc.DisputeAgentsGrpc.DisputeAgentsImplBase; +import static haveno.proto.grpc.DisputeAgentsGrpc.getRegisterDisputeAgentMethod; +import static haveno.proto.grpc.DisputeAgentsGrpc.getUnregisterDisputeAgentMethod; import static java.util.concurrent.TimeUnit.SECONDS; -import lombok.extern.slf4j.Slf4j; @Slf4j class GrpcDisputeAgentsService extends DisputeAgentsImplBase { diff --git a/daemon/src/main/java/haveno/daemon/grpc/GrpcDisputesService.java b/daemon/src/main/java/haveno/daemon/grpc/GrpcDisputesService.java index 4ee31e3095..dc0e951242 100644 --- a/daemon/src/main/java/haveno/daemon/grpc/GrpcDisputesService.java +++ b/daemon/src/main/java/haveno/daemon/grpc/GrpcDisputesService.java @@ -1,19 +1,12 @@ package haveno.daemon.grpc; -import com.google.inject.Inject; import haveno.common.proto.ProtoUtil; import haveno.core.api.CoreApi; import haveno.core.support.dispute.Attachment; import haveno.core.support.dispute.DisputeResult; import haveno.daemon.grpc.interceptor.CallRateMeteringInterceptor; import haveno.daemon.grpc.interceptor.GrpcCallRateMeter; -import static haveno.daemon.grpc.interceptor.GrpcServiceRateMeteringConfig.getCustomRateMeteringInterceptor; import haveno.proto.grpc.DisputesGrpc.DisputesImplBase; -import static haveno.proto.grpc.DisputesGrpc.getGetDisputeMethod; -import static haveno.proto.grpc.DisputesGrpc.getGetDisputesMethod; -import static haveno.proto.grpc.DisputesGrpc.getOpenDisputeMethod; -import static haveno.proto.grpc.DisputesGrpc.getResolveDisputeMethod; -import static haveno.proto.grpc.DisputesGrpc.getSendDisputeChatMessageMethod; import haveno.proto.grpc.GetDisputeReply; import haveno.proto.grpc.GetDisputeRequest; import haveno.proto.grpc.GetDisputesReply; @@ -26,12 +19,21 @@ import haveno.proto.grpc.SendDisputeChatMessageReply; import haveno.proto.grpc.SendDisputeChatMessageRequest; import io.grpc.ServerInterceptor; import io.grpc.stub.StreamObserver; +import lombok.extern.slf4j.Slf4j; + +import javax.inject.Inject; import java.util.ArrayList; import java.util.HashMap; import java.util.Optional; -import static java.util.concurrent.TimeUnit.SECONDS; import java.util.stream.Collectors; -import lombok.extern.slf4j.Slf4j; + +import static haveno.daemon.grpc.interceptor.GrpcServiceRateMeteringConfig.getCustomRateMeteringInterceptor; +import static haveno.proto.grpc.DisputesGrpc.getGetDisputeMethod; +import static haveno.proto.grpc.DisputesGrpc.getGetDisputesMethod; +import static haveno.proto.grpc.DisputesGrpc.getOpenDisputeMethod; +import static haveno.proto.grpc.DisputesGrpc.getResolveDisputeMethod; +import static haveno.proto.grpc.DisputesGrpc.getSendDisputeChatMessageMethod; +import static java.util.concurrent.TimeUnit.SECONDS; @Slf4j public class GrpcDisputesService extends DisputesImplBase { diff --git a/daemon/src/main/java/haveno/daemon/grpc/GrpcExceptionHandler.java b/daemon/src/main/java/haveno/daemon/grpc/GrpcExceptionHandler.java index d0deadd355..f45bf63587 100644 --- a/daemon/src/main/java/haveno/daemon/grpc/GrpcExceptionHandler.java +++ b/daemon/src/main/java/haveno/daemon/grpc/GrpcExceptionHandler.java @@ -17,16 +17,18 @@ package haveno.daemon.grpc; -import com.google.inject.Inject; -import com.google.inject.Singleton; import io.grpc.Status; -import static io.grpc.Status.INVALID_ARGUMENT; -import static io.grpc.Status.UNKNOWN; import io.grpc.StatusRuntimeException; import io.grpc.stub.StreamObserver; +import org.slf4j.Logger; + +import javax.inject.Inject; +import javax.inject.Singleton; import java.util.function.Function; import java.util.function.Predicate; -import org.slf4j.Logger; + +import static io.grpc.Status.INVALID_ARGUMENT; +import static io.grpc.Status.UNKNOWN; /** * The singleton instance of this class handles any expected core api Throwable by diff --git a/daemon/src/main/java/haveno/daemon/grpc/GrpcGetTradeStatisticsService.java b/daemon/src/main/java/haveno/daemon/grpc/GrpcGetTradeStatisticsService.java index 04aefc0872..459f59f37e 100644 --- a/daemon/src/main/java/haveno/daemon/grpc/GrpcGetTradeStatisticsService.java +++ b/daemon/src/main/java/haveno/daemon/grpc/GrpcGetTradeStatisticsService.java @@ -1,22 +1,24 @@ package haveno.daemon.grpc; -import com.google.inject.Inject; import haveno.core.api.CoreApi; import haveno.core.trade.statistics.TradeStatistics3; import haveno.daemon.grpc.interceptor.CallRateMeteringInterceptor; import haveno.daemon.grpc.interceptor.GrpcCallRateMeter; -import static haveno.daemon.grpc.interceptor.GrpcServiceRateMeteringConfig.getCustomRateMeteringInterceptor; -import static haveno.proto.grpc.GetTradeStatisticsGrpc.GetTradeStatisticsImplBase; -import static haveno.proto.grpc.GetTradeStatisticsGrpc.getGetTradeStatisticsMethod; import haveno.proto.grpc.GetTradeStatisticsReply; import haveno.proto.grpc.GetTradeStatisticsRequest; import io.grpc.ServerInterceptor; import io.grpc.stub.StreamObserver; +import lombok.extern.slf4j.Slf4j; + +import javax.inject.Inject; import java.util.HashMap; import java.util.Optional; -import static java.util.concurrent.TimeUnit.SECONDS; import java.util.stream.Collectors; -import lombok.extern.slf4j.Slf4j; + +import static haveno.daemon.grpc.interceptor.GrpcServiceRateMeteringConfig.getCustomRateMeteringInterceptor; +import static haveno.proto.grpc.GetTradeStatisticsGrpc.GetTradeStatisticsImplBase; +import static haveno.proto.grpc.GetTradeStatisticsGrpc.getGetTradeStatisticsMethod; +import static java.util.concurrent.TimeUnit.SECONDS; @Slf4j class GrpcGetTradeStatisticsService extends GetTradeStatisticsImplBase { diff --git a/daemon/src/main/java/haveno/daemon/grpc/GrpcHelpService.java b/daemon/src/main/java/haveno/daemon/grpc/GrpcHelpService.java index c7e994413b..2abfc11a97 100644 --- a/daemon/src/main/java/haveno/daemon/grpc/GrpcHelpService.java +++ b/daemon/src/main/java/haveno/daemon/grpc/GrpcHelpService.java @@ -17,21 +17,23 @@ package haveno.daemon.grpc; -import com.google.inject.Inject; import haveno.core.api.CoreApi; import haveno.daemon.grpc.interceptor.CallRateMeteringInterceptor; import haveno.daemon.grpc.interceptor.GrpcCallRateMeter; -import static haveno.daemon.grpc.interceptor.GrpcServiceRateMeteringConfig.getCustomRateMeteringInterceptor; import haveno.proto.grpc.GetMethodHelpReply; import haveno.proto.grpc.GetMethodHelpRequest; -import static haveno.proto.grpc.HelpGrpc.HelpImplBase; -import static haveno.proto.grpc.HelpGrpc.getGetMethodHelpMethod; import io.grpc.ServerInterceptor; import io.grpc.stub.StreamObserver; +import lombok.extern.slf4j.Slf4j; + +import javax.inject.Inject; import java.util.HashMap; import java.util.Optional; + +import static haveno.daemon.grpc.interceptor.GrpcServiceRateMeteringConfig.getCustomRateMeteringInterceptor; +import static haveno.proto.grpc.HelpGrpc.HelpImplBase; +import static haveno.proto.grpc.HelpGrpc.getGetMethodHelpMethod; import static java.util.concurrent.TimeUnit.SECONDS; -import lombok.extern.slf4j.Slf4j; @Slf4j class GrpcHelpService extends HelpImplBase { diff --git a/daemon/src/main/java/haveno/daemon/grpc/GrpcMoneroConnectionsService.java b/daemon/src/main/java/haveno/daemon/grpc/GrpcMoneroConnectionsService.java index ed317aac03..4e85d318aa 100644 --- a/daemon/src/main/java/haveno/daemon/grpc/GrpcMoneroConnectionsService.java +++ b/daemon/src/main/java/haveno/daemon/grpc/GrpcMoneroConnectionsService.java @@ -17,11 +17,9 @@ package haveno.daemon.grpc; -import com.google.inject.Inject; import haveno.core.api.CoreApi; import haveno.daemon.grpc.interceptor.CallRateMeteringInterceptor; import haveno.daemon.grpc.interceptor.GrpcCallRateMeter; -import static haveno.daemon.grpc.interceptor.GrpcServiceRateMeteringConfig.getCustomRateMeteringInterceptor; import haveno.proto.grpc.AddConnectionReply; import haveno.proto.grpc.AddConnectionRequest; import haveno.proto.grpc.CheckConnectionReply; @@ -34,18 +32,6 @@ import haveno.proto.grpc.GetConnectionReply; import haveno.proto.grpc.GetConnectionRequest; import haveno.proto.grpc.GetConnectionsReply; import haveno.proto.grpc.GetConnectionsRequest; -import static haveno.proto.grpc.MoneroConnectionsGrpc.MoneroConnectionsImplBase; -import static haveno.proto.grpc.MoneroConnectionsGrpc.getAddConnectionMethod; -import static haveno.proto.grpc.MoneroConnectionsGrpc.getCheckConnectionMethod; -import static haveno.proto.grpc.MoneroConnectionsGrpc.getCheckConnectionsMethod; -import static haveno.proto.grpc.MoneroConnectionsGrpc.getGetBestAvailableConnectionMethod; -import static haveno.proto.grpc.MoneroConnectionsGrpc.getGetConnectionMethod; -import static haveno.proto.grpc.MoneroConnectionsGrpc.getGetConnectionsMethod; -import static haveno.proto.grpc.MoneroConnectionsGrpc.getRemoveConnectionMethod; -import static haveno.proto.grpc.MoneroConnectionsGrpc.getSetAutoSwitchMethod; -import static haveno.proto.grpc.MoneroConnectionsGrpc.getSetConnectionMethod; -import static haveno.proto.grpc.MoneroConnectionsGrpc.getStartCheckingConnectionsMethod; -import static haveno.proto.grpc.MoneroConnectionsGrpc.getStopCheckingConnectionsMethod; import haveno.proto.grpc.RemoveConnectionReply; import haveno.proto.grpc.RemoveConnectionRequest; import haveno.proto.grpc.SetAutoSwitchReply; @@ -59,15 +45,31 @@ import haveno.proto.grpc.StopCheckingConnectionsRequest; import haveno.proto.grpc.UrlConnection; import io.grpc.ServerInterceptor; import io.grpc.stub.StreamObserver; +import lombok.extern.slf4j.Slf4j; +import monero.common.MoneroRpcConnection; + +import javax.inject.Inject; import java.net.MalformedURLException; import java.net.URL; import java.util.HashMap; import java.util.List; import java.util.Optional; -import static java.util.concurrent.TimeUnit.SECONDS; import java.util.stream.Collectors; -import lombok.extern.slf4j.Slf4j; -import monero.common.MoneroRpcConnection; + +import static haveno.daemon.grpc.interceptor.GrpcServiceRateMeteringConfig.getCustomRateMeteringInterceptor; +import static haveno.proto.grpc.MoneroConnectionsGrpc.MoneroConnectionsImplBase; +import static haveno.proto.grpc.MoneroConnectionsGrpc.getAddConnectionMethod; +import static haveno.proto.grpc.MoneroConnectionsGrpc.getCheckConnectionMethod; +import static haveno.proto.grpc.MoneroConnectionsGrpc.getCheckConnectionsMethod; +import static haveno.proto.grpc.MoneroConnectionsGrpc.getGetBestAvailableConnectionMethod; +import static haveno.proto.grpc.MoneroConnectionsGrpc.getGetConnectionMethod; +import static haveno.proto.grpc.MoneroConnectionsGrpc.getGetConnectionsMethod; +import static haveno.proto.grpc.MoneroConnectionsGrpc.getRemoveConnectionMethod; +import static haveno.proto.grpc.MoneroConnectionsGrpc.getSetAutoSwitchMethod; +import static haveno.proto.grpc.MoneroConnectionsGrpc.getSetConnectionMethod; +import static haveno.proto.grpc.MoneroConnectionsGrpc.getStartCheckingConnectionsMethod; +import static haveno.proto.grpc.MoneroConnectionsGrpc.getStopCheckingConnectionsMethod; +import static java.util.concurrent.TimeUnit.SECONDS; @Slf4j class GrpcMoneroConnectionsService extends MoneroConnectionsImplBase { diff --git a/daemon/src/main/java/haveno/daemon/grpc/GrpcMoneroNodeService.java b/daemon/src/main/java/haveno/daemon/grpc/GrpcMoneroNodeService.java index 576a31d5b9..b08cbe5188 100644 --- a/daemon/src/main/java/haveno/daemon/grpc/GrpcMoneroNodeService.java +++ b/daemon/src/main/java/haveno/daemon/grpc/GrpcMoneroNodeService.java @@ -16,33 +16,35 @@ */ package haveno.daemon.grpc; -import com.google.inject.Inject; import haveno.core.api.CoreApi; import haveno.core.xmr.MoneroNodeSettings; import haveno.daemon.grpc.interceptor.CallRateMeteringInterceptor; import haveno.daemon.grpc.interceptor.GrpcCallRateMeter; -import static haveno.daemon.grpc.interceptor.GrpcServiceRateMeteringConfig.getCustomRateMeteringInterceptor; import haveno.proto.grpc.GetMoneroNodeSettingsReply; import haveno.proto.grpc.GetMoneroNodeSettingsRequest; import haveno.proto.grpc.IsMoneroNodeOnlineReply; import haveno.proto.grpc.IsMoneroNodeOnlineRequest; import haveno.proto.grpc.MoneroNodeGrpc.MoneroNodeImplBase; -import static haveno.proto.grpc.MoneroNodeGrpc.getGetMoneroNodeSettingsMethod; -import static haveno.proto.grpc.MoneroNodeGrpc.getIsMoneroNodeOnlineMethod; -import static haveno.proto.grpc.MoneroNodeGrpc.getStartMoneroNodeMethod; -import static haveno.proto.grpc.MoneroNodeGrpc.getStopMoneroNodeMethod; import haveno.proto.grpc.StartMoneroNodeReply; import haveno.proto.grpc.StartMoneroNodeRequest; import haveno.proto.grpc.StopMoneroNodeReply; import haveno.proto.grpc.StopMoneroNodeRequest; import io.grpc.ServerInterceptor; import io.grpc.stub.StreamObserver; -import java.util.HashMap; -import java.util.Optional; -import static java.util.concurrent.TimeUnit.SECONDS; import lombok.extern.slf4j.Slf4j; import monero.common.MoneroError; +import javax.inject.Inject; +import java.util.HashMap; +import java.util.Optional; + +import static haveno.daemon.grpc.interceptor.GrpcServiceRateMeteringConfig.getCustomRateMeteringInterceptor; +import static haveno.proto.grpc.MoneroNodeGrpc.getGetMoneroNodeSettingsMethod; +import static haveno.proto.grpc.MoneroNodeGrpc.getIsMoneroNodeOnlineMethod; +import static haveno.proto.grpc.MoneroNodeGrpc.getStartMoneroNodeMethod; +import static haveno.proto.grpc.MoneroNodeGrpc.getStopMoneroNodeMethod; +import static java.util.concurrent.TimeUnit.SECONDS; + @Slf4j public class GrpcMoneroNodeService extends MoneroNodeImplBase { diff --git a/daemon/src/main/java/haveno/daemon/grpc/GrpcNotificationsService.java b/daemon/src/main/java/haveno/daemon/grpc/GrpcNotificationsService.java index 410ac270ce..23082d0364 100644 --- a/daemon/src/main/java/haveno/daemon/grpc/GrpcNotificationsService.java +++ b/daemon/src/main/java/haveno/daemon/grpc/GrpcNotificationsService.java @@ -1,15 +1,11 @@ package haveno.daemon.grpc; -import com.google.inject.Inject; import haveno.core.api.CoreApi; import haveno.core.api.NotificationListener; import haveno.daemon.grpc.interceptor.CallRateMeteringInterceptor; import haveno.daemon.grpc.interceptor.GrpcCallRateMeter; -import static haveno.daemon.grpc.interceptor.GrpcServiceRateMeteringConfig.getCustomRateMeteringInterceptor; import haveno.proto.grpc.NotificationMessage; import haveno.proto.grpc.NotificationsGrpc.NotificationsImplBase; -import static haveno.proto.grpc.NotificationsGrpc.getRegisterNotificationListenerMethod; -import static haveno.proto.grpc.NotificationsGrpc.getSendNotificationMethod; import haveno.proto.grpc.RegisterNotificationListenerRequest; import haveno.proto.grpc.SendNotificationReply; import haveno.proto.grpc.SendNotificationRequest; @@ -17,13 +13,19 @@ import io.grpc.Context; import io.grpc.ServerInterceptor; import io.grpc.stub.ServerCallStreamObserver; import io.grpc.stub.StreamObserver; -import java.util.HashMap; -import java.util.Optional; -import static java.util.concurrent.TimeUnit.SECONDS; import lombok.NonNull; import lombok.Value; import lombok.extern.slf4j.Slf4j; +import javax.inject.Inject; +import java.util.HashMap; +import java.util.Optional; + +import static haveno.daemon.grpc.interceptor.GrpcServiceRateMeteringConfig.getCustomRateMeteringInterceptor; +import static haveno.proto.grpc.NotificationsGrpc.getRegisterNotificationListenerMethod; +import static haveno.proto.grpc.NotificationsGrpc.getSendNotificationMethod; +import static java.util.concurrent.TimeUnit.SECONDS; + @Slf4j class GrpcNotificationsService extends NotificationsImplBase { diff --git a/daemon/src/main/java/haveno/daemon/grpc/GrpcOffersService.java b/daemon/src/main/java/haveno/daemon/grpc/GrpcOffersService.java index f74682507d..61e2905872 100644 --- a/daemon/src/main/java/haveno/daemon/grpc/GrpcOffersService.java +++ b/daemon/src/main/java/haveno/daemon/grpc/GrpcOffersService.java @@ -17,14 +17,12 @@ package haveno.daemon.grpc; -import com.google.inject.Inject; import haveno.core.api.CoreApi; import haveno.core.api.model.OfferInfo; import haveno.core.offer.Offer; import haveno.core.offer.OpenOffer; import haveno.daemon.grpc.interceptor.CallRateMeteringInterceptor; import haveno.daemon.grpc.interceptor.GrpcCallRateMeter; -import static haveno.daemon.grpc.interceptor.GrpcServiceRateMeteringConfig.getCustomRateMeteringInterceptor; import haveno.proto.grpc.CancelOfferReply; import haveno.proto.grpc.CancelOfferRequest; import haveno.proto.grpc.GetMyOfferReply; @@ -35,6 +33,20 @@ import haveno.proto.grpc.GetOfferReply; import haveno.proto.grpc.GetOfferRequest; import haveno.proto.grpc.GetOffersReply; import haveno.proto.grpc.GetOffersRequest; +import haveno.proto.grpc.PostOfferReply; +import haveno.proto.grpc.PostOfferRequest; +import io.grpc.ServerInterceptor; +import io.grpc.stub.StreamObserver; +import lombok.extern.slf4j.Slf4j; + +import javax.inject.Inject; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Optional; +import java.util.stream.Collectors; + +import static haveno.daemon.grpc.interceptor.GrpcServiceRateMeteringConfig.getCustomRateMeteringInterceptor; import static haveno.proto.grpc.OffersGrpc.OffersImplBase; import static haveno.proto.grpc.OffersGrpc.getCancelOfferMethod; import static haveno.proto.grpc.OffersGrpc.getGetMyOfferMethod; @@ -42,17 +54,7 @@ import static haveno.proto.grpc.OffersGrpc.getGetMyOffersMethod; import static haveno.proto.grpc.OffersGrpc.getGetOfferMethod; import static haveno.proto.grpc.OffersGrpc.getGetOffersMethod; import static haveno.proto.grpc.OffersGrpc.getPostOfferMethod; -import haveno.proto.grpc.PostOfferReply; -import haveno.proto.grpc.PostOfferRequest; -import io.grpc.ServerInterceptor; -import io.grpc.stub.StreamObserver; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Optional; import static java.util.concurrent.TimeUnit.SECONDS; -import java.util.stream.Collectors; -import lombok.extern.slf4j.Slf4j; @Slf4j class GrpcOffersService extends OffersImplBase { diff --git a/daemon/src/main/java/haveno/daemon/grpc/GrpcPaymentAccountsService.java b/daemon/src/main/java/haveno/daemon/grpc/GrpcPaymentAccountsService.java index 75fde41568..1d28eb9355 100644 --- a/daemon/src/main/java/haveno/daemon/grpc/GrpcPaymentAccountsService.java +++ b/daemon/src/main/java/haveno/daemon/grpc/GrpcPaymentAccountsService.java @@ -17,7 +17,6 @@ package haveno.daemon.grpc; -import com.google.inject.Inject; import haveno.core.api.CoreApi; import haveno.core.api.model.PaymentAccountForm; import haveno.core.api.model.PaymentAccountFormField; @@ -28,7 +27,6 @@ import haveno.core.payment.payload.PaymentMethod; import haveno.core.proto.CoreProtoResolver; import haveno.daemon.grpc.interceptor.CallRateMeteringInterceptor; import haveno.daemon.grpc.interceptor.GrpcCallRateMeter; -import static haveno.daemon.grpc.interceptor.GrpcServiceRateMeteringConfig.getCustomRateMeteringInterceptor; import haveno.proto.grpc.CreateCryptoCurrencyPaymentAccountReply; import haveno.proto.grpc.CreateCryptoCurrencyPaymentAccountRequest; import haveno.proto.grpc.CreatePaymentAccountReply; @@ -41,21 +39,25 @@ import haveno.proto.grpc.GetPaymentAccountsReply; import haveno.proto.grpc.GetPaymentAccountsRequest; import haveno.proto.grpc.GetPaymentMethodsReply; import haveno.proto.grpc.GetPaymentMethodsRequest; +import haveno.proto.grpc.ValidateFormFieldReply; +import haveno.proto.grpc.ValidateFormFieldRequest; +import io.grpc.ServerInterceptor; +import io.grpc.stub.StreamObserver; +import lombok.extern.slf4j.Slf4j; + +import javax.inject.Inject; +import java.util.HashMap; +import java.util.Optional; +import java.util.stream.Collectors; + +import static haveno.daemon.grpc.interceptor.GrpcServiceRateMeteringConfig.getCustomRateMeteringInterceptor; import static haveno.proto.grpc.PaymentAccountsGrpc.PaymentAccountsImplBase; import static haveno.proto.grpc.PaymentAccountsGrpc.getCreateCryptoCurrencyPaymentAccountMethod; import static haveno.proto.grpc.PaymentAccountsGrpc.getCreatePaymentAccountMethod; import static haveno.proto.grpc.PaymentAccountsGrpc.getGetPaymentAccountFormMethod; import static haveno.proto.grpc.PaymentAccountsGrpc.getGetPaymentAccountsMethod; import static haveno.proto.grpc.PaymentAccountsGrpc.getGetPaymentMethodsMethod; -import haveno.proto.grpc.ValidateFormFieldReply; -import haveno.proto.grpc.ValidateFormFieldRequest; -import io.grpc.ServerInterceptor; -import io.grpc.stub.StreamObserver; -import java.util.HashMap; -import java.util.Optional; import static java.util.concurrent.TimeUnit.SECONDS; -import java.util.stream.Collectors; -import lombok.extern.slf4j.Slf4j; @Slf4j class GrpcPaymentAccountsService extends PaymentAccountsImplBase { diff --git a/daemon/src/main/java/haveno/daemon/grpc/GrpcPriceService.java b/daemon/src/main/java/haveno/daemon/grpc/GrpcPriceService.java index 855cb63c96..d3617c4060 100644 --- a/daemon/src/main/java/haveno/daemon/grpc/GrpcPriceService.java +++ b/daemon/src/main/java/haveno/daemon/grpc/GrpcPriceService.java @@ -17,28 +17,30 @@ package haveno.daemon.grpc; -import com.google.inject.Inject; import haveno.core.api.CoreApi; import haveno.core.api.model.MarketDepthInfo; import haveno.core.api.model.MarketPriceInfo; import haveno.daemon.grpc.interceptor.CallRateMeteringInterceptor; import haveno.daemon.grpc.interceptor.GrpcCallRateMeter; -import static haveno.daemon.grpc.interceptor.GrpcServiceRateMeteringConfig.getCustomRateMeteringInterceptor; import haveno.proto.grpc.MarketDepthReply; import haveno.proto.grpc.MarketDepthRequest; import haveno.proto.grpc.MarketPriceReply; import haveno.proto.grpc.MarketPriceRequest; import haveno.proto.grpc.MarketPricesReply; import haveno.proto.grpc.MarketPricesRequest; -import static haveno.proto.grpc.PriceGrpc.PriceImplBase; -import static haveno.proto.grpc.PriceGrpc.getGetMarketPriceMethod; import io.grpc.ServerInterceptor; import io.grpc.stub.StreamObserver; +import lombok.extern.slf4j.Slf4j; + +import javax.inject.Inject; import java.util.HashMap; import java.util.List; import java.util.Optional; + +import static haveno.daemon.grpc.interceptor.GrpcServiceRateMeteringConfig.getCustomRateMeteringInterceptor; +import static haveno.proto.grpc.PriceGrpc.PriceImplBase; +import static haveno.proto.grpc.PriceGrpc.getGetMarketPriceMethod; import static java.util.concurrent.TimeUnit.SECONDS; -import lombok.extern.slf4j.Slf4j; @Slf4j class GrpcPriceService extends PriceImplBase { diff --git a/daemon/src/main/java/haveno/daemon/grpc/GrpcServer.java b/daemon/src/main/java/haveno/daemon/grpc/GrpcServer.java index be66aaea96..c1fbd039db 100644 --- a/daemon/src/main/java/haveno/daemon/grpc/GrpcServer.java +++ b/daemon/src/main/java/haveno/daemon/grpc/GrpcServer.java @@ -17,17 +17,19 @@ package haveno.daemon.grpc; -import com.google.inject.Inject; -import com.google.inject.Singleton; import haveno.common.config.Config; import haveno.core.api.CoreContext; import haveno.daemon.grpc.interceptor.PasswordAuthInterceptor; import io.grpc.Server; import io.grpc.ServerBuilder; -import static io.grpc.ServerInterceptors.interceptForward; +import lombok.extern.slf4j.Slf4j; + +import javax.inject.Inject; +import javax.inject.Singleton; import java.io.IOException; import java.io.UncheckedIOException; -import lombok.extern.slf4j.Slf4j; + +import static io.grpc.ServerInterceptors.interceptForward; @Singleton @Slf4j diff --git a/daemon/src/main/java/haveno/daemon/grpc/GrpcShutdownService.java b/daemon/src/main/java/haveno/daemon/grpc/GrpcShutdownService.java index 1fa70ef80a..000ca3aa3e 100644 --- a/daemon/src/main/java/haveno/daemon/grpc/GrpcShutdownService.java +++ b/daemon/src/main/java/haveno/daemon/grpc/GrpcShutdownService.java @@ -17,16 +17,18 @@ package haveno.daemon.grpc; -import com.google.inject.Inject; import haveno.common.UserThread; import haveno.core.app.HavenoHeadlessApp; import haveno.proto.grpc.ShutdownServerGrpc; import haveno.proto.grpc.StopReply; import haveno.proto.grpc.StopRequest; import io.grpc.stub.StreamObserver; -import static java.util.concurrent.TimeUnit.MILLISECONDS; import lombok.extern.slf4j.Slf4j; +import javax.inject.Inject; + +import static java.util.concurrent.TimeUnit.MILLISECONDS; + @Slf4j class GrpcShutdownService extends ShutdownServerGrpc.ShutdownServerImplBase { diff --git a/daemon/src/main/java/haveno/daemon/grpc/GrpcTradesService.java b/daemon/src/main/java/haveno/daemon/grpc/GrpcTradesService.java index c06a51c6a1..7e8c1e4198 100644 --- a/daemon/src/main/java/haveno/daemon/grpc/GrpcTradesService.java +++ b/daemon/src/main/java/haveno/daemon/grpc/GrpcTradesService.java @@ -17,14 +17,11 @@ package haveno.daemon.grpc; -import com.google.inject.Inject; import haveno.core.api.CoreApi; import haveno.core.api.model.TradeInfo; -import static haveno.core.api.model.TradeInfo.toTradeInfo; import haveno.core.trade.Trade; import haveno.daemon.grpc.interceptor.CallRateMeteringInterceptor; import haveno.daemon.grpc.interceptor.GrpcCallRateMeter; -import static haveno.daemon.grpc.interceptor.GrpcServiceRateMeteringConfig.getCustomRateMeteringInterceptor; import haveno.proto.grpc.CompleteTradeReply; import haveno.proto.grpc.CompleteTradeRequest; import haveno.proto.grpc.ConfirmPaymentReceivedReply; @@ -41,6 +38,18 @@ import haveno.proto.grpc.SendChatMessageReply; import haveno.proto.grpc.SendChatMessageRequest; import haveno.proto.grpc.TakeOfferReply; import haveno.proto.grpc.TakeOfferRequest; +import io.grpc.ServerInterceptor; +import io.grpc.stub.StreamObserver; +import lombok.extern.slf4j.Slf4j; + +import javax.inject.Inject; +import java.util.HashMap; +import java.util.List; +import java.util.Optional; +import java.util.stream.Collectors; + +import static haveno.core.api.model.TradeInfo.toTradeInfo; +import static haveno.daemon.grpc.interceptor.GrpcServiceRateMeteringConfig.getCustomRateMeteringInterceptor; import static haveno.proto.grpc.TradesGrpc.TradesImplBase; import static haveno.proto.grpc.TradesGrpc.getCompleteTradeMethod; import static haveno.proto.grpc.TradesGrpc.getConfirmPaymentReceivedMethod; @@ -51,15 +60,8 @@ import static haveno.proto.grpc.TradesGrpc.getGetTradesMethod; import static haveno.proto.grpc.TradesGrpc.getSendChatMessageMethod; import static haveno.proto.grpc.TradesGrpc.getTakeOfferMethod; import static haveno.proto.grpc.TradesGrpc.getWithdrawFundsMethod; -import io.grpc.ServerInterceptor; -import io.grpc.stub.StreamObserver; -import java.util.HashMap; -import java.util.List; -import java.util.Optional; import static java.util.concurrent.TimeUnit.MINUTES; import static java.util.concurrent.TimeUnit.SECONDS; -import java.util.stream.Collectors; -import lombok.extern.slf4j.Slf4j; @Slf4j class GrpcTradesService extends TradesImplBase { diff --git a/daemon/src/main/java/haveno/daemon/grpc/GrpcVersionService.java b/daemon/src/main/java/haveno/daemon/grpc/GrpcVersionService.java index dfd4bff750..a870047053 100644 --- a/daemon/src/main/java/haveno/daemon/grpc/GrpcVersionService.java +++ b/daemon/src/main/java/haveno/daemon/grpc/GrpcVersionService.java @@ -18,21 +18,23 @@ package haveno.daemon.grpc; import com.google.common.annotations.VisibleForTesting; -import com.google.inject.Inject; import haveno.core.api.CoreApi; import haveno.daemon.grpc.interceptor.CallRateMeteringInterceptor; import haveno.daemon.grpc.interceptor.GrpcCallRateMeter; -import static haveno.daemon.grpc.interceptor.GrpcServiceRateMeteringConfig.getCustomRateMeteringInterceptor; -import static haveno.proto.grpc.GetVersionGrpc.GetVersionImplBase; -import static haveno.proto.grpc.GetVersionGrpc.getGetVersionMethod; import haveno.proto.grpc.GetVersionReply; import haveno.proto.grpc.GetVersionRequest; import io.grpc.ServerInterceptor; import io.grpc.stub.StreamObserver; +import lombok.extern.slf4j.Slf4j; + +import javax.inject.Inject; import java.util.HashMap; import java.util.Optional; + +import static haveno.daemon.grpc.interceptor.GrpcServiceRateMeteringConfig.getCustomRateMeteringInterceptor; +import static haveno.proto.grpc.GetVersionGrpc.GetVersionImplBase; +import static haveno.proto.grpc.GetVersionGrpc.getGetVersionMethod; import static java.util.concurrent.TimeUnit.SECONDS; -import lombok.extern.slf4j.Slf4j; @VisibleForTesting @Slf4j diff --git a/daemon/src/main/java/haveno/daemon/grpc/GrpcWalletsService.java b/daemon/src/main/java/haveno/daemon/grpc/GrpcWalletsService.java index 2081aa1271..e12e9a116d 100644 --- a/daemon/src/main/java/haveno/daemon/grpc/GrpcWalletsService.java +++ b/daemon/src/main/java/haveno/daemon/grpc/GrpcWalletsService.java @@ -17,14 +17,11 @@ package haveno.daemon.grpc; -import com.google.inject.Inject; import haveno.common.UserThread; import haveno.core.api.CoreApi; import haveno.core.api.model.AddressBalanceInfo; -import static haveno.core.api.model.XmrTx.toXmrTx; import haveno.daemon.grpc.interceptor.CallRateMeteringInterceptor; import haveno.daemon.grpc.interceptor.GrpcCallRateMeter; -import static haveno.daemon.grpc.interceptor.GrpcServiceRateMeteringConfig.getCustomRateMeteringInterceptor; import haveno.proto.grpc.CreateXmrTxReply; import haveno.proto.grpc.CreateXmrTxRequest; import haveno.proto.grpc.GetAddressBalanceReply; @@ -51,6 +48,21 @@ import haveno.proto.grpc.SetWalletPasswordReply; import haveno.proto.grpc.SetWalletPasswordRequest; import haveno.proto.grpc.UnlockWalletReply; import haveno.proto.grpc.UnlockWalletRequest; +import io.grpc.ServerInterceptor; +import io.grpc.stub.StreamObserver; +import lombok.extern.slf4j.Slf4j; +import monero.wallet.model.MoneroDestination; +import monero.wallet.model.MoneroTxWallet; + +import javax.inject.Inject; +import java.math.BigInteger; +import java.util.HashMap; +import java.util.List; +import java.util.Optional; +import java.util.stream.Collectors; + +import static haveno.core.api.model.XmrTx.toXmrTx; +import static haveno.daemon.grpc.interceptor.GrpcServiceRateMeteringConfig.getCustomRateMeteringInterceptor; import static haveno.proto.grpc.WalletsGrpc.WalletsImplBase; import static haveno.proto.grpc.WalletsGrpc.getGetAddressBalanceMethod; import static haveno.proto.grpc.WalletsGrpc.getGetBalancesMethod; @@ -59,17 +71,7 @@ import static haveno.proto.grpc.WalletsGrpc.getLockWalletMethod; import static haveno.proto.grpc.WalletsGrpc.getRemoveWalletPasswordMethod; import static haveno.proto.grpc.WalletsGrpc.getSetWalletPasswordMethod; import static haveno.proto.grpc.WalletsGrpc.getUnlockWalletMethod; -import io.grpc.ServerInterceptor; -import io.grpc.stub.StreamObserver; -import java.math.BigInteger; -import java.util.HashMap; -import java.util.List; -import java.util.Optional; import static java.util.concurrent.TimeUnit.SECONDS; -import java.util.stream.Collectors; -import lombok.extern.slf4j.Slf4j; -import monero.wallet.model.MoneroDestination; -import monero.wallet.model.MoneroTxWallet; @Slf4j class GrpcWalletsService extends WalletsImplBase { diff --git a/daemon/src/main/java/haveno/daemon/grpc/interceptor/PasswordAuthInterceptor.java b/daemon/src/main/java/haveno/daemon/grpc/interceptor/PasswordAuthInterceptor.java index 704abd50a0..4eccc52f11 100644 --- a/daemon/src/main/java/haveno/daemon/grpc/interceptor/PasswordAuthInterceptor.java +++ b/daemon/src/main/java/haveno/daemon/grpc/interceptor/PasswordAuthInterceptor.java @@ -17,16 +17,18 @@ package haveno.daemon.grpc.interceptor; -import com.google.inject.Inject; import haveno.common.config.Config; import io.grpc.Metadata; -import static io.grpc.Metadata.ASCII_STRING_MARSHALLER; -import static io.grpc.Metadata.Key; import io.grpc.ServerCall; import io.grpc.ServerCallHandler; import io.grpc.ServerInterceptor; -import static io.grpc.Status.UNAUTHENTICATED; import io.grpc.StatusRuntimeException; + +import javax.inject.Inject; + +import static io.grpc.Metadata.ASCII_STRING_MARSHALLER; +import static io.grpc.Metadata.Key; +import static io.grpc.Status.UNAUTHENTICATED; import static java.lang.String.format; /** diff --git a/desktop/src/main/java/haveno/desktop/Navigation.java b/desktop/src/main/java/haveno/desktop/Navigation.java index c882d4a236..9d049f9bd6 100644 --- a/desktop/src/main/java/haveno/desktop/Navigation.java +++ b/desktop/src/main/java/haveno/desktop/Navigation.java @@ -18,7 +18,6 @@ package haveno.desktop; import com.google.inject.Inject; -import com.google.inject.Singleton; import haveno.common.persistence.PersistenceManager; import haveno.common.proto.persistable.NavigationPath; import haveno.common.proto.persistable.PersistedDataHost; @@ -26,15 +25,17 @@ import haveno.desktop.common.view.View; import haveno.desktop.common.view.ViewPath; import haveno.desktop.main.MainView; import haveno.desktop.main.market.MarketView; +import lombok.Getter; +import lombok.Setter; +import lombok.extern.slf4j.Slf4j; + +import javax.annotation.Nullable; +import javax.inject.Singleton; import java.util.ArrayList; import java.util.List; import java.util.Objects; import java.util.concurrent.CopyOnWriteArraySet; import java.util.stream.Collectors; -import javax.annotation.Nullable; -import lombok.Getter; -import lombok.Setter; -import lombok.extern.slf4j.Slf4j; @Slf4j @Singleton diff --git a/desktop/src/main/java/haveno/desktop/common/fxml/FxmlViewLoader.java b/desktop/src/main/java/haveno/desktop/common/fxml/FxmlViewLoader.java index e4efb0b691..e1f4e6110c 100644 --- a/desktop/src/main/java/haveno/desktop/common/fxml/FxmlViewLoader.java +++ b/desktop/src/main/java/haveno/desktop/common/fxml/FxmlViewLoader.java @@ -18,21 +18,23 @@ package haveno.desktop.common.fxml; import com.google.common.base.Joiner; -import static com.google.common.base.Preconditions.checkNotNull; -import com.google.inject.Inject; -import com.google.inject.Singleton; import haveno.common.util.Utilities; import haveno.desktop.common.ViewfxException; import haveno.desktop.common.view.FxmlView; import haveno.desktop.common.view.View; import haveno.desktop.common.view.ViewFactory; import haveno.desktop.common.view.ViewLoader; +import javafx.fxml.FXMLLoader; +import lombok.extern.slf4j.Slf4j; + +import javax.inject.Inject; +import javax.inject.Singleton; import java.io.IOException; import java.lang.annotation.Annotation; import java.net.URL; import java.util.ResourceBundle; -import javafx.fxml.FXMLLoader; -import lombok.extern.slf4j.Slf4j; + +import static com.google.common.base.Preconditions.checkNotNull; @Slf4j @Singleton diff --git a/desktop/src/main/java/haveno/desktop/common/view/CachingViewLoader.java b/desktop/src/main/java/haveno/desktop/common/view/CachingViewLoader.java index 0bba7274ae..a09de2d3de 100644 --- a/desktop/src/main/java/haveno/desktop/common/view/CachingViewLoader.java +++ b/desktop/src/main/java/haveno/desktop/common/view/CachingViewLoader.java @@ -17,8 +17,8 @@ package haveno.desktop.common.view; -import com.google.inject.Inject; -import com.google.inject.Singleton; +import javax.inject.Inject; +import javax.inject.Singleton; import java.util.HashMap; import java.util.Map; diff --git a/desktop/src/main/java/haveno/desktop/common/view/guice/InjectorViewFactory.java b/desktop/src/main/java/haveno/desktop/common/view/guice/InjectorViewFactory.java index 96e043b4e0..302957ff5e 100644 --- a/desktop/src/main/java/haveno/desktop/common/view/guice/InjectorViewFactory.java +++ b/desktop/src/main/java/haveno/desktop/common/view/guice/InjectorViewFactory.java @@ -19,9 +19,10 @@ package haveno.desktop.common.view.guice; import com.google.common.base.Preconditions; import com.google.inject.Injector; -import com.google.inject.Singleton; import haveno.desktop.common.view.ViewFactory; +import javax.inject.Singleton; + @Singleton public class InjectorViewFactory implements ViewFactory { diff --git a/desktop/src/main/java/haveno/desktop/main/MainView.java b/desktop/src/main/java/haveno/desktop/main/MainView.java index 81966dbf33..3be68ccded 100644 --- a/desktop/src/main/java/haveno/desktop/main/MainView.java +++ b/desktop/src/main/java/haveno/desktop/main/MainView.java @@ -17,7 +17,6 @@ package haveno.desktop.main; -import com.google.inject.Inject; import com.jfoenix.controls.JFXBadge; import com.jfoenix.controls.JFXComboBox; import com.jfoenix.controls.JFXProgressBar; @@ -56,10 +55,6 @@ import haveno.desktop.main.shared.PriceFeedComboBoxItem; import haveno.desktop.main.support.SupportView; import haveno.desktop.util.DisplayUtils; import haveno.desktop.util.Transitions; -import java.text.DecimalFormat; -import java.text.NumberFormat; -import java.util.Date; -import java.util.Locale; import javafx.animation.Animation; import javafx.animation.KeyFrame; import javafx.animation.Timeline; @@ -86,10 +81,6 @@ import javafx.scene.image.ImageView; import javafx.scene.input.KeyCode; import javafx.scene.input.KeyEvent; import javafx.scene.layout.AnchorPane; -import static javafx.scene.layout.AnchorPane.setBottomAnchor; -import static javafx.scene.layout.AnchorPane.setLeftAnchor; -import static javafx.scene.layout.AnchorPane.setRightAnchor; -import static javafx.scene.layout.AnchorPane.setTopAnchor; import javafx.scene.layout.BorderPane; import javafx.scene.layout.HBox; import javafx.scene.layout.Priority; @@ -102,6 +93,17 @@ import lombok.Setter; import lombok.extern.slf4j.Slf4j; import org.jetbrains.annotations.NotNull; +import javax.inject.Inject; +import java.text.DecimalFormat; +import java.text.NumberFormat; +import java.util.Date; +import java.util.Locale; + +import static javafx.scene.layout.AnchorPane.setBottomAnchor; +import static javafx.scene.layout.AnchorPane.setLeftAnchor; +import static javafx.scene.layout.AnchorPane.setRightAnchor; +import static javafx.scene.layout.AnchorPane.setTopAnchor; + @FxmlView @Slf4j public class MainView extends InitializableView { diff --git a/desktop/src/main/java/haveno/desktop/main/account/AccountView.java b/desktop/src/main/java/haveno/desktop/main/account/AccountView.java index 01b462f1fb..13ac1a922c 100644 --- a/desktop/src/main/java/haveno/desktop/main/account/AccountView.java +++ b/desktop/src/main/java/haveno/desktop/main/account/AccountView.java @@ -17,7 +17,6 @@ package haveno.desktop.main.account; -import com.google.inject.Inject; import haveno.common.util.Utilities; import haveno.core.locale.Res; import haveno.core.user.DontShowAgainLookup; @@ -40,7 +39,6 @@ import haveno.desktop.main.account.register.mediator.MediatorRegistrationView; import haveno.desktop.main.account.register.refundagent.RefundAgentRegistrationView; import haveno.desktop.main.account.register.signing.SigningView; import haveno.desktop.main.presentation.AccountPresentation; -import java.util.List; import javafx.beans.value.ChangeListener; import javafx.collections.ListChangeListener; import javafx.event.EventHandler; @@ -52,6 +50,9 @@ import javafx.scene.control.TabPane; import javafx.scene.input.KeyCode; import javafx.scene.input.KeyEvent; +import javax.inject.Inject; +import java.util.List; + @FxmlView public class AccountView extends ActivatableView { diff --git a/desktop/src/main/java/haveno/desktop/main/account/content/backup/BackupView.java b/desktop/src/main/java/haveno/desktop/main/account/content/backup/BackupView.java index 631f8706fa..bc14e1d6f6 100644 --- a/desktop/src/main/java/haveno/desktop/main/account/content/backup/BackupView.java +++ b/desktop/src/main/java/haveno/desktop/main/account/content/backup/BackupView.java @@ -17,7 +17,6 @@ package haveno.desktop.main.account.content.backup; -import com.google.inject.Inject; import haveno.common.config.Config; import haveno.common.file.FileUtil; import haveno.common.persistence.PersistenceManager; @@ -28,22 +27,25 @@ import haveno.core.user.Preferences; import haveno.desktop.common.view.ActivatableView; import haveno.desktop.common.view.FxmlView; import haveno.desktop.main.overlays.popups.Popup; -import static haveno.desktop.util.FormBuilder.add2Buttons; -import static haveno.desktop.util.FormBuilder.add2ButtonsAfterGroup; -import static haveno.desktop.util.FormBuilder.addInputTextField; -import static haveno.desktop.util.FormBuilder.addTitledGroupBg; import haveno.desktop.util.Layout; -import java.io.File; -import java.io.IOException; -import java.nio.file.Paths; -import java.text.SimpleDateFormat; -import java.util.Date; import javafx.beans.value.ChangeListener; import javafx.scene.control.Button; import javafx.scene.control.TextField; import javafx.scene.layout.GridPane; import javafx.stage.DirectoryChooser; + import javax.annotation.Nullable; +import javax.inject.Inject; +import java.io.File; +import java.io.IOException; +import java.nio.file.Paths; +import java.text.SimpleDateFormat; +import java.util.Date; + +import static haveno.desktop.util.FormBuilder.add2Buttons; +import static haveno.desktop.util.FormBuilder.add2ButtonsAfterGroup; +import static haveno.desktop.util.FormBuilder.addInputTextField; +import static haveno.desktop.util.FormBuilder.addTitledGroupBg; @FxmlView public class BackupView extends ActivatableView { diff --git a/desktop/src/main/java/haveno/desktop/main/account/content/cryptoaccounts/CryptoAccountsView.java b/desktop/src/main/java/haveno/desktop/main/account/content/cryptoaccounts/CryptoAccountsView.java index f5516f60e8..4dde7eed03 100644 --- a/desktop/src/main/java/haveno/desktop/main/account/content/cryptoaccounts/CryptoAccountsView.java +++ b/desktop/src/main/java/haveno/desktop/main/account/content/cryptoaccounts/CryptoAccountsView.java @@ -17,10 +17,8 @@ package haveno.desktop.main.account.content.cryptoaccounts; -import com.google.inject.Inject; -import com.google.inject.name.Named; -import haveno.asset.Asset; import haveno.asset.CryptoAccountDisclaimer; +import haveno.asset.Asset; import haveno.asset.coins.Monero; import haveno.common.util.Tuple2; import haveno.common.util.Tuple3; @@ -41,17 +39,11 @@ import haveno.core.util.validation.InputValidator; import haveno.desktop.common.view.FxmlView; import haveno.desktop.components.TitledGroupBg; import haveno.desktop.components.paymentmethods.AssetsForm; -import static haveno.desktop.components.paymentmethods.AssetsForm.INSTANT_TRADE_NEWS; import haveno.desktop.components.paymentmethods.PaymentMethodForm; import haveno.desktop.main.account.content.PaymentAccountsView; import haveno.desktop.main.overlays.popups.Popup; import haveno.desktop.util.FormBuilder; -import static haveno.desktop.util.FormBuilder.add2ButtonsAfterGroup; -import static haveno.desktop.util.FormBuilder.add3ButtonsAfterGroup; -import static haveno.desktop.util.FormBuilder.addTitledGroupBg; -import static haveno.desktop.util.FormBuilder.addTopLabelListView; import haveno.desktop.util.Layout; -import java.util.Optional; import javafx.collections.ObservableList; import javafx.scene.control.Button; import javafx.scene.control.Label; @@ -60,6 +52,16 @@ import javafx.scene.layout.GridPane; import javafx.scene.layout.VBox; import javafx.stage.Stage; +import javax.inject.Inject; +import javax.inject.Named; +import java.util.Optional; + +import static haveno.desktop.components.paymentmethods.AssetsForm.INSTANT_TRADE_NEWS; +import static haveno.desktop.util.FormBuilder.add2ButtonsAfterGroup; +import static haveno.desktop.util.FormBuilder.add3ButtonsAfterGroup; +import static haveno.desktop.util.FormBuilder.addTitledGroupBg; +import static haveno.desktop.util.FormBuilder.addTopLabelListView; + @FxmlView public class CryptoAccountsView extends PaymentAccountsView { diff --git a/desktop/src/main/java/haveno/desktop/main/account/content/notifications/MobileNotificationsView.java b/desktop/src/main/java/haveno/desktop/main/account/content/notifications/MobileNotificationsView.java index b51484af16..10e6d75081 100644 --- a/desktop/src/main/java/haveno/desktop/main/account/content/notifications/MobileNotificationsView.java +++ b/desktop/src/main/java/haveno/desktop/main/account/content/notifications/MobileNotificationsView.java @@ -17,7 +17,6 @@ package haveno.desktop.main.account.content.notifications; -import com.google.inject.Inject; import haveno.common.UserThread; import haveno.common.util.Tuple2; import haveno.common.util.Tuple3; @@ -41,25 +40,17 @@ import haveno.core.user.User; import haveno.core.util.FormattingUtils; import haveno.core.util.ParsingUtils; import haveno.core.util.PriceUtil; +import haveno.core.util.validation.NonFiatPriceValidator; import haveno.core.util.validation.FiatPriceValidator; import haveno.core.util.validation.InputValidator; -import haveno.core.util.validation.NonFiatPriceValidator; import haveno.desktop.common.view.ActivatableView; import haveno.desktop.common.view.FxmlView; import haveno.desktop.components.InfoInputTextField; import haveno.desktop.components.InputTextField; import haveno.desktop.main.overlays.popups.Popup; import haveno.desktop.util.FormBuilder; -import static haveno.desktop.util.FormBuilder.addButton; -import static haveno.desktop.util.FormBuilder.addInputTextField; -import static haveno.desktop.util.FormBuilder.addSlideToggleButton; -import static haveno.desktop.util.FormBuilder.addTitledGroupBg; -import static haveno.desktop.util.FormBuilder.addTopLabelButton; import haveno.desktop.util.GUIUtil; import haveno.desktop.util.Layout; -import java.util.ArrayList; -import java.util.List; -import java.util.Optional; import javafx.beans.value.ChangeListener; import javafx.collections.FXCollections; import javafx.collections.SetChangeListener; @@ -75,6 +66,17 @@ import javafx.scene.control.ToggleGroup; import javafx.scene.layout.GridPane; import javafx.util.StringConverter; +import javax.inject.Inject; +import java.util.ArrayList; +import java.util.List; +import java.util.Optional; + +import static haveno.desktop.util.FormBuilder.addButton; +import static haveno.desktop.util.FormBuilder.addInputTextField; +import static haveno.desktop.util.FormBuilder.addSlideToggleButton; +import static haveno.desktop.util.FormBuilder.addTitledGroupBg; +import static haveno.desktop.util.FormBuilder.addTopLabelButton; + @FxmlView public class MobileNotificationsView extends ActivatableView { private final Preferences preferences; diff --git a/desktop/src/main/java/haveno/desktop/main/account/content/password/PasswordView.java b/desktop/src/main/java/haveno/desktop/main/account/content/password/PasswordView.java index e5ada453a2..332170d3d7 100644 --- a/desktop/src/main/java/haveno/desktop/main/account/content/password/PasswordView.java +++ b/desktop/src/main/java/haveno/desktop/main/account/content/password/PasswordView.java @@ -17,8 +17,6 @@ package haveno.desktop.main.account.content.password; -import static com.google.common.base.Preconditions.checkArgument; -import com.google.inject.Inject; import com.jfoenix.validation.RequiredFieldValidator; import haveno.common.util.Tuple4; import haveno.core.api.CoreAccountService; @@ -35,10 +33,6 @@ import haveno.desktop.main.MainView; import haveno.desktop.main.account.AccountView; import haveno.desktop.main.account.content.backup.BackupView; import haveno.desktop.main.overlays.popups.Popup; -import static haveno.desktop.util.FormBuilder.addButtonBusyAnimationLabel; -import static haveno.desktop.util.FormBuilder.addMultilineLabel; -import static haveno.desktop.util.FormBuilder.addPasswordTextField; -import static haveno.desktop.util.FormBuilder.addTitledGroupBg; import haveno.desktop.util.Layout; import haveno.desktop.util.validation.PasswordValidator; import javafx.beans.value.ChangeListener; @@ -47,6 +41,14 @@ import javafx.scene.control.Label; import javafx.scene.layout.GridPane; import javafx.scene.layout.HBox; +import javax.inject.Inject; + +import static com.google.common.base.Preconditions.checkArgument; +import static haveno.desktop.util.FormBuilder.addButtonBusyAnimationLabel; +import static haveno.desktop.util.FormBuilder.addMultilineLabel; +import static haveno.desktop.util.FormBuilder.addPasswordTextField; +import static haveno.desktop.util.FormBuilder.addTitledGroupBg; + @FxmlView public class PasswordView extends ActivatableView { diff --git a/desktop/src/main/java/haveno/desktop/main/account/content/seedwords/SeedWordsView.java b/desktop/src/main/java/haveno/desktop/main/account/content/seedwords/SeedWordsView.java index dbd8464911..2e8d3679e2 100644 --- a/desktop/src/main/java/haveno/desktop/main/account/content/seedwords/SeedWordsView.java +++ b/desktop/src/main/java/haveno/desktop/main/account/content/seedwords/SeedWordsView.java @@ -18,8 +18,6 @@ package haveno.desktop.main.account.content.seedwords; import com.google.common.base.Splitter; -import com.google.inject.Inject; -import com.google.inject.name.Named; import haveno.common.config.Config; import haveno.core.locale.Res; import haveno.core.offer.OpenOfferManager; @@ -31,20 +29,7 @@ import haveno.desktop.common.view.FxmlView; import haveno.desktop.main.SharedPresentation; import haveno.desktop.main.overlays.popups.Popup; import haveno.desktop.main.overlays.windows.WalletPasswordWindow; -import static haveno.desktop.util.FormBuilder.addMultilineLabel; -import static haveno.desktop.util.FormBuilder.addPrimaryActionButtonAFterGroup; -import static haveno.desktop.util.FormBuilder.addTitledGroupBg; -import static haveno.desktop.util.FormBuilder.addTopLabelDatePicker; -import static haveno.desktop.util.FormBuilder.addTopLabelTextArea; import haveno.desktop.util.Layout; -import java.io.File; -import java.io.IOException; -import java.time.Instant; -import java.time.LocalDate; -import java.time.LocalDateTime; -import java.time.ZoneOffset; -import java.util.TimeZone; -import static javafx.beans.binding.Bindings.createBooleanBinding; import javafx.beans.property.BooleanProperty; import javafx.beans.property.SimpleBooleanProperty; import javafx.beans.value.ChangeListener; @@ -56,6 +41,23 @@ import org.bitcoinj.crypto.MnemonicCode; import org.bitcoinj.crypto.MnemonicException; import org.bitcoinj.wallet.DeterministicSeed; +import javax.inject.Inject; +import javax.inject.Named; +import java.io.File; +import java.io.IOException; +import java.time.Instant; +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.time.ZoneOffset; +import java.util.TimeZone; + +import static haveno.desktop.util.FormBuilder.addMultilineLabel; +import static haveno.desktop.util.FormBuilder.addPrimaryActionButtonAFterGroup; +import static haveno.desktop.util.FormBuilder.addTitledGroupBg; +import static haveno.desktop.util.FormBuilder.addTopLabelDatePicker; +import static haveno.desktop.util.FormBuilder.addTopLabelTextArea; +import static javafx.beans.binding.Bindings.createBooleanBinding; + @FxmlView public class SeedWordsView extends ActivatableView { private final WalletsManager walletsManager; diff --git a/desktop/src/main/java/haveno/desktop/main/account/content/traditionalaccounts/TraditionalAccountsView.java b/desktop/src/main/java/haveno/desktop/main/account/content/traditionalaccounts/TraditionalAccountsView.java index 2eac2f6b80..e06cbf9843 100644 --- a/desktop/src/main/java/haveno/desktop/main/account/content/traditionalaccounts/TraditionalAccountsView.java +++ b/desktop/src/main/java/haveno/desktop/main/account/content/traditionalaccounts/TraditionalAccountsView.java @@ -17,8 +17,6 @@ package haveno.desktop.main.account.content.traditionalaccounts; -import com.google.inject.Inject; -import com.google.inject.name.Named; import haveno.common.config.Config; import haveno.common.util.Tuple2; import haveno.common.util.Tuple3; @@ -29,17 +27,17 @@ import haveno.core.offer.OfferRestrictions; import haveno.core.payment.AmazonGiftCardAccount; import haveno.core.payment.AustraliaPayidAccount; import haveno.core.payment.CashAtAtmAccount; +import haveno.core.payment.PayByMailAccount; import haveno.core.payment.CashDepositAccount; +import haveno.core.payment.ZelleAccount; import haveno.core.payment.F2FAccount; import haveno.core.payment.HalCashAccount; import haveno.core.payment.MoneyGramAccount; -import haveno.core.payment.PayByMailAccount; import haveno.core.payment.PaymentAccount; import haveno.core.payment.PaymentAccountFactory; import haveno.core.payment.RevolutAccount; import haveno.core.payment.USPostalMoneyOrderAccount; import haveno.core.payment.WesternUnionAccount; -import haveno.core.payment.ZelleAccount; import haveno.core.payment.payload.PaymentMethod; import haveno.core.payment.validation.AdvancedCashValidator; import haveno.core.payment.validation.AliPayValidator; @@ -76,9 +74,11 @@ import haveno.desktop.components.paymentmethods.AustraliaPayidForm; import haveno.desktop.components.paymentmethods.BizumForm; import haveno.desktop.components.paymentmethods.CapitualForm; import haveno.desktop.components.paymentmethods.CashAtAtmForm; +import haveno.desktop.components.paymentmethods.PayByMailForm; import haveno.desktop.components.paymentmethods.CashDepositForm; import haveno.desktop.components.paymentmethods.CelPayForm; import haveno.desktop.components.paymentmethods.ChaseQuickPayForm; +import haveno.desktop.components.paymentmethods.ZelleForm; import haveno.desktop.components.paymentmethods.DomesticWireTransferForm; import haveno.desktop.components.paymentmethods.F2FForm; import haveno.desktop.components.paymentmethods.FasterPaymentsForm; @@ -93,7 +93,6 @@ import haveno.desktop.components.paymentmethods.NationalBankForm; import haveno.desktop.components.paymentmethods.NeftForm; import haveno.desktop.components.paymentmethods.NequiForm; import haveno.desktop.components.paymentmethods.PaxumForm; -import haveno.desktop.components.paymentmethods.PayByMailForm; import haveno.desktop.components.paymentmethods.PaymentMethodForm; import haveno.desktop.components.paymentmethods.PayseraForm; import haveno.desktop.components.paymentmethods.PaytmForm; @@ -120,19 +119,11 @@ import haveno.desktop.components.paymentmethods.UpiForm; import haveno.desktop.components.paymentmethods.VerseForm; import haveno.desktop.components.paymentmethods.WeChatPayForm; import haveno.desktop.components.paymentmethods.WesternUnionForm; -import haveno.desktop.components.paymentmethods.ZelleForm; import haveno.desktop.main.account.content.PaymentAccountsView; import haveno.desktop.main.overlays.popups.Popup; import haveno.desktop.util.FormBuilder; -import static haveno.desktop.util.FormBuilder.add2ButtonsAfterGroup; -import static haveno.desktop.util.FormBuilder.add3ButtonsAfterGroup; -import static haveno.desktop.util.FormBuilder.addTitledGroupBg; -import static haveno.desktop.util.FormBuilder.addTopLabelListView; import haveno.desktop.util.GUIUtil; import haveno.desktop.util.Layout; -import java.math.BigInteger; -import java.util.List; -import java.util.stream.Collectors; import javafx.collections.FXCollections; import javafx.collections.ObservableList; import javafx.scene.control.Button; @@ -144,6 +135,17 @@ import javafx.scene.layout.VBox; import javafx.stage.Stage; import javafx.util.StringConverter; +import javax.inject.Inject; +import javax.inject.Named; +import java.math.BigInteger; +import java.util.List; +import java.util.stream.Collectors; + +import static haveno.desktop.util.FormBuilder.add2ButtonsAfterGroup; +import static haveno.desktop.util.FormBuilder.add3ButtonsAfterGroup; +import static haveno.desktop.util.FormBuilder.addTitledGroupBg; +import static haveno.desktop.util.FormBuilder.addTopLabelListView; + @FxmlView public class TraditionalAccountsView extends PaymentAccountsView { diff --git a/desktop/src/main/java/haveno/desktop/main/account/content/walletinfo/WalletInfoView.java b/desktop/src/main/java/haveno/desktop/main/account/content/walletinfo/WalletInfoView.java index a073c30cf7..2d4f624340 100644 --- a/desktop/src/main/java/haveno/desktop/main/account/content/walletinfo/WalletInfoView.java +++ b/desktop/src/main/java/haveno/desktop/main/account/content/walletinfo/WalletInfoView.java @@ -17,8 +17,6 @@ package haveno.desktop.main.account.content.walletinfo; -import com.google.inject.Inject; -import com.google.inject.name.Named; import haveno.common.config.Config; import haveno.core.locale.Res; import haveno.core.util.FormattingUtils; @@ -31,10 +29,6 @@ import haveno.desktop.common.view.ActivatableView; import haveno.desktop.common.view.FxmlView; import haveno.desktop.main.overlays.popups.Popup; import haveno.desktop.main.overlays.windows.ShowWalletDataWindow; -import static haveno.desktop.util.FormBuilder.addButtonAfterGroup; -import static haveno.desktop.util.FormBuilder.addMultilineLabel; -import static haveno.desktop.util.FormBuilder.addTitledGroupBg; -import static haveno.desktop.util.FormBuilder.addTopLabelTextField; import haveno.desktop.util.Layout; import javafx.scene.control.Button; import javafx.scene.control.TextField; @@ -43,6 +37,14 @@ import org.bitcoinj.core.Coin; import org.bitcoinj.core.Transaction; import org.bitcoinj.script.Script; import org.bitcoinj.wallet.DeterministicKeyChain; + +import javax.inject.Inject; +import javax.inject.Named; + +import static haveno.desktop.util.FormBuilder.addButtonAfterGroup; +import static haveno.desktop.util.FormBuilder.addMultilineLabel; +import static haveno.desktop.util.FormBuilder.addTitledGroupBg; +import static haveno.desktop.util.FormBuilder.addTopLabelTextField; import static org.bitcoinj.wallet.Wallet.BalanceType.ESTIMATED_SPENDABLE; @FxmlView diff --git a/desktop/src/main/java/haveno/desktop/main/account/register/arbitrator/ArbitratorRegistrationView.java b/desktop/src/main/java/haveno/desktop/main/account/register/arbitrator/ArbitratorRegistrationView.java index f709311515..81aa0d88f1 100644 --- a/desktop/src/main/java/haveno/desktop/main/account/register/arbitrator/ArbitratorRegistrationView.java +++ b/desktop/src/main/java/haveno/desktop/main/account/register/arbitrator/ArbitratorRegistrationView.java @@ -18,14 +18,15 @@ package haveno.desktop.main.account.register.arbitrator; -import com.google.inject.Inject; -import com.google.inject.name.Named; import haveno.common.config.Config; import haveno.core.locale.Res; import haveno.core.support.dispute.arbitration.arbitrator.Arbitrator; import haveno.desktop.common.view.FxmlView; import haveno.desktop.main.account.register.AgentRegistrationView; +import javax.inject.Inject; +import javax.inject.Named; + @FxmlView public class ArbitratorRegistrationView extends AgentRegistrationView { diff --git a/desktop/src/main/java/haveno/desktop/main/account/register/mediator/MediatorRegistrationView.java b/desktop/src/main/java/haveno/desktop/main/account/register/mediator/MediatorRegistrationView.java index c99890cbf0..0cfa2524cf 100644 --- a/desktop/src/main/java/haveno/desktop/main/account/register/mediator/MediatorRegistrationView.java +++ b/desktop/src/main/java/haveno/desktop/main/account/register/mediator/MediatorRegistrationView.java @@ -18,14 +18,15 @@ package haveno.desktop.main.account.register.mediator; -import com.google.inject.Inject; -import com.google.inject.name.Named; import haveno.common.config.Config; import haveno.core.locale.Res; import haveno.core.support.dispute.mediation.mediator.Mediator; import haveno.desktop.common.view.FxmlView; import haveno.desktop.main.account.register.AgentRegistrationView; +import javax.inject.Inject; +import javax.inject.Named; + @FxmlView public class MediatorRegistrationView extends AgentRegistrationView { diff --git a/desktop/src/main/java/haveno/desktop/main/account/register/refundagent/RefundAgentRegistrationView.java b/desktop/src/main/java/haveno/desktop/main/account/register/refundagent/RefundAgentRegistrationView.java index ea9b3aa0b6..1f1ff3512a 100644 --- a/desktop/src/main/java/haveno/desktop/main/account/register/refundagent/RefundAgentRegistrationView.java +++ b/desktop/src/main/java/haveno/desktop/main/account/register/refundagent/RefundAgentRegistrationView.java @@ -18,14 +18,15 @@ package haveno.desktop.main.account.register.refundagent; -import com.google.inject.Inject; -import com.google.inject.name.Named; import haveno.common.config.Config; import haveno.core.locale.Res; import haveno.core.support.dispute.refund.refundagent.RefundAgent; import haveno.desktop.common.view.FxmlView; import haveno.desktop.main.account.register.AgentRegistrationView; +import javax.inject.Inject; +import javax.inject.Named; + @FxmlView public class RefundAgentRegistrationView extends AgentRegistrationView { diff --git a/desktop/src/main/java/haveno/desktop/main/account/register/signing/SigningView.java b/desktop/src/main/java/haveno/desktop/main/account/register/signing/SigningView.java index f83e04ac09..ec611af0a3 100644 --- a/desktop/src/main/java/haveno/desktop/main/account/register/signing/SigningView.java +++ b/desktop/src/main/java/haveno/desktop/main/account/register/signing/SigningView.java @@ -18,7 +18,6 @@ package haveno.desktop.main.account.register.signing; -import com.google.inject.Inject; import haveno.common.util.Utilities; import haveno.desktop.common.view.ActivatableView; import haveno.desktop.common.view.FxmlView; @@ -31,6 +30,8 @@ import javafx.scene.input.KeyCode; import javafx.scene.input.KeyEvent; import javafx.scene.layout.AnchorPane; +import javax.inject.Inject; + @FxmlView public class SigningView extends ActivatableView { diff --git a/desktop/src/main/java/haveno/desktop/main/debug/DebugView.java b/desktop/src/main/java/haveno/desktop/main/debug/DebugView.java index 2e79c8faae..40532baf16 100644 --- a/desktop/src/main/java/haveno/desktop/main/debug/DebugView.java +++ b/desktop/src/main/java/haveno/desktop/main/debug/DebugView.java @@ -17,7 +17,6 @@ package haveno.desktop.main.debug; -import com.google.inject.Inject; import haveno.common.taskrunner.Task; import haveno.common.util.Tuple2; import haveno.core.offer.availability.tasks.ProcessOfferAvailabilityResponse; @@ -41,8 +40,6 @@ import haveno.core.trade.protocol.tasks.VerifyPeersAccountAgeWitness; import haveno.desktop.common.view.FxmlView; import haveno.desktop.common.view.InitializableView; import haveno.desktop.components.TitledGroupBg; -import static haveno.desktop.util.FormBuilder.addTopLabelComboBox; -import java.util.Arrays; import javafx.collections.FXCollections; import javafx.collections.ObservableList; import javafx.fxml.FXML; @@ -51,6 +48,11 @@ import javafx.scene.control.Label; import javafx.scene.layout.GridPane; import javafx.util.StringConverter; +import javax.inject.Inject; +import java.util.Arrays; + +import static haveno.desktop.util.FormBuilder.addTopLabelComboBox; + // Not maintained anymore with new trade protocol, but leave it...If used needs to be adopted to current protocol. @FxmlView public class DebugView extends InitializableView { diff --git a/desktop/src/main/java/haveno/desktop/main/funds/FundsView.java b/desktop/src/main/java/haveno/desktop/main/funds/FundsView.java index d7599c4aaa..988660bb97 100644 --- a/desktop/src/main/java/haveno/desktop/main/funds/FundsView.java +++ b/desktop/src/main/java/haveno/desktop/main/funds/FundsView.java @@ -17,7 +17,6 @@ package haveno.desktop.main.funds; -import com.google.inject.Inject; import haveno.core.locale.Res; import haveno.desktop.Navigation; import haveno.desktop.common.view.ActivatableView; @@ -34,6 +33,8 @@ import javafx.fxml.FXML; import javafx.scene.control.Tab; import javafx.scene.control.TabPane; +import javax.inject.Inject; + @FxmlView public class FundsView extends ActivatableView { diff --git a/desktop/src/main/java/haveno/desktop/main/funds/deposit/DepositView.java b/desktop/src/main/java/haveno/desktop/main/funds/deposit/DepositView.java index cfdb2dd065..7bc3f900bd 100644 --- a/desktop/src/main/java/haveno/desktop/main/funds/deposit/DepositView.java +++ b/desktop/src/main/java/haveno/desktop/main/funds/deposit/DepositView.java @@ -17,8 +17,6 @@ package haveno.desktop.main.funds.deposit; -import com.google.inject.Inject; -import com.google.inject.name.Named; import haveno.common.UserThread; import haveno.common.app.DevEnv; import haveno.common.util.Tuple3; @@ -41,17 +39,8 @@ import haveno.desktop.components.InputTextField; import haveno.desktop.components.TitledGroupBg; import haveno.desktop.main.overlays.popups.Popup; import haveno.desktop.main.overlays.windows.QRCodeWindow; -import static haveno.desktop.util.FormBuilder.addAddressTextField; -import static haveno.desktop.util.FormBuilder.addButtonCheckBoxWithBox; -import static haveno.desktop.util.FormBuilder.addInputTextField; -import static haveno.desktop.util.FormBuilder.addTitledGroupBg; import haveno.desktop.util.GUIUtil; import haveno.desktop.util.Layout; -import java.io.ByteArrayInputStream; -import java.math.BigInteger; -import java.util.Comparator; -import java.util.List; -import java.util.concurrent.TimeUnit; import javafx.beans.property.ReadOnlyObjectWrapper; import javafx.beans.value.ChangeListener; import javafx.collections.FXCollections; @@ -81,6 +70,19 @@ import org.fxmisc.easybind.EasyBind; import org.fxmisc.easybind.Subscription; import org.jetbrains.annotations.NotNull; +import javax.inject.Inject; +import javax.inject.Named; +import java.io.ByteArrayInputStream; +import java.math.BigInteger; +import java.util.Comparator; +import java.util.List; +import java.util.concurrent.TimeUnit; + +import static haveno.desktop.util.FormBuilder.addAddressTextField; +import static haveno.desktop.util.FormBuilder.addButtonCheckBoxWithBox; +import static haveno.desktop.util.FormBuilder.addInputTextField; +import static haveno.desktop.util.FormBuilder.addTitledGroupBg; + @FxmlView public class DepositView extends ActivatableView { diff --git a/desktop/src/main/java/haveno/desktop/main/funds/locked/LockedView.java b/desktop/src/main/java/haveno/desktop/main/funds/locked/LockedView.java index 7311e897b8..0b45de8867 100644 --- a/desktop/src/main/java/haveno/desktop/main/funds/locked/LockedView.java +++ b/desktop/src/main/java/haveno/desktop/main/funds/locked/LockedView.java @@ -17,8 +17,6 @@ package haveno.desktop.main.funds.locked; -import com.google.inject.Inject; -import com.google.inject.name.Named; import com.googlecode.jcsv.writer.CSVEntryConverter; import de.jensd.fx.fontawesome.AwesomeIcon; import haveno.core.locale.Res; @@ -42,11 +40,6 @@ import haveno.desktop.components.HyperlinkWithIcon; import haveno.desktop.main.overlays.windows.OfferDetailsWindow; import haveno.desktop.main.overlays.windows.TradeDetailsWindow; import haveno.desktop.util.GUIUtil; -import java.util.Comparator; -import java.util.Date; -import java.util.Objects; -import java.util.Optional; -import java.util.stream.Collectors; import javafx.beans.property.ReadOnlyObjectWrapper; import javafx.collections.FXCollections; import javafx.collections.ListChangeListener; @@ -68,6 +61,14 @@ import javafx.util.Callback; import org.bitcoinj.core.Coin; import org.bitcoinj.core.Transaction; +import javax.inject.Inject; +import javax.inject.Named; +import java.util.Comparator; +import java.util.Date; +import java.util.Objects; +import java.util.Optional; +import java.util.stream.Collectors; + @FxmlView public class LockedView extends ActivatableView { @FXML diff --git a/desktop/src/main/java/haveno/desktop/main/funds/reserved/ReservedView.java b/desktop/src/main/java/haveno/desktop/main/funds/reserved/ReservedView.java index bac2d986de..83b7f83162 100644 --- a/desktop/src/main/java/haveno/desktop/main/funds/reserved/ReservedView.java +++ b/desktop/src/main/java/haveno/desktop/main/funds/reserved/ReservedView.java @@ -17,8 +17,6 @@ package haveno.desktop.main.funds.reserved; -import com.google.inject.Inject; -import com.google.inject.name.Named; import com.googlecode.jcsv.writer.CSVEntryConverter; import de.jensd.fx.fontawesome.AwesomeIcon; import haveno.core.locale.Res; @@ -42,11 +40,6 @@ import haveno.desktop.components.HyperlinkWithIcon; import haveno.desktop.main.overlays.windows.OfferDetailsWindow; import haveno.desktop.main.overlays.windows.TradeDetailsWindow; import haveno.desktop.util.GUIUtil; -import java.util.Comparator; -import java.util.Date; -import java.util.Objects; -import java.util.Optional; -import java.util.stream.Collectors; import javafx.beans.property.ReadOnlyObjectWrapper; import javafx.collections.FXCollections; import javafx.collections.ListChangeListener; @@ -68,6 +61,14 @@ import javafx.util.Callback; import org.bitcoinj.core.Coin; import org.bitcoinj.core.Transaction; +import javax.inject.Inject; +import javax.inject.Named; +import java.util.Comparator; +import java.util.Date; +import java.util.Objects; +import java.util.Optional; +import java.util.stream.Collectors; + @FxmlView public class ReservedView extends ActivatableView { @FXML diff --git a/desktop/src/main/java/haveno/desktop/main/funds/transactions/DisplayedTransactionsFactory.java b/desktop/src/main/java/haveno/desktop/main/funds/transactions/DisplayedTransactionsFactory.java index 69ec01d098..77b58b7430 100644 --- a/desktop/src/main/java/haveno/desktop/main/funds/transactions/DisplayedTransactionsFactory.java +++ b/desktop/src/main/java/haveno/desktop/main/funds/transactions/DisplayedTransactionsFactory.java @@ -17,10 +17,11 @@ package haveno.desktop.main.funds.transactions; -import com.google.inject.Inject; -import com.google.inject.Singleton; import haveno.core.xmr.wallet.XmrWalletService; +import javax.inject.Inject; +import javax.inject.Singleton; + @Singleton public class DisplayedTransactionsFactory { private final XmrWalletService xmrWalletService; diff --git a/desktop/src/main/java/haveno/desktop/main/funds/transactions/TradableRepository.java b/desktop/src/main/java/haveno/desktop/main/funds/transactions/TradableRepository.java index 24c6bae846..871c0271cb 100644 --- a/desktop/src/main/java/haveno/desktop/main/funds/transactions/TradableRepository.java +++ b/desktop/src/main/java/haveno/desktop/main/funds/transactions/TradableRepository.java @@ -18,13 +18,14 @@ package haveno.desktop.main.funds.transactions; import com.google.common.collect.ImmutableSet; -import com.google.inject.Inject; -import com.google.inject.Singleton; import haveno.core.offer.OpenOfferManager; import haveno.core.trade.ClosedTradableManager; import haveno.core.trade.Tradable; import haveno.core.trade.TradeManager; import haveno.core.trade.failed.FailedTradesManager; + +import javax.inject.Inject; +import javax.inject.Singleton; import java.util.Set; @Singleton diff --git a/desktop/src/main/java/haveno/desktop/main/funds/transactions/TransactionAwareTradableFactory.java b/desktop/src/main/java/haveno/desktop/main/funds/transactions/TransactionAwareTradableFactory.java index 661a8aa036..5f6334c1b9 100644 --- a/desktop/src/main/java/haveno/desktop/main/funds/transactions/TransactionAwareTradableFactory.java +++ b/desktop/src/main/java/haveno/desktop/main/funds/transactions/TransactionAwareTradableFactory.java @@ -17,8 +17,6 @@ package haveno.desktop.main.funds.transactions; -import com.google.inject.Inject; -import com.google.inject.Singleton; import haveno.common.crypto.PubKeyRingProvider; import haveno.core.offer.OpenOffer; import haveno.core.support.dispute.arbitration.ArbitrationManager; @@ -27,6 +25,9 @@ import haveno.core.trade.Tradable; import haveno.core.trade.Trade; import haveno.core.xmr.wallet.XmrWalletService; +import javax.inject.Inject; +import javax.inject.Singleton; + @Singleton public class TransactionAwareTradableFactory { diff --git a/desktop/src/main/java/haveno/desktop/main/funds/transactions/TransactionListItemFactory.java b/desktop/src/main/java/haveno/desktop/main/funds/transactions/TransactionListItemFactory.java index 9d7a39f1a5..6bd896acd9 100644 --- a/desktop/src/main/java/haveno/desktop/main/funds/transactions/TransactionListItemFactory.java +++ b/desktop/src/main/java/haveno/desktop/main/funds/transactions/TransactionListItemFactory.java @@ -17,16 +17,17 @@ package haveno.desktop.main.funds.transactions; -import com.google.inject.Inject; -import com.google.inject.Singleton; -import com.google.inject.name.Named; import haveno.core.user.Preferences; import haveno.core.util.FormattingUtils; import haveno.core.util.coin.CoinFormatter; import haveno.core.xmr.wallet.XmrWalletService; -import javax.annotation.Nullable; import monero.wallet.model.MoneroTxWallet; +import javax.annotation.Nullable; +import javax.inject.Inject; +import javax.inject.Named; +import javax.inject.Singleton; + @Singleton public class TransactionListItemFactory { diff --git a/desktop/src/main/java/haveno/desktop/main/funds/transactions/TransactionsView.java b/desktop/src/main/java/haveno/desktop/main/funds/transactions/TransactionsView.java index 5c8209fafb..7beed5d385 100644 --- a/desktop/src/main/java/haveno/desktop/main/funds/transactions/TransactionsView.java +++ b/desktop/src/main/java/haveno/desktop/main/funds/transactions/TransactionsView.java @@ -17,7 +17,6 @@ package haveno.desktop.main.funds.transactions; -import com.google.inject.Inject; import com.googlecode.jcsv.writer.CSVEntryConverter; import de.jensd.fx.fontawesome.AwesomeIcon; import haveno.common.util.Utilities; @@ -38,8 +37,6 @@ import haveno.desktop.main.overlays.windows.OfferDetailsWindow; import haveno.desktop.main.overlays.windows.TradeDetailsWindow; import haveno.desktop.util.GUIUtil; import haveno.network.p2p.P2PService; -import java.math.BigInteger; -import java.util.Comparator; import javafx.beans.property.ReadOnlyObjectWrapper; import javafx.collections.ObservableList; import javafx.collections.transformation.SortedList; @@ -63,6 +60,10 @@ import javafx.stage.Stage; import javafx.util.Callback; import monero.wallet.model.MoneroWalletListener; +import javax.inject.Inject; +import java.math.BigInteger; +import java.util.Comparator; + @FxmlView public class TransactionsView extends ActivatableView { diff --git a/desktop/src/main/java/haveno/desktop/main/funds/withdrawal/WithdrawalView.java b/desktop/src/main/java/haveno/desktop/main/funds/withdrawal/WithdrawalView.java index 5fbe8ee4b5..ce58884d71 100644 --- a/desktop/src/main/java/haveno/desktop/main/funds/withdrawal/WithdrawalView.java +++ b/desktop/src/main/java/haveno/desktop/main/funds/withdrawal/WithdrawalView.java @@ -17,7 +17,6 @@ package haveno.desktop.main.funds.withdrawal; -import com.google.inject.Inject; import haveno.common.util.Tuple2; import haveno.core.locale.Res; import haveno.core.trade.HavenoUtils; @@ -36,15 +35,9 @@ import haveno.desktop.components.TitledGroupBg; import haveno.desktop.main.overlays.popups.Popup; import haveno.desktop.main.overlays.windows.TxDetails; import haveno.desktop.main.overlays.windows.WalletPasswordWindow; -import static haveno.desktop.util.FormBuilder.addButton; -import static haveno.desktop.util.FormBuilder.addTitledGroupBg; -import static haveno.desktop.util.FormBuilder.addTopLabelInputTextField; import haveno.desktop.util.GUIUtil; import haveno.desktop.util.Layout; import haveno.network.p2p.P2PService; -import java.math.BigInteger; -import java.util.ArrayList; -import java.util.List; import javafx.beans.value.ChangeListener; import javafx.fxml.FXML; import javafx.scene.control.Button; @@ -55,6 +48,15 @@ import javafx.scene.layout.VBox; import monero.wallet.model.MoneroTxConfig; import monero.wallet.model.MoneroTxWallet; +import javax.inject.Inject; +import java.math.BigInteger; +import java.util.ArrayList; +import java.util.List; + +import static haveno.desktop.util.FormBuilder.addButton; +import static haveno.desktop.util.FormBuilder.addTitledGroupBg; +import static haveno.desktop.util.FormBuilder.addTopLabelInputTextField; + @FxmlView public class WithdrawalView extends ActivatableView { diff --git a/desktop/src/main/java/haveno/desktop/main/market/MarketView.java b/desktop/src/main/java/haveno/desktop/main/market/MarketView.java index efd4f519bf..c50bc16f63 100644 --- a/desktop/src/main/java/haveno/desktop/main/market/MarketView.java +++ b/desktop/src/main/java/haveno/desktop/main/market/MarketView.java @@ -18,8 +18,6 @@ package haveno.desktop.main.market; import com.google.common.base.Joiner; -import com.google.inject.Inject; -import com.google.inject.name.Named; import haveno.common.util.Utilities; import haveno.core.locale.CurrencyUtil; import haveno.core.locale.Res; @@ -45,8 +43,6 @@ import haveno.desktop.main.offer.offerbook.OfferBook; import haveno.desktop.main.offer.offerbook.OfferBookListItem; import haveno.desktop.main.overlays.popups.Popup; import haveno.desktop.util.DisplayUtils; -import java.util.List; -import java.util.stream.Collectors; import javafx.beans.value.ChangeListener; import javafx.event.EventHandler; import javafx.fxml.FXML; @@ -58,6 +54,11 @@ import javafx.scene.input.KeyCode; import javafx.scene.input.KeyEvent; import org.apache.commons.lang3.StringUtils; +import javax.inject.Inject; +import javax.inject.Named; +import java.util.List; +import java.util.stream.Collectors; + @FxmlView public class MarketView extends ActivatableView { @FXML diff --git a/desktop/src/main/java/haveno/desktop/main/market/offerbook/OfferBookChartView.java b/desktop/src/main/java/haveno/desktop/main/market/offerbook/OfferBookChartView.java index 5773cea3b3..134fddf50c 100644 --- a/desktop/src/main/java/haveno/desktop/main/market/offerbook/OfferBookChartView.java +++ b/desktop/src/main/java/haveno/desktop/main/market/offerbook/OfferBookChartView.java @@ -17,8 +17,6 @@ package haveno.desktop.main.market.offerbook; -import com.google.inject.Inject; -import com.google.inject.name.Named; import com.jfoenix.controls.JFXTabPane; import haveno.common.UserThread; import haveno.common.config.Config; @@ -42,15 +40,8 @@ import haveno.desktop.components.PeerInfoIconSmall; import haveno.desktop.main.offer.offerbook.OfferBookListItem; import haveno.desktop.util.CurrencyListItem; import haveno.desktop.util.DisplayUtils; -import static haveno.desktop.util.FormBuilder.addTopLabelAutocompleteComboBox; import haveno.desktop.util.GUIUtil; -import static haveno.desktop.util.Layout.INITIAL_WINDOW_HEIGHT; import haveno.network.p2p.NodeAddress; -import java.text.DecimalFormat; -import java.util.List; -import java.util.concurrent.TimeUnit; -import java.util.function.Function; -import java.util.stream.Collectors; import javafx.beans.property.ReadOnlyObjectWrapper; import javafx.beans.property.SimpleStringProperty; import javafx.beans.property.StringProperty; @@ -82,6 +73,17 @@ import javafx.util.StringConverter; import org.fxmisc.easybind.EasyBind; import org.fxmisc.easybind.Subscription; +import javax.inject.Inject; +import javax.inject.Named; +import java.text.DecimalFormat; +import java.util.List; +import java.util.concurrent.TimeUnit; +import java.util.function.Function; +import java.util.stream.Collectors; + +import static haveno.desktop.util.FormBuilder.addTopLabelAutocompleteComboBox; +import static haveno.desktop.util.Layout.INITIAL_WINDOW_HEIGHT; + @FxmlView public class OfferBookChartView extends ActivatableViewAndModel { private final boolean useDevPrivilegeKeys; diff --git a/desktop/src/main/java/haveno/desktop/main/market/spread/SpreadView.java b/desktop/src/main/java/haveno/desktop/main/market/spread/SpreadView.java index ab2a006c9b..7a680a68c2 100644 --- a/desktop/src/main/java/haveno/desktop/main/market/spread/SpreadView.java +++ b/desktop/src/main/java/haveno/desktop/main/market/spread/SpreadView.java @@ -17,8 +17,6 @@ package haveno.desktop.main.market.spread; -import com.google.inject.Inject; -import com.google.inject.name.Named; import haveno.common.UserThread; import haveno.core.locale.CurrencyUtil; import haveno.core.locale.Res; @@ -31,8 +29,6 @@ import haveno.desktop.components.AutoTooltipLabel; import haveno.desktop.components.AutoTooltipTableColumn; import haveno.desktop.components.ColoredDecimalPlacesWithZerosText; import haveno.desktop.util.GUIUtil; -import java.math.BigInteger; -import java.util.Comparator; import javafx.beans.property.ReadOnlyObjectWrapper; import javafx.collections.ListChangeListener; import javafx.collections.transformation.SortedList; @@ -44,6 +40,11 @@ import javafx.scene.layout.GridPane; import javafx.scene.layout.Priority; import javafx.util.Callback; +import javax.inject.Inject; +import javax.inject.Named; +import java.math.BigInteger; +import java.util.Comparator; + @FxmlView public class SpreadView extends ActivatableViewAndModel { private final CoinFormatter formatter; diff --git a/desktop/src/main/java/haveno/desktop/main/market/spread/SpreadViewModel.java b/desktop/src/main/java/haveno/desktop/main/market/spread/SpreadViewModel.java index 3c8911929f..3529cb94c4 100644 --- a/desktop/src/main/java/haveno/desktop/main/market/spread/SpreadViewModel.java +++ b/desktop/src/main/java/haveno/desktop/main/market/spread/SpreadViewModel.java @@ -18,7 +18,6 @@ package haveno.desktop.main.market.spread; import com.google.inject.Inject; -import com.google.inject.name.Named; import haveno.common.UserThread; import haveno.core.locale.Res; import haveno.core.monetary.CryptoMoney; @@ -36,6 +35,15 @@ import haveno.desktop.main.offer.offerbook.OfferBook; import haveno.desktop.main.offer.offerbook.OfferBookListItem; import haveno.desktop.main.overlays.popups.Popup; import haveno.desktop.util.GUIUtil; +import javafx.beans.property.IntegerProperty; +import javafx.beans.property.SimpleIntegerProperty; +import javafx.collections.FXCollections; +import javafx.collections.ListChangeListener; +import javafx.collections.ObservableList; +import lombok.Getter; +import lombok.Setter; + +import javax.inject.Named; import java.math.BigDecimal; import java.math.BigInteger; import java.math.RoundingMode; @@ -48,13 +56,6 @@ import java.util.concurrent.ConcurrentHashMap; import java.util.function.Function; import java.util.function.Predicate; import java.util.stream.Collectors; -import javafx.beans.property.IntegerProperty; -import javafx.beans.property.SimpleIntegerProperty; -import javafx.collections.FXCollections; -import javafx.collections.ListChangeListener; -import javafx.collections.ObservableList; -import lombok.Getter; -import lombok.Setter; class SpreadViewModel extends ActivatableViewModel { diff --git a/desktop/src/main/java/haveno/desktop/main/market/spread/SpreadViewPaymentMethod.java b/desktop/src/main/java/haveno/desktop/main/market/spread/SpreadViewPaymentMethod.java index aa0463baaf..7832ed7d60 100644 --- a/desktop/src/main/java/haveno/desktop/main/market/spread/SpreadViewPaymentMethod.java +++ b/desktop/src/main/java/haveno/desktop/main/market/spread/SpreadViewPaymentMethod.java @@ -17,15 +17,17 @@ package haveno.desktop.main.market.spread; -import com.google.inject.Inject; -import com.google.inject.name.Named; import haveno.core.locale.Res; import haveno.core.util.FormattingUtils; import haveno.core.util.coin.CoinFormatter; import haveno.desktop.common.view.FxmlView; -import static haveno.desktop.util.FormBuilder.addSlideToggleButton; import javafx.scene.control.ToggleButton; +import javax.inject.Inject; +import javax.inject.Named; + +import static haveno.desktop.util.FormBuilder.addSlideToggleButton; + @FxmlView public class SpreadViewPaymentMethod extends SpreadView { private ToggleButton expandedMode; diff --git a/desktop/src/main/java/haveno/desktop/main/market/trades/TradesChartsView.java b/desktop/src/main/java/haveno/desktop/main/market/trades/TradesChartsView.java index 484a2b0757..4553380ee1 100644 --- a/desktop/src/main/java/haveno/desktop/main/market/trades/TradesChartsView.java +++ b/desktop/src/main/java/haveno/desktop/main/market/trades/TradesChartsView.java @@ -17,8 +17,6 @@ package haveno.desktop.main.market.trades; -import com.google.inject.Inject; -import com.google.inject.name.Named; import com.googlecode.jcsv.writer.CSVEntryConverter; import com.jfoenix.controls.JFXTabPane; import haveno.common.UserThread; @@ -43,20 +41,11 @@ import haveno.desktop.components.AutoTooltipTableColumn; import haveno.desktop.components.AutoTooltipToggleButton; import haveno.desktop.components.AutocompleteComboBox; import haveno.desktop.components.ColoredDecimalPlacesWithZerosText; -import static haveno.desktop.main.market.trades.TradesChartsViewModel.MAX_TICKS; import haveno.desktop.main.market.trades.charts.price.CandleStickChart; import haveno.desktop.main.market.trades.charts.volume.VolumeChart; import haveno.desktop.util.CurrencyListItem; import haveno.desktop.util.DisplayUtils; -import static haveno.desktop.util.FormBuilder.addTopLabelAutocompleteComboBox; -import static haveno.desktop.util.FormBuilder.getTopLabelWithVBox; import haveno.desktop.util.GUIUtil; -import java.text.DecimalFormat; -import java.util.Comparator; -import java.util.Date; -import java.util.List; -import java.util.concurrent.CompletableFuture; -import java.util.stream.Collectors; import javafx.beans.property.ReadOnlyObjectWrapper; import javafx.beans.property.SimpleStringProperty; import javafx.beans.property.StringProperty; @@ -95,6 +84,19 @@ import org.fxmisc.easybind.Subscription; import org.fxmisc.easybind.monadic.MonadicBinding; import org.jetbrains.annotations.NotNull; +import javax.inject.Inject; +import javax.inject.Named; +import java.text.DecimalFormat; +import java.util.Comparator; +import java.util.Date; +import java.util.List; +import java.util.concurrent.CompletableFuture; +import java.util.stream.Collectors; + +import static haveno.desktop.main.market.trades.TradesChartsViewModel.MAX_TICKS; +import static haveno.desktop.util.FormBuilder.addTopLabelAutocompleteComboBox; +import static haveno.desktop.util.FormBuilder.getTopLabelWithVBox; + @FxmlView public class TradesChartsView extends ActivatableViewAndModel { private static final int SHOW_ALL = 0; diff --git a/desktop/src/main/java/haveno/desktop/main/offer/BuyOfferView.java b/desktop/src/main/java/haveno/desktop/main/offer/BuyOfferView.java index 59f0399394..5ae1de3268 100644 --- a/desktop/src/main/java/haveno/desktop/main/offer/BuyOfferView.java +++ b/desktop/src/main/java/haveno/desktop/main/offer/BuyOfferView.java @@ -17,7 +17,6 @@ package haveno.desktop.main.offer; -import com.google.inject.Inject; import haveno.core.offer.OfferDirection; import haveno.core.user.Preferences; import haveno.core.user.User; @@ -26,6 +25,8 @@ import haveno.desktop.common.view.FxmlView; import haveno.desktop.common.view.ViewLoader; import haveno.network.p2p.P2PService; +import javax.inject.Inject; + @FxmlView public class BuyOfferView extends OfferView { diff --git a/desktop/src/main/java/haveno/desktop/main/offer/MutableOfferDataModel.java b/desktop/src/main/java/haveno/desktop/main/offer/MutableOfferDataModel.java index 825b3db5cb..bc758b6e01 100644 --- a/desktop/src/main/java/haveno/desktop/main/offer/MutableOfferDataModel.java +++ b/desktop/src/main/java/haveno/desktop/main/offer/MutableOfferDataModel.java @@ -17,9 +17,7 @@ package haveno.desktop.main.offer; -import static com.google.common.base.Preconditions.checkNotNull; import com.google.inject.Inject; -import com.google.inject.name.Named; import haveno.common.handlers.ErrorMessageHandler; import haveno.common.util.MathUtils; import haveno.common.util.Utilities; @@ -54,16 +52,6 @@ import haveno.desktop.Navigation; import haveno.desktop.util.DisplayUtils; import haveno.desktop.util.GUIUtil; import haveno.network.p2p.P2PService; -import java.math.BigInteger; -import java.util.Comparator; -import static java.util.Comparator.comparing; -import java.util.Date; -import java.util.HashSet; -import java.util.Objects; -import java.util.Optional; -import java.util.Set; -import java.util.function.Predicate; -import java.util.stream.Collectors; import javafx.beans.property.BooleanProperty; import javafx.beans.property.DoubleProperty; import javafx.beans.property.ObjectProperty; @@ -82,6 +70,20 @@ import javafx.collections.SetChangeListener; import lombok.Getter; import org.jetbrains.annotations.NotNull; +import javax.inject.Named; +import java.math.BigInteger; +import java.util.Comparator; +import java.util.Date; +import java.util.HashSet; +import java.util.Objects; +import java.util.Optional; +import java.util.Set; +import java.util.function.Predicate; +import java.util.stream.Collectors; + +import static com.google.common.base.Preconditions.checkNotNull; +import static java.util.Comparator.comparing; + public abstract class MutableOfferDataModel extends OfferDataModel { private final CreateOfferService createOfferService; protected final OpenOfferManager openOfferManager; diff --git a/desktop/src/main/java/haveno/desktop/main/offer/MutableOfferViewModel.java b/desktop/src/main/java/haveno/desktop/main/offer/MutableOfferViewModel.java index 8809c4d3aa..8a0b01e1b9 100644 --- a/desktop/src/main/java/haveno/desktop/main/offer/MutableOfferViewModel.java +++ b/desktop/src/main/java/haveno/desktop/main/offer/MutableOfferViewModel.java @@ -17,8 +17,6 @@ package haveno.desktop.main.offer; -import com.google.inject.Inject; -import com.google.inject.name.Named; import haveno.common.UserThread; import haveno.common.app.DevEnv; import haveno.common.util.MathUtils; @@ -49,10 +47,10 @@ import haveno.core.util.PriceUtil; import haveno.core.util.VolumeUtil; import haveno.core.util.coin.CoinFormatter; import haveno.core.util.coin.CoinUtil; +import haveno.core.util.validation.NonFiatPriceValidator; import haveno.core.util.validation.FiatPriceValidator; import haveno.core.util.validation.InputValidator; import haveno.core.util.validation.MonetaryValidator; -import haveno.core.util.validation.NonFiatPriceValidator; import haveno.core.xmr.wallet.Restrictions; import haveno.desktop.Navigation; import haveno.desktop.common.model.ActivatableWithDataModel; @@ -64,9 +62,6 @@ import haveno.desktop.main.settings.SettingsView; import haveno.desktop.main.settings.preferences.PreferencesView; import haveno.desktop.util.DisplayUtils; import haveno.desktop.util.GUIUtil; -import java.math.BigInteger; -import java.util.concurrent.TimeUnit; -import static javafx.beans.binding.Bindings.createStringBinding; import javafx.beans.property.BooleanProperty; import javafx.beans.property.IntegerProperty; import javafx.beans.property.ObjectProperty; @@ -83,6 +78,13 @@ import javafx.util.Callback; import lombok.extern.slf4j.Slf4j; import org.bitcoinj.core.Coin; +import javax.inject.Inject; +import javax.inject.Named; +import java.math.BigInteger; +import java.util.concurrent.TimeUnit; + +import static javafx.beans.binding.Bindings.createStringBinding; + @Slf4j public abstract class MutableOfferViewModel extends ActivatableWithDataModel { private final XmrValidator xmrValidator; diff --git a/desktop/src/main/java/haveno/desktop/main/offer/SellOfferView.java b/desktop/src/main/java/haveno/desktop/main/offer/SellOfferView.java index 22c33d2dab..144aee1cf8 100644 --- a/desktop/src/main/java/haveno/desktop/main/offer/SellOfferView.java +++ b/desktop/src/main/java/haveno/desktop/main/offer/SellOfferView.java @@ -17,7 +17,6 @@ package haveno.desktop.main.offer; -import com.google.inject.Inject; import haveno.core.offer.OfferDirection; import haveno.core.user.Preferences; import haveno.core.user.User; @@ -26,6 +25,8 @@ import haveno.desktop.common.view.FxmlView; import haveno.desktop.common.view.ViewLoader; import haveno.network.p2p.P2PService; +import javax.inject.Inject; + @FxmlView public class SellOfferView extends OfferView { diff --git a/desktop/src/main/java/haveno/desktop/main/offer/createoffer/CreateOfferDataModel.java b/desktop/src/main/java/haveno/desktop/main/offer/createoffer/CreateOfferDataModel.java index 81669db644..3e54df3355 100644 --- a/desktop/src/main/java/haveno/desktop/main/offer/createoffer/CreateOfferDataModel.java +++ b/desktop/src/main/java/haveno/desktop/main/offer/createoffer/CreateOfferDataModel.java @@ -18,7 +18,6 @@ package haveno.desktop.main.offer.createoffer; import com.google.inject.Inject; -import com.google.inject.name.Named; import haveno.core.account.witness.AccountAgeWitnessService; import haveno.core.offer.CreateOfferService; import haveno.core.offer.OfferUtil; @@ -34,6 +33,8 @@ import haveno.core.xmr.wallet.XmrWalletService; import haveno.desktop.Navigation; import haveno.desktop.main.offer.MutableOfferDataModel; import haveno.network.p2p.P2PService; + +import javax.inject.Named; import java.util.Objects; import java.util.Set; import java.util.stream.Collectors; diff --git a/desktop/src/main/java/haveno/desktop/main/offer/createoffer/CreateOfferView.java b/desktop/src/main/java/haveno/desktop/main/offer/createoffer/CreateOfferView.java index ffc9eab50c..6dace11d42 100644 --- a/desktop/src/main/java/haveno/desktop/main/offer/createoffer/CreateOfferView.java +++ b/desktop/src/main/java/haveno/desktop/main/offer/createoffer/CreateOfferView.java @@ -18,7 +18,6 @@ package haveno.desktop.main.offer.createoffer; import com.google.inject.Inject; -import com.google.inject.name.Named; import haveno.core.locale.CurrencyUtil; import haveno.core.locale.TradeCurrency; import haveno.core.offer.OfferDirection; @@ -32,11 +31,13 @@ import haveno.desktop.main.offer.MutableOfferView; import haveno.desktop.main.offer.OfferView; import haveno.desktop.main.overlays.windows.OfferDetailsWindow; import haveno.desktop.util.GUIUtil; -import java.util.Objects; -import java.util.stream.Collectors; import javafx.collections.FXCollections; import javafx.collections.ObservableList; +import javax.inject.Named; +import java.util.Objects; +import java.util.stream.Collectors; + @FxmlView public class CreateOfferView extends MutableOfferView { diff --git a/desktop/src/main/java/haveno/desktop/main/offer/createoffer/CreateOfferViewModel.java b/desktop/src/main/java/haveno/desktop/main/offer/createoffer/CreateOfferViewModel.java index 1a6936d3a7..00b9d678ff 100644 --- a/desktop/src/main/java/haveno/desktop/main/offer/createoffer/CreateOfferViewModel.java +++ b/desktop/src/main/java/haveno/desktop/main/offer/createoffer/CreateOfferViewModel.java @@ -18,7 +18,6 @@ package haveno.desktop.main.offer.createoffer; import com.google.inject.Inject; -import com.google.inject.name.Named; import haveno.core.account.witness.AccountAgeWitnessService; import haveno.core.offer.OfferUtil; import haveno.core.payment.validation.FiatVolumeValidator; @@ -28,12 +27,14 @@ import haveno.core.provider.price.PriceFeedService; import haveno.core.user.Preferences; import haveno.core.util.FormattingUtils; import haveno.core.util.coin.CoinFormatter; -import haveno.core.util.validation.FiatPriceValidator; import haveno.core.util.validation.NonFiatPriceValidator; +import haveno.core.util.validation.FiatPriceValidator; import haveno.desktop.Navigation; import haveno.desktop.common.model.ViewModel; import haveno.desktop.main.offer.MutableOfferViewModel; +import javax.inject.Named; + class CreateOfferViewModel extends MutableOfferViewModel implements ViewModel { @Inject diff --git a/desktop/src/main/java/haveno/desktop/main/offer/offerbook/OfferBook.java b/desktop/src/main/java/haveno/desktop/main/offer/offerbook/OfferBook.java index 72183c9bae..a058939a51 100644 --- a/desktop/src/main/java/haveno/desktop/main/offer/offerbook/OfferBook.java +++ b/desktop/src/main/java/haveno/desktop/main/offer/offerbook/OfferBook.java @@ -17,23 +17,25 @@ package haveno.desktop.main.offer.offerbook; -import com.google.inject.Inject; -import com.google.inject.Singleton; import haveno.core.filter.FilterManager; import haveno.core.offer.Offer; import haveno.core.offer.OfferBookService; -import static haveno.core.offer.OfferDirection.BUY; import haveno.core.offer.OfferRestrictions; import haveno.network.p2p.storage.P2PDataStorage; import haveno.network.utils.Utils; +import javafx.collections.FXCollections; +import javafx.collections.ObservableList; +import lombok.extern.slf4j.Slf4j; + +import javax.inject.Inject; +import javax.inject.Singleton; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Optional; import java.util.stream.Collectors; -import javafx.collections.FXCollections; -import javafx.collections.ObservableList; -import lombok.extern.slf4j.Slf4j; + +import static haveno.core.offer.OfferDirection.BUY; /** * Holds and manages the unsorted and unfiltered offerbook list (except for banned offers) of both buy and sell offers. diff --git a/desktop/src/main/java/haveno/desktop/main/offer/offerbook/OtherOfferBookView.java b/desktop/src/main/java/haveno/desktop/main/offer/offerbook/OtherOfferBookView.java index dbdab352a1..e6537cfd71 100644 --- a/desktop/src/main/java/haveno/desktop/main/offer/offerbook/OtherOfferBookView.java +++ b/desktop/src/main/java/haveno/desktop/main/offer/offerbook/OtherOfferBookView.java @@ -17,8 +17,6 @@ package haveno.desktop.main.offer.offerbook; -import com.google.inject.Inject; -import com.google.inject.name.Named; import haveno.common.config.Config; import haveno.core.account.sign.SignedWitnessService; import haveno.core.account.witness.AccountAgeWitnessService; @@ -32,6 +30,9 @@ import haveno.desktop.common.view.FxmlView; import haveno.desktop.main.overlays.windows.OfferDetailsWindow; import javafx.scene.layout.GridPane; +import javax.inject.Inject; +import javax.inject.Named; + @FxmlView public class OtherOfferBookView extends OfferBookView { diff --git a/desktop/src/main/java/haveno/desktop/main/offer/offerbook/OtherOfferBookViewModel.java b/desktop/src/main/java/haveno/desktop/main/offer/offerbook/OtherOfferBookViewModel.java index 071c340db2..c6fc412aa2 100644 --- a/desktop/src/main/java/haveno/desktop/main/offer/offerbook/OtherOfferBookViewModel.java +++ b/desktop/src/main/java/haveno/desktop/main/offer/offerbook/OtherOfferBookViewModel.java @@ -18,7 +18,6 @@ package haveno.desktop.main.offer.offerbook; import com.google.inject.Inject; -import com.google.inject.name.Named; import haveno.core.account.witness.AccountAgeWitnessService; import haveno.core.api.CoreApi; import haveno.core.locale.CryptoCurrency; @@ -43,13 +42,15 @@ import haveno.desktop.Navigation; import haveno.desktop.main.offer.OfferViewUtil; import haveno.desktop.util.GUIUtil; import haveno.network.p2p.P2PService; -import java.util.List; -import java.util.function.Predicate; -import java.util.stream.Collectors; import javafx.collections.FXCollections; import javafx.collections.ObservableList; import org.jetbrains.annotations.NotNull; +import javax.inject.Named; +import java.util.List; +import java.util.function.Predicate; +import java.util.stream.Collectors; + public class OtherOfferBookViewModel extends OfferBookViewModel { @Inject diff --git a/desktop/src/main/java/haveno/desktop/main/offer/offerbook/TopCryptoOfferBookView.java b/desktop/src/main/java/haveno/desktop/main/offer/offerbook/TopCryptoOfferBookView.java index f6f3ff2362..b04f04101d 100644 --- a/desktop/src/main/java/haveno/desktop/main/offer/offerbook/TopCryptoOfferBookView.java +++ b/desktop/src/main/java/haveno/desktop/main/offer/offerbook/TopCryptoOfferBookView.java @@ -17,8 +17,6 @@ package haveno.desktop.main.offer.offerbook; -import com.google.inject.Inject; -import com.google.inject.name.Named; import haveno.common.config.Config; import haveno.core.account.sign.SignedWitnessService; import haveno.core.account.witness.AccountAgeWitnessService; @@ -32,6 +30,9 @@ import haveno.desktop.common.view.FxmlView; import haveno.desktop.main.overlays.windows.OfferDetailsWindow; import javafx.scene.layout.GridPane; +import javax.inject.Inject; +import javax.inject.Named; + @FxmlView public class TopCryptoOfferBookView extends OfferBookView { diff --git a/desktop/src/main/java/haveno/desktop/main/offer/offerbook/TopCryptoOfferBookViewModel.java b/desktop/src/main/java/haveno/desktop/main/offer/offerbook/TopCryptoOfferBookViewModel.java index 14a7e07c01..8ce52b69ee 100644 --- a/desktop/src/main/java/haveno/desktop/main/offer/offerbook/TopCryptoOfferBookViewModel.java +++ b/desktop/src/main/java/haveno/desktop/main/offer/offerbook/TopCryptoOfferBookViewModel.java @@ -18,7 +18,6 @@ package haveno.desktop.main.offer.offerbook; import com.google.inject.Inject; -import com.google.inject.name.Named; import haveno.core.account.witness.AccountAgeWitnessService; import haveno.core.api.CoreApi; import haveno.core.locale.TradeCurrency; @@ -38,11 +37,13 @@ import haveno.core.xmr.setup.WalletsSetup; import haveno.desktop.Navigation; import haveno.desktop.util.GUIUtil; import haveno.network.p2p.P2PService; -import java.util.function.Predicate; -import java.util.stream.Collectors; import javafx.collections.FXCollections; import javafx.collections.ObservableList; +import javax.inject.Named; +import java.util.function.Predicate; +import java.util.stream.Collectors; + public class TopCryptoOfferBookViewModel extends OfferBookViewModel { public static TradeCurrency TOP_CRYPTO = GUIUtil.TOP_CRYPTO; diff --git a/desktop/src/main/java/haveno/desktop/main/offer/offerbook/XmrOfferBookView.java b/desktop/src/main/java/haveno/desktop/main/offer/offerbook/XmrOfferBookView.java index 61e2846bd9..697431d5d9 100644 --- a/desktop/src/main/java/haveno/desktop/main/offer/offerbook/XmrOfferBookView.java +++ b/desktop/src/main/java/haveno/desktop/main/offer/offerbook/XmrOfferBookView.java @@ -17,8 +17,6 @@ package haveno.desktop.main.offer.offerbook; -import com.google.inject.Inject; -import com.google.inject.name.Named; import haveno.common.config.Config; import haveno.core.account.sign.SignedWitnessService; import haveno.core.account.witness.AccountAgeWitnessService; @@ -32,6 +30,9 @@ import haveno.desktop.common.view.FxmlView; import haveno.desktop.main.overlays.windows.OfferDetailsWindow; import javafx.scene.layout.GridPane; +import javax.inject.Inject; +import javax.inject.Named; + @FxmlView public class XmrOfferBookView extends OfferBookView { diff --git a/desktop/src/main/java/haveno/desktop/main/offer/offerbook/XmrOfferBookViewModel.java b/desktop/src/main/java/haveno/desktop/main/offer/offerbook/XmrOfferBookViewModel.java index 5555c9308a..afa2a9d668 100644 --- a/desktop/src/main/java/haveno/desktop/main/offer/offerbook/XmrOfferBookViewModel.java +++ b/desktop/src/main/java/haveno/desktop/main/offer/offerbook/XmrOfferBookViewModel.java @@ -18,7 +18,6 @@ package haveno.desktop.main.offer.offerbook; import com.google.inject.Inject; -import com.google.inject.name.Named; import haveno.core.account.witness.AccountAgeWitnessService; import haveno.core.api.CoreApi; import haveno.core.locale.CryptoCurrency; @@ -43,11 +42,13 @@ import haveno.core.xmr.setup.WalletsSetup; import haveno.desktop.Navigation; import haveno.desktop.util.GUIUtil; import haveno.network.p2p.P2PService; +import javafx.collections.FXCollections; +import javafx.collections.ObservableList; + +import javax.inject.Named; import java.util.List; import java.util.function.Predicate; import java.util.stream.Collectors; -import javafx.collections.FXCollections; -import javafx.collections.ObservableList; public class XmrOfferBookViewModel extends OfferBookViewModel { diff --git a/desktop/src/main/java/haveno/desktop/main/offer/signedoffer/SignedOfferView.java b/desktop/src/main/java/haveno/desktop/main/offer/signedoffer/SignedOfferView.java index 1d3e750bd4..dfbde8df65 100644 --- a/desktop/src/main/java/haveno/desktop/main/offer/signedoffer/SignedOfferView.java +++ b/desktop/src/main/java/haveno/desktop/main/offer/signedoffer/SignedOfferView.java @@ -17,7 +17,38 @@ package haveno.desktop.main.offer.signedoffer; -import com.google.inject.Inject; +import javax.inject.Inject; + +import javafx.fxml.FXML; + +import javafx.scene.control.ContextMenu; +import javafx.scene.control.Label; +import javafx.scene.control.MenuItem; +import javafx.scene.control.TableCell; +import javafx.scene.control.TableColumn; +import javafx.scene.control.TableRow; +import javafx.scene.control.TableView; +import javafx.scene.control.Tooltip; +import javafx.scene.layout.HBox; +import javafx.scene.layout.Priority; +import javafx.scene.layout.Region; +import javafx.scene.layout.VBox; + +import javafx.geometry.Insets; + +import javafx.beans.property.ReadOnlyObjectWrapper; + +import javafx.collections.transformation.FilteredList; +import javafx.collections.transformation.SortedList; + +import javafx.util.Callback; +import javafx.util.Duration; + +import java.util.Comparator; +import java.util.Date; + + + import haveno.common.util.Utilities; import haveno.core.locale.Res; import haveno.core.offer.SignedOffer; @@ -34,27 +65,6 @@ import haveno.desktop.main.offer.OfferViewUtil; import haveno.desktop.main.overlays.popups.Popup; import haveno.desktop.util.DisplayUtils; import haveno.desktop.util.GUIUtil; -import java.util.Comparator; -import java.util.Date; -import javafx.beans.property.ReadOnlyObjectWrapper; -import javafx.collections.transformation.FilteredList; -import javafx.collections.transformation.SortedList; -import javafx.fxml.FXML; -import javafx.geometry.Insets; -import javafx.scene.control.ContextMenu; -import javafx.scene.control.Label; -import javafx.scene.control.MenuItem; -import javafx.scene.control.TableCell; -import javafx.scene.control.TableColumn; -import javafx.scene.control.TableRow; -import javafx.scene.control.TableView; -import javafx.scene.control.Tooltip; -import javafx.scene.layout.HBox; -import javafx.scene.layout.Priority; -import javafx.scene.layout.Region; -import javafx.scene.layout.VBox; -import javafx.util.Callback; -import javafx.util.Duration; @FxmlView public class SignedOfferView extends ActivatableViewAndModel { diff --git a/desktop/src/main/java/haveno/desktop/main/offer/takeoffer/TakeOfferView.java b/desktop/src/main/java/haveno/desktop/main/offer/takeoffer/TakeOfferView.java index 5bbf4f9206..db6c39d854 100644 --- a/desktop/src/main/java/haveno/desktop/main/offer/takeoffer/TakeOfferView.java +++ b/desktop/src/main/java/haveno/desktop/main/offer/takeoffer/TakeOfferView.java @@ -17,8 +17,6 @@ package haveno.desktop.main.offer.takeoffer; -import com.google.inject.Inject; -import com.google.inject.name.Named; import com.jfoenix.controls.JFXTextField; import de.jensd.fx.glyphs.materialdesignicons.MaterialDesignIcon; import haveno.common.UserThread; @@ -56,7 +54,6 @@ import haveno.desktop.main.offer.ClosableView; import haveno.desktop.main.offer.InitializableViewWithTakeOfferData; import haveno.desktop.main.offer.OfferView; import haveno.desktop.main.offer.OfferViewUtil; -import static haveno.desktop.main.offer.OfferViewUtil.addPayInfoEntry; import haveno.desktop.main.offer.SelectableView; import haveno.desktop.main.overlays.notifications.Notification; import haveno.desktop.main.overlays.popups.Popup; @@ -65,27 +62,9 @@ import haveno.desktop.main.overlays.windows.OfferDetailsWindow; import haveno.desktop.main.overlays.windows.QRCodeWindow; import haveno.desktop.main.portfolio.PortfolioView; import haveno.desktop.main.portfolio.pendingtrades.PendingTradesView; -import static haveno.desktop.util.FormBuilder.add2ButtonsWithBox; -import static haveno.desktop.util.FormBuilder.addAddressTextField; -import static haveno.desktop.util.FormBuilder.addBalanceTextField; -import static haveno.desktop.util.FormBuilder.addComboBoxTopLabelTextField; -import static haveno.desktop.util.FormBuilder.addFundsTextfield; -import static haveno.desktop.util.FormBuilder.addTitledGroupBg; -import static haveno.desktop.util.FormBuilder.getEditableValueBox; -import static haveno.desktop.util.FormBuilder.getIconForLabel; -import static haveno.desktop.util.FormBuilder.getNonEditableValueBox; -import static haveno.desktop.util.FormBuilder.getNonEditableValueBoxWithInfo; -import static haveno.desktop.util.FormBuilder.getSmallIconForLabel; -import static haveno.desktop.util.FormBuilder.getTopLabelWithVBox; import haveno.desktop.util.GUIUtil; import haveno.desktop.util.Layout; import haveno.desktop.util.Transitions; -import java.io.ByteArrayInputStream; -import java.math.BigInteger; -import java.net.URI; -import java.util.HashMap; -import java.util.concurrent.TimeUnit; -import static javafx.beans.binding.Bindings.createStringBinding; import javafx.beans.property.SimpleBooleanProperty; import javafx.beans.value.ChangeListener; import javafx.geometry.HPos; @@ -114,6 +93,29 @@ import org.fxmisc.easybind.EasyBind; import org.fxmisc.easybind.Subscription; import org.jetbrains.annotations.NotNull; +import javax.inject.Inject; +import javax.inject.Named; +import java.io.ByteArrayInputStream; +import java.math.BigInteger; +import java.net.URI; +import java.util.HashMap; +import java.util.concurrent.TimeUnit; + +import static haveno.desktop.main.offer.OfferViewUtil.addPayInfoEntry; +import static haveno.desktop.util.FormBuilder.add2ButtonsWithBox; +import static haveno.desktop.util.FormBuilder.addAddressTextField; +import static haveno.desktop.util.FormBuilder.addBalanceTextField; +import static haveno.desktop.util.FormBuilder.addComboBoxTopLabelTextField; +import static haveno.desktop.util.FormBuilder.addFundsTextfield; +import static haveno.desktop.util.FormBuilder.addTitledGroupBg; +import static haveno.desktop.util.FormBuilder.getEditableValueBox; +import static haveno.desktop.util.FormBuilder.getIconForLabel; +import static haveno.desktop.util.FormBuilder.getNonEditableValueBox; +import static haveno.desktop.util.FormBuilder.getNonEditableValueBoxWithInfo; +import static haveno.desktop.util.FormBuilder.getSmallIconForLabel; +import static haveno.desktop.util.FormBuilder.getTopLabelWithVBox; +import static javafx.beans.binding.Bindings.createStringBinding; + @FxmlView public class TakeOfferView extends ActivatableViewAndModel implements ClosableView, InitializableViewWithTakeOfferData, SelectableView { private final Navigation navigation; diff --git a/desktop/src/main/java/haveno/desktop/main/offer/takeoffer/TakeOfferViewModel.java b/desktop/src/main/java/haveno/desktop/main/offer/takeoffer/TakeOfferViewModel.java index eb8dfe1889..6063d4599c 100644 --- a/desktop/src/main/java/haveno/desktop/main/offer/takeoffer/TakeOfferViewModel.java +++ b/desktop/src/main/java/haveno/desktop/main/offer/takeoffer/TakeOfferViewModel.java @@ -17,9 +17,6 @@ package haveno.desktop.main.offer.takeoffer; -import static com.google.common.base.Preconditions.checkNotNull; -import com.google.inject.Inject; -import com.google.inject.name.Named; import haveno.common.UserThread; import haveno.core.account.witness.AccountAgeWitnessService; import haveno.core.locale.Res; @@ -53,8 +50,6 @@ import haveno.network.p2p.P2PService; import haveno.network.p2p.network.CloseConnectionReason; import haveno.network.p2p.network.Connection; import haveno.network.p2p.network.ConnectionListener; -import java.math.BigInteger; -import static javafx.beans.binding.Bindings.createStringBinding; import javafx.beans.property.BooleanProperty; import javafx.beans.property.ObjectProperty; import javafx.beans.property.SimpleBooleanProperty; @@ -67,7 +62,14 @@ import javafx.scene.control.ComboBox; import javafx.scene.control.ListCell; import javafx.scene.control.ListView; import javafx.util.Callback; + import javax.annotation.Nullable; +import javax.inject.Inject; +import javax.inject.Named; +import java.math.BigInteger; + +import static com.google.common.base.Preconditions.checkNotNull; +import static javafx.beans.binding.Bindings.createStringBinding; class TakeOfferViewModel extends ActivatableWithDataModel implements ViewModel { final TakeOfferDataModel dataModel; @@ -590,7 +592,7 @@ class TakeOfferViewModel extends ActivatableWithDataModel im && !isAmountEqualMinAmount(amount) && !isAmountEqualMaxAmount(amount)) { // We only apply the rounding if the amount is variable (minAmount is lower as amount). // Otherwise we could get an amount lower then the minAmount set by rounding - amount = dataModel.getOffer().isFiatOffer() ? + amount = dataModel.getOffer().isFiatOffer() ? CoinUtil.getRoundedFiatAmount(amount, price, maxTradeLimit) : CoinUtil.getRoundedTraditionalAmount(amount, price, maxTradeLimit); } diff --git a/desktop/src/main/java/haveno/desktop/main/overlays/notifications/NotificationCenter.java b/desktop/src/main/java/haveno/desktop/main/overlays/notifications/NotificationCenter.java index 33d2600522..81c81dfc44 100644 --- a/desktop/src/main/java/haveno/desktop/main/overlays/notifications/NotificationCenter.java +++ b/desktop/src/main/java/haveno/desktop/main/overlays/notifications/NotificationCenter.java @@ -18,7 +18,6 @@ package haveno.desktop.main.overlays.notifications; import com.google.inject.Inject; -import com.google.inject.Singleton; import haveno.common.UserThread; import haveno.core.api.NotificationListener; import haveno.core.locale.Res; @@ -46,17 +45,19 @@ import haveno.desktop.main.support.dispute.client.mediation.MediationClientView; import haveno.desktop.main.support.dispute.client.refund.RefundClientView; import haveno.proto.grpc.NotificationMessage; import haveno.proto.grpc.NotificationMessage.NotificationType; +import javafx.collections.ListChangeListener; +import lombok.NonNull; +import lombok.extern.slf4j.Slf4j; +import org.fxmisc.easybind.EasyBind; +import org.fxmisc.easybind.Subscription; + +import javax.annotation.Nullable; +import javax.inject.Singleton; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.function.Consumer; -import javafx.collections.ListChangeListener; -import javax.annotation.Nullable; -import lombok.NonNull; -import lombok.extern.slf4j.Slf4j; -import org.fxmisc.easybind.EasyBind; -import org.fxmisc.easybind.Subscription; @Slf4j @Singleton diff --git a/desktop/src/main/java/haveno/desktop/main/overlays/windows/ClosedTradesSummaryWindow.java b/desktop/src/main/java/haveno/desktop/main/overlays/windows/ClosedTradesSummaryWindow.java index 3bf047563e..de49b4e1e0 100644 --- a/desktop/src/main/java/haveno/desktop/main/overlays/windows/ClosedTradesSummaryWindow.java +++ b/desktop/src/main/java/haveno/desktop/main/overlays/windows/ClosedTradesSummaryWindow.java @@ -17,16 +17,18 @@ package haveno.desktop.main.overlays.windows; -import com.google.inject.Inject; import haveno.core.locale.Res; import haveno.desktop.main.overlays.Overlay; import haveno.desktop.main.portfolio.closedtrades.ClosedTradesViewModel; -import static haveno.desktop.util.FormBuilder.addConfirmationLabelLabel; -import static haveno.desktop.util.FormBuilder.addTitledGroupBg; import haveno.desktop.util.Layout; +import javafx.geometry.Insets; + +import javax.inject.Inject; import java.math.BigInteger; import java.util.Map; -import javafx.geometry.Insets; + +import static haveno.desktop.util.FormBuilder.addConfirmationLabelLabel; +import static haveno.desktop.util.FormBuilder.addTitledGroupBg; public class ClosedTradesSummaryWindow extends Overlay { private final ClosedTradesViewModel model; diff --git a/desktop/src/main/java/haveno/desktop/main/overlays/windows/ContractWindow.java b/desktop/src/main/java/haveno/desktop/main/overlays/windows/ContractWindow.java index 70b82d8e3a..51093841b5 100644 --- a/desktop/src/main/java/haveno/desktop/main/overlays/windows/ContractWindow.java +++ b/desktop/src/main/java/haveno/desktop/main/overlays/windows/ContractWindow.java @@ -18,7 +18,6 @@ package haveno.desktop.main.overlays.windows; import com.google.common.base.Joiner; -import com.google.inject.Inject; import haveno.common.UserThread; import haveno.core.account.witness.AccountAgeWitnessService; import haveno.core.locale.CountryUtil; @@ -39,17 +38,8 @@ import haveno.desktop.components.HavenoTextArea; import haveno.desktop.main.MainView; import haveno.desktop.main.overlays.Overlay; import haveno.desktop.util.DisplayUtils; -import static haveno.desktop.util.DisplayUtils.getAccountWitnessDescription; -import static haveno.desktop.util.FormBuilder.addButtonAfterGroup; -import static haveno.desktop.util.FormBuilder.addConfirmationLabelButton; -import static haveno.desktop.util.FormBuilder.addConfirmationLabelTextField; -import static haveno.desktop.util.FormBuilder.addConfirmationLabelTextFieldWithCopyIcon; -import static haveno.desktop.util.FormBuilder.addLabelExplorerAddressTextField; -import static haveno.desktop.util.FormBuilder.addLabelTxIdTextField; -import static haveno.desktop.util.FormBuilder.addTitledGroupBg; import haveno.desktop.util.Layout; import haveno.network.p2p.NodeAddress; -import java.util.List; import javafx.geometry.Insets; import javafx.scene.Scene; import javafx.scene.control.Button; @@ -64,6 +54,18 @@ import javafx.stage.Window; import lombok.extern.slf4j.Slf4j; import org.bitcoinj.core.Utils; +import javax.inject.Inject; +import java.util.List; + +import static haveno.desktop.util.DisplayUtils.getAccountWitnessDescription; +import static haveno.desktop.util.FormBuilder.addButtonAfterGroup; +import static haveno.desktop.util.FormBuilder.addConfirmationLabelButton; +import static haveno.desktop.util.FormBuilder.addConfirmationLabelTextField; +import static haveno.desktop.util.FormBuilder.addConfirmationLabelTextFieldWithCopyIcon; +import static haveno.desktop.util.FormBuilder.addLabelExplorerAddressTextField; +import static haveno.desktop.util.FormBuilder.addLabelTxIdTextField; +import static haveno.desktop.util.FormBuilder.addTitledGroupBg; + @Slf4j public class ContractWindow extends Overlay { private final ArbitrationManager arbitrationManager; diff --git a/desktop/src/main/java/haveno/desktop/main/overlays/windows/FilterWindow.java b/desktop/src/main/java/haveno/desktop/main/overlays/windows/FilterWindow.java index 04bdf223a4..57cad82c6b 100644 --- a/desktop/src/main/java/haveno/desktop/main/overlays/windows/FilterWindow.java +++ b/desktop/src/main/java/haveno/desktop/main/overlays/windows/FilterWindow.java @@ -18,7 +18,6 @@ package haveno.desktop.main.overlays.windows; import com.google.inject.Inject; -import com.google.inject.name.Named; import haveno.common.UserThread; import haveno.common.app.DevEnv; import haveno.common.config.Config; @@ -30,14 +29,6 @@ import haveno.desktop.components.AutoTooltipButton; import haveno.desktop.components.InputTextField; import haveno.desktop.main.overlays.Overlay; import haveno.desktop.main.overlays.popups.Popup; -import static haveno.desktop.util.FormBuilder.addInputTextField; -import static haveno.desktop.util.FormBuilder.addLabelCheckBox; -import static haveno.desktop.util.FormBuilder.addTopLabelInputTextField; -import java.util.Arrays; -import java.util.Collection; -import java.util.HashSet; -import java.util.List; -import java.util.stream.Collectors; import javafx.collections.FXCollections; import javafx.geometry.HPos; import javafx.geometry.Insets; @@ -51,6 +42,17 @@ import javafx.scene.layout.HBox; import javafx.scene.layout.Region; import org.apache.commons.lang3.StringUtils; +import javax.inject.Named; +import java.util.Arrays; +import java.util.Collection; +import java.util.HashSet; +import java.util.List; +import java.util.stream.Collectors; + +import static haveno.desktop.util.FormBuilder.addInputTextField; +import static haveno.desktop.util.FormBuilder.addLabelCheckBox; +import static haveno.desktop.util.FormBuilder.addTopLabelInputTextField; + public class FilterWindow extends Overlay { private final FilterManager filterManager; private final boolean useDevPrivilegeKeys; diff --git a/desktop/src/main/java/haveno/desktop/main/overlays/windows/OfferDetailsWindow.java b/desktop/src/main/java/haveno/desktop/main/overlays/windows/OfferDetailsWindow.java index 75f87aa351..6d5f217718 100644 --- a/desktop/src/main/java/haveno/desktop/main/overlays/windows/OfferDetailsWindow.java +++ b/desktop/src/main/java/haveno/desktop/main/overlays/windows/OfferDetailsWindow.java @@ -18,8 +18,7 @@ package haveno.desktop.main.overlays.windows; import com.google.common.base.Joiner; -import com.google.inject.Inject; -import com.google.inject.name.Named; + import haveno.common.UserThread; import haveno.common.crypto.KeyRing; import haveno.common.util.Tuple2; @@ -43,17 +42,8 @@ import haveno.desktop.components.AutoTooltipButton; import haveno.desktop.components.BusyAnimation; import haveno.desktop.main.overlays.Overlay; import haveno.desktop.util.DisplayUtils; -import static haveno.desktop.util.FormBuilder.addButtonAfterGroup; -import static haveno.desktop.util.FormBuilder.addButtonBusyAnimationLabelAfterGroup; -import static haveno.desktop.util.FormBuilder.addConfirmationLabelLabel; -import static haveno.desktop.util.FormBuilder.addConfirmationLabelTextArea; -import static haveno.desktop.util.FormBuilder.addConfirmationLabelTextFieldWithCopyIcon; -import static haveno.desktop.util.FormBuilder.addTitledGroupBg; import haveno.desktop.util.GUIUtil; import haveno.desktop.util.Layout; -import java.math.BigInteger; -import java.util.List; -import java.util.Optional; import javafx.geometry.HPos; import javafx.geometry.Insets; import javafx.scene.control.Button; @@ -68,6 +58,19 @@ import org.fxmisc.easybind.Subscription; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import javax.inject.Inject; +import javax.inject.Named; +import java.math.BigInteger; +import java.util.List; +import java.util.Optional; + +import static haveno.desktop.util.FormBuilder.addButtonAfterGroup; +import static haveno.desktop.util.FormBuilder.addButtonBusyAnimationLabelAfterGroup; +import static haveno.desktop.util.FormBuilder.addConfirmationLabelLabel; +import static haveno.desktop.util.FormBuilder.addConfirmationLabelTextArea; +import static haveno.desktop.util.FormBuilder.addConfirmationLabelTextFieldWithCopyIcon; +import static haveno.desktop.util.FormBuilder.addTitledGroupBg; + public class OfferDetailsWindow extends Overlay { protected static final Logger log = LoggerFactory.getLogger(OfferDetailsWindow.class); diff --git a/desktop/src/main/java/haveno/desktop/main/overlays/windows/SelectDepositTxWindow.java b/desktop/src/main/java/haveno/desktop/main/overlays/windows/SelectDepositTxWindow.java index 09870356bd..4a7cac56ce 100644 --- a/desktop/src/main/java/haveno/desktop/main/overlays/windows/SelectDepositTxWindow.java +++ b/desktop/src/main/java/haveno/desktop/main/overlays/windows/SelectDepositTxWindow.java @@ -17,14 +17,9 @@ package haveno.desktop.main.overlays.windows; -import com.google.inject.Inject; import haveno.core.locale.Res; import haveno.desktop.main.overlays.Overlay; import haveno.desktop.util.FormBuilder; -import static haveno.desktop.util.FormBuilder.addMultilineLabel; -import java.util.List; -import java.util.Optional; -import java.util.function.Consumer; import javafx.collections.FXCollections; import javafx.geometry.Insets; import javafx.scene.control.ComboBox; @@ -33,6 +28,13 @@ import javafx.scene.layout.GridPane; import javafx.util.StringConverter; import org.bitcoinj.core.Transaction; +import javax.inject.Inject; +import java.util.List; +import java.util.Optional; +import java.util.function.Consumer; + +import static haveno.desktop.util.FormBuilder.addMultilineLabel; + //TODO might be removed, but leave it for now until sure we will not use it anymore. public class SelectDepositTxWindow extends Overlay { private ComboBox transactionsComboBox; diff --git a/desktop/src/main/java/haveno/desktop/main/overlays/windows/SendAlertMessageWindow.java b/desktop/src/main/java/haveno/desktop/main/overlays/windows/SendAlertMessageWindow.java index 9e6c661f40..ca8ce6fcfc 100644 --- a/desktop/src/main/java/haveno/desktop/main/overlays/windows/SendAlertMessageWindow.java +++ b/desktop/src/main/java/haveno/desktop/main/overlays/windows/SendAlertMessageWindow.java @@ -18,7 +18,6 @@ package haveno.desktop.main.overlays.windows; import com.google.inject.Inject; -import com.google.inject.name.Named; import haveno.common.app.DevEnv; import haveno.common.config.Config; import haveno.common.util.Tuple2; @@ -30,10 +29,6 @@ import haveno.desktop.components.InputTextField; import haveno.desktop.main.overlays.Overlay; import haveno.desktop.main.overlays.popups.Popup; import haveno.desktop.util.FormBuilder; -import static haveno.desktop.util.FormBuilder.addInputTextField; -import static haveno.desktop.util.FormBuilder.addLabelCheckBox; -import static haveno.desktop.util.FormBuilder.addRadioButton; -import static haveno.desktop.util.FormBuilder.addTopLabelTextArea; import javafx.geometry.HPos; import javafx.geometry.Insets; import javafx.scene.Scene; @@ -47,6 +42,13 @@ import javafx.scene.input.KeyCode; import javafx.scene.layout.GridPane; import javafx.scene.layout.HBox; +import javax.inject.Named; + +import static haveno.desktop.util.FormBuilder.addInputTextField; +import static haveno.desktop.util.FormBuilder.addLabelCheckBox; +import static haveno.desktop.util.FormBuilder.addRadioButton; +import static haveno.desktop.util.FormBuilder.addTopLabelTextArea; + public class SendAlertMessageWindow extends Overlay { private final AlertManager alertManager; private final boolean useDevPrivilegeKeys; diff --git a/desktop/src/main/java/haveno/desktop/main/overlays/windows/SignPaymentAccountsWindow.java b/desktop/src/main/java/haveno/desktop/main/overlays/windows/SignPaymentAccountsWindow.java index 0fa83e3320..798414900e 100644 --- a/desktop/src/main/java/haveno/desktop/main/overlays/windows/SignPaymentAccountsWindow.java +++ b/desktop/src/main/java/haveno/desktop/main/overlays/windows/SignPaymentAccountsWindow.java @@ -17,8 +17,6 @@ package haveno.desktop.main.overlays.windows; -import com.google.inject.Inject; -import com.google.inject.name.Named; import haveno.common.config.Config; import haveno.common.util.Tuple2; import haveno.common.util.Tuple3; @@ -36,22 +34,6 @@ import haveno.desktop.components.AutoTooltipButton; import haveno.desktop.components.InputTextField; import haveno.desktop.main.overlays.Overlay; import haveno.desktop.main.overlays.popups.Popup; -import static haveno.desktop.util.FormBuilder.add2ButtonsAfterGroup; -import static haveno.desktop.util.FormBuilder.addComboBox; -import static haveno.desktop.util.FormBuilder.addInputTextField; -import static haveno.desktop.util.FormBuilder.addLabelCheckBox; -import static haveno.desktop.util.FormBuilder.addMultilineLabel; -import static haveno.desktop.util.FormBuilder.addTopLabelDatePicker; -import static haveno.desktop.util.FormBuilder.addTopLabelListView; -import static haveno.desktop.util.FormBuilder.removeRowsFromGridPane; -import java.time.Instant; -import java.time.ZoneId; -import java.time.ZoneOffset; -import java.time.temporal.ChronoUnit; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; -import java.util.stream.Collectors; import javafx.collections.FXCollections; import javafx.collections.ObservableList; import javafx.geometry.HPos; @@ -72,6 +54,26 @@ import lombok.extern.slf4j.Slf4j; import org.bitcoinj.core.ECKey; import org.bitcoinj.core.Utils; +import javax.inject.Inject; +import javax.inject.Named; +import java.time.Instant; +import java.time.ZoneId; +import java.time.ZoneOffset; +import java.time.temporal.ChronoUnit; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import java.util.stream.Collectors; + +import static haveno.desktop.util.FormBuilder.add2ButtonsAfterGroup; +import static haveno.desktop.util.FormBuilder.addComboBox; +import static haveno.desktop.util.FormBuilder.addInputTextField; +import static haveno.desktop.util.FormBuilder.addLabelCheckBox; +import static haveno.desktop.util.FormBuilder.addMultilineLabel; +import static haveno.desktop.util.FormBuilder.addTopLabelDatePicker; +import static haveno.desktop.util.FormBuilder.addTopLabelListView; +import static haveno.desktop.util.FormBuilder.removeRowsFromGridPane; + @Slf4j public class SignPaymentAccountsWindow extends Overlay { diff --git a/desktop/src/main/java/haveno/desktop/main/overlays/windows/SignSpecificWitnessWindow.java b/desktop/src/main/java/haveno/desktop/main/overlays/windows/SignSpecificWitnessWindow.java index 959f619d0f..880494b84f 100644 --- a/desktop/src/main/java/haveno/desktop/main/overlays/windows/SignSpecificWitnessWindow.java +++ b/desktop/src/main/java/haveno/desktop/main/overlays/windows/SignSpecificWitnessWindow.java @@ -17,7 +17,6 @@ package haveno.desktop.main.overlays.windows; -import com.google.inject.Inject; import haveno.common.util.Tuple2; import haveno.common.util.Utilities; import haveno.core.account.witness.AccountAgeWitness; @@ -29,12 +28,6 @@ import haveno.desktop.components.HavenoTextArea; import haveno.desktop.components.InputTextField; import haveno.desktop.main.overlays.Overlay; import haveno.desktop.main.overlays.popups.Popup; -import static haveno.desktop.util.FormBuilder.add2ButtonsAfterGroup; -import static haveno.desktop.util.FormBuilder.addInputTextField; -import static haveno.desktop.util.FormBuilder.addMultilineLabel; -import static haveno.desktop.util.FormBuilder.addTopLabelTextField; -import static haveno.desktop.util.FormBuilder.removeRowsFromGridPane; -import java.util.Date; import javafx.geometry.VPos; import javafx.scene.control.TextArea; import javafx.scene.layout.GridPane; @@ -43,6 +36,15 @@ import lombok.extern.slf4j.Slf4j; import org.bitcoinj.core.ECKey; import org.bitcoinj.core.Utils; +import javax.inject.Inject; +import java.util.Date; + +import static haveno.desktop.util.FormBuilder.add2ButtonsAfterGroup; +import static haveno.desktop.util.FormBuilder.addInputTextField; +import static haveno.desktop.util.FormBuilder.addMultilineLabel; +import static haveno.desktop.util.FormBuilder.addTopLabelTextField; +import static haveno.desktop.util.FormBuilder.removeRowsFromGridPane; + @Slf4j public class SignSpecificWitnessWindow extends Overlay { diff --git a/desktop/src/main/java/haveno/desktop/main/overlays/windows/SignUnsignedPubKeysWindow.java b/desktop/src/main/java/haveno/desktop/main/overlays/windows/SignUnsignedPubKeysWindow.java index d3a9051128..c840a718ec 100644 --- a/desktop/src/main/java/haveno/desktop/main/overlays/windows/SignUnsignedPubKeysWindow.java +++ b/desktop/src/main/java/haveno/desktop/main/overlays/windows/SignUnsignedPubKeysWindow.java @@ -17,7 +17,6 @@ package haveno.desktop.main.overlays.windows; -import com.google.inject.Inject; import haveno.common.crypto.Hash; import haveno.common.util.Tuple3; import haveno.common.util.Utilities; @@ -29,12 +28,6 @@ import haveno.desktop.components.AutoTooltipButton; import haveno.desktop.components.InputTextField; import haveno.desktop.main.overlays.Overlay; import haveno.desktop.main.overlays.popups.Popup; -import static haveno.desktop.util.FormBuilder.add2ButtonsAfterGroup; -import static haveno.desktop.util.FormBuilder.addInputTextField; -import static haveno.desktop.util.FormBuilder.addTopLabelListView; -import static haveno.desktop.util.FormBuilder.removeRowsFromGridPane; -import java.util.ArrayList; -import java.util.List; import javafx.collections.FXCollections; import javafx.geometry.VPos; import javafx.scene.control.Label; @@ -47,6 +40,15 @@ import javafx.util.Callback; import lombok.extern.slf4j.Slf4j; import org.bitcoinj.core.Utils; +import javax.inject.Inject; +import java.util.ArrayList; +import java.util.List; + +import static haveno.desktop.util.FormBuilder.add2ButtonsAfterGroup; +import static haveno.desktop.util.FormBuilder.addInputTextField; +import static haveno.desktop.util.FormBuilder.addTopLabelListView; +import static haveno.desktop.util.FormBuilder.removeRowsFromGridPane; + @Slf4j public class SignUnsignedPubKeysWindow extends Overlay { diff --git a/desktop/src/main/java/haveno/desktop/main/overlays/windows/TorNetworkSettingsWindow.java b/desktop/src/main/java/haveno/desktop/main/overlays/windows/TorNetworkSettingsWindow.java index e3cc347581..1899041b3a 100644 --- a/desktop/src/main/java/haveno/desktop/main/overlays/windows/TorNetworkSettingsWindow.java +++ b/desktop/src/main/java/haveno/desktop/main/overlays/windows/TorNetworkSettingsWindow.java @@ -18,8 +18,6 @@ package haveno.desktop.main.overlays.windows; -import com.google.inject.Inject; -import com.google.inject.Singleton; import haveno.common.UserThread; import haveno.common.util.Tuple2; import haveno.common.util.Tuple4; @@ -32,19 +30,9 @@ import haveno.desktop.components.BusyAnimation; import haveno.desktop.components.TitledGroupBg; import haveno.desktop.main.overlays.Overlay; import haveno.desktop.main.overlays.popups.Popup; -import static haveno.desktop.util.FormBuilder.addButtonBusyAnimationLabelAfterGroup; -import static haveno.desktop.util.FormBuilder.addComboBox; -import static haveno.desktop.util.FormBuilder.addLabel; -import static haveno.desktop.util.FormBuilder.addRadioButton; -import static haveno.desktop.util.FormBuilder.addTitledGroupBg; -import static haveno.desktop.util.FormBuilder.addTopLabelTextArea; import haveno.desktop.util.Layout; import haveno.network.p2p.network.DefaultPluggableTransports; import haveno.network.p2p.network.NetworkNode; -import java.io.IOException; -import java.net.URI; -import java.util.Arrays; -import java.util.concurrent.TimeUnit; import javafx.collections.FXCollections; import javafx.geometry.HPos; import javafx.geometry.Insets; @@ -64,6 +52,20 @@ import javafx.scene.layout.Priority; import javafx.util.StringConverter; import lombok.extern.slf4j.Slf4j; +import javax.inject.Inject; +import javax.inject.Singleton; +import java.io.IOException; +import java.net.URI; +import java.util.Arrays; +import java.util.concurrent.TimeUnit; + +import static haveno.desktop.util.FormBuilder.addButtonBusyAnimationLabelAfterGroup; +import static haveno.desktop.util.FormBuilder.addComboBox; +import static haveno.desktop.util.FormBuilder.addLabel; +import static haveno.desktop.util.FormBuilder.addRadioButton; +import static haveno.desktop.util.FormBuilder.addTitledGroupBg; +import static haveno.desktop.util.FormBuilder.addTopLabelTextArea; + @Slf4j @Singleton public class TorNetworkSettingsWindow extends Overlay { diff --git a/desktop/src/main/java/haveno/desktop/main/overlays/windows/TradeDetailsWindow.java b/desktop/src/main/java/haveno/desktop/main/overlays/windows/TradeDetailsWindow.java index 41be6e6b03..0decace925 100644 --- a/desktop/src/main/java/haveno/desktop/main/overlays/windows/TradeDetailsWindow.java +++ b/desktop/src/main/java/haveno/desktop/main/overlays/windows/TradeDetailsWindow.java @@ -17,8 +17,6 @@ package haveno.desktop.main.overlays.windows; -import com.google.inject.Inject; -import com.google.inject.name.Named; import haveno.common.UserThread; import haveno.common.util.Tuple3; import haveno.common.util.Utilities; @@ -39,12 +37,6 @@ import haveno.desktop.components.HavenoTextArea; import haveno.desktop.main.MainView; import haveno.desktop.main.overlays.Overlay; import haveno.desktop.util.DisplayUtils; -import static haveno.desktop.util.DisplayUtils.getAccountWitnessDescription; -import static haveno.desktop.util.FormBuilder.add2ButtonsWithBox; -import static haveno.desktop.util.FormBuilder.addConfirmationLabelTextArea; -import static haveno.desktop.util.FormBuilder.addConfirmationLabelTextField; -import static haveno.desktop.util.FormBuilder.addLabelTxIdTextField; -import static haveno.desktop.util.FormBuilder.addTitledGroupBg; import haveno.desktop.util.Layout; import haveno.network.p2p.NodeAddress; import javafx.beans.property.IntegerProperty; @@ -67,6 +59,16 @@ import javafx.stage.Window; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import javax.inject.Inject; +import javax.inject.Named; + +import static haveno.desktop.util.DisplayUtils.getAccountWitnessDescription; +import static haveno.desktop.util.FormBuilder.add2ButtonsWithBox; +import static haveno.desktop.util.FormBuilder.addConfirmationLabelTextArea; +import static haveno.desktop.util.FormBuilder.addConfirmationLabelTextField; +import static haveno.desktop.util.FormBuilder.addLabelTxIdTextField; +import static haveno.desktop.util.FormBuilder.addTitledGroupBg; + public class TradeDetailsWindow extends Overlay { protected static final Logger log = LoggerFactory.getLogger(TradeDetailsWindow.class); diff --git a/desktop/src/main/java/haveno/desktop/main/overlays/windows/WalletPasswordWindow.java b/desktop/src/main/java/haveno/desktop/main/overlays/windows/WalletPasswordWindow.java index 77a327580a..9a0d65ddf3 100644 --- a/desktop/src/main/java/haveno/desktop/main/overlays/windows/WalletPasswordWindow.java +++ b/desktop/src/main/java/haveno/desktop/main/overlays/windows/WalletPasswordWindow.java @@ -17,10 +17,7 @@ package haveno.desktop.main.overlays.windows; -import static com.google.common.base.Preconditions.checkArgument; import com.google.common.base.Splitter; -import com.google.inject.Inject; -import com.google.inject.name.Named; import haveno.common.config.Config; import haveno.common.crypto.IncorrectPasswordException; import haveno.common.util.Tuple2; @@ -35,18 +32,7 @@ import haveno.desktop.components.PasswordTextField; import haveno.desktop.main.SharedPresentation; import haveno.desktop.main.overlays.Overlay; import haveno.desktop.main.overlays.popups.Popup; -import static haveno.desktop.util.FormBuilder.addPasswordTextField; -import static haveno.desktop.util.FormBuilder.addPrimaryActionButton; -import static haveno.desktop.util.FormBuilder.addTextArea; -import static haveno.desktop.util.FormBuilder.addTopLabelDatePicker; import haveno.desktop.util.Layout; -import java.io.File; -import java.io.IOException; -import java.time.Instant; -import java.time.LocalDate; -import java.time.ZoneId; -import java.time.ZoneOffset; -import static javafx.beans.binding.Bindings.createBooleanBinding; import javafx.beans.property.BooleanProperty; import javafx.beans.property.SimpleBooleanProperty; import javafx.beans.value.ChangeListener; @@ -68,6 +54,22 @@ import org.bitcoinj.crypto.MnemonicCode; import org.bitcoinj.crypto.MnemonicException; import org.bitcoinj.wallet.DeterministicSeed; +import javax.inject.Inject; +import javax.inject.Named; +import java.io.File; +import java.io.IOException; +import java.time.Instant; +import java.time.LocalDate; +import java.time.ZoneId; +import java.time.ZoneOffset; + +import static com.google.common.base.Preconditions.checkArgument; +import static haveno.desktop.util.FormBuilder.addPasswordTextField; +import static haveno.desktop.util.FormBuilder.addPrimaryActionButton; +import static haveno.desktop.util.FormBuilder.addTextArea; +import static haveno.desktop.util.FormBuilder.addTopLabelDatePicker; +import static javafx.beans.binding.Bindings.createBooleanBinding; + @Slf4j public class WalletPasswordWindow extends Overlay { private final CoreAccountService accountService; diff --git a/desktop/src/main/java/haveno/desktop/main/portfolio/PortfolioView.java b/desktop/src/main/java/haveno/desktop/main/portfolio/PortfolioView.java index 84c353e756..982f3e787c 100644 --- a/desktop/src/main/java/haveno/desktop/main/portfolio/PortfolioView.java +++ b/desktop/src/main/java/haveno/desktop/main/portfolio/PortfolioView.java @@ -17,7 +17,6 @@ package haveno.desktop.main.portfolio; -import com.google.inject.Inject; import haveno.core.locale.Res; import haveno.core.offer.OfferPayload; import haveno.core.offer.OpenOffer; @@ -35,13 +34,15 @@ import haveno.desktop.main.portfolio.editoffer.EditOfferView; import haveno.desktop.main.portfolio.failedtrades.FailedTradesView; import haveno.desktop.main.portfolio.openoffer.OpenOffersView; import haveno.desktop.main.portfolio.pendingtrades.PendingTradesView; -import java.util.List; import javafx.beans.value.ChangeListener; import javafx.collections.ListChangeListener; import javafx.fxml.FXML; import javafx.scene.control.Tab; import javafx.scene.control.TabPane; + import javax.annotation.Nullable; +import javax.inject.Inject; +import java.util.List; @FxmlView public class PortfolioView extends ActivatableView { diff --git a/desktop/src/main/java/haveno/desktop/main/portfolio/closedtrades/ClosedTradesView.java b/desktop/src/main/java/haveno/desktop/main/portfolio/closedtrades/ClosedTradesView.java index 5f2ff5b397..a43d677605 100644 --- a/desktop/src/main/java/haveno/desktop/main/portfolio/closedtrades/ClosedTradesView.java +++ b/desktop/src/main/java/haveno/desktop/main/portfolio/closedtrades/ClosedTradesView.java @@ -17,8 +17,6 @@ package haveno.desktop.main.portfolio.closedtrades; -import com.google.inject.Inject; -import com.google.inject.name.Named; import com.googlecode.jcsv.writer.CSVEntryConverter; import de.jensd.fx.glyphs.materialdesignicons.MaterialDesignIcon; import haveno.common.config.Config; @@ -45,11 +43,8 @@ import haveno.desktop.main.overlays.windows.ClosedTradesSummaryWindow; import haveno.desktop.main.overlays.windows.OfferDetailsWindow; import haveno.desktop.main.overlays.windows.TradeDetailsWindow; import haveno.desktop.main.portfolio.presentation.PortfolioUtil; -import static haveno.desktop.util.FormBuilder.getRegularIconButton; import haveno.desktop.util.GUIUtil; import haveno.network.p2p.NodeAddress; -import java.util.Comparator; -import java.util.function.Function; import javafx.beans.binding.Bindings; import javafx.beans.property.ReadOnlyObjectWrapper; import javafx.beans.value.ChangeListener; @@ -75,6 +70,13 @@ import javafx.scene.layout.VBox; import javafx.stage.Stage; import javafx.util.Callback; +import javax.inject.Inject; +import javax.inject.Named; +import java.util.Comparator; +import java.util.function.Function; + +import static haveno.desktop.util.FormBuilder.getRegularIconButton; + @FxmlView public class ClosedTradesView extends ActivatableViewAndModel { private final boolean useDevPrivilegeKeys; diff --git a/desktop/src/main/java/haveno/desktop/main/portfolio/duplicateoffer/DuplicateOfferDataModel.java b/desktop/src/main/java/haveno/desktop/main/portfolio/duplicateoffer/DuplicateOfferDataModel.java index 64a6c1bfd8..780667087f 100644 --- a/desktop/src/main/java/haveno/desktop/main/portfolio/duplicateoffer/DuplicateOfferDataModel.java +++ b/desktop/src/main/java/haveno/desktop/main/portfolio/duplicateoffer/DuplicateOfferDataModel.java @@ -19,7 +19,6 @@ package haveno.desktop.main.portfolio.duplicateoffer; import com.google.inject.Inject; -import com.google.inject.name.Named; import haveno.core.account.witness.AccountAgeWitnessService; import haveno.core.locale.CurrencyUtil; import haveno.core.locale.TradeCurrency; @@ -40,6 +39,8 @@ import haveno.core.xmr.wallet.XmrWalletService; import haveno.desktop.Navigation; import haveno.desktop.main.offer.MutableOfferDataModel; import haveno.network.p2p.P2PService; + +import javax.inject.Named; import java.math.BigInteger; import java.util.Objects; import java.util.Optional; diff --git a/desktop/src/main/java/haveno/desktop/main/portfolio/duplicateoffer/DuplicateOfferView.java b/desktop/src/main/java/haveno/desktop/main/portfolio/duplicateoffer/DuplicateOfferView.java index 2a9b58b920..b2c6a10f07 100644 --- a/desktop/src/main/java/haveno/desktop/main/portfolio/duplicateoffer/DuplicateOfferView.java +++ b/desktop/src/main/java/haveno/desktop/main/portfolio/duplicateoffer/DuplicateOfferView.java @@ -18,7 +18,6 @@ package haveno.desktop.main.portfolio.duplicateoffer; import com.google.inject.Inject; -import com.google.inject.name.Named; import haveno.core.locale.CurrencyUtil; import haveno.core.offer.OfferPayload; import haveno.core.payment.PaymentAccount; @@ -32,6 +31,8 @@ import haveno.desktop.main.overlays.windows.OfferDetailsWindow; import javafx.collections.ObservableList; import javafx.geometry.Insets; +import javax.inject.Named; + @FxmlView public class DuplicateOfferView extends MutableOfferView { diff --git a/desktop/src/main/java/haveno/desktop/main/portfolio/duplicateoffer/DuplicateOfferViewModel.java b/desktop/src/main/java/haveno/desktop/main/portfolio/duplicateoffer/DuplicateOfferViewModel.java index c9813b7333..a3a0f6fe8e 100644 --- a/desktop/src/main/java/haveno/desktop/main/portfolio/duplicateoffer/DuplicateOfferViewModel.java +++ b/desktop/src/main/java/haveno/desktop/main/portfolio/duplicateoffer/DuplicateOfferViewModel.java @@ -18,7 +18,6 @@ package haveno.desktop.main.portfolio.duplicateoffer; import com.google.inject.Inject; -import com.google.inject.name.Named; import haveno.core.account.witness.AccountAgeWitnessService; import haveno.core.offer.Offer; import haveno.core.offer.OfferPayload; @@ -30,12 +29,14 @@ import haveno.core.provider.price.PriceFeedService; import haveno.core.user.Preferences; import haveno.core.util.FormattingUtils; import haveno.core.util.coin.CoinFormatter; -import haveno.core.util.validation.FiatPriceValidator; import haveno.core.util.validation.NonFiatPriceValidator; +import haveno.core.util.validation.FiatPriceValidator; import haveno.desktop.Navigation; import haveno.desktop.main.offer.MutableOfferViewModel; import lombok.extern.slf4j.Slf4j; +import javax.inject.Named; + @Slf4j class DuplicateOfferViewModel extends MutableOfferViewModel { diff --git a/desktop/src/main/java/haveno/desktop/main/portfolio/editoffer/EditOfferDataModel.java b/desktop/src/main/java/haveno/desktop/main/portfolio/editoffer/EditOfferDataModel.java index a59394eac6..9d312dd964 100644 --- a/desktop/src/main/java/haveno/desktop/main/portfolio/editoffer/EditOfferDataModel.java +++ b/desktop/src/main/java/haveno/desktop/main/portfolio/editoffer/EditOfferDataModel.java @@ -19,7 +19,6 @@ package haveno.desktop.main.portfolio.editoffer; import com.google.inject.Inject; -import com.google.inject.name.Named; import haveno.common.handlers.ErrorMessageHandler; import haveno.common.handlers.ResultHandler; import haveno.core.account.witness.AccountAgeWitnessService; @@ -46,6 +45,8 @@ import haveno.core.xmr.wallet.XmrWalletService; import haveno.desktop.Navigation; import haveno.desktop.main.offer.MutableOfferDataModel; import haveno.network.p2p.P2PService; + +import javax.inject.Named; import java.util.Optional; import java.util.Set; diff --git a/desktop/src/main/java/haveno/desktop/main/portfolio/editoffer/EditOfferView.java b/desktop/src/main/java/haveno/desktop/main/portfolio/editoffer/EditOfferView.java index 908266bcfa..549661b0b7 100644 --- a/desktop/src/main/java/haveno/desktop/main/portfolio/editoffer/EditOfferView.java +++ b/desktop/src/main/java/haveno/desktop/main/portfolio/editoffer/EditOfferView.java @@ -18,7 +18,6 @@ package haveno.desktop.main.portfolio.editoffer; import com.google.inject.Inject; -import com.google.inject.name.Named; import haveno.common.util.Tuple4; import haveno.core.locale.CurrencyUtil; import haveno.core.locale.Res; @@ -35,7 +34,6 @@ import haveno.desktop.components.BusyAnimation; import haveno.desktop.main.offer.MutableOfferView; import haveno.desktop.main.overlays.popups.Popup; import haveno.desktop.main.overlays.windows.OfferDetailsWindow; -import static haveno.desktop.util.FormBuilder.addButtonBusyAnimationLabelAfterGroup; import javafx.collections.ObservableList; import javafx.geometry.HPos; import javafx.geometry.Insets; @@ -46,6 +44,10 @@ import javafx.scene.image.ImageView; import javafx.scene.layout.GridPane; import javafx.scene.layout.HBox; +import javax.inject.Named; + +import static haveno.desktop.util.FormBuilder.addButtonBusyAnimationLabelAfterGroup; + @FxmlView public class EditOfferView extends MutableOfferView { diff --git a/desktop/src/main/java/haveno/desktop/main/portfolio/editoffer/EditOfferViewModel.java b/desktop/src/main/java/haveno/desktop/main/portfolio/editoffer/EditOfferViewModel.java index 6b6b2c1c2b..e8450aded5 100644 --- a/desktop/src/main/java/haveno/desktop/main/portfolio/editoffer/EditOfferViewModel.java +++ b/desktop/src/main/java/haveno/desktop/main/portfolio/editoffer/EditOfferViewModel.java @@ -18,7 +18,6 @@ package haveno.desktop.main.portfolio.editoffer; import com.google.inject.Inject; -import com.google.inject.name.Named; import haveno.common.handlers.ErrorMessageHandler; import haveno.common.handlers.ResultHandler; import haveno.core.account.witness.AccountAgeWitnessService; @@ -32,11 +31,13 @@ import haveno.core.user.Preferences; import haveno.core.util.FormattingUtils; import haveno.core.util.PriceUtil; import haveno.core.util.coin.CoinFormatter; -import haveno.core.util.validation.FiatPriceValidator; import haveno.core.util.validation.NonFiatPriceValidator; +import haveno.core.util.validation.FiatPriceValidator; import haveno.desktop.Navigation; import haveno.desktop.main.offer.MutableOfferViewModel; +import javax.inject.Named; + class EditOfferViewModel extends MutableOfferViewModel { @Inject diff --git a/desktop/src/main/java/haveno/desktop/main/portfolio/failedtrades/FailedTradesView.java b/desktop/src/main/java/haveno/desktop/main/portfolio/failedtrades/FailedTradesView.java index 56e9b6cae5..4048fdff0a 100644 --- a/desktop/src/main/java/haveno/desktop/main/portfolio/failedtrades/FailedTradesView.java +++ b/desktop/src/main/java/haveno/desktop/main/portfolio/failedtrades/FailedTradesView.java @@ -17,7 +17,6 @@ package haveno.desktop.main.portfolio.failedtrades; -import com.google.inject.Inject; import com.googlecode.jcsv.writer.CSVEntryConverter; import com.jfoenix.controls.JFXButton; import de.jensd.fx.fontawesome.AwesomeIcon; @@ -39,8 +38,6 @@ import haveno.desktop.main.overlays.popups.Popup; import haveno.desktop.main.overlays.windows.TradeDetailsWindow; import haveno.desktop.util.FormBuilder; import haveno.desktop.util.GUIUtil; -import java.math.BigInteger; -import java.util.Comparator; import javafx.beans.property.ReadOnlyObjectWrapper; import javafx.beans.value.ChangeListener; import javafx.collections.ObservableList; @@ -68,6 +65,10 @@ import javafx.scene.layout.VBox; import javafx.stage.Stage; import javafx.util.Callback; +import javax.inject.Inject; +import java.math.BigInteger; +import java.util.Comparator; + @FxmlView public class FailedTradesView extends ActivatableViewAndModel { diff --git a/desktop/src/main/java/haveno/desktop/main/portfolio/failedtrades/FailedTradesViewModel.java b/desktop/src/main/java/haveno/desktop/main/portfolio/failedtrades/FailedTradesViewModel.java index 35b140b9de..cdf8ac053c 100644 --- a/desktop/src/main/java/haveno/desktop/main/portfolio/failedtrades/FailedTradesViewModel.java +++ b/desktop/src/main/java/haveno/desktop/main/portfolio/failedtrades/FailedTradesViewModel.java @@ -18,7 +18,6 @@ package haveno.desktop.main.portfolio.failedtrades; import com.google.inject.Inject; -import com.google.inject.name.Named; import haveno.core.locale.CurrencyUtil; import haveno.core.locale.Res; import haveno.core.trade.HavenoUtils; @@ -30,6 +29,8 @@ import haveno.desktop.common.model.ViewModel; import haveno.desktop.util.DisplayUtils; import javafx.collections.ObservableList; +import javax.inject.Named; + class FailedTradesViewModel extends ActivatableWithDataModel implements ViewModel { private final CoinFormatter formatter; diff --git a/desktop/src/main/java/haveno/desktop/main/portfolio/openoffer/OpenOffersView.java b/desktop/src/main/java/haveno/desktop/main/portfolio/openoffer/OpenOffersView.java index ce5ea6158e..592255b55b 100644 --- a/desktop/src/main/java/haveno/desktop/main/portfolio/openoffer/OpenOffersView.java +++ b/desktop/src/main/java/haveno/desktop/main/portfolio/openoffer/OpenOffersView.java @@ -17,7 +17,6 @@ package haveno.desktop.main.portfolio.openoffer; -import com.google.inject.Inject; import com.googlecode.jcsv.writer.CSVEntryConverter; import de.jensd.fx.glyphs.materialdesignicons.MaterialDesignIcon; import haveno.core.locale.Res; @@ -41,13 +40,7 @@ import haveno.desktop.main.overlays.popups.Popup; import haveno.desktop.main.overlays.windows.OfferDetailsWindow; import haveno.desktop.main.portfolio.PortfolioView; import haveno.desktop.main.portfolio.duplicateoffer.DuplicateOfferView; -import static haveno.desktop.util.FormBuilder.getRegularIconButton; import haveno.desktop.util.GUIUtil; -import java.util.Comparator; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.stream.Collectors; import javafx.beans.binding.Bindings; import javafx.beans.property.ReadOnlyObjectWrapper; import javafx.beans.value.ChangeListener; @@ -75,10 +68,20 @@ import javafx.scene.layout.Region; import javafx.scene.layout.VBox; import javafx.stage.Stage; import javafx.util.Callback; + import org.fxmisc.easybind.EasyBind; import org.fxmisc.easybind.Subscription; import org.jetbrains.annotations.NotNull; +import javax.inject.Inject; +import java.util.Comparator; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +import static haveno.desktop.util.FormBuilder.getRegularIconButton; + @FxmlView public class OpenOffersView extends ActivatableViewAndModel { diff --git a/desktop/src/main/java/haveno/desktop/main/portfolio/openoffer/OpenOffersViewModel.java b/desktop/src/main/java/haveno/desktop/main/portfolio/openoffer/OpenOffersViewModel.java index 03c1303870..57992bf310 100644 --- a/desktop/src/main/java/haveno/desktop/main/portfolio/openoffer/OpenOffersViewModel.java +++ b/desktop/src/main/java/haveno/desktop/main/portfolio/openoffer/OpenOffersViewModel.java @@ -17,9 +17,7 @@ package haveno.desktop.main.portfolio.openoffer; -import static com.google.common.base.Preconditions.checkNotNull; import com.google.inject.Inject; -import com.google.inject.name.Named; import haveno.common.handlers.ErrorMessageHandler; import haveno.common.handlers.ResultHandler; import haveno.core.locale.CurrencyUtil; @@ -39,6 +37,10 @@ import haveno.desktop.util.GUIUtil; import haveno.network.p2p.P2PService; import javafx.collections.ObservableList; +import javax.inject.Named; + +import static com.google.common.base.Preconditions.checkNotNull; + class OpenOffersViewModel extends ActivatableWithDataModel implements ViewModel { private final P2PService p2PService; private final PriceUtil priceUtil; diff --git a/desktop/src/main/java/haveno/desktop/main/portfolio/pendingtrades/PendingTradesDataModel.java b/desktop/src/main/java/haveno/desktop/main/portfolio/pendingtrades/PendingTradesDataModel.java index f09ba10e26..798e3ffdea 100644 --- a/desktop/src/main/java/haveno/desktop/main/portfolio/pendingtrades/PendingTradesDataModel.java +++ b/desktop/src/main/java/haveno/desktop/main/portfolio/pendingtrades/PendingTradesDataModel.java @@ -17,10 +17,7 @@ package haveno.desktop.main.portfolio.pendingtrades; -import static com.google.common.base.Preconditions.checkArgument; -import static com.google.common.base.Preconditions.checkNotNull; import com.google.inject.Inject; -import com.google.inject.name.Named; import haveno.common.UserThread; import haveno.common.crypto.PubKeyRing; import haveno.common.crypto.PubKeyRingProvider; @@ -64,9 +61,6 @@ import haveno.desktop.main.support.dispute.client.arbitration.ArbitrationClientV import haveno.desktop.main.support.dispute.client.mediation.MediationClientView; import haveno.desktop.util.GUIUtil; import haveno.network.p2p.P2PService; -import java.math.BigInteger; -import java.util.Date; -import java.util.stream.Collectors; import javafx.beans.property.ObjectProperty; import javafx.beans.property.SimpleObjectProperty; import javafx.beans.property.SimpleStringProperty; @@ -75,11 +69,19 @@ import javafx.beans.value.ChangeListener; import javafx.collections.FXCollections; import javafx.collections.ListChangeListener; import javafx.collections.ObservableList; -import javax.annotation.Nullable; import lombok.Getter; import org.bitcoinj.core.Coin; import org.bouncycastle.crypto.params.KeyParameter; +import javax.annotation.Nullable; +import javax.inject.Named; +import java.math.BigInteger; +import java.util.Date; +import java.util.stream.Collectors; + +import static com.google.common.base.Preconditions.checkArgument; +import static com.google.common.base.Preconditions.checkNotNull; + public class PendingTradesDataModel extends ActivatableDataModel { @Getter public final TradeManager tradeManager; diff --git a/desktop/src/main/java/haveno/desktop/main/portfolio/pendingtrades/PendingTradesView.java b/desktop/src/main/java/haveno/desktop/main/portfolio/pendingtrades/PendingTradesView.java index ef9e2a99fa..b309de20a3 100644 --- a/desktop/src/main/java/haveno/desktop/main/portfolio/pendingtrades/PendingTradesView.java +++ b/desktop/src/main/java/haveno/desktop/main/portfolio/pendingtrades/PendingTradesView.java @@ -17,8 +17,6 @@ package haveno.desktop.main.portfolio.pendingtrades; -import com.google.inject.Inject; -import com.google.inject.name.Named; import com.jfoenix.controls.JFXBadge; import com.jfoenix.controls.JFXButton; import de.jensd.fx.glyphs.materialdesignicons.MaterialDesignIcon; @@ -56,9 +54,6 @@ import haveno.desktop.util.CssTheme; import haveno.desktop.util.DisplayUtils; import haveno.desktop.util.FormBuilder; import haveno.network.p2p.NodeAddress; -import java.util.Comparator; -import java.util.HashMap; -import java.util.Map; import javafx.application.Platform; import javafx.beans.binding.Bindings; import javafx.beans.property.ReadOnlyObjectWrapper; @@ -97,6 +92,12 @@ import javafx.util.Callback; import org.fxmisc.easybind.EasyBind; import org.fxmisc.easybind.Subscription; +import javax.inject.Inject; +import javax.inject.Named; +import java.util.Comparator; +import java.util.HashMap; +import java.util.Map; + @FxmlView public class PendingTradesView extends ActivatableViewAndModel { public interface ChatCallback { diff --git a/desktop/src/main/java/haveno/desktop/main/portfolio/pendingtrades/PendingTradesViewModel.java b/desktop/src/main/java/haveno/desktop/main/portfolio/pendingtrades/PendingTradesViewModel.java index f3f531d7e9..e07dd2fdea 100644 --- a/desktop/src/main/java/haveno/desktop/main/portfolio/pendingtrades/PendingTradesViewModel.java +++ b/desktop/src/main/java/haveno/desktop/main/portfolio/pendingtrades/PendingTradesViewModel.java @@ -17,9 +17,7 @@ package haveno.desktop.main.portfolio.pendingtrades; -import static com.google.common.base.Preconditions.checkNotNull; import com.google.inject.Inject; -import com.google.inject.name.Named; import haveno.common.ClockWatcher; import haveno.common.app.DevEnv; import haveno.core.account.witness.AccountAgeWitnessService; @@ -43,23 +41,27 @@ import haveno.core.xmr.wallet.Restrictions; import haveno.desktop.Navigation; import haveno.desktop.common.model.ActivatableWithDataModel; import haveno.desktop.common.model.ViewModel; -import static haveno.desktop.main.portfolio.pendingtrades.PendingTradesViewModel.SellerState.UNDEFINED; import haveno.desktop.util.DisplayUtils; import haveno.desktop.util.GUIUtil; import haveno.network.p2p.P2PService; -import java.math.BigInteger; -import java.util.Date; -import java.util.stream.Collectors; import javafx.beans.property.IntegerProperty; import javafx.beans.property.ObjectProperty; import javafx.beans.property.ReadOnlyObjectProperty; import javafx.beans.property.SimpleIntegerProperty; import javafx.beans.property.SimpleObjectProperty; -import javax.annotation.Nullable; import lombok.Getter; import org.fxmisc.easybind.EasyBind; import org.fxmisc.easybind.Subscription; +import javax.annotation.Nullable; +import javax.inject.Named; +import java.math.BigInteger; +import java.util.Date; +import java.util.stream.Collectors; + +import static com.google.common.base.Preconditions.checkNotNull; +import static haveno.desktop.main.portfolio.pendingtrades.PendingTradesViewModel.SellerState.UNDEFINED; + public class PendingTradesViewModel extends ActivatableWithDataModel implements ViewModel { @Getter @@ -150,12 +152,12 @@ public class PendingTradesViewModel extends ActivatableWithDataModel { diff --git a/desktop/src/main/java/haveno/desktop/main/presentation/AccountPresentation.java b/desktop/src/main/java/haveno/desktop/main/presentation/AccountPresentation.java index 7a7746777a..c54dbff962 100644 --- a/desktop/src/main/java/haveno/desktop/main/presentation/AccountPresentation.java +++ b/desktop/src/main/java/haveno/desktop/main/presentation/AccountPresentation.java @@ -17,8 +17,6 @@ package haveno.desktop.main.presentation; -import com.google.inject.Inject; -import com.google.inject.Singleton; import haveno.common.app.DevEnv; import haveno.core.locale.Res; import haveno.core.user.DontShowAgainLookup; @@ -28,6 +26,9 @@ import javafx.beans.property.BooleanProperty; import javafx.beans.property.SimpleBooleanProperty; import javafx.collections.MapChangeListener; +import javax.inject.Inject; +import javax.inject.Singleton; + @Singleton public class AccountPresentation { diff --git a/desktop/src/main/java/haveno/desktop/main/presentation/MarketPricePresentation.java b/desktop/src/main/java/haveno/desktop/main/presentation/MarketPricePresentation.java index 455655316f..35be328950 100644 --- a/desktop/src/main/java/haveno/desktop/main/presentation/MarketPricePresentation.java +++ b/desktop/src/main/java/haveno/desktop/main/presentation/MarketPricePresentation.java @@ -17,8 +17,6 @@ package haveno.desktop.main.presentation; -import com.google.inject.Inject; -import com.google.inject.Singleton; import haveno.common.UserThread; import haveno.core.locale.CurrencyUtil; import haveno.core.locale.Res; @@ -30,10 +28,6 @@ import haveno.core.util.FormattingUtils; import haveno.core.xmr.wallet.XmrWalletService; import haveno.desktop.components.TxIdTextField; import haveno.desktop.main.shared.PriceFeedComboBoxItem; -import java.util.List; -import java.util.Optional; -import java.util.concurrent.TimeUnit; -import java.util.stream.Collectors; import javafx.beans.property.BooleanProperty; import javafx.beans.property.IntegerProperty; import javafx.beans.property.ObjectProperty; @@ -50,6 +44,13 @@ import org.fxmisc.easybind.EasyBind; import org.fxmisc.easybind.Subscription; import org.fxmisc.easybind.monadic.MonadicBinding; +import javax.inject.Inject; +import javax.inject.Singleton; +import java.util.List; +import java.util.Optional; +import java.util.concurrent.TimeUnit; +import java.util.stream.Collectors; + @Singleton public class MarketPricePresentation { private final Preferences preferences; diff --git a/desktop/src/main/java/haveno/desktop/main/presentation/SettingsPresentation.java b/desktop/src/main/java/haveno/desktop/main/presentation/SettingsPresentation.java index e1336106b3..8f25f91845 100644 --- a/desktop/src/main/java/haveno/desktop/main/presentation/SettingsPresentation.java +++ b/desktop/src/main/java/haveno/desktop/main/presentation/SettingsPresentation.java @@ -17,13 +17,14 @@ package haveno.desktop.main.presentation; -import com.google.inject.Inject; -import com.google.inject.Singleton; import haveno.core.user.Preferences; import javafx.beans.property.BooleanProperty; import javafx.beans.property.SimpleBooleanProperty; import javafx.collections.MapChangeListener; +import javax.inject.Inject; +import javax.inject.Singleton; + @Singleton public class SettingsPresentation { diff --git a/desktop/src/main/java/haveno/desktop/main/settings/SettingsView.java b/desktop/src/main/java/haveno/desktop/main/settings/SettingsView.java index 22fbfb752b..4a2f0a836d 100644 --- a/desktop/src/main/java/haveno/desktop/main/settings/SettingsView.java +++ b/desktop/src/main/java/haveno/desktop/main/settings/SettingsView.java @@ -17,7 +17,6 @@ package haveno.desktop.main.settings; -import com.google.inject.Inject; import haveno.core.locale.Res; import haveno.core.user.Preferences; import haveno.desktop.Navigation; @@ -37,6 +36,8 @@ import javafx.scene.control.ScrollPane; import javafx.scene.control.Tab; import javafx.scene.control.TabPane; +import javax.inject.Inject; + @FxmlView public class SettingsView extends ActivatableView { @FXML diff --git a/desktop/src/main/java/haveno/desktop/main/settings/about/AboutView.java b/desktop/src/main/java/haveno/desktop/main/settings/about/AboutView.java index a682012beb..722638c0b4 100644 --- a/desktop/src/main/java/haveno/desktop/main/settings/about/AboutView.java +++ b/desktop/src/main/java/haveno/desktop/main/settings/about/AboutView.java @@ -17,21 +17,23 @@ package haveno.desktop.main.settings.about; -import com.google.inject.Inject; import haveno.common.app.Version; import haveno.core.locale.Res; import haveno.desktop.common.view.ActivatableView; import haveno.desktop.common.view.FxmlView; import haveno.desktop.components.HyperlinkWithIcon; -import static haveno.desktop.util.FormBuilder.addCompactTopLabelTextField; -import static haveno.desktop.util.FormBuilder.addHyperlinkWithIcon; -import static haveno.desktop.util.FormBuilder.addLabel; -import static haveno.desktop.util.FormBuilder.addTitledGroupBg; import haveno.desktop.util.Layout; import javafx.geometry.HPos; import javafx.scene.control.Label; import javafx.scene.layout.GridPane; +import javax.inject.Inject; + +import static haveno.desktop.util.FormBuilder.addCompactTopLabelTextField; +import static haveno.desktop.util.FormBuilder.addHyperlinkWithIcon; +import static haveno.desktop.util.FormBuilder.addLabel; +import static haveno.desktop.util.FormBuilder.addTitledGroupBg; + @FxmlView public class AboutView extends ActivatableView { diff --git a/desktop/src/main/java/haveno/desktop/main/settings/network/NetworkSettingsView.java b/desktop/src/main/java/haveno/desktop/main/settings/network/NetworkSettingsView.java index bd7b48c6df..cc9ce3bee6 100644 --- a/desktop/src/main/java/haveno/desktop/main/settings/network/NetworkSettingsView.java +++ b/desktop/src/main/java/haveno/desktop/main/settings/network/NetworkSettingsView.java @@ -17,7 +17,6 @@ package haveno.desktop.main.settings.network; -import com.google.inject.Inject; import haveno.common.ClockWatcher; import haveno.common.UserThread; import haveno.core.api.CoreMoneroConnectionsService; @@ -28,8 +27,8 @@ import haveno.core.user.Preferences; import haveno.core.util.FormattingUtils; import haveno.core.util.validation.RegexValidator; import haveno.core.util.validation.RegexValidatorFactory; -import haveno.core.xmr.nodes.LocalBitcoinNode; import haveno.core.xmr.nodes.XmrNodes; +import haveno.core.xmr.nodes.LocalBitcoinNode; import haveno.core.xmr.setup.WalletsSetup; import haveno.desktop.app.HavenoApp; import haveno.desktop.common.view.ActivatableView; @@ -43,10 +42,6 @@ import haveno.desktop.main.overlays.windows.TorNetworkSettingsWindow; import haveno.desktop.util.GUIUtil; import haveno.network.p2p.P2PService; import haveno.network.p2p.network.Statistic; -import java.util.List; -import java.util.concurrent.TimeUnit; -import java.util.stream.Collectors; -import static javafx.beans.binding.Bindings.createStringBinding; import javafx.beans.value.ChangeListener; import javafx.collections.FXCollections; import javafx.collections.ObservableList; @@ -67,6 +62,13 @@ import monero.daemon.model.MoneroPeer; import org.fxmisc.easybind.EasyBind; import org.fxmisc.easybind.Subscription; +import javax.inject.Inject; +import java.util.List; +import java.util.concurrent.TimeUnit; +import java.util.stream.Collectors; + +import static javafx.beans.binding.Bindings.createStringBinding; + @FxmlView public class NetworkSettingsView extends ActivatableView { diff --git a/desktop/src/main/java/haveno/desktop/main/settings/preferences/PreferencesView.java b/desktop/src/main/java/haveno/desktop/main/settings/preferences/PreferencesView.java index 4d81c850b2..f9792d6f94 100644 --- a/desktop/src/main/java/haveno/desktop/main/settings/preferences/PreferencesView.java +++ b/desktop/src/main/java/haveno/desktop/main/settings/preferences/PreferencesView.java @@ -17,9 +17,6 @@ package haveno.desktop.main.settings.preferences; -import static com.google.common.base.Preconditions.checkArgument; -import com.google.inject.Inject; -import com.google.inject.name.Named; import haveno.common.UserThread; import haveno.common.app.DevEnv; import haveno.common.config.Config; @@ -32,10 +29,10 @@ import haveno.core.locale.Country; import haveno.core.locale.CountryUtil; import haveno.core.locale.CryptoCurrency; import haveno.core.locale.CurrencyUtil; +import haveno.core.locale.TraditionalCurrency; import haveno.core.locale.LanguageUtil; import haveno.core.locale.Res; import haveno.core.locale.TradeCurrency; -import haveno.core.locale.TraditionalCurrency; import haveno.core.payment.PaymentAccount; import haveno.core.payment.payload.PaymentMethod; import haveno.core.payment.validation.XmrValidator; @@ -57,24 +54,9 @@ import haveno.desktop.components.PasswordTextField; import haveno.desktop.components.TitledGroupBg; import haveno.desktop.main.overlays.popups.Popup; import haveno.desktop.main.overlays.windows.EditCustomExplorerWindow; -import static haveno.desktop.util.FormBuilder.addButton; -import static haveno.desktop.util.FormBuilder.addComboBox; -import static haveno.desktop.util.FormBuilder.addInputTextField; -import static haveno.desktop.util.FormBuilder.addSlideToggleButton; -import static haveno.desktop.util.FormBuilder.addTextFieldWithEditButton; -import static haveno.desktop.util.FormBuilder.addTitledGroupBg; -import static haveno.desktop.util.FormBuilder.addTopLabelListView; import haveno.desktop.util.GUIUtil; import haveno.desktop.util.ImageUtil; import haveno.desktop.util.Layout; -import java.io.File; -import java.math.BigInteger; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Set; -import java.util.concurrent.TimeUnit; -import java.util.stream.Collectors; import javafx.beans.value.ChangeListener; import javafx.collections.FXCollections; import javafx.collections.ObservableList; @@ -99,6 +81,26 @@ import javafx.util.Callback; import javafx.util.StringConverter; import org.apache.commons.lang3.StringUtils; +import javax.inject.Inject; +import javax.inject.Named; +import java.io.File; +import java.math.BigInteger; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Set; +import java.util.concurrent.TimeUnit; +import java.util.stream.Collectors; + +import static com.google.common.base.Preconditions.checkArgument; +import static haveno.desktop.util.FormBuilder.addButton; +import static haveno.desktop.util.FormBuilder.addComboBox; +import static haveno.desktop.util.FormBuilder.addInputTextField; +import static haveno.desktop.util.FormBuilder.addSlideToggleButton; +import static haveno.desktop.util.FormBuilder.addTextFieldWithEditButton; +import static haveno.desktop.util.FormBuilder.addTitledGroupBg; +import static haveno.desktop.util.FormBuilder.addTopLabelListView; + @FxmlView public class PreferencesView extends ActivatableViewAndModel { private final User user; diff --git a/desktop/src/main/java/haveno/desktop/main/support/SupportView.java b/desktop/src/main/java/haveno/desktop/main/support/SupportView.java index 92f3e9ae1a..0ff81ea2a3 100644 --- a/desktop/src/main/java/haveno/desktop/main/support/SupportView.java +++ b/desktop/src/main/java/haveno/desktop/main/support/SupportView.java @@ -17,7 +17,6 @@ package haveno.desktop.main.support; -import com.google.inject.Inject; import haveno.common.app.DevEnv; import haveno.common.crypto.KeyRing; import haveno.common.crypto.PubKeyRing; @@ -38,8 +37,8 @@ import haveno.desktop.common.view.FxmlView; import haveno.desktop.common.view.View; import haveno.desktop.common.view.ViewLoader; import haveno.desktop.main.MainView; -import haveno.desktop.main.offer.signedoffer.SignedOfferView; import haveno.desktop.main.overlays.popups.Popup; +import haveno.desktop.main.offer.signedoffer.SignedOfferView; import haveno.desktop.main.support.dispute.agent.arbitration.ArbitratorView; import haveno.desktop.main.support.dispute.agent.mediation.MediatorView; import haveno.desktop.main.support.dispute.agent.refund.RefundAgentView; @@ -51,7 +50,9 @@ import javafx.beans.value.ChangeListener; import javafx.collections.MapChangeListener; import javafx.scene.control.Tab; import javafx.scene.control.TabPane; + import javax.annotation.Nullable; +import javax.inject.Inject; @FxmlView public class SupportView extends ActivatableView { diff --git a/desktop/src/main/java/haveno/desktop/main/support/dispute/agent/arbitration/ArbitratorView.java b/desktop/src/main/java/haveno/desktop/main/support/dispute/agent/arbitration/ArbitratorView.java index 2a82ca9d4f..821892e108 100644 --- a/desktop/src/main/java/haveno/desktop/main/support/dispute/agent/arbitration/ArbitratorView.java +++ b/desktop/src/main/java/haveno/desktop/main/support/dispute/agent/arbitration/ArbitratorView.java @@ -17,8 +17,6 @@ package haveno.desktop.main.support.dispute.agent.arbitration; -import com.google.inject.Inject; -import com.google.inject.name.Named; import haveno.common.config.Config; import haveno.common.crypto.KeyRing; import haveno.core.account.witness.AccountAgeWitnessService; @@ -39,6 +37,9 @@ import haveno.desktop.main.overlays.windows.DisputeSummaryWindow; import haveno.desktop.main.overlays.windows.TradeDetailsWindow; import haveno.desktop.main.support.dispute.agent.DisputeAgentView; +import javax.inject.Inject; +import javax.inject.Named; + @FxmlView public class ArbitratorView extends DisputeAgentView { diff --git a/desktop/src/main/java/haveno/desktop/main/support/dispute/agent/mediation/MediatorView.java b/desktop/src/main/java/haveno/desktop/main/support/dispute/agent/mediation/MediatorView.java index b6ed9031d6..dca55b0871 100644 --- a/desktop/src/main/java/haveno/desktop/main/support/dispute/agent/mediation/MediatorView.java +++ b/desktop/src/main/java/haveno/desktop/main/support/dispute/agent/mediation/MediatorView.java @@ -17,8 +17,6 @@ package haveno.desktop.main.support.dispute.agent.mediation; -import com.google.inject.Inject; -import com.google.inject.name.Named; import haveno.common.config.Config; import haveno.common.crypto.KeyRing; import haveno.core.account.witness.AccountAgeWitnessService; @@ -39,6 +37,9 @@ import haveno.desktop.main.overlays.windows.DisputeSummaryWindow; import haveno.desktop.main.overlays.windows.TradeDetailsWindow; import haveno.desktop.main.support.dispute.agent.DisputeAgentView; +import javax.inject.Inject; +import javax.inject.Named; + @FxmlView public class MediatorView extends DisputeAgentView { diff --git a/desktop/src/main/java/haveno/desktop/main/support/dispute/agent/refund/RefundAgentView.java b/desktop/src/main/java/haveno/desktop/main/support/dispute/agent/refund/RefundAgentView.java index b73cd75905..8b225c7fe6 100644 --- a/desktop/src/main/java/haveno/desktop/main/support/dispute/agent/refund/RefundAgentView.java +++ b/desktop/src/main/java/haveno/desktop/main/support/dispute/agent/refund/RefundAgentView.java @@ -17,8 +17,6 @@ package haveno.desktop.main.support.dispute.agent.refund; -import com.google.inject.Inject; -import com.google.inject.name.Named; import haveno.common.config.Config; import haveno.common.crypto.KeyRing; import haveno.core.account.witness.AccountAgeWitnessService; @@ -41,6 +39,9 @@ import haveno.desktop.main.overlays.windows.DisputeSummaryWindow; import haveno.desktop.main.overlays.windows.TradeDetailsWindow; import haveno.desktop.main.support.dispute.agent.DisputeAgentView; +import javax.inject.Inject; +import javax.inject.Named; + @FxmlView public class RefundAgentView extends DisputeAgentView { diff --git a/desktop/src/main/java/haveno/desktop/main/support/dispute/client/arbitration/ArbitrationClientView.java b/desktop/src/main/java/haveno/desktop/main/support/dispute/client/arbitration/ArbitrationClientView.java index 7c4d83119d..b9eda655cd 100644 --- a/desktop/src/main/java/haveno/desktop/main/support/dispute/client/arbitration/ArbitrationClientView.java +++ b/desktop/src/main/java/haveno/desktop/main/support/dispute/client/arbitration/ArbitrationClientView.java @@ -17,8 +17,6 @@ package haveno.desktop.main.support.dispute.client.arbitration; -import com.google.inject.Inject; -import com.google.inject.name.Named; import haveno.common.config.Config; import haveno.common.crypto.KeyRing; import haveno.core.account.witness.AccountAgeWitnessService; @@ -39,6 +37,9 @@ import haveno.desktop.main.overlays.windows.DisputeSummaryWindow; import haveno.desktop.main.overlays.windows.TradeDetailsWindow; import haveno.desktop.main.support.dispute.client.DisputeClientView; +import javax.inject.Inject; +import javax.inject.Named; + @FxmlView public class ArbitrationClientView extends DisputeClientView { @Inject diff --git a/desktop/src/main/java/haveno/desktop/main/support/dispute/client/mediation/MediationClientView.java b/desktop/src/main/java/haveno/desktop/main/support/dispute/client/mediation/MediationClientView.java index 369bde0696..73865352ef 100644 --- a/desktop/src/main/java/haveno/desktop/main/support/dispute/client/mediation/MediationClientView.java +++ b/desktop/src/main/java/haveno/desktop/main/support/dispute/client/mediation/MediationClientView.java @@ -17,8 +17,6 @@ package haveno.desktop.main.support.dispute.client.mediation; -import com.google.inject.Inject; -import com.google.inject.name.Named; import haveno.common.config.Config; import haveno.common.crypto.KeyRing; import haveno.core.account.witness.AccountAgeWitnessService; @@ -43,6 +41,9 @@ import haveno.desktop.main.overlays.windows.TradeDetailsWindow; import haveno.desktop.main.support.dispute.client.DisputeClientView; import haveno.network.p2p.NodeAddress; +import javax.inject.Inject; +import javax.inject.Named; + @FxmlView public class MediationClientView extends DisputeClientView { @Inject diff --git a/desktop/src/main/java/haveno/desktop/main/support/dispute/client/refund/RefundClientView.java b/desktop/src/main/java/haveno/desktop/main/support/dispute/client/refund/RefundClientView.java index 2b812a8ecf..2dfa06ad82 100644 --- a/desktop/src/main/java/haveno/desktop/main/support/dispute/client/refund/RefundClientView.java +++ b/desktop/src/main/java/haveno/desktop/main/support/dispute/client/refund/RefundClientView.java @@ -17,8 +17,6 @@ package haveno.desktop.main.support.dispute.client.refund; -import com.google.inject.Inject; -import com.google.inject.name.Named; import haveno.common.config.Config; import haveno.common.crypto.KeyRing; import haveno.core.account.witness.AccountAgeWitnessService; @@ -41,6 +39,9 @@ import haveno.desktop.main.overlays.windows.TradeDetailsWindow; import haveno.desktop.main.support.dispute.client.DisputeClientView; import haveno.network.p2p.NodeAddress; +import javax.inject.Inject; +import javax.inject.Named; + @FxmlView public class RefundClientView extends DisputeClientView { @Inject diff --git a/desktop/src/main/java/haveno/desktop/util/Transitions.java b/desktop/src/main/java/haveno/desktop/util/Transitions.java index 06c84712ed..c0ce04c2ca 100644 --- a/desktop/src/main/java/haveno/desktop/util/Transitions.java +++ b/desktop/src/main/java/haveno/desktop/util/Transitions.java @@ -17,8 +17,6 @@ package haveno.desktop.util; -import com.google.inject.Inject; -import com.google.inject.Singleton; import haveno.common.UserThread; import haveno.core.user.Preferences; import javafx.animation.FadeTransition; @@ -34,6 +32,9 @@ import javafx.scene.effect.GaussianBlur; import javafx.scene.layout.Pane; import javafx.util.Duration; +import javax.inject.Inject; +import javax.inject.Singleton; + @Singleton public class Transitions { diff --git a/docs/installing.md b/docs/installing.md index 8e12c8bae2..3d525f6a3a 100644 --- a/docs/installing.md +++ b/docs/installing.md @@ -6,12 +6,12 @@ These are the steps needed to build Haveno and test it on our test network or lo On Ubuntu: - 1. `sudo apt install make wget git openjdk-17-jdk`. - 2. If `echo $JAVA_HOME` does not print the path to JDK 17, then `export JAVA_HOME=/path/to/jdk` (e.g. `export JAVA_HOME=/usr/lib/jvm/java-17-openjdk`). + 1. `sudo apt install make wget git openjdk-11-jdk`. + 2. If `echo $JAVA_HOME` does not print the path to JDK 11, then `export JAVA_HOME=/path/to/jdk` (e.g. `export JAVA_HOME=/usr/lib/jvm/java-11-openjdk`). On Windows: - 1. Download [Java JDK 17](https://adoptium.net/temurin/archive/?version=17). During installation, enable the option to set the $JAVA_HOME environment variable. + 1. Download [Java JDK 11](https://adoptium.net/temurin/archive/?version=11). During installation, enable the option to set the $JAVA_HOME environment variable. 2. Install [MSYS2](https://www.msys2.org/). 3. Start MSYS2 MINGW64 or MSYS MINGW32 depending on your system. Use MSYS2 for all commands throughout this document. 4. Update pacman: `pacman -Syy` diff --git a/gradle/README.md b/gradle/README.md index bb93fa1f7c..b1f90bd970 100644 --- a/gradle/README.md +++ b/gradle/README.md @@ -8,9 +8,9 @@ Visit the [Gradle website](https://gradle.org/releases/) and decide the: Adjust the following command with tha arguments above and execute it twice: - ./gradlew wrapper --gradle-version 8.2 \ + ./gradlew wrapper --gradle-version 8.0.2 \ --distribution-type all \ - --gradle-distribution-sha256-sum 5022b0b25fe182b0e50867e77f484501dba44feeea88f5c1f13b6b4660463640 + --gradle-distribution-sha256-sum 47a5bfed9ef814f90f8debcbbb315e8e7c654109acd224595ea39fca95c5d4da The first execution should automatically update: diff --git a/gradle/verification-metadata.xml b/gradle/verification-metadata.xml index a448d4e884..8472b2c7c5 100644 --- a/gradle/verification-metadata.xml +++ b/gradle/verification-metadata.xml @@ -678,11 +678,6 @@ - - - - - @@ -738,6 +733,14 @@ + + + + + + + + @@ -749,25 +752,59 @@ + + + + + + + + + + + + + + + + + + + + + - - - - - + + + + + + + + + + + + + + + + + + @@ -794,9 +831,17 @@ - - - + + + + + + + + + + + @@ -812,11 +857,6 @@ - - - - - @@ -921,9 +961,9 @@ - - - + + + @@ -1511,11 +1551,6 @@ - - - - - @@ -2163,11 +2198,6 @@ - - - - - @@ -2346,24 +2376,48 @@ - - - + + + + + + - - - + + + + + + - - - + + + - - - + + + + + + + + + + + + + + + + + + + + + @@ -3127,11 +3181,6 @@ - - - - - @@ -3173,11 +3222,6 @@ - - - - - @@ -3201,11 +3245,6 @@ - - - - - diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 033e24c4cdf41af1ab109bc7f253b2b887023340..7454180f2ae8848c63b8b4dea2cb829da983f2fa 100644 GIT binary patch delta 37613 zcmY(qV{oQV^eq}Y6K7)Ewr$(Ct;rMH)*IXQ#F$tUXJSr_iE)4D{BNCe@29S=-c|i! zRo7Z;@70OdkVy-W&?@qfPzb5uNLa~u7~lxWOs?SndxruA1_tKrX3Y!<_J1qZvHs^U z6$+dX1py2U4(`7qQLuE%rSh)SPgfb>LDDx(#8}qWevm5)S~FRMi9yXXcunDgG(=Opj6?!MGeaUuQq@d-T1+#fM+DY{EY}vAIx zWZg`IIXv#_^rpHq$)UbLO)pJuS@PZY3SoR#!*0oQk?o!qFQ79vdXIKH?1ggK3Sd3!v9<8BuRLCy{%s-0xQSeB0`u3dGmnJGcBmG|5d+(UuctR-V!yxqPHus zK2?=;Rw7aNJNqM6;`h`PmtH+$H)=4ihrq|Z3bU8GITKZh;pi)0-qZIYohrpuG|V^}jQqyF)y z-Wi_F$$$o9PZraL-r(+8PkVdw(B%W~l-uODpVKzo*`6GmdyhQgg$(sbkkRLV87~tu zxHwv}X8GEku*U^soXVI_VTiqNZM>2NE*!|GN&K0p>(EWloV2V?Z#tK96i@Fn&Tcfv zk@eeJA*juMFR^r`8fB^D>xgwpR2rfWC&275$pW3&@3>bC`p^+Np+Pg5NcrB2M2QsM z+|*8vW%<1_HS6lb6|#M?Zt4AkC3T%<=pJrdO*tp@2~OFT@Ew(W^4+>BZ86!#$L;vW zKry9f-GoXUqbq{#+dpgQhtd0P#d${mcmu1t7|=A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ivQ~Cyj+zrKA-#?1NSRe@d z6!JBH|1wqq0Ms|s@?ZR;MgX5!K~uCqiljew8qtXUOu`j-5mxe55txn&B07x>$IDF9 z0tqwWLiRs6T!HH+)T!(%4G{rsi0_RG{ktL!0HC>1q0XEul{b>85OzV7|8&5O9ihjR5!?O5a~yDY4Gt!9OA91=enwe%;sk=eEub ec=;3@&P1fHgaluG0s!#CU+MS&z})iBZ~q7WrX+m; diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index a3044fac5a..1a703c8b43 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,8 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionSha256Sum=5022b0b25fe182b0e50867e77f484501dba44feeea88f5c1f13b6b4660463640 -distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-all.zip -networkTimeout=10000 -validateDistributionUrl=true +distributionSha256Sum=47a5bfed9ef814f90f8debcbbb315e8e7c654109acd224595ea39fca95c5d4da +distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index fcb6fca147..1b6c787337 100755 --- a/gradlew +++ b/gradlew @@ -55,7 +55,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -80,11 +80,14 @@ do esac done -# This is normally unused -# shellcheck disable=SC2034 -APP_BASE_NAME=${0##*/} APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit +APP_NAME="Gradle" +APP_BASE_NAME=${0##*/} + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -130,29 +133,22 @@ location of your Java installation." fi else JAVACMD=java - if ! command -v java >/dev/null 2>&1 - then - die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the location of your Java installation." - fi fi # Increase the maximum file descriptors if we can. if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then case $MAX_FD in #( max*) - # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 MAX_FD=$( ulimit -H -n ) || warn "Could not query maximum file descriptor limit" esac case $MAX_FD in #( '' | soft) :;; #( *) - # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 ulimit -n "$MAX_FD" || warn "Could not set maximum file descriptor limit to $MAX_FD" esac @@ -197,10 +193,6 @@ if "$cygwin" || "$msys" ; then done fi - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' - # Collect all arguments for the java command; # * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of # shell script including quotes and variable substitutions, so put them in @@ -213,12 +205,6 @@ set -- \ org.gradle.wrapper.GradleWrapperMain \ "$@" -# Stop when "xargs" is not available. -if ! command -v xargs >/dev/null 2>&1 -then - die "xargs is not available" -fi - # Use "xargs" to parse quoted args. # # With -n1 it outputs one arg per line, with the quotes and backslashes removed. diff --git a/gradlew.bat b/gradlew.bat index 93e3f59f13..107acd32c4 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -14,7 +14,7 @@ @rem limitations under the License. @rem -@if "%DEBUG%"=="" @echo off +@if "%DEBUG%" == "" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,8 +25,7 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%"=="" set DIRNAME=. -@rem This is normally unused +if "%DIRNAME%" == "" set DIRNAME=. set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -41,7 +40,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if %ERRORLEVEL% equ 0 goto execute +if "%ERRORLEVEL%" == "0" goto execute echo. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. @@ -76,15 +75,13 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar :end @rem End local scope for the variables with windows NT shell -if %ERRORLEVEL% equ 0 goto mainEnd +if "%ERRORLEVEL%"=="0" goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -set EXIT_CODE=%ERRORLEVEL% -if %EXIT_CODE% equ 0 set EXIT_CODE=1 -if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% -exit /b %EXIT_CODE% +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 :mainEnd if "%OS%"=="Windows_NT" endlocal diff --git a/p2p/src/main/java/haveno/network/Socks5ProxyProvider.java b/p2p/src/main/java/haveno/network/Socks5ProxyProvider.java index c8b4ad10df..8029e5014d 100644 --- a/p2p/src/main/java/haveno/network/Socks5ProxyProvider.java +++ b/p2p/src/main/java/haveno/network/Socks5ProxyProvider.java @@ -18,15 +18,16 @@ package haveno.network; import com.google.inject.Inject; -import com.google.inject.name.Named; import com.runjva.sourceforge.jsocks.protocol.Socks5Proxy; import haveno.common.config.Config; import haveno.network.p2p.network.NetworkNode; -import java.net.UnknownHostException; -import javax.annotation.Nullable; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import javax.annotation.Nullable; +import javax.inject.Named; +import java.net.UnknownHostException; + /** * Provides Socks5Proxies for the bitcoin network and http requests *

diff --git a/p2p/src/main/java/haveno/network/crypto/EncryptionService.java b/p2p/src/main/java/haveno/network/crypto/EncryptionService.java index b2fe4a6039..b0e6fa7b8d 100644 --- a/p2p/src/main/java/haveno/network/crypto/EncryptionService.java +++ b/p2p/src/main/java/haveno/network/crypto/EncryptionService.java @@ -17,11 +17,9 @@ package haveno.network.crypto; -import com.google.inject.Inject; import com.google.protobuf.InvalidProtocolBufferException; import haveno.common.crypto.CryptoException; import haveno.common.crypto.Encryption; -import static haveno.common.crypto.Encryption.decryptSecretKey; import haveno.common.crypto.Hash; import haveno.common.crypto.KeyRing; import haveno.common.crypto.PubKeyRing; @@ -31,11 +29,15 @@ import haveno.common.proto.ProtobufferException; import haveno.common.proto.network.NetworkEnvelope; import haveno.common.proto.network.NetworkProtoResolver; import haveno.network.p2p.DecryptedMessageWithPubKey; +import lombok.extern.slf4j.Slf4j; + +import javax.crypto.SecretKey; +import javax.inject.Inject; import java.security.KeyPair; import java.security.PrivateKey; import java.security.PublicKey; -import javax.crypto.SecretKey; -import lombok.extern.slf4j.Slf4j; + +import static haveno.common.crypto.Encryption.decryptSecretKey; @Slf4j public class EncryptionService { diff --git a/p2p/src/main/java/haveno/network/http/HttpClientImpl.java b/p2p/src/main/java/haveno/network/http/HttpClientImpl.java index d75eb0461e..17185d60e1 100644 --- a/p2p/src/main/java/haveno/network/http/HttpClientImpl.java +++ b/p2p/src/main/java/haveno/network/http/HttpClientImpl.java @@ -17,25 +17,10 @@ package haveno.network.http; -import static com.google.common.base.Preconditions.checkArgument; -import static com.google.common.base.Preconditions.checkNotNull; -import com.google.inject.Inject; import com.runjva.sourceforge.jsocks.protocol.Socks5Proxy; import haveno.common.app.Version; import haveno.common.util.Utilities; import haveno.network.Socks5ProxyProvider; -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.UnsupportedEncodingException; -import java.net.HttpURLConnection; -import java.net.InetSocketAddress; -import java.net.URL; -import java.nio.charset.StandardCharsets; -import java.util.UUID; -import java.util.concurrent.TimeUnit; -import javax.annotation.Nullable; import lombok.Getter; import lombok.Setter; import lombok.extern.slf4j.Slf4j; @@ -54,6 +39,23 @@ import org.apache.http.impl.client.HttpClients; import org.apache.http.impl.conn.PoolingHttpClientConnectionManager; import org.apache.http.ssl.SSLContexts; +import javax.annotation.Nullable; +import javax.inject.Inject; +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.UnsupportedEncodingException; +import java.net.HttpURLConnection; +import java.net.InetSocketAddress; +import java.net.URL; +import java.nio.charset.StandardCharsets; +import java.util.UUID; +import java.util.concurrent.TimeUnit; + +import static com.google.common.base.Preconditions.checkArgument; +import static com.google.common.base.Preconditions.checkNotNull; + // TODO close connection if failing @Slf4j public class HttpClientImpl implements HttpClient { diff --git a/p2p/src/main/java/haveno/network/p2p/NetworkNodeProvider.java b/p2p/src/main/java/haveno/network/p2p/NetworkNodeProvider.java index 6825abe79c..5bdaa2cc38 100644 --- a/p2p/src/main/java/haveno/network/p2p/NetworkNodeProvider.java +++ b/p2p/src/main/java/haveno/network/p2p/NetworkNodeProvider.java @@ -17,20 +17,24 @@ package haveno.network.p2p; -import com.google.inject.Inject; -import com.google.inject.Provider; -import com.google.inject.name.Named; -import haveno.common.config.Config; -import haveno.common.proto.network.NetworkProtoResolver; -import haveno.network.p2p.network.BanFilter; import haveno.network.p2p.network.BridgeAddressProvider; import haveno.network.p2p.network.LocalhostNetworkNode; +import haveno.network.p2p.network.BanFilter; import haveno.network.p2p.network.NetworkNode; import haveno.network.p2p.network.NewTor; import haveno.network.p2p.network.RunningTor; import haveno.network.p2p.network.TorMode; import haveno.network.p2p.network.TorNetworkNode; + +import haveno.common.config.Config; +import haveno.common.proto.network.NetworkProtoResolver; + +import javax.inject.Inject; +import javax.inject.Named; +import javax.inject.Provider; + import java.io.File; + import javax.annotation.Nullable; public class NetworkNodeProvider implements Provider { diff --git a/p2p/src/main/java/haveno/network/p2p/mailbox/IgnoredMailboxService.java b/p2p/src/main/java/haveno/network/p2p/mailbox/IgnoredMailboxService.java index ede80009d5..7d6fd9292b 100644 --- a/p2p/src/main/java/haveno/network/p2p/mailbox/IgnoredMailboxService.java +++ b/p2p/src/main/java/haveno/network/p2p/mailbox/IgnoredMailboxService.java @@ -17,12 +17,13 @@ package haveno.network.p2p.mailbox; -import com.google.inject.Inject; -import com.google.inject.Singleton; import haveno.common.persistence.PersistenceManager; import haveno.common.proto.persistable.PersistedDataHost; import haveno.network.p2p.storage.payload.MailboxStoragePayload; +import javax.inject.Inject; +import javax.inject.Singleton; + /** * We persist failed attempts to decrypt mailbox messages (expected if mailbox message was not addressed to us). * This improves performance at processing mailbox messages. diff --git a/p2p/src/main/java/haveno/network/p2p/mailbox/MailboxMessageService.java b/p2p/src/main/java/haveno/network/p2p/mailbox/MailboxMessageService.java index 09f7b49e7f..5249a7caf2 100644 --- a/p2p/src/main/java/haveno/network/p2p/mailbox/MailboxMessageService.java +++ b/p2p/src/main/java/haveno/network/p2p/mailbox/MailboxMessageService.java @@ -18,15 +18,10 @@ package haveno.network.p2p.mailbox; import com.google.common.base.Joiner; -import static com.google.common.base.Preconditions.checkArgument; -import static com.google.common.base.Preconditions.checkNotNull; import com.google.common.util.concurrent.FutureCallback; import com.google.common.util.concurrent.Futures; import com.google.common.util.concurrent.MoreExecutors; import com.google.common.util.concurrent.SettableFuture; -import com.google.inject.Inject; -import com.google.inject.Singleton; -import com.google.inject.name.Named; import haveno.common.UserThread; import haveno.common.config.Config; import haveno.common.crypto.CryptoException; @@ -58,6 +53,13 @@ import haveno.network.p2p.storage.payload.MailboxStoragePayload; import haveno.network.p2p.storage.payload.ProtectedMailboxStorageEntry; import haveno.network.p2p.storage.payload.ProtectedStorageEntry; import haveno.network.utils.CapabilityUtils; +import lombok.extern.slf4j.Slf4j; +import org.jetbrains.annotations.NotNull; + +import javax.annotation.Nullable; +import javax.inject.Inject; +import javax.inject.Named; +import javax.inject.Singleton; import java.security.PublicKey; import java.time.Clock; import java.util.ArrayDeque; @@ -76,9 +78,9 @@ import java.util.concurrent.CopyOnWriteArraySet; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicLong; import java.util.stream.Collectors; -import javax.annotation.Nullable; -import lombok.extern.slf4j.Slf4j; -import org.jetbrains.annotations.NotNull; + +import static com.google.common.base.Preconditions.checkArgument; +import static com.google.common.base.Preconditions.checkNotNull; /** * Responsible for handling of mailbox messages. diff --git a/p2p/src/main/java/haveno/network/p2p/network/Connection.java b/p2p/src/main/java/haveno/network/p2p/network/Connection.java index daf1bc0e7d..bd887e2cc1 100644 --- a/p2p/src/main/java/haveno/network/p2p/network/Connection.java +++ b/p2p/src/main/java/haveno/network/p2p/network/Connection.java @@ -17,22 +17,6 @@ package haveno.network.p2p.network; -import static com.google.common.base.Preconditions.checkArgument; -import static com.google.common.base.Preconditions.checkNotNull; -import com.google.common.util.concurrent.Uninterruptibles; -import com.google.inject.Inject; -import com.google.protobuf.InvalidProtocolBufferException; -import haveno.common.Proto; -import haveno.common.UserThread; -import haveno.common.app.Capabilities; -import haveno.common.app.HasCapabilities; -import haveno.common.app.Version; -import haveno.common.config.Config; -import haveno.common.proto.ProtobufferException; -import haveno.common.proto.network.NetworkEnvelope; -import haveno.common.proto.network.NetworkProtoResolver; -import haveno.common.util.SingleThreadExecutorUtils; -import haveno.common.util.Utilities; import haveno.network.p2p.BundleOfEnvelopes; import haveno.network.p2p.CloseConnectionMessage; import haveno.network.p2p.ExtendedDataSizePermission; @@ -46,16 +30,39 @@ import haveno.network.p2p.storage.messages.AddPersistableNetworkPayloadMessage; import haveno.network.p2p.storage.messages.RemoveDataMessage; import haveno.network.p2p.storage.payload.CapabilityRequiringPayload; import haveno.network.p2p.storage.payload.PersistableNetworkPayload; + +import haveno.common.Proto; +import haveno.common.UserThread; +import haveno.common.app.Capabilities; +import haveno.common.app.HasCapabilities; +import haveno.common.app.Version; +import haveno.common.config.Config; +import haveno.common.proto.ProtobufferException; +import haveno.common.proto.network.NetworkEnvelope; +import haveno.common.proto.network.NetworkProtoResolver; +import haveno.common.util.SingleThreadExecutorUtils; +import haveno.common.util.Utilities; + +import com.google.protobuf.InvalidProtocolBufferException; + +import javax.inject.Inject; + +import com.google.common.util.concurrent.Uninterruptibles; + +import javafx.beans.property.ObjectProperty; +import javafx.beans.property.SimpleObjectProperty; + +import java.net.Socket; +import java.net.SocketException; +import java.net.SocketTimeoutException; + import java.io.EOFException; import java.io.IOException; import java.io.InputStream; import java.io.InvalidClassException; import java.io.OptionalDataException; import java.io.StreamCorruptedException; -import java.lang.ref.WeakReference; -import java.net.Socket; -import java.net.SocketException; -import java.net.SocketTimeoutException; + import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; @@ -70,12 +77,17 @@ import java.util.concurrent.ExecutorService; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; import java.util.stream.Collectors; -import javafx.beans.property.ObjectProperty; -import javafx.beans.property.SimpleObjectProperty; + +import java.lang.ref.WeakReference; + import lombok.Getter; import lombok.extern.slf4j.Slf4j; + import org.jetbrains.annotations.Nullable; +import static com.google.common.base.Preconditions.checkArgument; +import static com.google.common.base.Preconditions.checkNotNull; + /** * Connection is created by the server thread or by sendMessage from NetworkNode. * All handlers are called on User thread. diff --git a/p2p/src/main/java/haveno/network/p2p/peers/Broadcaster.java b/p2p/src/main/java/haveno/network/p2p/peers/Broadcaster.java index 625483edf2..109e192fcb 100644 --- a/p2p/src/main/java/haveno/network/p2p/peers/Broadcaster.java +++ b/p2p/src/main/java/haveno/network/p2p/peers/Broadcaster.java @@ -17,25 +17,31 @@ package haveno.network.p2p.peers; -import com.google.common.util.concurrent.ListeningExecutorService; -import com.google.common.util.concurrent.MoreExecutors; -import com.google.inject.Inject; -import com.google.inject.name.Named; +import haveno.network.p2p.NodeAddress; +import haveno.network.p2p.network.NetworkNode; +import haveno.network.p2p.storage.messages.BroadcastMessage; + import haveno.common.Timer; import haveno.common.UserThread; import haveno.common.config.Config; import haveno.common.util.Utilities; -import haveno.network.p2p.NodeAddress; -import haveno.network.p2p.network.NetworkNode; -import haveno.network.p2p.storage.messages.BroadcastMessage; + +import javax.inject.Inject; +import javax.inject.Named; + +import com.google.common.util.concurrent.ListeningExecutorService; +import com.google.common.util.concurrent.MoreExecutors; + import java.util.ArrayList; import java.util.List; import java.util.Set; import java.util.concurrent.CopyOnWriteArraySet; import java.util.concurrent.ThreadPoolExecutor; import java.util.concurrent.TimeUnit; + import lombok.Value; import lombok.extern.slf4j.Slf4j; + import org.jetbrains.annotations.Nullable; @Slf4j diff --git a/p2p/src/main/java/haveno/network/p2p/peers/PeerManager.java b/p2p/src/main/java/haveno/network/p2p/peers/PeerManager.java index 0ca6217d47..457457deed 100644 --- a/p2p/src/main/java/haveno/network/p2p/peers/PeerManager.java +++ b/p2p/src/main/java/haveno/network/p2p/peers/PeerManager.java @@ -18,9 +18,6 @@ package haveno.network.p2p.peers; import com.google.common.annotations.VisibleForTesting; -import static com.google.common.base.Preconditions.checkArgument; -import com.google.inject.Inject; -import com.google.inject.name.Named; import haveno.common.ClockWatcher; import haveno.common.Timer; import haveno.common.UserThread; @@ -40,6 +37,12 @@ import haveno.network.p2p.network.RuleViolation; import haveno.network.p2p.peers.peerexchange.Peer; import haveno.network.p2p.peers.peerexchange.PeerList; import haveno.network.p2p.seed.SeedNodeRepository; +import lombok.Getter; +import lombok.extern.slf4j.Slf4j; + +import javax.annotation.Nullable; +import javax.inject.Inject; +import javax.inject.Named; import java.util.ArrayList; import java.util.Collection; import java.util.Comparator; @@ -53,9 +56,8 @@ import java.util.concurrent.CopyOnWriteArrayList; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; import java.util.stream.Collectors; -import javax.annotation.Nullable; -import lombok.Getter; -import lombok.extern.slf4j.Slf4j; + +import static com.google.common.base.Preconditions.checkArgument; @Slf4j public final class PeerManager implements ConnectionListener, PersistedDataHost { diff --git a/p2p/src/main/java/haveno/network/p2p/peers/getdata/RequestDataManager.java b/p2p/src/main/java/haveno/network/p2p/peers/getdata/RequestDataManager.java index fbb1fb7e0d..5a62959e12 100644 --- a/p2p/src/main/java/haveno/network/p2p/peers/getdata/RequestDataManager.java +++ b/p2p/src/main/java/haveno/network/p2p/peers/getdata/RequestDataManager.java @@ -17,9 +17,6 @@ package haveno.network.p2p.peers.getdata; -import static com.google.common.base.Preconditions.checkArgument; -import static com.google.common.base.Preconditions.checkNotNull; -import com.google.inject.Inject; import haveno.common.Timer; import haveno.common.UserThread; import haveno.common.app.Version; @@ -35,6 +32,10 @@ import haveno.network.p2p.peers.getdata.messages.GetDataRequest; import haveno.network.p2p.peers.peerexchange.Peer; import haveno.network.p2p.seed.SeedNodeRepository; import haveno.network.p2p.storage.P2PDataStorage; +import lombok.extern.slf4j.Slf4j; +import org.jetbrains.annotations.Nullable; + +import javax.inject.Inject; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; @@ -44,8 +45,9 @@ import java.util.Map; import java.util.Optional; import java.util.concurrent.TimeUnit; import java.util.stream.Collectors; -import lombok.extern.slf4j.Slf4j; -import org.jetbrains.annotations.Nullable; + +import static com.google.common.base.Preconditions.checkArgument; +import static com.google.common.base.Preconditions.checkNotNull; @Slf4j public class RequestDataManager implements MessageListener, ConnectionListener, PeerManager.Listener { diff --git a/p2p/src/main/java/haveno/network/p2p/peers/keepalive/KeepAliveManager.java b/p2p/src/main/java/haveno/network/p2p/peers/keepalive/KeepAliveManager.java index 715238881b..d1772dc8bc 100644 --- a/p2p/src/main/java/haveno/network/p2p/peers/keepalive/KeepAliveManager.java +++ b/p2p/src/main/java/haveno/network/p2p/peers/keepalive/KeepAliveManager.java @@ -20,7 +20,6 @@ package haveno.network.p2p.peers.keepalive; import com.google.common.util.concurrent.Futures; import com.google.common.util.concurrent.MoreExecutors; import com.google.common.util.concurrent.SettableFuture; -import com.google.inject.Inject; import haveno.common.Timer; import haveno.common.UserThread; import haveno.common.proto.network.NetworkEnvelope; @@ -34,11 +33,13 @@ import haveno.network.p2p.network.OutboundConnection; import haveno.network.p2p.peers.PeerManager; import haveno.network.p2p.peers.keepalive.messages.Ping; import haveno.network.p2p.peers.keepalive.messages.Pong; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import javax.inject.Inject; import java.util.HashMap; import java.util.Map; import java.util.Random; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; public class KeepAliveManager implements MessageListener, ConnectionListener, PeerManager.Listener { private static final Logger log = LoggerFactory.getLogger(KeepAliveManager.class); diff --git a/p2p/src/main/java/haveno/network/p2p/peers/peerexchange/PeerExchangeManager.java b/p2p/src/main/java/haveno/network/p2p/peers/peerexchange/PeerExchangeManager.java index d2b454a1b8..ec7d3b60f1 100644 --- a/p2p/src/main/java/haveno/network/p2p/peers/peerexchange/PeerExchangeManager.java +++ b/p2p/src/main/java/haveno/network/p2p/peers/peerexchange/PeerExchangeManager.java @@ -18,7 +18,6 @@ package haveno.network.p2p.peers.peerexchange; import com.google.common.base.Preconditions; -import com.google.inject.Inject; import haveno.common.Timer; import haveno.common.UserThread; import haveno.common.proto.network.NetworkEnvelope; @@ -31,6 +30,10 @@ import haveno.network.p2p.network.NetworkNode; import haveno.network.p2p.peers.PeerManager; import haveno.network.p2p.peers.peerexchange.messages.GetPeersRequest; import haveno.network.p2p.seed.SeedNodeRepository; +import lombok.extern.slf4j.Slf4j; + +import javax.annotation.Nullable; +import javax.inject.Inject; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; @@ -43,8 +46,6 @@ import java.util.Random; import java.util.Set; import java.util.concurrent.TimeUnit; import java.util.stream.Collectors; -import javax.annotation.Nullable; -import lombok.extern.slf4j.Slf4j; @Slf4j public class PeerExchangeManager implements MessageListener, ConnectionListener, PeerManager.Listener { diff --git a/p2p/src/main/java/haveno/network/p2p/storage/P2PDataStorage.java b/p2p/src/main/java/haveno/network/p2p/storage/P2PDataStorage.java index ea52805a7c..45017c9967 100644 --- a/p2p/src/main/java/haveno/network/p2p/storage/P2PDataStorage.java +++ b/p2p/src/main/java/haveno/network/p2p/storage/P2PDataStorage.java @@ -17,26 +17,6 @@ package haveno.network.p2p.storage; -import com.google.common.annotations.VisibleForTesting; -import com.google.common.collect.Maps; -import com.google.inject.Inject; -import com.google.inject.name.Named; -import com.google.protobuf.ByteString; -import haveno.common.Timer; -import haveno.common.UserThread; -import haveno.common.app.Capabilities; -import haveno.common.crypto.CryptoException; -import haveno.common.crypto.Hash; -import haveno.common.crypto.Sig; -import haveno.common.persistence.PersistenceManager; -import haveno.common.proto.network.GetDataResponsePriority; -import haveno.common.proto.network.NetworkEnvelope; -import haveno.common.proto.network.NetworkPayload; -import haveno.common.proto.persistable.PersistablePayload; -import haveno.common.proto.persistable.PersistedDataHost; -import haveno.common.util.Hex; -import haveno.common.util.Tuple2; -import haveno.common.util.Utilities; import haveno.network.p2p.NodeAddress; import haveno.network.p2p.network.CloseConnectionReason; import haveno.network.p2p.network.Connection; @@ -74,9 +54,43 @@ import haveno.network.p2p.storage.persistence.ProtectedDataStoreService; import haveno.network.p2p.storage.persistence.RemovedPayloadsService; import haveno.network.p2p.storage.persistence.ResourceDataStoreService; import haveno.network.p2p.storage.persistence.SequenceNumberMap; + +import haveno.common.Timer; +import haveno.common.UserThread; +import haveno.common.app.Capabilities; +import haveno.common.crypto.CryptoException; +import haveno.common.crypto.Hash; +import haveno.common.crypto.Sig; +import haveno.common.persistence.PersistenceManager; +import haveno.common.proto.network.GetDataResponsePriority; +import haveno.common.proto.network.NetworkEnvelope; +import haveno.common.proto.network.NetworkPayload; +import haveno.common.proto.persistable.PersistablePayload; +import haveno.common.proto.persistable.PersistedDataHost; +import haveno.common.util.Hex; +import haveno.common.util.Tuple2; +import haveno.common.util.Utilities; + +import com.google.protobuf.ByteString; + +import com.google.inject.name.Named; + +import javax.inject.Inject; + +import com.google.common.annotations.VisibleForTesting; +import com.google.common.collect.Maps; + +import org.fxmisc.easybind.EasyBind; +import org.fxmisc.easybind.monadic.MonadicBinding; + +import javafx.beans.property.BooleanProperty; +import javafx.beans.property.SimpleBooleanProperty; + import java.security.KeyPair; import java.security.PublicKey; + import java.time.Clock; + import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; @@ -97,16 +111,14 @@ import java.util.concurrent.atomic.AtomicLong; import java.util.function.Function; import java.util.function.Predicate; import java.util.stream.Collectors; -import javafx.beans.property.BooleanProperty; -import javafx.beans.property.SimpleBooleanProperty; -import javax.annotation.Nullable; + import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.Setter; import lombok.ToString; import lombok.extern.slf4j.Slf4j; -import org.fxmisc.easybind.EasyBind; -import org.fxmisc.easybind.monadic.MonadicBinding; + +import javax.annotation.Nullable; @Slf4j public class P2PDataStorage implements MessageListener, ConnectionListener, PersistedDataHost { @@ -235,7 +247,7 @@ public class P2PDataStorage implements MessageListener, ConnectionListener, Pers appendOnlyDataStoreService.readFromResourcesSync(postFix); protectedDataStoreService.readFromResourcesSync(postFix); resourceDataStoreService.readFromResourcesSync(postFix); - + map.putAll(protectedDataStoreService.getMap()); } } @@ -819,9 +831,9 @@ public class P2PDataStorage implements MessageListener, ConnectionListener, Pers synchronized (map) { ProtectedStoragePayload protectedStoragePayload = protectedStorageEntry.getProtectedStoragePayload(); ByteArray hashOfPayload = get32ByteHashAsByteArray(protectedStoragePayload); - + //log.trace("## call addProtectedStorageEntry hash={}, map={}", hashOfPayload, printMap()); - + // We do that check early as it is a very common case for returning, so we return early // If we have seen a more recent operation for this payload and we have a payload locally, ignore it ProtectedStorageEntry storedEntry = map.get(hashOfPayload); @@ -829,13 +841,13 @@ public class P2PDataStorage implements MessageListener, ConnectionListener, Pers log.trace("## hasSequenceNrIncreased is false. hash={}", hashOfPayload); return false; } - + if (hasAlreadyRemovedAddOncePayload(protectedStoragePayload, hashOfPayload)) { log.trace("## We have already removed that AddOncePayload by a previous removeDataMessage. " + "We ignore that message. ProtectedStoragePayload: {}", protectedStoragePayload.toString()); return false; } - + // To avoid that expired data get stored and broadcast we check for expire date. if (protectedStorageEntry.isExpired(clock)) { String peer = sender != null ? sender.getFullAddress() : "sender is null"; @@ -843,7 +855,7 @@ public class P2PDataStorage implements MessageListener, ConnectionListener, Pers peer, protectedStorageEntry.getProtectedStoragePayload().getClass().getSimpleName()); return false; } - + // We want to allow add operations for equal sequence numbers if we don't have the payload locally. This is // the case for non-persistent Payloads that need to be reconstructed from peer and seed nodes each startup. MapValue sequenceNumberMapValue = sequenceNumberMap.get(hashOfPayload); @@ -852,36 +864,36 @@ public class P2PDataStorage implements MessageListener, ConnectionListener, Pers log.trace("## sequenceNr too low hash={}", hashOfPayload); return false; } - + // Verify the ProtectedStorageEntry is well formed and valid for the add operation if (!protectedStorageEntry.isValidForAddOperation()) { log.trace("## !isValidForAddOperation hash={}", hashOfPayload); return false; } - + // If we have already seen an Entry with the same hash, verify the metadata is equal if (storedEntry != null && !protectedStorageEntry.matchesRelevantPubKey(storedEntry)) { log.trace("## !matchesRelevantPubKey hash={}", hashOfPayload); return false; } - + // Test against filterPredicate set from FilterManager if (filterPredicate != null && !filterPredicate.test(protectedStorageEntry.getProtectedStoragePayload())) { log.debug("filterPredicate test failed. hashOfPayload={}", hashOfPayload); return false; } - + // This is an updated entry. Record it and signal listeners. map.put(hashOfPayload, protectedStorageEntry); hashMapChangedListeners.forEach(e -> e.onAdded(Collections.singletonList(protectedStorageEntry))); - + // Record the updated sequence number and persist it. Higher delay so we can batch more items. sequenceNumberMap.put(hashOfPayload, new MapValue(protectedStorageEntry.getSequenceNumber(), this.clock.millis())); requestPersistence(); - + //log.trace("## ProtectedStorageEntry added to map. hash={}, map={}", hashOfPayload, printMap()); - + // Optionally, broadcast the add/update depending on the calling environment if (allowBroadcast) { broadcaster.broadcast(new AddDataMessage(protectedStorageEntry), sender, listener); @@ -890,7 +902,7 @@ public class P2PDataStorage implements MessageListener, ConnectionListener, Pers // Persist ProtectedStorageEntries carrying PersistablePayload payloads if (protectedStoragePayload instanceof PersistablePayload) protectedDataStoreService.put(hashOfPayload, protectedStorageEntry); - + return true; } } @@ -939,13 +951,13 @@ public class P2PDataStorage implements MessageListener, ConnectionListener, Pers try { ByteArray hashOfPayload = new ByteArray(refreshTTLMessage.getHashOfPayload()); ProtectedStorageEntry storedData = map.get(hashOfPayload); - + if (storedData == null) { log.debug("We don't have data for that refresh message in our map. That is expected if we missed the data publishing."); - + return false; } - + ProtectedStorageEntry storedEntry = map.get(hashOfPayload); ProtectedStorageEntry updatedEntry = new ProtectedStorageEntry( storedEntry.getProtectedStoragePayload(), @@ -953,26 +965,26 @@ public class P2PDataStorage implements MessageListener, ConnectionListener, Pers refreshTTLMessage.getSequenceNumber(), refreshTTLMessage.getSignature(), this.clock); - - + + // If we have seen a more recent operation for this payload, we ignore the current one if (!hasSequenceNrIncreased(updatedEntry.getSequenceNumber(), hashOfPayload)) return false; - + // Verify the updated ProtectedStorageEntry is well formed and valid for update if (!updatedEntry.isValidForAddOperation()) return false; - + // Update the hash map with the updated entry map.put(hashOfPayload, updatedEntry); - + // Record the latest sequence number and persist it sequenceNumberMap.put(hashOfPayload, new MapValue(updatedEntry.getSequenceNumber(), this.clock.millis())); requestPersistence(); - + // Always broadcast refreshes broadcaster.broadcast(refreshTTLMessage, sender); - + } catch (IllegalArgumentException e) { log.error("refreshTTL failed, missing data: {}", e.toString()); e.printStackTrace(); @@ -995,29 +1007,29 @@ public class P2PDataStorage implements MessageListener, ConnectionListener, Pers synchronized (map) { ProtectedStoragePayload protectedStoragePayload = protectedStorageEntry.getProtectedStoragePayload(); ByteArray hashOfPayload = get32ByteHashAsByteArray(protectedStoragePayload); - + // If we have seen a more recent operation for this payload, ignore this one if (!hasSequenceNrIncreased(protectedStorageEntry.getSequenceNumber(), hashOfPayload)) return false; - + // Verify the ProtectedStorageEntry is well formed and valid for the remove operation if (!protectedStorageEntry.isValidForRemoveOperation()) return false; - + // If we have already seen an Entry with the same hash, verify the metadata is the same ProtectedStorageEntry storedEntry = map.get(hashOfPayload); if (storedEntry != null && !protectedStorageEntry.matchesRelevantPubKey(storedEntry)) return false; - + // Record the latest sequence number and persist it sequenceNumberMap.put(hashOfPayload, new MapValue(protectedStorageEntry.getSequenceNumber(), this.clock.millis())); requestPersistence(); - + // Update that we have seen this AddOncePayload so the next time it is seen it fails verification if (protectedStoragePayload instanceof AddOncePayload) { removedPayloadsService.addHash(hashOfPayload); } - + if (storedEntry != null) { // Valid remove entry, do the remove and signal listeners removeFromMapAndDataStore(protectedStorageEntry, hashOfPayload); @@ -1027,13 +1039,13 @@ public class P2PDataStorage implements MessageListener, ConnectionListener, Pers // broadcast the remove to peers so they can update their state appropriately } */ printData("after remove"); - + if (protectedStorageEntry instanceof ProtectedMailboxStorageEntry) { broadcaster.broadcast(new RemoveMailboxDataMessage((ProtectedMailboxStorageEntry) protectedStorageEntry), sender); } else { broadcaster.broadcast(new RemoveDataMessage(protectedStorageEntry), sender); } - + return true; } } diff --git a/p2p/src/main/java/haveno/network/p2p/storage/persistence/AppendOnlyDataStoreService.java b/p2p/src/main/java/haveno/network/p2p/storage/persistence/AppendOnlyDataStoreService.java index 8f7b2b8027..6aabfe761d 100644 --- a/p2p/src/main/java/haveno/network/p2p/storage/persistence/AppendOnlyDataStoreService.java +++ b/p2p/src/main/java/haveno/network/p2p/storage/persistence/AppendOnlyDataStoreService.java @@ -18,18 +18,21 @@ package haveno.network.p2p.storage.persistence; import com.google.common.annotations.VisibleForTesting; -import com.google.inject.Inject; import haveno.network.p2p.storage.P2PDataStorage; import haveno.network.p2p.storage.payload.PersistableNetworkPayload; +import lombok.Getter; +import lombok.extern.slf4j.Slf4j; + +import javax.inject.Inject; + +import org.jetbrains.annotations.NotNull; + import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Optional; import java.util.concurrent.atomic.AtomicInteger; -import lombok.Getter; -import lombok.extern.slf4j.Slf4j; -import org.jetbrains.annotations.NotNull; /** * Used for PersistableNetworkPayload data which gets appended to a map storage. diff --git a/p2p/src/main/java/haveno/network/p2p/storage/persistence/ProtectedDataStoreService.java b/p2p/src/main/java/haveno/network/p2p/storage/persistence/ProtectedDataStoreService.java index 8b36b416d7..8e1291b274 100644 --- a/p2p/src/main/java/haveno/network/p2p/storage/persistence/ProtectedDataStoreService.java +++ b/p2p/src/main/java/haveno/network/p2p/storage/persistence/ProtectedDataStoreService.java @@ -18,17 +18,18 @@ package haveno.network.p2p.storage.persistence; import com.google.common.annotations.VisibleForTesting; -import com.google.inject.Inject; import haveno.common.proto.persistable.PersistableEnvelope; import haveno.network.p2p.storage.P2PDataStorage; import haveno.network.p2p.storage.payload.ProtectedStorageEntry; +import lombok.extern.slf4j.Slf4j; + +import javax.inject.Inject; import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicReference; import java.util.stream.Collectors; -import lombok.extern.slf4j.Slf4j; /** * Used for data which can be added and removed. ProtectedStorageEntry is used for verifying ownership. diff --git a/p2p/src/main/java/haveno/network/p2p/storage/persistence/RemovedPayloadsService.java b/p2p/src/main/java/haveno/network/p2p/storage/persistence/RemovedPayloadsService.java index e7c17ce8a7..902ae73fb9 100644 --- a/p2p/src/main/java/haveno/network/p2p/storage/persistence/RemovedPayloadsService.java +++ b/p2p/src/main/java/haveno/network/p2p/storage/persistence/RemovedPayloadsService.java @@ -17,14 +17,15 @@ package haveno.network.p2p.storage.persistence; -import com.google.inject.Inject; -import com.google.inject.Singleton; import haveno.common.persistence.PersistenceManager; import haveno.common.proto.persistable.PersistedDataHost; import haveno.network.p2p.storage.P2PDataStorage; import haveno.network.p2p.storage.payload.MailboxStoragePayload; import lombok.extern.slf4j.Slf4j; +import javax.inject.Inject; +import javax.inject.Singleton; + /** * We persist the hashes and timestamp when a AddOncePayload payload got removed. This protects that it could be * added again for instance if the sequence number map would be inconsistent/deleted or when we receive data from diff --git a/p2p/src/main/java/haveno/network/p2p/storage/persistence/ResourceDataStoreService.java b/p2p/src/main/java/haveno/network/p2p/storage/persistence/ResourceDataStoreService.java index a081733e2e..b10573c8cb 100644 --- a/p2p/src/main/java/haveno/network/p2p/storage/persistence/ResourceDataStoreService.java +++ b/p2p/src/main/java/haveno/network/p2p/storage/persistence/ResourceDataStoreService.java @@ -18,12 +18,13 @@ package haveno.network.p2p.storage.persistence; import com.google.common.annotations.VisibleForTesting; -import com.google.inject.Inject; import haveno.common.proto.persistable.PersistableEnvelope; +import lombok.extern.slf4j.Slf4j; + +import javax.inject.Inject; import java.util.ArrayList; import java.util.List; import java.util.concurrent.atomic.AtomicInteger; -import lombok.extern.slf4j.Slf4j; /** * Used for handling data from resource files. diff --git a/scripts/install_java.bat b/scripts/install_java.bat index 3364679050..b53b087917 100644 --- a/scripts/install_java.bat +++ b/scripts/install_java.bat @@ -25,9 +25,9 @@ cd /D "%~dp0" title Install Java -set jdk_version=20.0.1 +set jdk_version=11.0.2 set jdk_filename=openjdk-%jdk_version%_windows-x64_bin -set jdk_url=https://download.java.net/java/GA/jdk20.0.1/b4887098932d415489976708ad6d1a4b/9/GPL/openjdk-20.0.1_windows-x64_bin.zip +set jdk_url=https://download.java.net/java/GA/jdk11/9/GPL/openjdk-11.0.2_windows-x64_bin.zip if exist "%PROGRAMFILES%\Java\openjdk\jdk-%jdk_version%" ( echo %PROGRAMFILES%\Java\openjdk\jdk-%jdk_version% already exists, skipping install diff --git a/scripts/install_java.sh b/scripts/install_java.sh index 6ffb7eb4fa..d14214b9f7 100755 --- a/scripts/install_java.sh +++ b/scripts/install_java.sh @@ -15,9 +15,9 @@ set -e unameOut="$(uname -s)" case "${unameOut}" in Linux*) - JAVA_HOME=/usr/lib/jvm/openjdk-20.0.1 - JDK_FILENAME=openjdk-20.0.1_linux-x64_bin.tar.gz - JDK_URL=https://download.java.net/java/GA/jdk20.0.1/b4887098932d415489976708ad6d1a4b/9/GPL/openjdk-20.0.1_linux-x64_bin.tar.gz + JAVA_HOME=/usr/lib/jvm/openjdk-11.0.2 + JDK_FILENAME=openjdk-11.0.2_linux-x64_bin.tar.gz + JDK_URL=https://download.java.net/java/GA/jdk11/9/GPL/openjdk-11.0.2_linux-x64_bin.tar.gz # Determine which package manager to use depending on the distribution declare -A osInfo; @@ -52,9 +52,9 @@ case "${unameOut}" in update-alternatives --set javac $JAVA_HOME/bin/javac ;; Darwin*) - JAVA_HOME=/Library/Java/JavaVirtualMachines/openjdk-20.0.1.jdk/Contents/Home - JDK_FILENAME=openjdk-20.0.1_macos-x64_bin.tar.gz - JDK_URL=https://download.java.net/java/GA/jdk20.0.1/b4887098932d415489976708ad6d1a4b/9/GPL/openjdk-20.0.1_macos-x64_bin.tar.gz + JAVA_HOME=/Library/Java/JavaVirtualMachines/openjdk-11.0.2.jdk/Contents/Home + JDK_FILENAME=openjdk-11.0.2_osx-x64_bin.tar.gz + JDK_URL=https://download.java.net/java/GA/jdk11/9/GPL/openjdk-11.0.2_osx-x64_bin.tar.gz if [ ! -d "$JAVA_HOME" ]; then if [[ $(command -v brew) == "" ]]; then echo "Installing Homebrew" @@ -66,10 +66,10 @@ case "${unameOut}" in brew install curl curl -L -O $JDK_URL - sudo mkdir /Library/Java/JavaVirtualMachines/openjdk-20.0.1.jdk | sudo bash + sudo mkdir /Library/Java/JavaVirtualMachines/openjdk-11.0.2.jdk | sudo bash gunzip -c $JDK_FILENAME | tar xopf - - sudo mv jdk-20.0.1.jdk/* /Library/Java/JavaVirtualMachines/openjdk-20.0.1.jdk - sudo rmdir jdk-20.0.1.jdk + sudo mv jdk-11.0.2.jdk/* /Library/Java/JavaVirtualMachines/openjdk-11.0.2.jdk + sudo rmdir jdk-11.0.2.jdk rm $JDK_FILENAME fi