From 2efc3acb29e7131587a58e07bd803165af95d235 Mon Sep 17 00:00:00 2001 From: Mike Rosseel Date: Thu, 16 Mar 2017 14:38:16 +0100 Subject: [PATCH 1/7] split network-messages in its own module. Compiles. --- LICENSE | 20 +- common/pom.xml | 5 - .../java/io/bisq/locale/CurrencyTuple.java | 40 - .../resources/i18n/displayStrings.properties | 126 +-- .../i18n/displayStrings_de.properties | 106 +-- .../i18n/in_dev/displayStrings_ae.properties | 50 +- .../i18n/in_dev/displayStrings_ba.properties | 50 +- .../i18n/in_dev/displayStrings_br.properties | 50 +- .../i18n/in_dev/displayStrings_cn.properties | 50 +- .../i18n/in_dev/displayStrings_cz.properties | 50 +- .../i18n/in_dev/displayStrings_dk.properties | 50 +- .../i18n/in_dev/displayStrings_en.properties | 50 +- .../i18n/in_dev/displayStrings_es.properties | 4 +- .../i18n/in_dev/displayStrings_fi.properties | 50 +- .../i18n/in_dev/displayStrings_fr.properties | 50 +- .../i18n/in_dev/displayStrings_ge.properties | 50 +- .../i18n/in_dev/displayStrings_gr.properties | 50 +- .../i18n/in_dev/displayStrings_hr.properties | 4 +- .../i18n/in_dev/displayStrings_hu.properties | 50 +- .../i18n/in_dev/displayStrings_id.properties | 50 +- .../i18n/in_dev/displayStrings_ie.properties | 50 +- .../i18n/in_dev/displayStrings_in.properties | 50 +- .../i18n/in_dev/displayStrings_is.properties | 50 +- .../i18n/in_dev/displayStrings_it.properties | 4 +- .../i18n/in_dev/displayStrings_jp.properties | 50 +- .../i18n/in_dev/displayStrings_kg.properties | 50 +- .../i18n/in_dev/displayStrings_kr.properties | 50 +- .../i18n/in_dev/displayStrings_kz.properties | 50 +- .../i18n/in_dev/displayStrings_lt.properties | 50 +- .../i18n/in_dev/displayStrings_my.properties | 50 +- .../i18n/in_dev/displayStrings_nl.properties | 50 +- .../i18n/in_dev/displayStrings_no.properties | 50 +- .../i18n/in_dev/displayStrings_nz.properties | 50 +- .../i18n/in_dev/displayStrings_ph.properties | 50 +- .../i18n/in_dev/displayStrings_pl.properties | 50 +- .../i18n/in_dev/displayStrings_pt.properties | 4 +- .../i18n/in_dev/displayStrings_ro.properties | 50 +- .../i18n/in_dev/displayStrings_ru.properties | 50 +- .../i18n/in_dev/displayStrings_se.properties | 50 +- .../i18n/in_dev/displayStrings_th.properties | 50 +- .../i18n/in_dev/displayStrings_ua.properties | 50 +- .../i18n/in_dev/displayStrings_uz.properties | 50 +- .../i18n/in_dev/displayStrings_vn.properties | 50 +- .../main/java/io/bisq/alert/AlertManager.java | 4 +- .../alert/PrivateNotificationManager.java | 12 +- .../main/java/io/bisq/app/BisqExecutable.java | 2 +- .../bisq/arbitration/ArbitratorManager.java | 8 +- .../bisq/arbitration/ArbitratorService.java | 4 +- .../io/bisq/arbitration/DisputeManager.java | 14 +- .../main/java/io/bisq/btc/BitcoinModule.java | 4 +- .../providers/BlockchainTxProvider.java | 2 +- .../btc/provider/squ/BsqUtxoFeedProvider.java | 2 +- .../btc/provider/squ/BsqUtxoFeedService.java | 2 +- .../io/bisq/btc/wallet/BsqWalletService.java | 4 +- .../io/bisq/btc/wallet/BtcWalletService.java | 4 +- .../bisq/btc/wallet/TradeWalletService.java | 4 +- .../io/bisq/btc/wallet/WalletService.java | 4 +- .../java/io/bisq/btc/wallet/WalletsSetup.java | 2 +- .../CompensationRequestManager.java | 4 +- .../java/io/bisq/dao/vote/VotingManager.java | 2 +- .../java/io/bisq/filter/FilterManager.java | 4 +- .../java/io/bisq/payment/AliPayAccount.java | 5 +- .../io/bisq/payment/ChaseQuickPayAccount.java | 5 +- .../io/bisq/payment/ClearXchangeAccount.java | 5 +- .../payment/CountryBasedPaymentAccount.java | 2 +- .../bisq/payment/FasterPaymentsAccount.java | 5 +- .../bisq/payment/InteracETransferAccount.java | 5 +- .../java/io/bisq/payment/OKPayAccount.java | 5 +- .../java/io/bisq/payment/PaymentAccount.java | 2 +- .../io/bisq/payment/PaymentAccountUtil.java | 4 +- .../io/bisq/payment/PerfectMoneyAccount.java | 5 +- .../java/io/bisq/payment/SepaAccount.java | 5 +- .../java/io/bisq/payment/SwishAccount.java | 5 +- .../payment/USPostalMoneyOrderAccount.java | 5 +- .../io/bisq/trade/BuyerAsOffererTrade.java | 4 +- .../java/io/bisq/trade/BuyerAsTakerTrade.java | 4 +- .../main/java/io/bisq/trade/BuyerTrade.java | 4 +- .../main/java/io/bisq/trade/OffererTrade.java | 2 +- .../io/bisq/trade/SellerAsOffererTrade.java | 4 +- .../io/bisq/trade/SellerAsTakerTrade.java | 4 +- .../main/java/io/bisq/trade/SellerTrade.java | 4 +- .../src/main/java/io/bisq/trade/Tradable.java | 2 +- core/src/main/java/io/bisq/trade/Trade.java | 10 +- .../main/java/io/bisq/trade/TradeManager.java | 31 +- .../trade/closed/ClosedTradableManager.java | 6 +- .../trade/failed/FailedTradesManager.java | 6 +- .../io/bisq/trade/offer/OfferBookService.java | 37 +- .../io/bisq/trade/offer/OfferForJson.java | 12 +- .../java/io/bisq/trade/offer/OpenOffer.java | 4 +- .../io/bisq/trade/offer/OpenOfferManager.java | 45 +- .../protocol/placeoffer/PlaceOfferModel.java | 2 +- .../placeoffer/PlaceOfferProtocol.java | 4 +- .../tasks/BroadcastCreateOfferFeeTx.java | 10 +- .../placeoffer/tasks/CreateOfferFeeTx.java | 6 +- .../trade/ArbitrationSelectionRule.java | 6 +- .../trade/BuyerAsOffererProtocol.java | 4 +- .../protocol/trade/BuyerAsTakerProtocol.java | 4 +- .../trade/protocol/trade/OffererProtocol.java | 2 +- .../trade/protocol/trade/ProcessModel.java | 10 +- .../trade/SellerAsOffererProtocol.java | 4 +- .../protocol/trade/SellerAsTakerProtocol.java | 4 +- .../trade/protocol/trade/TradeProtocol.java | 10 +- .../trade/protocol/trade/TradingPeer.java | 2 +- .../trade/protocol/trade/tasks/TradeTask.java | 4 +- ...ffererCreatesAndSignsDepositTxAsBuyer.java | 2 +- .../buyer/SendFiatTransferStartedMessage.java | 2 +- .../buyer/SendPayoutTxFinalizedMessage.java | 2 +- .../TakerSignAndPublishDepositTxAsBuyer.java | 2 +- .../tasks/offerer/CreateAndSignContract.java | 4 +- .../ProcessDepositTxPublishedMessage.java | 2 +- .../tasks/offerer/PublishTradeStatistics.java | 2 +- .../offerer/SendPublishDepositTxRequest.java | 2 +- .../offerer/SetupDepositBalanceListener.java | 2 +- .../offerer/VerifyArbitrationSelection.java | 2 +- ...fererCreatesAndSignsDepositTxAsSeller.java | 2 +- .../seller/SendFinalizePayoutTxRequest.java | 2 +- .../SignAndPublishDepositTxAsSeller.java | 2 +- .../tasks/taker/CreateTakeOfferFeeTx.java | 4 +- .../tasks/taker/LoadCreateOfferFeeTx.java | 2 +- .../tasks/taker/PublishTradeStatistics.java | 2 +- .../trade/tasks/taker/SelectArbitrator.java | 2 +- .../taker/SendDepositTxPublishedMessage.java | 2 +- .../tasks/taker/SendPayDepositRequest.java | 2 +- .../tasks/taker/VerifyAndSignContract.java | 4 +- .../statistics/TradeStatisticsForJson.java | 10 +- .../statistics/TradeStatisticsManager.java | 9 +- core/src/main/java/io/bisq/user/User.java | 10 +- .../pricefeed/MarketPriceFeedServiceTest.java | 2 +- doc/protobuffer.md | 4 +- gui/src/main/java/io/bisq/app/BisqApp.java | 2 +- .../main/java/io/bisq/app/BisqAppModule.java | 6 +- gui/src/main/java/io/bisq/gui/bisq.css | 2 +- .../io/bisq/gui/components/PeerInfoIcon.java | 5 +- .../io/bisq/gui/components/TxIdTextField.java | 2 +- .../components/paymentmethods/BankForm.java | 3 +- .../paymentmethods/CashDepositForm.java | 14 +- .../paymentmethods/ChaseQuickPayForm.java | 2 +- .../paymentmethods/CryptoCurrencyForm.java | 4 +- .../paymentmethods/FasterPaymentsForm.java | 2 +- .../paymentmethods/InteracETransferForm.java | 2 +- .../components/paymentmethods/OKPayForm.java | 5 +- .../paymentmethods/PaymentMethodForm.java | 7 +- .../paymentmethods/PerfectMoneyForm.java | 2 +- .../paymentmethods/SameBankForm.java | 2 +- .../components/paymentmethods/SepaForm.java | 39 +- .../components/paymentmethods/SwishForm.java | 2 +- .../USPostalMoneyOrderForm.java | 2 +- .../main/java/io/bisq/gui/main/MainView.java | 2 +- .../java/io/bisq/gui/main/MainViewModel.java | 22 +- .../io/bisq/gui/main/account/AccountView.java | 2 +- .../ArbitratorRegistrationView.java | 5 +- .../ArbitratorRegistrationViewModel.java | 11 +- .../AltCoinAccountsDataModel.java | 8 +- .../altcoinaccounts/AltCoinAccountsView.java | 4 +- .../ArbitratorSelectionView.java | 2 +- .../ArbitratorSelectionViewModel.java | 8 +- .../account/content/backup/BackupView.java | 2 +- .../fiataccounts/FiatAccountsDataModel.java | 8 +- .../content/seedwords/SeedWordsView.java | 2 +- .../java/io/bisq/gui/main/dao/DaoView.java | 2 +- .../create/CreateCompensationRequestView.java | 8 +- .../gui/main/dao/voting/vote/VoteView.java | 2 +- .../gui/main/dao/wallet/send/BsqSendView.java | 2 +- .../io/bisq/gui/main/debug/DebugView.java | 6 +- .../bisq/gui/main/disputes/DisputesView.java | 6 +- .../arbitrator/ArbitratorDisputeView.java | 4 +- .../disputes/trader/TraderDisputeView.java | 8 +- .../gui/main/funds/deposit/DepositView.java | 4 +- .../gui/main/funds/locked/LockedView.java | 2 +- .../gui/main/funds/reserved/ReservedView.java | 2 +- .../transactions/TransactionsListItem.java | 2 +- .../funds/transactions/TransactionsView.java | 2 +- .../main/funds/withdrawal/WithdrawalView.java | 4 +- .../market/offerbook/OfferBookChartView.java | 23 +- .../offerbook/OfferBookChartViewModel.java | 36 +- .../main/market/offerbook/OfferListItem.java | 2 +- .../gui/main/market/spread/SpreadView.java | 2 +- .../main/market/spread/SpreadViewModel.java | 13 +- .../main/market/trades/TradesChartsView.java | 2 +- .../market/trades/TradesChartsViewModel.java | 16 +- .../io/bisq/gui/main/offer/BuyOfferView.fxml | 2 +- .../io/bisq/gui/main/offer/BuyOfferView.java | 2 +- .../io/bisq/gui/main/offer/OfferView.java | 17 +- .../io/bisq/gui/main/offer/SellOfferView.fxml | 2 +- .../io/bisq/gui/main/offer/SellOfferView.java | 2 +- .../createoffer/CreateOfferDataModel.java | 35 +- .../offer/createoffer/CreateOfferView.fxml | 2 +- .../offer/createoffer/CreateOfferView.java | 11 +- .../createoffer/CreateOfferViewModel.java | 39 +- .../offer/createoffer/monetary/Price.java | 2 +- .../offer/createoffer/monetary/Volume.java | 2 +- .../gui/main/offer/offerbook/OfferBook.java | 11 +- .../offer/offerbook/OfferBookListItem.java | 19 +- .../main/offer/offerbook/OfferBookView.fxml | 2 +- .../main/offer/offerbook/OfferBookView.java | 38 +- .../offer/offerbook/OfferBookViewModel.java | 54 +- .../offer/takeoffer/TakeOfferDataModel.java | 23 +- .../main/offer/takeoffer/TakeOfferView.fxml | 2 +- .../main/offer/takeoffer/TakeOfferView.java | 11 +- .../offer/takeoffer/TakeOfferViewModel.java | 15 +- .../io/bisq/gui/main/overlays/Overlay.java | 2 +- .../editor/PeerInfoWithTagEditor.java | 4 +- .../notifications/NotificationCenter.java | 2 +- .../windows/AddBitcoinNodesWindow.java | 2 +- .../main/overlays/windows/ContractWindow.java | 11 +- .../overlays/windows/OfferDetailsWindow.java | 37 +- .../SendPrivateNotificationWindow.java | 6 +- .../gui/main/overlays/windows/TacWindow.java | 2 +- .../overlays/windows/TradeDetailsWindow.java | 2 +- .../closedtrades/ClosedTradesDataModel.java | 5 +- .../closedtrades/ClosedTradesView.java | 5 +- .../failedtrades/FailedTradesDataModel.java | 5 +- .../openoffer/OpenOfferListItem.java | 2 +- .../openoffer/OpenOffersDataModel.java | 7 +- .../portfolio/openoffer/OpenOffersView.java | 2 +- .../openoffer/OpenOffersViewModel.java | 6 +- .../pendingtrades/PendingTradesDataModel.java | 17 +- .../pendingtrades/PendingTradesViewModel.java | 4 +- .../pendingtrades/steps/TradeStepView.java | 2 +- .../steps/buyer/BuyerStep2View.java | 11 +- .../steps/seller/SellerStep3View.java | 10 +- .../settings/network/NetworkSettingsView.java | 4 +- .../settings/preferences/PreferencesView.java | 9 +- .../java/io/bisq/gui/util/BSFormatter.java | 45 +- .../io/bisq/gui/util/CurrencyListItem.java | 2 +- .../main/java/io/bisq/gui/util/GUIUtil.java | 6 +- .../main/java/io/bisq/gui/util/ImageUtil.java | 2 +- .../java/io/bisq/gui/util/Transitions.java | 2 +- .../util/validation/AccountNrValidator.java | 2 +- .../gui/util/validation/BankIdValidator.java | 2 +- .../util/validation/BranchIdValidator.java | 2 +- .../util/validation/BtcAddressValidator.java | 2 +- .../trades/TradesChartsViewModelTest.java | 6 +- .../offerbook/OfferBookViewModelTest.java | 15 +- .../main/java/io/bisq/headless/Headless.java | 2 +- .../java/io/bisq/headless/HeadlessModule.java | 6 +- .../main/java/io/bisq/monitor/Gateway.java | 2 +- .../main/java/io/bisq/monitor/Monitor.java | 2 +- .../java/io/bisq/monitor/MonitorModule.java | 6 +- network-messages/pom.xml | 61 ++ .../io/bisq}/messages/AnonymousMessage.java | 2 +- .../messages/CloseConnectionMessage.java | 3 +- .../DecryptedDirectMessageListener.java | 5 +- .../messages}/DecryptedMsgWithPubKey.java | 3 +- .../main/java/io/bisq/messages/Message.java | 0 .../java/io/bisq/messages}/NodeAddress.java | 6 +- .../messages/SendersNodeAddressMessage.java | 4 +- .../java/io/bisq/messages/ToProtoBuffer.java | 0 .../messages/arbitration/DisputeResult.java | 2 +- .../messages}/crypto/DecryptedDataTuple.java | 2 +- .../io/bisq/messages}/crypto/Encryption.java | 4 +- .../java/io/bisq/messages}/crypto/Hash.java | 2 +- .../io/bisq/messages}/crypto/KeyRing.java | 4 +- .../io/bisq/messages}/crypto/KeyStorage.java | 3 +- .../io/bisq/messages}/crypto/PubKeyRing.java | 5 +- .../messages}/crypto/SealedAndSigned.java | 5 +- .../messaging/DecryptedMailboxListener.java | 7 +- .../p2p/messaging/DirectMessage.java | 2 +- .../p2p/messaging/MailboxMessage.java | 4 +- .../PrefixedSealedAndSignedMessage.java | 8 +- .../messaging/SendDirectMessageListener.java | 2 +- .../trade/offer/payload/OfferPayload.java | 449 ++--------- .../bisq/messages}/util/ProtoBufferUtils.java | 4 +- .../java/io/bisq/messages}/wire/Payload.java | 2 +- .../payload/CapabilityRequiringPayload.java | 5 +- .../io/bisq}/payload/ExpirablePayload.java | 5 +- .../payload/PersistedStoragePayload.java | 2 +- .../payload/RequiresOwnerIsOnlinePayload.java | 6 +- .../java/io/bisq}/payload/StoragePayload.java | 8 +- .../src/main/proto/bsmessage.proto | 0 .../java/io/bisq}/crypto/EncryptionTest.java | 5 +- .../test/java/io/bisq}/crypto/SigTest.java | 6 +- .../java/io/bisq}/proto/ProtoBufferTest.java | 3 +- network/pom.xml | 5 + .../java/io/bisq/app/BisqEnvironment.java | 2 +- .../io/bisq/crypto/EncryptionService.java | 10 +- .../java/io/bisq/messages/alert/Alert.java | 170 ----- .../messages/alert/PrivateNotification.java | 124 --- .../alert/PrivateNotificationMessage.java | 86 --- .../bisq/messages/arbitration/Arbitrator.java | 177 ----- .../io/bisq/messages/arbitration/Dispute.java | 394 ---------- .../DisputeCommunicationMessage.java | 219 ------ .../messages/arbitration/DisputeList.java | 95 --- .../messages/arbitration/DisputeMessage.java | 47 -- .../arbitration/DisputeResultMessage.java | 71 -- .../arbitration/OpenNewDisputeMessage.java | 74 -- .../arbitration/PeerOpenedDisputeMessage.java | 75 -- .../PeerPublishedPayoutTxMessage.java | 84 -- .../arbitration/payload/Attachment.java | 65 -- .../availability/AvailabilityResult.java | 11 - .../OfferAvailabilityRequest.java | 72 -- .../OfferAvailabilityResponse.java | 70 -- .../messages/availability/OfferMessage.java | 50 -- .../io/bisq/messages/btc/BitcoinNetwork.java | 41 - .../io/bisq/messages/btc/BtcOptionKeys.java | 9 - .../io/bisq/messages/btc/Restrictions.java | 38 - .../java/io/bisq/messages/btc/UserAgent.java | 44 -- .../btc/data/RawTransactionInput.java | 78 -- .../btc/provider/HttpClientProvider.java | 21 - .../btc/provider/ProvidersRepository.java | 62 -- .../messages/btc/provider/fee/FeeData.java | 14 - .../btc/provider/fee/FeeProvider.java | 40 - .../messages/btc/provider/fee/FeeRequest.java | 40 - .../messages/btc/provider/fee/FeeService.java | 155 ---- .../btc/provider/price/PriceProvider.java | 48 -- .../btc/provider/price/PriceRequest.java | 41 - .../provider/price/PriceRequestException.java | 7 - .../dao/blockchain/RpcOptionKeys.java | 9 - .../payload/CompensationRequestPayload.java | 306 -------- .../bisq/messages/filter/payload/Filter.java | 156 ---- .../filter/payload/PaymentAccountFilter.java | 40 - .../io/bisq/messages/locale/BankUtil.java | 241 ------ .../java/io/bisq/messages/locale/Country.java | 70 -- .../io/bisq/messages/locale/CountryUtil.java | 209 ----- .../bisq/messages/locale/CryptoCurrency.java | 52 -- .../io/bisq/messages/locale/CurrencyUtil.java | 339 --------- .../io/bisq/messages/locale/FiatCurrency.java | 62 -- .../io/bisq/messages/locale/LanguageUtil.java | 119 --- .../io/bisq/messages/locale/LocaleUtil.java | 201 ----- .../java/io/bisq/messages/locale/Region.java | 65 -- .../bisq/messages/locale/TradeCurrency.java | 102 --- .../bisq/messages/payment/PaymentMethod.java | 211 ------ .../payload/AliPayAccountContractData.java | 75 -- .../payload/BankAccountContractData.java | 138 ---- .../CashDepositAccountContractData.java | 187 ----- .../ChaseQuickPayAccountContractData.java | 82 -- .../ClearXchangeAccountContractData.java | 82 -- ...ountryBasedPaymentAccountContractData.java | 83 -- .../CryptoCurrencyAccountContractData.java | 68 -- .../FasterPaymentsAccountContractData.java | 82 -- .../InteracETransferAccountContractData.java | 106 --- .../NationalBankAccountContractData.java | 66 -- .../payload/OKPayAccountContractData.java | 68 -- .../payload/PaymentAccountContractData.java | 92 --- .../PerfectMoneyAccountContractData.java | 68 -- .../payload/SameBankAccountContractData.java | 68 -- .../payload/SepaAccountContractData.java | 123 --- .../SpecificBanksAccountContractData.java | 95 --- .../payload/SwishAccountContractData.java | 82 -- ...USPostalMoneyOrderAccountContractData.java | 84 -- .../availability/OfferAvailabilityModel.java | 74 -- .../OfferAvailabilityProtocol.java | 152 ---- .../ProcessOfferAvailabilityResponse.java | 61 -- .../tasks/SendOfferAvailabilityRequest.java | 65 -- .../messages/protocol/trade/TradeMessage.java | 57 -- .../messages/provider/price/MarketPrice.java | 69 -- .../provider/price/PriceFeedService.java | 237 ------ .../MarketPriceNotAvailableException.java | 7 - .../TradePriceOutOfToleranceException.java | 7 - .../bisq/messages/trade/payload/Contract.java | 287 ------- .../messages/DepositTxPublishedMessage.java | 96 --- .../messages/FiatTransferStartedMessage.java | 105 --- .../messages/FinalizePayoutTxRequest.java | 117 --- .../trade/messages/PayDepositRequest.java | 190 ----- .../messages/PayoutTxFinalizedMessage.java | 96 --- .../messages/PublishDepositTxRequest.java | 94 --- .../statistics/payload/TradeStatistics.java | 208 ----- .../messages/user/BlockChainExplorer.java | 40 - .../io/bisq/messages/user/Preferences.java | 716 ------------------ .../java/io/bisq/messages/util/Validator.java | 57 -- .../io/bisq/p2p/NetworkNotReadyException.java | 2 +- .../src/main/java/io/bisq/p2p/P2PModule.java | 1 + .../messaging/SendMailboxMessageListener.java | 9 - .../SupportedCapabilitiesMessage.java | 11 - .../java/io/bisq/p2p/network/Connection.java | 14 +- .../p2p/network/LocalhostNetworkNode.java | 2 +- .../java/io/bisq/p2p/network/NetworkNode.java | 2 +- .../bisq/p2p/network/OutboundConnection.java | 2 +- .../p2p/network/ProtoBufferUtilities.java | 33 +- .../io/bisq/p2p/network/TorNetworkNode.java | 2 +- .../main/java/io/bisq/p2p/peers/BanList.java | 2 +- .../io/bisq/p2p/peers/BroadcastHandler.java | 2 +- .../java/io/bisq/p2p/peers/Broadcaster.java | 2 +- .../java/io/bisq/p2p/peers/PeerManager.java | 2 +- .../peers/getdata/GetDataRequestHandler.java | 4 +- .../p2p/peers/getdata/RequestDataHandler.java | 8 +- .../p2p/peers/getdata/RequestDataManager.java | 2 +- .../getdata/messages/GetDataResponse.java | 2 +- .../messages/GetUpdatedDataRequest.java | 4 +- .../messages/PreliminaryGetDataRequest.java | 4 +- .../p2p/peers/keepalive/messages/Ping.java | 2 +- .../p2p/peers/keepalive/messages/Pong.java | 2 +- .../io/bisq/p2p/peers/peerexchange/Peer.java | 4 +- .../peerexchange/PeerExchangeHandler.java | 2 +- .../peerexchange/PeerExchangeManager.java | 2 +- .../messages/GetPeersRequest.java | 6 +- .../messages/GetPeersResponse.java | 2 +- .../bisq/p2p/protocol/availability/Offer.java | 329 ++++++++ .../io/bisq/p2p/seed/SeedNodesRepository.java | 2 +- .../io/bisq/p2p/storage/P2PDataStorage.java | 10 +- .../io/bisq/p2p/{ => storage}/P2PService.java | 21 +- .../p2p/storage/messages/AddDataMessage.java | 2 +- .../storage/messages/RemoveDataMessage.java | 2 +- .../messages/RemoveMailboxDataMessage.java | 2 +- .../payload/LazyProcessedStoragePayload.java | 8 - .../payload/MailboxStoragePayload.java | 137 ---- .../ProtectedMailboxStorageEntry.java | 2 +- .../storageentry/ProtectedStorageEntry.java | 4 +- .../bisq/crypto/EncryptionServiceTests.java | 10 +- .../test/java/io/bisq/p2p/DummySeedNode.java | 2 + .../java/io/bisq/p2p/PeerServiceTest.java | 2 + .../src/test/java/io/bisq/p2p/TestUtils.java | 4 +- .../io/bisq/p2p/mocks/MockMailboxPayload.java | 6 +- .../java/io/bisq/p2p/mocks/MockPayload.java | 2 +- .../bisq/p2p/network/NetworkStressTest.java | 17 +- .../p2p/network/ProtoBufferUtilitiesTest.java | 6 +- .../io/bisq/p2p/routing/PeerManagerTest.java | 4 +- .../bisq/p2p/storage/P2PDataStorageTest.java | 60 +- .../p2p/storage/ProtectedDataStorageTest.java | 9 +- .../storage/messages/AddDataMessageTest.java | 12 +- .../io/bisq/p2p/storage/mocks/MockData.java | 2 +- package/linux/LICENSE | 20 +- pom.xml | 12 +- .../bisq/provider/fee/FeeRequestService.java | 2 +- .../fee/providers/BtcFeesProvider.java | 2 +- .../providers/CoinmarketcapProvider.java | 4 +- .../price/providers/PoloniexProvider.java | 4 +- .../main/java/io/bisq/seednode/SeedNode.java | 2 +- .../java/io/bisq/seednode/SeedNodeModule.java | 6 +- .../java/io/bisq/statistics/Statistics.java | 8 +- .../io/bisq/statistics/StatisticsModule.java | 6 +- 421 files changed, 2426 insertions(+), 11523 deletions(-) delete mode 100644 common/src/main/java/io/bisq/locale/CurrencyTuple.java create mode 100644 network-messages/pom.xml rename {network/src/main/java/io/bisq/p2p/network => network-messages/src/main/java/io/bisq}/messages/AnonymousMessage.java (70%) rename {network/src/main/java/io/bisq/p2p/network => network-messages/src/main/java/io/bisq}/messages/CloseConnectionMessage.java (95%) rename {network/src/main/java/io/bisq/p2p/messaging => network-messages/src/main/java/io/bisq/messages}/DecryptedDirectMessageListener.java (58%) rename {network/src/main/java/io/bisq/crypto => network-messages/src/main/java/io/bisq/messages}/DecryptedMsgWithPubKey.java (97%) rename {common => network-messages}/src/main/java/io/bisq/messages/Message.java (100%) rename {network/src/main/java/io/bisq/p2p => network-messages/src/main/java/io/bisq/messages}/NodeAddress.java (95%) rename {network/src/main/java/io/bisq/p2p/network => network-messages/src/main/java/io/bisq}/messages/SendersNodeAddressMessage.java (50%) rename {common => network-messages}/src/main/java/io/bisq/messages/ToProtoBuffer.java (100%) rename {network => network-messages}/src/main/java/io/bisq/messages/arbitration/DisputeResult.java (99%) rename {common/src/main/java/io/bisq/common => network-messages/src/main/java/io/bisq/messages}/crypto/DecryptedDataTuple.java (98%) rename {common/src/main/java/io/bisq/common => network-messages/src/main/java/io/bisq/messages}/crypto/Encryption.java (98%) rename {common/src/main/java/io/bisq/common => network-messages/src/main/java/io/bisq/messages}/crypto/Hash.java (98%) rename {common/src/main/java/io/bisq/common => network-messages/src/main/java/io/bisq/messages}/crypto/KeyRing.java (97%) rename {common/src/main/java/io/bisq/common => network-messages/src/main/java/io/bisq/messages}/crypto/KeyStorage.java (98%) rename {common/src/main/java/io/bisq/common => network-messages/src/main/java/io/bisq/messages}/crypto/PubKeyRing.java (97%) rename {common/src/main/java/io/bisq/common => network-messages/src/main/java/io/bisq/messages}/crypto/SealedAndSigned.java (97%) rename {network/src/main/java/io/bisq => network-messages/src/main/java/io/bisq/messages}/p2p/messaging/DecryptedMailboxListener.java (55%) rename {network/src/main/java/io/bisq => network-messages/src/main/java/io/bisq/messages}/p2p/messaging/DirectMessage.java (95%) rename {network/src/main/java/io/bisq => network-messages/src/main/java/io/bisq/messages}/p2p/messaging/MailboxMessage.java (91%) rename {network/src/main/java/io/bisq => network-messages/src/main/java/io/bisq/messages}/p2p/messaging/PrefixedSealedAndSignedMessage.java (93%) rename {network/src/main/java/io/bisq => network-messages/src/main/java/io/bisq/messages}/p2p/messaging/SendDirectMessageListener.java (69%) rename network/src/main/java/io/bisq/messages/trade/offer/payload/Offer.java => network-messages/src/main/java/io/bisq/messages/trade/offer/payload/OfferPayload.java (51%) rename {common/src/main/java/io/bisq/common => network-messages/src/main/java/io/bisq/messages}/util/ProtoBufferUtils.java (81%) rename {common/src/main/java/io/bisq/common => network-messages/src/main/java/io/bisq/messages}/wire/Payload.java (89%) rename {network/src/main/java/io/bisq/p2p/storage => network-messages/src/main/java/io/bisq}/payload/CapabilityRequiringPayload.java (88%) rename {network/src/main/java/io/bisq/p2p/storage => network-messages/src/main/java/io/bisq}/payload/ExpirablePayload.java (78%) rename {network/src/main/java/io/bisq/p2p/storage => network-messages/src/main/java/io/bisq}/payload/PersistedStoragePayload.java (81%) rename {network/src/main/java/io/bisq/p2p/storage => network-messages/src/main/java/io/bisq}/payload/RequiresOwnerIsOnlinePayload.java (81%) rename {network/src/main/java/io/bisq/p2p/storage => network-messages/src/main/java/io/bisq}/payload/StoragePayload.java (78%) rename {common => network-messages}/src/main/proto/bsmessage.proto (100%) rename {common/src/test/java/io/bisq/common => network-messages/src/test/java/io/bisq}/crypto/EncryptionTest.java (87%) rename {common/src/test/java/io/bisq/common => network-messages/src/test/java/io/bisq}/crypto/SigTest.java (91%) rename {common/src/test/java/io/bisq/common/wire => network-messages/src/test/java/io/bisq}/proto/ProtoBufferTest.java (96%) delete mode 100644 network/src/main/java/io/bisq/messages/alert/Alert.java delete mode 100644 network/src/main/java/io/bisq/messages/alert/PrivateNotification.java delete mode 100644 network/src/main/java/io/bisq/messages/alert/PrivateNotificationMessage.java delete mode 100644 network/src/main/java/io/bisq/messages/arbitration/Arbitrator.java delete mode 100644 network/src/main/java/io/bisq/messages/arbitration/Dispute.java delete mode 100644 network/src/main/java/io/bisq/messages/arbitration/DisputeCommunicationMessage.java delete mode 100644 network/src/main/java/io/bisq/messages/arbitration/DisputeList.java delete mode 100644 network/src/main/java/io/bisq/messages/arbitration/DisputeMessage.java delete mode 100644 network/src/main/java/io/bisq/messages/arbitration/DisputeResultMessage.java delete mode 100644 network/src/main/java/io/bisq/messages/arbitration/OpenNewDisputeMessage.java delete mode 100644 network/src/main/java/io/bisq/messages/arbitration/PeerOpenedDisputeMessage.java delete mode 100644 network/src/main/java/io/bisq/messages/arbitration/PeerPublishedPayoutTxMessage.java delete mode 100644 network/src/main/java/io/bisq/messages/arbitration/payload/Attachment.java delete mode 100644 network/src/main/java/io/bisq/messages/availability/AvailabilityResult.java delete mode 100644 network/src/main/java/io/bisq/messages/availability/OfferAvailabilityRequest.java delete mode 100644 network/src/main/java/io/bisq/messages/availability/OfferAvailabilityResponse.java delete mode 100644 network/src/main/java/io/bisq/messages/availability/OfferMessage.java delete mode 100644 network/src/main/java/io/bisq/messages/btc/BitcoinNetwork.java delete mode 100644 network/src/main/java/io/bisq/messages/btc/BtcOptionKeys.java delete mode 100644 network/src/main/java/io/bisq/messages/btc/Restrictions.java delete mode 100644 network/src/main/java/io/bisq/messages/btc/UserAgent.java delete mode 100644 network/src/main/java/io/bisq/messages/btc/data/RawTransactionInput.java delete mode 100644 network/src/main/java/io/bisq/messages/btc/provider/HttpClientProvider.java delete mode 100644 network/src/main/java/io/bisq/messages/btc/provider/ProvidersRepository.java delete mode 100644 network/src/main/java/io/bisq/messages/btc/provider/fee/FeeData.java delete mode 100644 network/src/main/java/io/bisq/messages/btc/provider/fee/FeeProvider.java delete mode 100644 network/src/main/java/io/bisq/messages/btc/provider/fee/FeeRequest.java delete mode 100644 network/src/main/java/io/bisq/messages/btc/provider/fee/FeeService.java delete mode 100644 network/src/main/java/io/bisq/messages/btc/provider/price/PriceProvider.java delete mode 100644 network/src/main/java/io/bisq/messages/btc/provider/price/PriceRequest.java delete mode 100644 network/src/main/java/io/bisq/messages/btc/provider/price/PriceRequestException.java delete mode 100644 network/src/main/java/io/bisq/messages/dao/blockchain/RpcOptionKeys.java delete mode 100644 network/src/main/java/io/bisq/messages/dao/compensation/payload/CompensationRequestPayload.java delete mode 100644 network/src/main/java/io/bisq/messages/filter/payload/Filter.java delete mode 100644 network/src/main/java/io/bisq/messages/filter/payload/PaymentAccountFilter.java delete mode 100644 network/src/main/java/io/bisq/messages/locale/BankUtil.java delete mode 100644 network/src/main/java/io/bisq/messages/locale/Country.java delete mode 100644 network/src/main/java/io/bisq/messages/locale/CountryUtil.java delete mode 100644 network/src/main/java/io/bisq/messages/locale/CryptoCurrency.java delete mode 100644 network/src/main/java/io/bisq/messages/locale/CurrencyUtil.java delete mode 100644 network/src/main/java/io/bisq/messages/locale/FiatCurrency.java delete mode 100644 network/src/main/java/io/bisq/messages/locale/LanguageUtil.java delete mode 100644 network/src/main/java/io/bisq/messages/locale/LocaleUtil.java delete mode 100644 network/src/main/java/io/bisq/messages/locale/Region.java delete mode 100644 network/src/main/java/io/bisq/messages/locale/TradeCurrency.java delete mode 100644 network/src/main/java/io/bisq/messages/payment/PaymentMethod.java delete mode 100644 network/src/main/java/io/bisq/messages/payment/payload/AliPayAccountContractData.java delete mode 100644 network/src/main/java/io/bisq/messages/payment/payload/BankAccountContractData.java delete mode 100644 network/src/main/java/io/bisq/messages/payment/payload/CashDepositAccountContractData.java delete mode 100644 network/src/main/java/io/bisq/messages/payment/payload/ChaseQuickPayAccountContractData.java delete mode 100644 network/src/main/java/io/bisq/messages/payment/payload/ClearXchangeAccountContractData.java delete mode 100644 network/src/main/java/io/bisq/messages/payment/payload/CountryBasedPaymentAccountContractData.java delete mode 100644 network/src/main/java/io/bisq/messages/payment/payload/CryptoCurrencyAccountContractData.java delete mode 100644 network/src/main/java/io/bisq/messages/payment/payload/FasterPaymentsAccountContractData.java delete mode 100644 network/src/main/java/io/bisq/messages/payment/payload/InteracETransferAccountContractData.java delete mode 100644 network/src/main/java/io/bisq/messages/payment/payload/NationalBankAccountContractData.java delete mode 100644 network/src/main/java/io/bisq/messages/payment/payload/OKPayAccountContractData.java delete mode 100644 network/src/main/java/io/bisq/messages/payment/payload/PaymentAccountContractData.java delete mode 100644 network/src/main/java/io/bisq/messages/payment/payload/PerfectMoneyAccountContractData.java delete mode 100644 network/src/main/java/io/bisq/messages/payment/payload/SameBankAccountContractData.java delete mode 100644 network/src/main/java/io/bisq/messages/payment/payload/SepaAccountContractData.java delete mode 100644 network/src/main/java/io/bisq/messages/payment/payload/SpecificBanksAccountContractData.java delete mode 100644 network/src/main/java/io/bisq/messages/payment/payload/SwishAccountContractData.java delete mode 100644 network/src/main/java/io/bisq/messages/payment/payload/USPostalMoneyOrderAccountContractData.java delete mode 100644 network/src/main/java/io/bisq/messages/protocol/availability/OfferAvailabilityModel.java delete mode 100644 network/src/main/java/io/bisq/messages/protocol/availability/OfferAvailabilityProtocol.java delete mode 100644 network/src/main/java/io/bisq/messages/protocol/availability/tasks/ProcessOfferAvailabilityResponse.java delete mode 100644 network/src/main/java/io/bisq/messages/protocol/availability/tasks/SendOfferAvailabilityRequest.java delete mode 100644 network/src/main/java/io/bisq/messages/protocol/trade/TradeMessage.java delete mode 100644 network/src/main/java/io/bisq/messages/provider/price/MarketPrice.java delete mode 100644 network/src/main/java/io/bisq/messages/provider/price/PriceFeedService.java delete mode 100644 network/src/main/java/io/bisq/messages/trade/exceptions/MarketPriceNotAvailableException.java delete mode 100644 network/src/main/java/io/bisq/messages/trade/exceptions/TradePriceOutOfToleranceException.java delete mode 100644 network/src/main/java/io/bisq/messages/trade/payload/Contract.java delete mode 100644 network/src/main/java/io/bisq/messages/trade/protocol/trade/messages/DepositTxPublishedMessage.java delete mode 100644 network/src/main/java/io/bisq/messages/trade/protocol/trade/messages/FiatTransferStartedMessage.java delete mode 100644 network/src/main/java/io/bisq/messages/trade/protocol/trade/messages/FinalizePayoutTxRequest.java delete mode 100644 network/src/main/java/io/bisq/messages/trade/protocol/trade/messages/PayDepositRequest.java delete mode 100644 network/src/main/java/io/bisq/messages/trade/protocol/trade/messages/PayoutTxFinalizedMessage.java delete mode 100644 network/src/main/java/io/bisq/messages/trade/protocol/trade/messages/PublishDepositTxRequest.java delete mode 100644 network/src/main/java/io/bisq/messages/trade/statistics/payload/TradeStatistics.java delete mode 100644 network/src/main/java/io/bisq/messages/user/BlockChainExplorer.java delete mode 100644 network/src/main/java/io/bisq/messages/user/Preferences.java delete mode 100644 network/src/main/java/io/bisq/messages/util/Validator.java delete mode 100644 network/src/main/java/io/bisq/p2p/messaging/SendMailboxMessageListener.java delete mode 100644 network/src/main/java/io/bisq/p2p/messaging/SupportedCapabilitiesMessage.java create mode 100644 network/src/main/java/io/bisq/p2p/protocol/availability/Offer.java rename network/src/main/java/io/bisq/p2p/{ => storage}/P2PService.java (98%) delete mode 100644 network/src/main/java/io/bisq/p2p/storage/payload/LazyProcessedStoragePayload.java delete mode 100644 network/src/main/java/io/bisq/p2p/storage/payload/MailboxStoragePayload.java diff --git a/LICENSE b/LICENSE index dba13ed2dd..5aec298772 100644 --- a/LICENSE +++ b/LICENSE @@ -25,7 +25,7 @@ want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. Developers that use our General Public Licenses protect your rights -with two steps: (1) assert copyright on the software, and (2) offer +with two steps: (1) assert copyright on the software, and (2) offerPayload you this License which gives you legal permission to copy, distribute and/or modify the software. @@ -191,7 +191,7 @@ keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. +and you may offerPayload support or warranty protection for a fee. 5. Conveying Modified Source Versions. @@ -244,8 +244,8 @@ in one of these ways: b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product + written offerPayload, valid for at least three years and valid for as + long as you offerPayload spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical @@ -255,13 +255,13 @@ in one of these ways: Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This + written offerPayload to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord + only if you received the object code with such an offerPayload, in accord with subsection 6b. d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the + place (gratis or for a charge), and offerPayload equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to @@ -474,7 +474,7 @@ this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and +make, use, sell, offerPayload for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express @@ -540,7 +540,7 @@ License would be to refrain entirely from conveying the Program. 13. Remote Network Interaction; Use with the GNU General Public License. Notwithstanding any other provision of this License, if you modify the -Program, your modified version must prominently offer all users +Program, your modified version must prominently offerPayload all users interacting with it remotely through a computer network (if your version supports such interaction) an opportunity to receive the Corresponding Source of your version by providing access to the Corresponding Source @@ -651,7 +651,7 @@ Also add information on how to contact you by electronic and paper mail. network, you should also make sure that it provides a way for users to get its source. For example, if your program is a web application, its interface could display a "Source" link that leads users to an archive -of the code. There are many ways you could offer source, and different +of the code. There are many ways you could offerPayload source, and different solutions will be better for different programs; see section 13 for the specific requirements. diff --git a/common/pom.xml b/common/pom.xml index cce4bbca73..85c67bf6b9 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -22,10 +22,5 @@ spring-core ${spring.version} - - com.google.protobuf - protobuf-java - 3.2.0 - \ No newline at end of file diff --git a/common/src/main/java/io/bisq/locale/CurrencyTuple.java b/common/src/main/java/io/bisq/locale/CurrencyTuple.java deleted file mode 100644 index f9700e9927..0000000000 --- a/common/src/main/java/io/bisq/locale/CurrencyTuple.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * This file is part of bisq. - * - * bisq is free software: you can redistribute it and/or modify it - * under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or (at - * your option) any later version. - * - * bisq is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public - * License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with bisq. If not, see . - */ - -package io.bisq.locale; - -import java.io.Serializable; - -public class CurrencyTuple implements Serializable { - // That object is used for serializing to a Json file. - - public final String code; - public final String name; - public final int precision; // precision 4 is 1/10000 -> 0.0001 is smallest unit - - public CurrencyTuple(String code, String name) { - // We use Fiat class and there precision is 4 - // In future we might add custom precision per currency - this(code, name, 4); - } - - public CurrencyTuple(String code, String name, int precision) { - this.code = code; - this.name = name; - this.precision = precision; - } -} diff --git a/common/src/main/resources/i18n/displayStrings.properties b/common/src/main/resources/i18n/displayStrings.properties index abee84f19d..15acf2eed5 100644 --- a/common/src/main/resources/i18n/displayStrings.properties +++ b/common/src/main/resources/i18n/displayStrings.properties @@ -85,8 +85,8 @@ shared.amountMinMax=Amount (min - max) shared.remove=Remove shared.goTo=Go to {0} shared.BTCMinMax=BTC (min - max) -shared.removeOffer=Remove offer -shared.dontRemoveOffer=Don't remove offer +shared.removeOffer=Remove offerPayload +shared.dontRemoveOffer=Don't remove offerPayload shared.openLargeQRWindow=Open large QR-Code window shared.tradingAccount=Trading account shared.faq=Visit FAQ web page @@ -120,7 +120,7 @@ shared.applyAndShutDown=Apply and shut down shared.selectPaymentMethod=Select payment method shared.accountNameAlreadyUsed=That account name is already used in a saved account.\nPlease use another name. shared.askConfirmDeleteAccount=Do you really want to delete the selected account? -shared.cannotDeleteAccount=You cannot delete that account because it is used in an open offer or in a trade. +shared.cannotDeleteAccount=You cannot delete that account because it is used in an open offerPayload or in a trade. shared.noAccountsSetupYet=There are no accounts set up yet shared.manageAccounts=Manage accounts shared.addNewAccount=Add new account @@ -275,8 +275,8 @@ market.trades.tooltip.candle.date=Date: # OfferView #################################################################### -offerbook.createOffer=Create offer -offerbook.takeOffer=Take offer +offerbook.createOffer=Create offerPayload +offerbook.takeOffer=Take offerPayload offerbook.offerersBankId=Maker''s bank ID: {0} offerbook.offerersBankName=Maker''s bank name: {0} offerbook.offerersBankSeat=Maker''s seat of bank country: {0} @@ -288,31 +288,31 @@ offerbook.filterByPaymentMethod=Filter by payment method offerbook.nrOffers=No. of offers: {0} offerbook.volume={0} (min - max) -# e.g: Create new offer to buy BTC - {0} buy or sell, {1} BTC or other currency like ETH -offerbook.createOfferTo=Create new offer to {0} {1} -# postfix to previous. e.g.: Create new offer to buy BTC with ETH or Create new offer to sell BTC for ETH +# e.g: Create new offerPayload to buy BTC - {0} buy or sell, {1} BTC or other currency like ETH +offerbook.createOfferTo=Create new offerPayload to {0} {1} +# postfix to previous. e.g.: Create new offerPayload to buy BTC with ETH or Create new offerPayload to sell BTC for ETH offerbook.buyWithOtherCurrency=with {0} offerbook.sellForOtherCurrency=for {0} offerbook.wantTo=I want to: -offerbook.takeOfferButton.tooltip=Take offer for {0} -offerbook.yesCreateOffer=Yes, create offer +offerbook.takeOfferButton.tooltip=Take offerPayload for {0} +offerbook.yesCreateOffer=Yes, create offerPayload offerbook.setupNewAccount=Set up a new trading account -offerbook.removeOffer.success=Remove offer was successful. -offerbook.removeOffer.failed=Remove offer failed:\n{0} +offerbook.removeOffer.success=Remove offerPayload was successful. +offerbook.removeOffer.failed=Remove offerPayload failed:\n{0} offerbook.withdrawFundsHint=You can withdraw the funds you paid in from the {0} screen. offerbook.warning.noTradingAccountForCurrency.headline=No trading account for selected currency -offerbook.warning.noTradingAccountForCurrency.msg=You don't have a trading account for the selected currency.\nDo you want to create an offer with one of your existing trading accounts? +offerbook.warning.noTradingAccountForCurrency.msg=You don't have a trading account for the selected currency.\nDo you want to create an offerPayload with one of your existing trading accounts? offerbook.warning.noMatchingAccount.headline=No matching trading account. -offerbook.warning.noMatchingAccount.msg=You don't have a trading account with the payment method required for that offer.\nYou need to setup a trading account with that payment method if you want to take this offer.\nDo you want to do this now? -offerbook.warning.wrongTradeProtocol=That offer requires a different protocol version as the one used in your version of the software.\n\nPlease check if you have the latest version installed, otherwise the user who created the offer has used an older version.\n\nUsers cannot trade with an incompatible trade protocol version. +offerbook.warning.noMatchingAccount.msg=You don't have a trading account with the payment method required for that offerPayload.\nYou need to setup a trading account with that payment method if you want to take this offerPayload.\nDo you want to do this now? +offerbook.warning.wrongTradeProtocol=That offerPayload requires a different protocol version as the one used in your version of the software.\n\nPlease check if you have the latest version installed, otherwise the user who created the offerPayload has used an older version.\n\nUsers cannot trade with an incompatible trade protocol version. offerbook.warning.userIgnored=You have added that user's onion address to your ignore list. -offerbook.warning.offerBlocked=That offer was blocked by the bisq developers.\nProbably there is an unhandled bug causing issues when taking that offer. +offerbook.warning.offerBlocked=That offerPayload was blocked by the bisq developers.\nProbably there is an unhandled bug causing issues when taking that offerPayload. offerbook.warning.nodeBlocked=The onion address of that trader was blocked by the bisq developers.\nProbably there is an unhandled bug causing issues when taking offers from that trader. #################################################################### -# Offerbook / Create offer +# Offerbook / Create offerPayload #################################################################### createOffer.amount.prompt=Enter amount in BTC @@ -325,44 +325,44 @@ createOffer.amountPriceBox.sell.volumeDescription=Amount in {0} to receive createOffer.amountPriceBox.minAmountDescription=Minimum amount of BTC createOffer.securityDeposit.prompt=Security deposit in BTC createOffer.securityDepositBox.description=Customize security deposit -createOffer.fundsBox.title=Fund your offer +createOffer.fundsBox.title=Fund your offerPayload createOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above createOffer.fundsBox.offerFee=Maker fee: createOffer.fundsBox.networkFee=Mining fee: createOffer.fundsBox.placeOfferSpinnerInfo=Offer publishing is in progress ... createOffer.fundsBox.paymentLabel=bisq trade with ID {0} -createOffer.success.headline=Your offer has been published +createOffer.success.headline=Your offerPayload has been published createOffer.success.info=You can manage your open offers at \"Portfolio/My open offers\". # new entries -createOffer.placeOfferButton=Review: Place offer to {0} bitcoin -createOffer.alreadyFunded=You had already funded that offer.\nYour funds have been moved to your local bisq wallet and are available for withdrawal in the \"Funds/Available for withdrawal\" screen. -createOffer.createOfferFundWalletInfo.headline=Fund your offer +createOffer.placeOfferButton=Review: Place offerPayload to {0} bitcoin +createOffer.alreadyFunded=You had already funded that offerPayload.\nYour funds have been moved to your local bisq wallet and are available for withdrawal in the \"Funds/Available for withdrawal\" screen. +createOffer.createOfferFundWalletInfo.headline=Fund your offerPayload # suppress inspection "TrailingSpacesInProperty" createOffer.createOfferFundWalletInfo.tradeAmount=- Trade amount: {0} \n -createOffer.createOfferFundWalletInfo.msg=You need to deposit {0} to this offer.\n\nThose funds are reserved in your local wallet and will get locked into the Multisig deposit address once someone takes your offer.\n\nThe amount is the sum of:\n{1}- Security deposit: {2}\n- Trading fee: {3}\n- Mining fee: {4}\n\nYou can choose between two options when funding your trade:\n- Use your bisq wallet (convenient, but transactions may be linkable) OR\n- Transfer from an external wallet (potentially more private)\n\nYou will see all funding options and details after closing this popup. +createOffer.createOfferFundWalletInfo.msg=You need to deposit {0} to this offerPayload.\n\nThose funds are reserved in your local wallet and will get locked into the Multisig deposit address once someone takes your offerPayload.\n\nThe amount is the sum of:\n{1}- Security deposit: {2}\n- Trading fee: {3}\n- Mining fee: {4}\n\nYou can choose between two options when funding your trade:\n- Use your bisq wallet (convenient, but transactions may be linkable) OR\n- Transfer from an external wallet (potentially more private)\n\nYou will see all funding options and details after closing this popup. -# only first part "An error occurred when placing the offer:" has been used before. We added now the rest (need update in existing translations!) -createOffer.amountPriceBox.error.message=An error occurred when placing the offer:\n\n{0}\n\n\ +# only first part "An error occurred when placing the offerPayload:" has been used before. We added now the rest (need update in existing translations!) +createOffer.amountPriceBox.error.message=An error occurred when placing the offerPayload:\n\n{0}\n\n\ No funds have left your wallet yet.\n\ Please restart your application and check your network connection. createOffer.setAmountPrice=Set amount and price -createOffer.warnCancelOffer=You have already funded that offer.\nIf you cancel now, your funds will be moved to your local bisq wallet and are available for withdrawal in the \"Funds/Available for withdrawal\" screen.\nAre you sure you want to cancel? +createOffer.warnCancelOffer=You have already funded that offerPayload.\nIf you cancel now, your funds will be moved to your local bisq wallet and are available for withdrawal in the \"Funds/Available for withdrawal\" screen.\nAre you sure you want to cancel? createOffer.fixed=Fixed createOffer.percentage=Percentage -createOffer.timeoutAtPublishing=A timeout occurred at publishing the offer. +createOffer.timeoutAtPublishing=A timeout occurred at publishing the offerPayload. createOffer.errorInfo=\n\nThe maker fee is already paid. In the worst case you have lost that fee. We are sorry about that but keep in mind it is a very small amount.\nPlease try to restart you application and check your network connection to see if you can resolve the issue. createOffer.tooLowSecDeposit.warning=You have set the security deposit to a lower value than the recommended default value of {0}.\nAre you sure you want to use a lower security deposit?\nIt gives you less protection in case the trading peer does not follow the trade protocol. createOffer.resetToDefault=No, reset to the default value createOffer.useLowerValue=Yes, use my lower value createOffer.priceOutSideOfDeviation=The price you have entered is outside the max. allowed deviation from the market price.\nThe max. allowed deviation is {0} and can be adjusted in the preferences. createOffer.changePrice=Change price -createOffer.tac=With placing that offer I agree to trade with any trader who fulfills the conditions as defined above. +createOffer.tac=With placing that offerPayload I agree to trade with any trader who fulfills the conditions as defined above. #################################################################### -# Offerbook / Take offer +# Offerbook / Take offerPayload #################################################################### takeOffer.amount.prompt=Enter amount in BTC @@ -370,47 +370,47 @@ takeOffer.amountPriceBox.buy.amountDescription=Amount of bitcoin to sell takeOffer.amountPriceBox.sell.amountDescription=Amount of bitcoin to buy takeOffer.amountPriceBox.priceDescription=Price per bitcoin in {0} takeOffer.amountPriceBox.amountRangeDescription=Possible amount range -takeOffer.securityDepositBox.description=Security deposit for offer +takeOffer.securityDepositBox.description=Security deposit for offerPayload takeOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. -takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offer. -takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offer. +takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offerPayload. +takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offerPayload. takeOffer.validation.amountLargerThanOfferAmountMinusFee=That input amount would create dust change for the BTC seller. takeOffer.fundsBox.title=Fund your trade -takeOffer.fundsBox.isOfferAvailable=Check if offer is available ... +takeOffer.fundsBox.isOfferAvailable=Check if offerPayload is available ... takeOffer.fundsBox.tradeAmount=Amount to sell: takeOffer.fundsBox.offerFee=Taker fee: takeOffer.fundsBox.networkFee=Mining fees (3x): -takeOffer.fundsBox.takeOfferSpinnerInfo=Take offer in progress ... +takeOffer.fundsBox.takeOfferSpinnerInfo=Take offerPayload in progress ... takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} -takeOffer.success.headline=You have successfully taken an offer. +takeOffer.success.headline=You have successfully taken an offerPayload. takeOffer.success.info=You can see the status of your trade at \"Portfolio/Open trades\". -takeOffer.error.message=An error occurred when taking the offer.\n\n{0} +takeOffer.error.message=An error occurred when taking the offerPayload.\n\n{0} # new entries -takeOffer.takeOfferButton=Review: Take offer to {0} bitcoin -takeOffer.noPriceFeedAvailable=You cannot take that offer as it uses a percentage price based on the market price but there is no price feed available. -takeOffer.alreadyFunded.movedFunds=You had already funded that offer.\nYour funds have been moved to your local bisq wallet and are available for withdrawal in the \"Funds/Available for withdrawal\" screen. +takeOffer.takeOfferButton=Review: Take offerPayload to {0} bitcoin +takeOffer.noPriceFeedAvailable=You cannot take that offerPayload as it uses a percentage price based on the market price but there is no price feed available. +takeOffer.alreadyFunded.movedFunds=You had already funded that offerPayload.\nYour funds have been moved to your local bisq wallet and are available for withdrawal in the \"Funds/Available for withdrawal\" screen. takeOffer.takeOfferFundWalletInfo.headline=Fund your trade # suppress inspection "TrailingSpacesInProperty" takeOffer.takeOfferFundWalletInfo.tradeAmount=- Trade amount: {0} \n -takeOffer.takeOfferFundWalletInfo.msg=You need to deposit {0} for taking this offer.\n\nThe amount is the sum of:\n{1}- Security deposit: {2}\n- Trading fee: {3}\n- Mining fee (3x): {4}\n\nYou can choose between two options when funding your trade:\n- Use your bisq wallet (convenient, but transactions may be linkable) OR\n- Transfer from an external wallet (potentially more private)\n\nYou will see all funding options and details after closing this popup. +takeOffer.takeOfferFundWalletInfo.msg=You need to deposit {0} for taking this offerPayload.\n\nThe amount is the sum of:\n{1}- Security deposit: {2}\n- Trading fee: {3}\n- Mining fee (3x): {4}\n\nYou can choose between two options when funding your trade:\n- Use your bisq wallet (convenient, but transactions may be linkable) OR\n- Transfer from an external wallet (potentially more private)\n\nYou will see all funding options and details after closing this popup. takeOffer.alreadyPaidInFunds=If you have already paid in funds you can withdraw it in the \"Funds/Available for withdrawal\" screen. takeOffer.paymentInfo=Payment info takeOffer.setAmountPrice=Set amount and price -takeOffer.alreadyFunded.askCancel=You have already funded that offer.\nIf you cancel now, your funds will be moved to your local bisq wallet and are available for withdrawal in the \"Funds/Available for withdrawal\" screen.\nAre you sure you want to cancel? -takeOffer.failed.offerNotAvailable=Take offer request failed because the offer is not available anymore. Maybe another trader has taken the offer in the meantime. -takeOffer.failed.offerTaken=TYou cannot take that offer because the offer was already taken by another trader. -takeOffer.failed.offerRemoved=You cannot take that offer because the offer has been removed in the meantime. -takeOffer.failed.offererNotOnline=Take offer request failed because maker is not online anymore. -takeOffer.failed.offererOffline=You cannot take that offer because the maker is offline. -takeOffer.warning.connectionToPeerLost=You lost connection to the maker.\nHe might have gone offline or has closed the connection to you because of too many open connections.\n\nIf you can still see his offer in the offerbook you can try to take the offer again. +takeOffer.alreadyFunded.askCancel=You have already funded that offerPayload.\nIf you cancel now, your funds will be moved to your local bisq wallet and are available for withdrawal in the \"Funds/Available for withdrawal\" screen.\nAre you sure you want to cancel? +takeOffer.failed.offerNotAvailable=Take offerPayload request failed because the offerPayload is not available anymore. Maybe another trader has taken the offerPayload in the meantime. +takeOffer.failed.offerTaken=TYou cannot take that offerPayload because the offerPayload was already taken by another trader. +takeOffer.failed.offerRemoved=You cannot take that offerPayload because the offerPayload has been removed in the meantime. +takeOffer.failed.offererNotOnline=Take offerPayload request failed because maker is not online anymore. +takeOffer.failed.offererOffline=You cannot take that offerPayload because the maker is offline. +takeOffer.warning.connectionToPeerLost=You lost connection to the maker.\nHe might have gone offline or has closed the connection to you because of too many open connections.\n\nIf you can still see his offerPayload in the offerbook you can try to take the offerPayload again. takeOffer.error.noFundsLost=\n\nNo funds have left your wallet yet.\nPlease try to restart you application and check your network connection to see if you can resolve the issue. takeOffer.error.feePaid=\n\nThe taker fee is already paid. In the worst case you have lost that fee. We are sorry about that but keep in mind it is a very small amount.\nPlease try to restart you application and check your network connection to see if you can resolve the issue. takeOffer.error.depositPublished=\n\nThe deposit transaction is already published.\nPlease try to restart you application and check your network connection to see if you can resolve the issue.\nIf the problem still remains please contact the developers for support. takeOffer.error.payoutPublished=\n\nThe payout transaction is already published.\nPlease try to restart you application and check your network connection to see if you can resolve the issue.\nIf the problem still remains please contact the developers for support. takeOffer.error.disputed=\n\nThe trade is handled already by an arbitrator.\nPlease try to restart you application and check your network connection to see if you can resolve the issue.\nIf the problem still remains please contact the arbitrator or the developers for support. -takeOffer.tac=With taking that offer I agree to the trade conditions as defined above. +takeOffer.tac=With taking that offerPayload I agree to the trade conditions as defined above. #################################################################### @@ -616,7 +616,7 @@ funds.withdrawal.warn.noSourceAddressSelected=You need to select a source addres funds.withdrawal.warn.amountExceeds=Your amount exceeds the available amount for the selected address.\nConsider to select multiple addresses in the table above if you want to withdraw more. funds.reserved.noFunds=No funds are reserved in open offers -funds.reserved.reserved=Reserved in local wallet for offer with ID: {0} +funds.reserved.reserved=Reserved in local wallet for offerPayload with ID: {0} funds.locked.noFunds=No funds are locked in trades funds.locked.locked=Locked in MultiSig for trade with ID: {0} @@ -649,7 +649,7 @@ support.filter=Filter list: support.noTickets=There are no open tickets support.sendingMessage=Sending Message... support.receiverNotOnline=Receiver is not online. Message is saved to his mailbox. -support.wrongVersion=The offer in that dispute has been created with an older version of bisq.\n\ +support.wrongVersion=The offerPayload in that dispute has been created with an older version of bisq.\n\ You cannot close that dispute with your version of the application.\n\n\ Please use an older version with protocol version {0} support.openFile=Open file to attach (max. file size: {0} kb) @@ -732,7 +732,7 @@ setting.preferences.noAltcoins=There are no altcoins selected setting.preferences.addFiat=Add national currency setting.preferences.addAltcoin=Add altcoin setting.preferences.displayOptions=Display options -setting.preferences.showOwnOffers=Show my own offers in offer book: +setting.preferences.showOwnOffers=Show my own offers in offerPayload book: setting.preferences.useAnimations=Use animations: setting.preferences.sortWithNumOffers=Sort market lists with no. of offers/trades: setting.preferences.resetAllFlags=Reset all \"Don't show again\" flags: @@ -1044,8 +1044,8 @@ offerDetailsWindow.acceptedArbitrators=Accepted arbitrators: offerDetailsWindow.commitment=Commitment offerDetailsWindow.agree=I agree: offerDetailsWindow.tac=Terms and conditions: -offerDetailsWindow.confirm.maker=Confirm: Place offer to {0} bitcoin -offerDetailsWindow.confirm.taker=Confirm: Take offer to {0} bitcoin +offerDetailsWindow.confirm.maker=Confirm: Place offerPayload to {0} bitcoin +offerDetailsWindow.confirm.taker=Confirm: Take offerPayload to {0} bitcoin offerDetailsWindow.warn.noArbitrator=You have no arbitrator selected.\nPlease select at least one arbitrator. offerDetailsWindow.creationDate=Creation date: offerDetailsWindow.makersOnion=Maker's onion address: @@ -1145,21 +1145,21 @@ popup.warning.startupFailed.timeout=The application could not startup after 4 mi popup.warning.startupFailed.twoInstances=bisq is already running. You cannot run two instances of bisq. popup.warning.cryptoTestFailed=Seems that you use a self compiled binary and have not following the build instructions in https://github.com/bisq/bisq/blob/master/doc/build.md#7-enable-unlimited-strength-for-cryptographic-keys.\n\nIf that is not the case and you use the official bisq binary, please file a bug report to the Github page.\nError={0} popup.warning.oldOffers.msg=You have open offers which have been created with an older version of bisq.\nPlease remove those offers as they are not valid anymore.\n\nOffers (ID): {0} -popup.warning.oldOffers.buttonText=Remove outdated offer(s) +popup.warning.oldOffers.buttonText=Remove outdated offerPayload(s) popup.warning.tradePeriod.halfReached=Your trade with ID {0} has reached the half of the max. allowed trading period and is still not completed.\n\nThe trade period ends on {1}\n\nPlease check your trade state at \"Portfolio/Open trades\" for further information. popup.warning.tradePeriod.ended=Your trade with ID {0} has reached the max. allowed trading period and is not completed.\n\nThe trade period ended on {1}\n\nPlease check your trade at \"Portfolio/Open trades\" for contacting the arbitrator. popup.warning.noTradingAccountSetup.headline=You have not setup a trading account -popup.warning.noTradingAccountSetup.msg=You need to setup a national currency or altcoin account before you can create an offer.\nDo you want to setup an account? +popup.warning.noTradingAccountSetup.msg=You need to setup a national currency or altcoin account before you can create an offerPayload.\nDo you want to setup an account? popup.warning.noArbitratorSelected.headline=You don't have an arbitrator selected. popup.warning.noArbitratorSelected.msg=You need to setup at least one arbitrator to be able to trade.\nDo you want to do this now? popup.warning.notFullyConnected=You need to wait until you are fully connected to the network.\nThat might take up to about 2 minutes at startup. -popup.warning.removeOffer=Are you sure you want to remove that offer?\nThe maker fee of {0} will be lost if you remove that offer. +popup.warning.removeOffer=Are you sure you want to remove that offerPayload?\nThe maker fee of {0} will be lost if you remove that offerPayload. popup.warning.tooLargePercentageValue=You cannot set a percentage of 100% or larger. popup.warning.examplePercentageValue=Please enter a percentage number like \"5.4\" for 5.4% popup.warning.noPriceFeedAvailable=There is no price feed available for that currency. You cannot use a percent based price.\nPlease select the fixed price. popup.warning.sendMsgFailed=Sending message to your trading partner failed.\nPlease try again and if it continue to fail report a bug. -popup.info.securityDepositInfo=To ensure that both traders follow the trade protocol they need to pay a security deposit.\n\nThe deposit will stay in your local trading wallet until the offer gets accepted by another trader.\nIt will be refunded to you after the trade has successfully completed.\n\nPlease note that you need to keep you application running if you have an open offer.\nWhen another trader wants to take your offer it requires that your application is online and able to react.\nBe sure that you have standby mode deactivated as that would disconnect your client from the network (standby of the monitor is not a problem). +popup.info.securityDepositInfo=To ensure that both traders follow the trade protocol they need to pay a security deposit.\n\nThe deposit will stay in your local trading wallet until the offerPayload gets accepted by another trader.\nIt will be refunded to you after the trade has successfully completed.\n\nPlease note that you need to keep you application running if you have an open offerPayload.\nWhen another trader wants to take your offerPayload it requires that your application is online and able to react.\nBe sure that you have standby mode deactivated as that would disconnect your client from the network (standby of the monitor is not a problem). popup.privateNotification.headline=Important private notification! @@ -1179,7 +1179,7 @@ popup.attention.forTradeWithId=Attention required for trade with ID {0} notification.trade.headline=Notification for trade with ID {0} notification.ticket.headline=Support ticket for trade with ID {0} notification.trade.completed=The trade is now completed and you can withdraw your funds. -notification.trade.accepted=Your offer has been accepted by a BTC {0}. +notification.trade.accepted=Your offerPayload has been accepted by a BTC {0}. notification.trade.confirmed=Your trade has at least one blockchain confirmation.\nYou can start the payment now. notification.trade.paymentStarted=The BTC buyer has started the payment. notification.trade.selectTrade=Select trade @@ -1187,7 +1187,7 @@ notification.trade.peerOpenedDispute=Your trading peer has opened a {0}. notification.trade.disputeClosed=The {0} has been closed. notification.walletUpdate.headline=Trading wallet update notification.walletUpdate.msg=Your trading wallet is sufficiently funded.\nAmount: {0} -notification.takeOffer.walletUpdate.msg=Your trading wallet was already sufficiently funded from an earlier take offer attempt.\nAmount: {0} +notification.takeOffer.walletUpdate.msg=Your trading wallet was already sufficiently funded from an earlier take offerPayload attempt.\nAmount: {0} notification.tradeCompleted.headline=Trade completed notification.tradeCompleted.msg=You can withdraw your funds now to your external Bitcoin wallet or transfer it to the bisq wallet. @@ -1244,8 +1244,8 @@ list.currency.editList=Edit currency list table.placeholder.noItems=Currently there are no {0} available table.placeholder.noData=Currently there is no data available -peerInfoIcon.tooltip.offer.traded=Maker''s onion address: {0}\nYou have already traded {1} times with that maker. -peerInfoIcon.tooltip.offer.notTraded=Maker''s onion address: {0} +peerInfoIcon.tooltip.offerPayload.traded=Maker''s onion address: {0}\nYou have already traded {1} times with that maker. +peerInfoIcon.tooltip.offerPayload.notTraded=Maker''s onion address: {0} peerInfoIcon.tooltip.trade.traded=Trading peer''s onion address: {0}\nYou have already traded {1} times with that peer. peerInfoIcon.tooltip.trade.notTraded=Trading peer''s onion address: {0} @@ -1298,8 +1298,8 @@ formatter.makerTaker=Maker as {0} {1} / Taker as {2} {3} formatter.youAreAsMaker=You are {0} {1} as maker / Taker is {2} {3} formatter.youAreAsTaker=You are {0} {1} as taker / Maker is {2} {3} formatter.youAre=You are {0} {1} ({2} {3}) -formatter.youAreCreatingAnOffer.fiat=You are creating an offer to {0} {1} -formatter.youAreCreatingAnOffer.altcoin=You are creating an offer to {0} {1} ({2} {3}) +formatter.youAreCreatingAnOffer.fiat=You are creating an offerPayload to {0} {1} +formatter.youAreCreatingAnOffer.altcoin=You are creating an offerPayload to {0} {1} ({2} {3}) formatter.asMaker={0} {1} as maker formatter.asTaker={0} {1} as taker diff --git a/common/src/main/resources/i18n/displayStrings_de.properties b/common/src/main/resources/i18n/displayStrings_de.properties index 013e812d0a..019ecf3bf5 100644 --- a/common/src/main/resources/i18n/displayStrings_de.properties +++ b/common/src/main/resources/i18n/displayStrings_de.properties @@ -85,8 +85,8 @@ shared.amountMinMax=Amount (min - max) shared.remove=Remove shared.goTo=Go to {0} shared.BTCMinMax=BTC (min - max) -shared.removeOffer=Remove offer -shared.dontRemoveOffer=Don't remove offer +shared.removeOffer=Remove offerPayload +shared.dontRemoveOffer=Don't remove offerPayload shared.openLargeQRWindow=Open large QR-Code window shared.tradingAccount=Trading account shared.faq=Visit FAQ web page @@ -120,7 +120,7 @@ shared.applyAndShutDown=Apply and shut down shared.selectPaymentMethod=Select payment method shared.accountNameAlreadyUsed=That account name is already used in a saved account.\nPlease use another name. shared.askConfirmDeleteAccount=Do you really want to delete the selected account? -shared.cannotDeleteAccount=You cannot delete that account because it is used in an open offer or in a trade. +shared.cannotDeleteAccount=You cannot delete that account because it is used in an open offerPayload or in a trade. shared.noAccountsSetupYet=There are no accounts set up yet shared.manageAccounts=Manage accounts shared.addNewAccount=Add new account @@ -275,8 +275,8 @@ market.trades.tooltip.candle.date=Date: # OfferView #################################################################### -offerbook.createOffer=Create offer -offerbook.takeOffer=Take offer +offerbook.createOffer=Create offerPayload +offerbook.takeOffer=Take offerPayload offerbook.offerersBankId=Maker''s bank ID: {0} offerbook.offerersBankName=Maker''s bank name: {0} offerbook.offerersBankSeat=Maker''s seat of bank country: {0} @@ -288,31 +288,31 @@ offerbook.filterByPaymentMethod=Filter by payment method offerbook.nrOffers=No. of offers: {0} offerbook.volume={0} (min - max) -# e.g: Create new offer to buy BTC - {0} buy or sell, {1} BTC or other currency like ETH -offerbook.createOfferTo=Create new offer to {0} {1} -# postfix to previous. e.g.: Create new offer to buy BTC with ETH or Create new offer to sell BTC for ETH +# e.g: Create new offerPayload to buy BTC - {0} buy or sell, {1} BTC or other currency like ETH +offerbook.createOfferTo=Create new offerPayload to {0} {1} +# postfix to previous. e.g.: Create new offerPayload to buy BTC with ETH or Create new offerPayload to sell BTC for ETH offerbook.buyWithOtherCurrency=with {0} offerbook.sellForOtherCurrency=for {0} offerbook.wantTo=I want to: -offerbook.takeOfferButton.tooltip=Take offer for {0} -offerbook.yesCreateOffer=Yes, create offer +offerbook.takeOfferButton.tooltip=Take offerPayload for {0} +offerbook.yesCreateOffer=Yes, create offerPayload offerbook.setupNewAccount=Set up a new trading account -offerbook.removeOffer.success=Remove offer was successful. -offerbook.removeOffer.failed=Remove offer failed:\n{0} +offerbook.removeOffer.success=Remove offerPayload was successful. +offerbook.removeOffer.failed=Remove offerPayload failed:\n{0} offerbook.withdrawFundsHint=You can withdraw the funds you paid in from the {0} screen. offerbook.warning.noTradingAccountForCurrency.headline=No trading account for selected currency -offerbook.warning.noTradingAccountForCurrency.msg=You don't have a trading account for the selected currency.\nDo you want to create an offer with one of your existing trading accounts? +offerbook.warning.noTradingAccountForCurrency.msg=You don't have a trading account for the selected currency.\nDo you want to create an offerPayload with one of your existing trading accounts? offerbook.warning.noMatchingAccount.headline=No matching trading account. -offerbook.warning.noMatchingAccount.msg=You don't have a trading account with the payment method required for that offer.\nYou need to setup a trading account with that payment method if you want to take this offer.\nDo you want to do this now? -offerbook.warning.wrongTradeProtocol=That offer requires a different protocol version as the one used in your version of the software.\n\nPlease check if you have the latest version installed, otherwise the user who created the offer has used an older version.\n\nUsers cannot trade with an incompatible trade protocol version. +offerbook.warning.noMatchingAccount.msg=You don't have a trading account with the payment method required for that offerPayload.\nYou need to setup a trading account with that payment method if you want to take this offerPayload.\nDo you want to do this now? +offerbook.warning.wrongTradeProtocol=That offerPayload requires a different protocol version as the one used in your version of the software.\n\nPlease check if you have the latest version installed, otherwise the user who created the offerPayload has used an older version.\n\nUsers cannot trade with an incompatible trade protocol version. offerbook.warning.userIgnored=You have added that user's onion address to your ignore list. -offerbook.warning.offerBlocked=That offer was blocked by the bisq developers.\nProbably there is an unhandled bug causing issues when taking that offer. +offerbook.warning.offerBlocked=That offerPayload was blocked by the bisq developers.\nProbably there is an unhandled bug causing issues when taking that offerPayload. offerbook.warning.nodeBlocked=The onion address of that trader was blocked by the bisq developers.\nProbably there is an unhandled bug causing issues when taking offers from that trader. #################################################################### -# Offerbook / Create offer +# Offerbook / Create offerPayload #################################################################### createOffer.amount.prompt=Betrag in BTC eingeben @@ -336,33 +336,33 @@ createOffer.success.info=Sie können Ihre offenen Angebote unter \"Portfolio/Mei # new entries -createOffer.placeOfferButton=Review: Place offer to {0} bitcoin -createOffer.alreadyFunded=You had already funded that offer.\nYour funds have been moved to your local bisq wallet and are available for withdrawal in the \"Funds/Available for withdrawal\" screen. -createOffer.createOfferFundWalletInfo.headline=Fund your offer +createOffer.placeOfferButton=Review: Place offerPayload to {0} bitcoin +createOffer.alreadyFunded=You had already funded that offerPayload.\nYour funds have been moved to your local bisq wallet and are available for withdrawal in the \"Funds/Available for withdrawal\" screen. +createOffer.createOfferFundWalletInfo.headline=Fund your offerPayload # suppress inspection "TrailingSpacesInProperty" createOffer.createOfferFundWalletInfo.tradeAmount=- Trade amount: {0} \n -createOffer.createOfferFundWalletInfo.msg=You need to deposit {0} to this offer.\n\nThose funds are reserved in your local wallet and will get locked into the Multisig deposit address once someone takes your offer.\n\nThe amount is the sum of:\n{1}- Security deposit: {2}\n- Trading fee: {3}\n- Mining fee: {4}\n\nYou can choose between two options when funding your trade:\n- Use your bisq wallet (convenient, but transactions may be linkable) OR\n- Transfer from an external wallet (potentially more private)\n\nYou will see all funding options and details after closing this popup. +createOffer.createOfferFundWalletInfo.msg=You need to deposit {0} to this offerPayload.\n\nThose funds are reserved in your local wallet and will get locked into the Multisig deposit address once someone takes your offerPayload.\n\nThe amount is the sum of:\n{1}- Security deposit: {2}\n- Trading fee: {3}\n- Mining fee: {4}\n\nYou can choose between two options when funding your trade:\n- Use your bisq wallet (convenient, but transactions may be linkable) OR\n- Transfer from an external wallet (potentially more private)\n\nYou will see all funding options and details after closing this popup. -# only first part "An error occurred when placing the offer:" has been used before. We added now the rest (need update in existing translations!) +# only first part "An error occurred when placing the offerPayload:" has been used before. We added now the rest (need update in existing translations!) createOffer.amountPriceBox.error.message=Bei der Angebotsabgabe ist ein Fehler aufgetreten:\n\n{0}\n\n\ Es wurden keine bitcoin aus dem Wallet versandt.\n\ Bitte starten Sie Ihre Anwendung neu und überprüfen Sie ihre Netzwerkverbingung. createOffer.setAmountPrice=Set amount and price -createOffer.warnCancelOffer=You have already funded that offer.\nIf you cancel now, your funds will be moved to your local bisq wallet and are available for withdrawal in the \"Funds/Available for withdrawal\" screen.\nAre you sure you want to cancel? +createOffer.warnCancelOffer=You have already funded that offerPayload.\nIf you cancel now, your funds will be moved to your local bisq wallet and are available for withdrawal in the \"Funds/Available for withdrawal\" screen.\nAre you sure you want to cancel? createOffer.fixed=Fixed createOffer.percentage=Percentage -createOffer.timeoutAtPublishing=A timeout occurred at publishing the offer. +createOffer.timeoutAtPublishing=A timeout occurred at publishing the offerPayload. createOffer.errorInfo=\n\nThe maker fee is already paid. In the worst case you have lost that fee. We are sorry about that but keep in mind it is a very small amount.\nPlease try to restart you application and check your network connection to see if you can resolve the issue. createOffer.tooLowSecDeposit.warning=You have set the security deposit to a lower value than the recommended default value of {0}.\nAre you sure you want to use a lower security deposit?\nIt gives you less protection in case the trading peer does not follow the trade protocol. createOffer.resetToDefault=No, reset to the default value createOffer.useLowerValue=Yes, use my lower value createOffer.priceOutSideOfDeviation=The price you have entered is outside the max. allowed deviation from the market price.\nThe max. allowed deviation is {0} and can be adjusted in the preferences. createOffer.changePrice=Change price -createOffer.tac=With placing that offer I agree to trade with any trader who fulfills the conditions as defined above. +createOffer.tac=With placing that offerPayload I agree to trade with any trader who fulfills the conditions as defined above. #################################################################### -# Offerbook / Take offer +# Offerbook / Take offerPayload #################################################################### takeOffer.amount.prompt=Betrag in BTC eingeben @@ -387,30 +387,30 @@ takeOffer.success.info=Sie können den Status Ihres Handels unter \"Portfolio/Of takeOffer.error.message=Beim Annehmen des Angebots ist ein Fehler aufgetreten.\n\n{0} # new entries -takeOffer.takeOfferButton=Review: Take offer to {0} bitcoin -takeOffer.noPriceFeedAvailable=You cannot take that offer as it uses a percentage price based on the market price but there is no price feed available. -takeOffer.alreadyFunded.movedFunds=You had already funded that offer.\nYour funds have been moved to your local bisq wallet and are available for withdrawal in the \"Funds/Available for withdrawal\" screen. +takeOffer.takeOfferButton=Review: Take offerPayload to {0} bitcoin +takeOffer.noPriceFeedAvailable=You cannot take that offerPayload as it uses a percentage price based on the market price but there is no price feed available. +takeOffer.alreadyFunded.movedFunds=You had already funded that offerPayload.\nYour funds have been moved to your local bisq wallet and are available for withdrawal in the \"Funds/Available for withdrawal\" screen. takeOffer.takeOfferFundWalletInfo.headline=Fund your trade # suppress inspection "TrailingSpacesInProperty" takeOffer.takeOfferFundWalletInfo.tradeAmount=- Trade amount: {0} \n -takeOffer.takeOfferFundWalletInfo.msg=You need to deposit {0} for taking this offer.\n\nThe amount is the sum of:\n{1}- Security deposit: {2}\n- Trading fee: {3}\n- Mining fee (3x): {4}\n\nYou can choose between two options when funding your trade:\n- Use your bisq wallet (convenient, but transactions may be linkable) OR\n- Transfer from an external wallet (potentially more private)\n\nYou will see all funding options and details after closing this popup. +takeOffer.takeOfferFundWalletInfo.msg=You need to deposit {0} for taking this offerPayload.\n\nThe amount is the sum of:\n{1}- Security deposit: {2}\n- Trading fee: {3}\n- Mining fee (3x): {4}\n\nYou can choose between two options when funding your trade:\n- Use your bisq wallet (convenient, but transactions may be linkable) OR\n- Transfer from an external wallet (potentially more private)\n\nYou will see all funding options and details after closing this popup. takeOffer.alreadyPaidInFunds=If you have already paid in funds you can withdraw it in the \"Funds/Available for withdrawal\" screen. takeOffer.paymentInfo=Payment info takeOffer.setAmountPrice=Set amount and price -takeOffer.alreadyFunded.askCancel=You have already funded that offer.\nIf you cancel now, your funds will be moved to your local bisq wallet and are available for withdrawal in the \"Funds/Available for withdrawal\" screen.\nAre you sure you want to cancel? -takeOffer.failed.offerNotAvailable=Take offer request failed because the offer is not available anymore. Maybe another trader has taken the offer in the meantime. -takeOffer.failed.offerTaken=TYou cannot take that offer because the offer was already taken by another trader. -takeOffer.failed.offerRemoved=You cannot take that offer because the offer has been removed in the meantime. -takeOffer.failed.offererNotOnline=Take offer request failed because maker is not online anymore. -takeOffer.failed.offererOffline=You cannot take that offer because the maker is offline. -takeOffer.warning.connectionToPeerLost=You lost connection to the maker.\nHe might have gone offline or has closed the connection to you because of too many open connections.\n\nIf you can still see his offer in the offerbook you can try to take the offer again. +takeOffer.alreadyFunded.askCancel=You have already funded that offerPayload.\nIf you cancel now, your funds will be moved to your local bisq wallet and are available for withdrawal in the \"Funds/Available for withdrawal\" screen.\nAre you sure you want to cancel? +takeOffer.failed.offerNotAvailable=Take offerPayload request failed because the offerPayload is not available anymore. Maybe another trader has taken the offerPayload in the meantime. +takeOffer.failed.offerTaken=TYou cannot take that offerPayload because the offerPayload was already taken by another trader. +takeOffer.failed.offerRemoved=You cannot take that offerPayload because the offerPayload has been removed in the meantime. +takeOffer.failed.offererNotOnline=Take offerPayload request failed because maker is not online anymore. +takeOffer.failed.offererOffline=You cannot take that offerPayload because the maker is offline. +takeOffer.warning.connectionToPeerLost=You lost connection to the maker.\nHe might have gone offline or has closed the connection to you because of too many open connections.\n\nIf you can still see his offerPayload in the offerbook you can try to take the offerPayload again. takeOffer.error.noFundsLost=\n\nNo funds have left your wallet yet.\nPlease try to restart you application and check your network connection to see if you can resolve the issue. takeOffer.error.feePaid=\n\nThe taker fee is already paid. In the worst case you have lost that fee. We are sorry about that but keep in mind it is a very small amount.\nPlease try to restart you application and check your network connection to see if you can resolve the issue. takeOffer.error.depositPublished=\n\nThe deposit transaction is already published.\nPlease try to restart you application and check your network connection to see if you can resolve the issue.\nIf the problem still remains please contact the developers for support. takeOffer.error.payoutPublished=\n\nThe payout transaction is already published.\nPlease try to restart you application and check your network connection to see if you can resolve the issue.\nIf the problem still remains please contact the developers for support. takeOffer.error.disputed=\n\nThe trade is handled already by an arbitrator.\nPlease try to restart you application and check your network connection to see if you can resolve the issue.\nIf the problem still remains please contact the arbitrator or the developers for support. -takeOffer.tac=With taking that offer I agree to the trade conditions as defined above. +takeOffer.tac=With taking that offerPayload I agree to the trade conditions as defined above. #################################################################### @@ -616,7 +616,7 @@ funds.withdrawal.warn.noSourceAddressSelected=You need to select a source addres funds.withdrawal.warn.amountExceeds=Your amount exceeds the available amount for the selected address.\nConsider to select multiple addresses in the table above if you want to withdraw more. funds.reserved.noFunds=No funds are reserved in open offers -funds.reserved.reserved=Reserved in local wallet for offer with ID: {0} +funds.reserved.reserved=Reserved in local wallet for offerPayload with ID: {0} funds.locked.noFunds=No funds are locked in trades funds.locked.locked=Locked in MultiSig for trade with ID: {0} @@ -649,7 +649,7 @@ support.filter=Filter list: support.noTickets=There are no open tickets support.sendingMessage=Sending Message... support.receiverNotOnline=Receiver is not online. Message is saved to his mailbox. -support.wrongVersion=The offer in that dispute has been created with an older version of bisq.\n\ +support.wrongVersion=The offerPayload in that dispute has been created with an older version of bisq.\n\ You cannot close that dispute with your version of the application.\n\n\ Please use an older version with protocol version {0} support.openFile=Open file to attach (max. file size: {0} kb) @@ -732,7 +732,7 @@ setting.preferences.noAltcoins=There are no altcoins selected setting.preferences.addFiat=Add national currency setting.preferences.addAltcoin=Add altcoin setting.preferences.displayOptions=Display options -setting.preferences.showOwnOffers=Show my own offers in offer book: +setting.preferences.showOwnOffers=Show my own offers in offerPayload book: setting.preferences.useAnimations=Use animations: setting.preferences.sortWithNumOffers=Sort market lists with no. of offers/trades: setting.preferences.resetAllFlags=Reset all \"Don't show again\" flags: @@ -1044,8 +1044,8 @@ offerDetailsWindow.acceptedArbitrators=Accepted arbitrators: offerDetailsWindow.commitment=Commitment offerDetailsWindow.agree=I agree: offerDetailsWindow.tac=Terms and conditions: -offerDetailsWindow.confirm.maker=Confirm: Place offer to {0} bitcoin -offerDetailsWindow.confirm.taker=Confirm: Take offer to {0} bitcoin +offerDetailsWindow.confirm.maker=Confirm: Place offerPayload to {0} bitcoin +offerDetailsWindow.confirm.taker=Confirm: Take offerPayload to {0} bitcoin offerDetailsWindow.warn.noArbitrator=You have no arbitrator selected.\nPlease select at least one arbitrator. offerDetailsWindow.creationDate=Creation date: offerDetailsWindow.makersOnion=Maker's onion address: @@ -1145,21 +1145,21 @@ popup.warning.startupFailed.timeout=The application could not startup after 4 mi popup.warning.startupFailed.twoInstances=bisq is already running. You cannot run two instances of bisq. popup.warning.cryptoTestFailed=Seems that you use a self compiled binary and have not following the build instructions in https://github.com/bisq/bisq/blob/master/doc/build.md#7-enable-unlimited-strength-for-cryptographic-keys.\n\nIf that is not the case and you use the official bisq binary, please file a bug report to the Github page.\nError={0} popup.warning.oldOffers.msg=You have open offers which have been created with an older version of bisq.\nPlease remove those offers as they are not valid anymore.\n\nOffers (ID): {0} -popup.warning.oldOffers.buttonText=Remove outdated offer(s) +popup.warning.oldOffers.buttonText=Remove outdated offerPayload(s) popup.warning.tradePeriod.halfReached=Your trade with ID {0} has reached the half of the max. allowed trading period and is still not completed.\n\nThe trade period ends on {1}\n\nPlease check your trade state at \"Portfolio/Open trades\" for further information. popup.warning.tradePeriod.ended=Your trade with ID {0} has reached the max. allowed trading period and is not completed.\n\nThe trade period ended on {1}\n\nPlease check your trade at \"Portfolio/Open trades\" for contacting the arbitrator. popup.warning.noTradingAccountSetup.headline=You have not setup a trading account -popup.warning.noTradingAccountSetup.msg=You need to setup a national currency or altcoin account before you can create an offer.\nDo you want to setup an account? +popup.warning.noTradingAccountSetup.msg=You need to setup a national currency or altcoin account before you can create an offerPayload.\nDo you want to setup an account? popup.warning.noArbitratorSelected.headline=You don't have an arbitrator selected. popup.warning.noArbitratorSelected.msg=You need to setup at least one arbitrator to be able to trade.\nDo you want to do this now? popup.warning.notFullyConnected=You need to wait until you are fully connected to the network.\nThat might take up to about 2 minutes at startup. -popup.warning.removeOffer=Are you sure you want to remove that offer?\nThe maker fee of {0} will be lost if you remove that offer. +popup.warning.removeOffer=Are you sure you want to remove that offerPayload?\nThe maker fee of {0} will be lost if you remove that offerPayload. popup.warning.tooLargePercentageValue=You cannot set a percentage of 100% or larger. popup.warning.examplePercentageValue=Please enter a percentage number like \"5.4\" for 5.4% popup.warning.noPriceFeedAvailable=There is no price feed available for that currency. You cannot use a percent based price.\nPlease select the fixed price. popup.warning.sendMsgFailed=Sending message to your trading partner failed.\nPlease try again and if it continue to fail report a bug. -popup.info.securityDepositInfo=To ensure that both traders follow the trade protocol they need to pay a security deposit.\n\nThe deposit will stay in your local trading wallet until the offer gets accepted by another trader.\nIt will be refunded to you after the trade has successfully completed.\n\nPlease note that you need to keep you application running if you have an open offer.\nWhen another trader wants to take your offer it requires that your application is online and able to react.\nBe sure that you have standby mode deactivated as that would disconnect your client from the network (standby of the monitor is not a problem). +popup.info.securityDepositInfo=To ensure that both traders follow the trade protocol they need to pay a security deposit.\n\nThe deposit will stay in your local trading wallet until the offerPayload gets accepted by another trader.\nIt will be refunded to you after the trade has successfully completed.\n\nPlease note that you need to keep you application running if you have an open offerPayload.\nWhen another trader wants to take your offerPayload it requires that your application is online and able to react.\nBe sure that you have standby mode deactivated as that would disconnect your client from the network (standby of the monitor is not a problem). popup.privateNotification.headline=Important private notification! @@ -1179,7 +1179,7 @@ popup.attention.forTradeWithId=Attention required for trade with ID {0} notification.trade.headline=Notification for trade with ID {0} notification.ticket.headline=Support ticket for trade with ID {0} notification.trade.completed=The trade is now completed and you can withdraw your funds. -notification.trade.accepted=Your offer has been accepted by a BTC {0}. +notification.trade.accepted=Your offerPayload has been accepted by a BTC {0}. notification.trade.confirmed=Your trade has at least one blockchain confirmation.\nYou can start the payment now. notification.trade.paymentStarted=The BTC buyer has started the payment. notification.trade.selectTrade=Select trade @@ -1187,7 +1187,7 @@ notification.trade.peerOpenedDispute=Your trading peer has opened a {0}. notification.trade.disputeClosed=The {0} has been closed. notification.walletUpdate.headline=Trading wallet update notification.walletUpdate.msg=Your trading wallet is sufficiently funded.\nAmount: {0} -notification.takeOffer.walletUpdate.msg=Your trading wallet was already sufficiently funded from an earlier take offer attempt.\nAmount: {0} +notification.takeOffer.walletUpdate.msg=Your trading wallet was already sufficiently funded from an earlier take offerPayload attempt.\nAmount: {0} notification.tradeCompleted.headline=Trade completed notification.tradeCompleted.msg=You can withdraw your funds now to your external Bitcoin wallet or transfer it to the bisq wallet. @@ -1244,8 +1244,8 @@ list.currency.editList=Edit currency list table.placeholder.noItems=Currently there are no {0} available table.placeholder.noData=Currently there is no data available -peerInfoIcon.tooltip.offer.traded=Maker''s onion address: {0}\nYou have already traded {1} times with that maker. -peerInfoIcon.tooltip.offer.notTraded=Maker''s onion address: {0} +peerInfoIcon.tooltip.offerPayload.traded=Maker''s onion address: {0}\nYou have already traded {1} times with that maker. +peerInfoIcon.tooltip.offerPayload.notTraded=Maker''s onion address: {0} peerInfoIcon.tooltip.trade.traded=Trading peer''s onion address: {0}\nYou have already traded {1} times with that peer. peerInfoIcon.tooltip.trade.notTraded=Trading peer''s onion address: {0} @@ -1298,8 +1298,8 @@ formatter.makerTaker=Maker as {0} {1} / Taker as {2} {3} formatter.youAreAsMaker=You are {0} {1} as maker / Taker is {2} {3} formatter.youAreAsTaker=You are {0} {1} as taker / Maker is {2} {3} formatter.youAre=You are {0} {1} ({2} {3}) -formatter.youAreCreatingAnOffer.fiat=You are creating an offer to {0} {1} -formatter.youAreCreatingAnOffer.altcoin=You are creating an offer to {0} {1} ({2} {3}) +formatter.youAreCreatingAnOffer.fiat=You are creating an offerPayload to {0} {1} +formatter.youAreCreatingAnOffer.altcoin=You are creating an offerPayload to {0} {1} ({2} {3}) formatter.asMaker={0} {1} as maker formatter.asTaker={0} {1} as taker diff --git a/common/src/main/resources/i18n/in_dev/displayStrings_ae.properties b/common/src/main/resources/i18n/in_dev/displayStrings_ae.properties index a0550844e5..75d1d988a5 100644 --- a/common/src/main/resources/i18n/in_dev/displayStrings_ae.properties +++ b/common/src/main/resources/i18n/in_dev/displayStrings_ae.properties @@ -93,42 +93,42 @@ validation.bankIdNumber={0} must consist of {1} numbers. validation.accountNr=Account number must consist of {0} numbers. validation.accountNrChars=Account number must consist of {0} characters. -# Create offer +# Create offerPayload createOffer.amount.prompt=Enter amount in BTC createOffer.price.prompt=Enter price createOffer.volume.prompt=Enter amount in {0} # TODO remove createOffer.minAmount.prompt=Enter min. amount -# TODO remove createOffer.amountPriceBox.title=Create your offer +# TODO remove createOffer.amountPriceBox.title=Create your offerPayload createOffer.amountPriceBox.amountDescription=Amount of bitcoin to {0} createOffer.amountPriceBox.priceDescriptionFiat=Fixed price per {0} createOffer.amountPriceBox.buy.volumeDescription=Amount in {0} to spend createOffer.amountPriceBox.sell.volumeDescription=Amount in {0} to receive createOffer.amountPriceBox.minAmountDescription=Minimum amount of BTC -# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. -# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. +# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. +# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. # TODO remove createOffer.amountPriceBox.next=Next step # TODO remove createOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. # TODO remove createOffer.amountPriceBox.warning.invalidFiatDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted. # TODO remove createOffer.amountPriceBox.warning.adjustedVolume=The total volume you have entered leads to invalid fractional bitcoin amounts. The amount has been adjusted and a new total volume be calculated from it. -createOffer.amountPriceBox.error.message=An error occurred when placing the offer:\n\n{0} +createOffer.amountPriceBox.error.message=An error occurred when placing the offerPayload:\n\n{0} # TODO remove createOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount. # TODO remove createOffer.validation.minAmountLargerThanAmount=Minimum amount cannot be larger than amount. -createOffer.fundsBox.title=Fund your offer +createOffer.fundsBox.title=Fund your offerPayload createOffer.fundsBox.totalsNeeded=Funds needed: createOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above createOffer.fundsBox.address=Trade wallet address: createOffer.fundsBox.balance=Trade wallet balance: -# TODO remove createOffer.fundsBox.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offer gets executed. If you cancel your offer you can withdraw your funds from that trading wallet. The only payment made when placing an offer is the offer fee payment. https://bisq.io/faq/#6 +# TODO remove createOffer.fundsBox.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offerPayload gets executed. If you cancel your offerPayload you can withdraw your funds from that trading wallet. The only payment made when placing an offerPayload is the offerPayload fee payment. https://bisq.io/faq/#6 createOffer.fundsBox.tradeAmount=Trade amount: createOffer.fundsBox.securityDeposit=Security deposit: -createOffer.fundsBox.offerFee=Create offer fee: +createOffer.fundsBox.offerFee=Create offerPayload fee: createOffer.fundsBox.networkFee=Mining fee: createOffer.fundsBox.total=Total: # TODO remove createOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove createOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove createOffer.fundsBox.placeOffer=Place offer +# TODO remove createOffer.fundsBox.placeOffer=Place offerPayload createOffer.fundsBox.placeOfferSpinnerInfo=Offer publishing is in progress ... createOffer.fundsBox.paymentLabel=bisq trade with ID {0} @@ -139,20 +139,20 @@ createOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove createOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove createOffer.advancedBox.county=Payments account country: -# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offer restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). +# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offerPayload restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). -createOffer.success.headline=Your offer has been published +createOffer.success.headline=Your offerPayload has been published createOffer.success.info=You can manage your open offers in the \"Portfolio\" screen under \"My open offers\". -# TODO remove createOffer.error.message=An error occurred when placing the offer.\n\n{0} +# TODO remove createOffer.error.message=An error occurred when placing the offerPayload.\n\n{0} -# Take offer +# Take offerPayload takeOffer.amount.prompt=Enter amount in BTC # TODO remove takeOffer.price.prompt=Enter price # TODO remove takeOffer.volume.prompt=Enter amount in {0} # TODO remove takeOffer.minAmount.prompt=Enter min. amount -# TODO remove takeOffer.amountPriceBox.title=Take offer +# TODO remove takeOffer.amountPriceBox.title=Take offerPayload # TODO remove takeOffer.amountPriceBox.subTitle=Buy bitcoin takeOffer.amountPriceBox.buy.amountDescription=Amount of bitcoin to sell takeOffer.amountPriceBox.sell.amountDescription=Amount of bitcoin to buy @@ -164,30 +164,30 @@ takeOffer.amountPriceBox.amountRangeDescription=Possible amount range # TODO remove takeOffer.amountPriceBox.sell.info=Enter the amount of bitcoin you want to buy. You can choose an amount between the minimum amount and the amount. # TODO remove takeOffer.amountPriceBox.next=Next step takeOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. -takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offer. -takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offer. +takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offerPayload. +takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offerPayload. takeOffer.validation.amountLargerThanOfferAmountMinusFee=That input amount would create dust change for the BTC seller. takeOffer.fundsBox.title=Fund your trade -takeOffer.fundsBox.isOfferAvailable=Check if offer is available ... +takeOffer.fundsBox.isOfferAvailable=Check if offerPayload is available ... takeOffer.fundsBox.totalsNeeded=Funds needed: # TODO remove takeOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above takeOffer.fundsBox.address=Trade wallet address: takeOffer.fundsBox.balance=Trade wallet balance: -# TODO remove takeOffer.fundsBox.buy.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.buy.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid in to a locked deposit address. At the end of a successful trade you will get back your security deposit and the bitcoin amount you sold will be transferred \ to the BTC buyer. -# TODO remove takeOffer.fundsBox.sell.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.sell.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid into a locked deposit address. At the end of a successful trade you will get back your security deposit. takeOffer.fundsBox.tradeAmount=Amount to sell: takeOffer.fundsBox.securityDeposit=Security deposit: -takeOffer.fundsBox.offerFee=Take offer fee: +takeOffer.fundsBox.offerFee=Take offerPayload fee: takeOffer.fundsBox.networkFee=Mining fee: takeOffer.fundsBox.total=Total: # TODO remove takeOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove takeOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove takeOffer.fundsBox.takeOffer=Take offer -takeOffer.fundsBox.takeOfferSpinnerInfo=Take offer in progress ... +# TODO remove takeOffer.fundsBox.takeOffer=Take offerPayload +takeOffer.fundsBox.takeOfferSpinnerInfo=Take offerPayload in progress ... takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.title=Advanced settings @@ -197,12 +197,12 @@ takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove takeOffer.advancedBox.county=Payments account country: -# TODO remove takeOffer.advancedBox.info=These are the offer restrictions your trading partner has defined in his offer. \ +# TODO remove takeOffer.advancedBox.info=These are the offerPayload restrictions your trading partner has defined in his offerPayload. \ Your settings match those constraints and you are able to trade with him. -takeOffer.success.headline=You have successfully taken an offer. +takeOffer.success.headline=You have successfully taken an offerPayload. takeOffer.success.info=You can see the status of your trade at the \"Portfolio\" screen under \"Open trades\". -takeOffer.error.message=An error occurred when taking the offer.\n\n{0} +takeOffer.error.message=An error occurred when taking the offerPayload.\n\n{0} # Payment methods # remove N/A=Not available diff --git a/common/src/main/resources/i18n/in_dev/displayStrings_ba.properties b/common/src/main/resources/i18n/in_dev/displayStrings_ba.properties index 60dc00dcc1..cf344c8b17 100644 --- a/common/src/main/resources/i18n/in_dev/displayStrings_ba.properties +++ b/common/src/main/resources/i18n/in_dev/displayStrings_ba.properties @@ -93,42 +93,42 @@ validation.bankIdNumber={0} must consist of {1} numbers. validation.accountNr=Account number must consist of {0} numbers. validation.accountNrChars=Account number must consist of {0} characters. -# Create offer +# Create offerPayload createOffer.amount.prompt=Enter amount in BTC createOffer.price.prompt=Enter price createOffer.volume.prompt=Enter amount in {0} # TODO remove createOffer.minAmount.prompt=Enter min. amount -# TODO remove createOffer.amountPriceBox.title=Create your offer +# TODO remove createOffer.amountPriceBox.title=Create your offerPayload createOffer.amountPriceBox.amountDescription=Amount of bitcoin to {0} createOffer.amountPriceBox.priceDescriptionFiat=Fixed price per {0} createOffer.amountPriceBox.buy.volumeDescription=Amount in {0} to spend createOffer.amountPriceBox.sell.volumeDescription=Amount in {0} to receive createOffer.amountPriceBox.minAmountDescription=Minimum amount of BTC -# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. -# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. +# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. +# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. # TODO remove createOffer.amountPriceBox.next=Next step # TODO remove createOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. # TODO remove createOffer.amountPriceBox.warning.invalidFiatDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted. # TODO remove createOffer.amountPriceBox.warning.adjustedVolume=The total volume you have entered leads to invalid fractional bitcoin amounts. The amount has been adjusted and a new total volume be calculated from it. -createOffer.amountPriceBox.error.message=An error occurred when placing the offer:\n\n{0} +createOffer.amountPriceBox.error.message=An error occurred when placing the offerPayload:\n\n{0} # TODO remove createOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount. # TODO remove createOffer.validation.minAmountLargerThanAmount=Minimum amount cannot be larger than amount. -createOffer.fundsBox.title=Fund your offer +createOffer.fundsBox.title=Fund your offerPayload createOffer.fundsBox.totalsNeeded=Funds needed: createOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above createOffer.fundsBox.address=Trade wallet address: createOffer.fundsBox.balance=Trade wallet balance: -# TODO remove createOffer.fundsBox.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offer gets executed. If you cancel your offer you can withdraw your funds from that trading wallet. The only payment made when placing an offer is the offer fee payment. https://bisq.io/faq/#6 +# TODO remove createOffer.fundsBox.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offerPayload gets executed. If you cancel your offerPayload you can withdraw your funds from that trading wallet. The only payment made when placing an offerPayload is the offerPayload fee payment. https://bisq.io/faq/#6 createOffer.fundsBox.tradeAmount=Trade amount: createOffer.fundsBox.securityDeposit=Security deposit: -createOffer.fundsBox.offerFee=Create offer fee: +createOffer.fundsBox.offerFee=Create offerPayload fee: createOffer.fundsBox.networkFee=Mining fee: createOffer.fundsBox.total=Total: # TODO remove createOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove createOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove createOffer.fundsBox.placeOffer=Place offer +# TODO remove createOffer.fundsBox.placeOffer=Place offerPayload createOffer.fundsBox.placeOfferSpinnerInfo=Offer publishing is in progress ... createOffer.fundsBox.paymentLabel=bisq trade with ID {0} @@ -139,20 +139,20 @@ createOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove createOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove createOffer.advancedBox.county=Payments account country: -# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offer restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). +# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offerPayload restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). -createOffer.success.headline=Your offer has been published +createOffer.success.headline=Your offerPayload has been published createOffer.success.info=You can manage your open offers in the \"Portfolio\" screen under \"My open offers\". -# TODO remove createOffer.error.message=An error occurred when placing the offer.\n\n{0} +# TODO remove createOffer.error.message=An error occurred when placing the offerPayload.\n\n{0} -# Take offer +# Take offerPayload takeOffer.amount.prompt=Enter amount in BTC # TODO remove takeOffer.price.prompt=Enter price # TODO remove takeOffer.volume.prompt=Enter amount in {0} # TODO remove takeOffer.minAmount.prompt=Enter min. amount -# TODO remove takeOffer.amountPriceBox.title=Take offer +# TODO remove takeOffer.amountPriceBox.title=Take offerPayload # TODO remove takeOffer.amountPriceBox.subTitle=Buy bitcoin takeOffer.amountPriceBox.buy.amountDescription=Amount of bitcoin to sell takeOffer.amountPriceBox.sell.amountDescription=Amount of bitcoin to buy @@ -164,30 +164,30 @@ takeOffer.amountPriceBox.amountRangeDescription=Possible amount range # TODO remove takeOffer.amountPriceBox.sell.info=Enter the amount of bitcoin you want to buy. You can choose an amount between the minimum amount and the amount. # TODO remove takeOffer.amountPriceBox.next=Next step takeOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. -takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offer. -takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offer. +takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offerPayload. +takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offerPayload. takeOffer.validation.amountLargerThanOfferAmountMinusFee=That input amount would create dust change for the BTC seller. takeOffer.fundsBox.title=Fund your trade -takeOffer.fundsBox.isOfferAvailable=Check if offer is available ... +takeOffer.fundsBox.isOfferAvailable=Check if offerPayload is available ... takeOffer.fundsBox.totalsNeeded=Funds needed: # TODO remove takeOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above takeOffer.fundsBox.address=Trade wallet address: takeOffer.fundsBox.balance=Trade wallet balance: -# TODO remove takeOffer.fundsBox.buy.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.buy.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid in to a locked deposit address. At the end of a successful trade you will get back your security deposit and the bitcoin amount you sold will be transferred \ to the BTC buyer. -# TODO remove takeOffer.fundsBox.sell.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.sell.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid into a locked deposit address. At the end of a successful trade you will get back your security deposit. takeOffer.fundsBox.tradeAmount=Amount to sell: takeOffer.fundsBox.securityDeposit=Security deposit: -takeOffer.fundsBox.offerFee=Take offer fee: +takeOffer.fundsBox.offerFee=Take offerPayload fee: takeOffer.fundsBox.networkFee=Mining fee: takeOffer.fundsBox.total=Total: # TODO remove takeOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove takeOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove takeOffer.fundsBox.takeOffer=Take offer -takeOffer.fundsBox.takeOfferSpinnerInfo=Take offer in progress ... +# TODO remove takeOffer.fundsBox.takeOffer=Take offerPayload +takeOffer.fundsBox.takeOfferSpinnerInfo=Take offerPayload in progress ... takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.title=Advanced settings @@ -197,12 +197,12 @@ takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove takeOffer.advancedBox.county=Payments account country: -# TODO remove takeOffer.advancedBox.info=These are the offer restrictions your trading partner has defined in his offer. \ +# TODO remove takeOffer.advancedBox.info=These are the offerPayload restrictions your trading partner has defined in his offerPayload. \ Your settings match those constraints and you are able to trade with him. -takeOffer.success.headline=You have successfully taken an offer. +takeOffer.success.headline=You have successfully taken an offerPayload. takeOffer.success.info=You can see the status of your trade at the \"Portfolio\" screen under \"Open trades\". -takeOffer.error.message=An error occurred when taking the offer.\n\n{0} +takeOffer.error.message=An error occurred when taking the offerPayload.\n\n{0} # Payment methods # remove N/A=Not available diff --git a/common/src/main/resources/i18n/in_dev/displayStrings_br.properties b/common/src/main/resources/i18n/in_dev/displayStrings_br.properties index bbaf1def05..fa174cc907 100644 --- a/common/src/main/resources/i18n/in_dev/displayStrings_br.properties +++ b/common/src/main/resources/i18n/in_dev/displayStrings_br.properties @@ -93,42 +93,42 @@ validation.bankIdNumber={0} must consist of {1} numbers. validation.accountNr=Account number must consist of {0} numbers. validation.accountNrChars=Account number must consist of {0} characters. -# Create offer +# Create offerPayload createOffer.amount.prompt=Enter amount in BTC createOffer.price.prompt=Enter price createOffer.volume.prompt=Enter amount in {0} # TODO remove createOffer.minAmount.prompt=Enter min. amount -# TODO remove createOffer.amountPriceBox.title=Create your offer +# TODO remove createOffer.amountPriceBox.title=Create your offerPayload createOffer.amountPriceBox.amountDescription=Amount of bitcoin to {0} createOffer.amountPriceBox.priceDescriptionFiat=Fixed price per {0} createOffer.amountPriceBox.buy.volumeDescription=Amount in {0} to spend createOffer.amountPriceBox.sell.volumeDescription=Amount in {0} to receive createOffer.amountPriceBox.minAmountDescription=Minimum amount of BTC -# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. -# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. +# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. +# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. # TODO remove createOffer.amountPriceBox.next=Next step # TODO remove createOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. # TODO remove createOffer.amountPriceBox.warning.invalidFiatDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted. # TODO remove createOffer.amountPriceBox.warning.adjustedVolume=The total volume you have entered leads to invalid fractional bitcoin amounts. The amount has been adjusted and a new total volume be calculated from it. -createOffer.amountPriceBox.error.message=An error occurred when placing the offer:\n\n{0} +createOffer.amountPriceBox.error.message=An error occurred when placing the offerPayload:\n\n{0} # TODO remove createOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount. # TODO remove createOffer.validation.minAmountLargerThanAmount=Minimum amount cannot be larger than amount. -createOffer.fundsBox.title=Fund your offer +createOffer.fundsBox.title=Fund your offerPayload createOffer.fundsBox.totalsNeeded=Funds needed: createOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above createOffer.fundsBox.address=Trade wallet address: createOffer.fundsBox.balance=Trade wallet balance: -# TODO remove createOffer.fundsBox.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offer gets executed. If you cancel your offer you can withdraw your funds from that trading wallet. The only payment made when placing an offer is the offer fee payment. https://bisq.io/faq/#6 +# TODO remove createOffer.fundsBox.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offerPayload gets executed. If you cancel your offerPayload you can withdraw your funds from that trading wallet. The only payment made when placing an offerPayload is the offerPayload fee payment. https://bisq.io/faq/#6 createOffer.fundsBox.tradeAmount=Trade amount: createOffer.fundsBox.securityDeposit=Security deposit: -createOffer.fundsBox.offerFee=Create offer fee: +createOffer.fundsBox.offerFee=Create offerPayload fee: createOffer.fundsBox.networkFee=Mining fee: createOffer.fundsBox.total=Total: # TODO remove createOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove createOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove createOffer.fundsBox.placeOffer=Place offer +# TODO remove createOffer.fundsBox.placeOffer=Place offerPayload createOffer.fundsBox.placeOfferSpinnerInfo=Offer publishing is in progress ... createOffer.fundsBox.paymentLabel=bisq trade with ID {0} @@ -139,20 +139,20 @@ createOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove createOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove createOffer.advancedBox.county=Payments account country: -# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offer restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). +# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offerPayload restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). -createOffer.success.headline=Your offer has been published +createOffer.success.headline=Your offerPayload has been published createOffer.success.info=You can manage your open offers in the \"Portfolio\" screen under \"My open offers\". -# TODO remove createOffer.error.message=An error occurred when placing the offer.\n\n{0} +# TODO remove createOffer.error.message=An error occurred when placing the offerPayload.\n\n{0} -# Take offer +# Take offerPayload takeOffer.amount.prompt=Enter amount in BTC # TODO remove takeOffer.price.prompt=Enter price # TODO remove takeOffer.volume.prompt=Enter amount in {0} # TODO remove takeOffer.minAmount.prompt=Enter min. amount -# TODO remove takeOffer.amountPriceBox.title=Take offer +# TODO remove takeOffer.amountPriceBox.title=Take offerPayload # TODO remove takeOffer.amountPriceBox.subTitle=Buy bitcoin takeOffer.amountPriceBox.buy.amountDescription=Amount of bitcoin to sell takeOffer.amountPriceBox.sell.amountDescription=Amount of bitcoin to buy @@ -164,30 +164,30 @@ takeOffer.amountPriceBox.amountRangeDescription=Possible amount range # TODO remove takeOffer.amountPriceBox.sell.info=Enter the amount of bitcoin you want to buy. You can choose an amount between the minimum amount and the amount. # TODO remove takeOffer.amountPriceBox.next=Next step takeOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. -takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offer. -takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offer. +takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offerPayload. +takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offerPayload. takeOffer.validation.amountLargerThanOfferAmountMinusFee=That input amount would create dust change for the BTC seller. takeOffer.fundsBox.title=Fund your trade -takeOffer.fundsBox.isOfferAvailable=Check if offer is available ... +takeOffer.fundsBox.isOfferAvailable=Check if offerPayload is available ... takeOffer.fundsBox.totalsNeeded=Funds needed: # TODO remove takeOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above takeOffer.fundsBox.address=Trade wallet address: takeOffer.fundsBox.balance=Trade wallet balance: -# TODO remove takeOffer.fundsBox.buy.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.buy.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid in to a locked deposit address. At the end of a successful trade you will get back your security deposit and the bitcoin amount you sold will be transferred \ to the BTC buyer. -# TODO remove takeOffer.fundsBox.sell.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.sell.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid into a locked deposit address. At the end of a successful trade you will get back your security deposit. takeOffer.fundsBox.tradeAmount=Amount to sell: takeOffer.fundsBox.securityDeposit=Security deposit: -takeOffer.fundsBox.offerFee=Take offer fee: +takeOffer.fundsBox.offerFee=Take offerPayload fee: takeOffer.fundsBox.networkFee=Mining fee: takeOffer.fundsBox.total=Total: # TODO remove takeOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove takeOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove takeOffer.fundsBox.takeOffer=Take offer -takeOffer.fundsBox.takeOfferSpinnerInfo=Take offer in progress ... +# TODO remove takeOffer.fundsBox.takeOffer=Take offerPayload +takeOffer.fundsBox.takeOfferSpinnerInfo=Take offerPayload in progress ... takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.title=Advanced settings @@ -197,12 +197,12 @@ takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove takeOffer.advancedBox.county=Payments account country: -# TODO remove takeOffer.advancedBox.info=These are the offer restrictions your trading partner has defined in his offer. \ +# TODO remove takeOffer.advancedBox.info=These are the offerPayload restrictions your trading partner has defined in his offerPayload. \ Your settings match those constraints and you are able to trade with him. -takeOffer.success.headline=You have successfully taken an offer. +takeOffer.success.headline=You have successfully taken an offerPayload. takeOffer.success.info=You can see the status of your trade at the \"Portfolio\" screen under \"Open trades\". -takeOffer.error.message=An error occurred when taking the offer.\n\n{0} +takeOffer.error.message=An error occurred when taking the offerPayload.\n\n{0} # Payment methods # remove N/A=Not available diff --git a/common/src/main/resources/i18n/in_dev/displayStrings_cn.properties b/common/src/main/resources/i18n/in_dev/displayStrings_cn.properties index 01c5863cba..90acfc8153 100644 --- a/common/src/main/resources/i18n/in_dev/displayStrings_cn.properties +++ b/common/src/main/resources/i18n/in_dev/displayStrings_cn.properties @@ -93,42 +93,42 @@ validation.bankIdNumber={0} must consist of {1} numbers. validation.accountNr=Account number must consist of {0} numbers. validation.accountNrChars=Account number must consist of {0} characters. -# Create offer +# Create offerPayload createOffer.amount.prompt=Enter amount in BTC createOffer.price.prompt=Enter price createOffer.volume.prompt=Enter amount in {0} # TODO remove createOffer.minAmount.prompt=Enter min. amount -# TODO remove createOffer.amountPriceBox.title=Create your offer +# TODO remove createOffer.amountPriceBox.title=Create your offerPayload createOffer.amountPriceBox.amountDescription=Amount of bitcoin to {0} createOffer.amountPriceBox.priceDescriptionFiat=Fixed price per {0} createOffer.amountPriceBox.buy.volumeDescription=Amount in {0} to spend createOffer.amountPriceBox.sell.volumeDescription=Amount in {0} to receive createOffer.amountPriceBox.minAmountDescription=Minimum amount of BTC -# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. -# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. +# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. +# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. # TODO remove createOffer.amountPriceBox.next=Next step # TODO remove createOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. # TODO remove createOffer.amountPriceBox.warning.invalidFiatDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted. # TODO remove createOffer.amountPriceBox.warning.adjustedVolume=The total volume you have entered leads to invalid fractional bitcoin amounts. The amount has been adjusted and a new total volume be calculated from it. -createOffer.amountPriceBox.error.message=An error occurred when placing the offer:\n\n{0} +createOffer.amountPriceBox.error.message=An error occurred when placing the offerPayload:\n\n{0} # TODO remove createOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount. # TODO remove createOffer.validation.minAmountLargerThanAmount=Minimum amount cannot be larger than amount. -createOffer.fundsBox.title=Fund your offer +createOffer.fundsBox.title=Fund your offerPayload createOffer.fundsBox.totalsNeeded=Funds needed: createOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above createOffer.fundsBox.address=Trade wallet address: createOffer.fundsBox.balance=Trade wallet balance: -# TODO remove createOffer.fundsBox.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offer gets executed. If you cancel your offer you can withdraw your funds from that trading wallet. The only payment made when placing an offer is the offer fee payment. https://bisq.io/faq/#6 +# TODO remove createOffer.fundsBox.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offerPayload gets executed. If you cancel your offerPayload you can withdraw your funds from that trading wallet. The only payment made when placing an offerPayload is the offerPayload fee payment. https://bisq.io/faq/#6 createOffer.fundsBox.tradeAmount=Trade amount: createOffer.fundsBox.securityDeposit=Security deposit: -createOffer.fundsBox.offerFee=Create offer fee: +createOffer.fundsBox.offerFee=Create offerPayload fee: createOffer.fundsBox.networkFee=Mining fee: createOffer.fundsBox.total=Total: # TODO remove createOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove createOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove createOffer.fundsBox.placeOffer=Place offer +# TODO remove createOffer.fundsBox.placeOffer=Place offerPayload createOffer.fundsBox.placeOfferSpinnerInfo=Offer publishing is in progress ... createOffer.fundsBox.paymentLabel=bisq trade with ID {0} @@ -139,20 +139,20 @@ createOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove createOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove createOffer.advancedBox.county=Payments account country: -# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offer restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). +# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offerPayload restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). -createOffer.success.headline=Your offer has been published +createOffer.success.headline=Your offerPayload has been published createOffer.success.info=You can manage your open offers in the \"Portfolio\" screen under \"My open offers\". -# TODO remove createOffer.error.message=An error occurred when placing the offer.\n\n{0} +# TODO remove createOffer.error.message=An error occurred when placing the offerPayload.\n\n{0} -# Take offer +# Take offerPayload takeOffer.amount.prompt=Enter amount in BTC # TODO remove takeOffer.price.prompt=Enter price # TODO remove takeOffer.volume.prompt=Enter amount in {0} # TODO remove takeOffer.minAmount.prompt=Enter min. amount -# TODO remove takeOffer.amountPriceBox.title=Take offer +# TODO remove takeOffer.amountPriceBox.title=Take offerPayload # TODO remove takeOffer.amountPriceBox.subTitle=Buy bitcoin takeOffer.amountPriceBox.buy.amountDescription=Amount of bitcoin to sell takeOffer.amountPriceBox.sell.amountDescription=Amount of bitcoin to buy @@ -164,30 +164,30 @@ takeOffer.amountPriceBox.amountRangeDescription=Possible amount range # TODO remove takeOffer.amountPriceBox.sell.info=Enter the amount of bitcoin you want to buy. You can choose an amount between the minimum amount and the amount. # TODO remove takeOffer.amountPriceBox.next=Next step takeOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. -takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offer. -takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offer. +takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offerPayload. +takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offerPayload. takeOffer.validation.amountLargerThanOfferAmountMinusFee=That input amount would create dust change for the BTC seller. takeOffer.fundsBox.title=Fund your trade -takeOffer.fundsBox.isOfferAvailable=Check if offer is available ... +takeOffer.fundsBox.isOfferAvailable=Check if offerPayload is available ... takeOffer.fundsBox.totalsNeeded=Funds needed: # TODO remove takeOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above takeOffer.fundsBox.address=Trade wallet address: takeOffer.fundsBox.balance=Trade wallet balance: -# TODO remove takeOffer.fundsBox.buy.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.buy.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid in to a locked deposit address. At the end of a successful trade you will get back your security deposit and the bitcoin amount you sold will be transferred \ to the BTC buyer. -# TODO remove takeOffer.fundsBox.sell.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.sell.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid into a locked deposit address. At the end of a successful trade you will get back your security deposit. takeOffer.fundsBox.tradeAmount=Amount to sell: takeOffer.fundsBox.securityDeposit=Security deposit: -takeOffer.fundsBox.offerFee=Take offer fee: +takeOffer.fundsBox.offerFee=Take offerPayload fee: takeOffer.fundsBox.networkFee=Mining fee: takeOffer.fundsBox.total=Total: # TODO remove takeOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove takeOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove takeOffer.fundsBox.takeOffer=Take offer -takeOffer.fundsBox.takeOfferSpinnerInfo=Take offer in progress ... +# TODO remove takeOffer.fundsBox.takeOffer=Take offerPayload +takeOffer.fundsBox.takeOfferSpinnerInfo=Take offerPayload in progress ... takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.title=Advanced settings @@ -197,12 +197,12 @@ takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove takeOffer.advancedBox.county=Payments account country: -# TODO remove takeOffer.advancedBox.info=These are the offer restrictions your trading partner has defined in his offer. \ +# TODO remove takeOffer.advancedBox.info=These are the offerPayload restrictions your trading partner has defined in his offerPayload. \ Your settings match those constraints and you are able to trade with him. -takeOffer.success.headline=You have successfully taken an offer. +takeOffer.success.headline=You have successfully taken an offerPayload. takeOffer.success.info=You can see the status of your trade at the \"Portfolio\" screen under \"Open trades\". -takeOffer.error.message=An error occurred when taking the offer.\n\n{0} +takeOffer.error.message=An error occurred when taking the offerPayload.\n\n{0} # Payment methods # remove N/A=Not available diff --git a/common/src/main/resources/i18n/in_dev/displayStrings_cz.properties b/common/src/main/resources/i18n/in_dev/displayStrings_cz.properties index 99ddafddeb..9e8bc93ffa 100644 --- a/common/src/main/resources/i18n/in_dev/displayStrings_cz.properties +++ b/common/src/main/resources/i18n/in_dev/displayStrings_cz.properties @@ -93,42 +93,42 @@ validation.bankIdNumber={0} must consist of {1} numbers. validation.accountNr=Account number must consist of {0} numbers. validation.accountNrChars=Account number must consist of {0} characters. -# Create offer +# Create offerPayload createOffer.amount.prompt=Enter amount in BTC createOffer.price.prompt=Enter price createOffer.volume.prompt=Enter amount in {0} # TODO remove createOffer.minAmount.prompt=Enter min. amount -# TODO remove createOffer.amountPriceBox.title=Create your offer +# TODO remove createOffer.amountPriceBox.title=Create your offerPayload createOffer.amountPriceBox.amountDescription=Amount of bitcoin to {0} createOffer.amountPriceBox.priceDescriptionFiat=Fixed price per {0} createOffer.amountPriceBox.buy.volumeDescription=Amount in {0} to spend createOffer.amountPriceBox.sell.volumeDescription=Amount in {0} to receive createOffer.amountPriceBox.minAmountDescription=Minimum amount of BTC -# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. -# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. +# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. +# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. # TODO remove createOffer.amountPriceBox.next=Next step # TODO remove createOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. # TODO remove createOffer.amountPriceBox.warning.invalidFiatDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted. # TODO remove createOffer.amountPriceBox.warning.adjustedVolume=The total volume you have entered leads to invalid fractional bitcoin amounts. The amount has been adjusted and a new total volume be calculated from it. -createOffer.amountPriceBox.error.message=An error occurred when placing the offer:\n\n{0} +createOffer.amountPriceBox.error.message=An error occurred when placing the offerPayload:\n\n{0} # TODO remove createOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount. # TODO remove createOffer.validation.minAmountLargerThanAmount=Minimum amount cannot be larger than amount. -createOffer.fundsBox.title=Fund your offer +createOffer.fundsBox.title=Fund your offerPayload createOffer.fundsBox.totalsNeeded=Funds needed: createOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above createOffer.fundsBox.address=Trade wallet address: createOffer.fundsBox.balance=Trade wallet balance: -# TODO remove createOffer.fundsBox.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offer gets executed. If you cancel your offer you can withdraw your funds from that trading wallet. The only payment made when placing an offer is the offer fee payment. https://bisq.io/faq/#6 +# TODO remove createOffer.fundsBox.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offerPayload gets executed. If you cancel your offerPayload you can withdraw your funds from that trading wallet. The only payment made when placing an offerPayload is the offerPayload fee payment. https://bisq.io/faq/#6 createOffer.fundsBox.tradeAmount=Trade amount: createOffer.fundsBox.securityDeposit=Security deposit: -createOffer.fundsBox.offerFee=Create offer fee: +createOffer.fundsBox.offerFee=Create offerPayload fee: createOffer.fundsBox.networkFee=Mining fee: createOffer.fundsBox.total=Total: # TODO remove createOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove createOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove createOffer.fundsBox.placeOffer=Place offer +# TODO remove createOffer.fundsBox.placeOffer=Place offerPayload createOffer.fundsBox.placeOfferSpinnerInfo=Offer publishing is in progress ... createOffer.fundsBox.paymentLabel=bisq trade with ID {0} @@ -139,20 +139,20 @@ createOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove createOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove createOffer.advancedBox.county=Payments account country: -# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offer restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). +# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offerPayload restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). -createOffer.success.headline=Your offer has been published +createOffer.success.headline=Your offerPayload has been published createOffer.success.info=You can manage your open offers in the \"Portfolio\" screen under \"My open offers\". -# TODO remove createOffer.error.message=An error occurred when placing the offer.\n\n{0} +# TODO remove createOffer.error.message=An error occurred when placing the offerPayload.\n\n{0} -# Take offer +# Take offerPayload takeOffer.amount.prompt=Enter amount in BTC # TODO remove takeOffer.price.prompt=Enter price # TODO remove takeOffer.volume.prompt=Enter amount in {0} # TODO remove takeOffer.minAmount.prompt=Enter min. amount -# TODO remove takeOffer.amountPriceBox.title=Take offer +# TODO remove takeOffer.amountPriceBox.title=Take offerPayload # TODO remove takeOffer.amountPriceBox.subTitle=Buy bitcoin takeOffer.amountPriceBox.buy.amountDescription=Amount of bitcoin to sell takeOffer.amountPriceBox.sell.amountDescription=Amount of bitcoin to buy @@ -164,30 +164,30 @@ takeOffer.amountPriceBox.amountRangeDescription=Possible amount range # TODO remove takeOffer.amountPriceBox.sell.info=Enter the amount of bitcoin you want to buy. You can choose an amount between the minimum amount and the amount. # TODO remove takeOffer.amountPriceBox.next=Next step takeOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. -takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offer. -takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offer. +takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offerPayload. +takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offerPayload. takeOffer.validation.amountLargerThanOfferAmountMinusFee=That input amount would create dust change for the BTC seller. takeOffer.fundsBox.title=Fund your trade -takeOffer.fundsBox.isOfferAvailable=Check if offer is available ... +takeOffer.fundsBox.isOfferAvailable=Check if offerPayload is available ... takeOffer.fundsBox.totalsNeeded=Funds needed: # TODO remove takeOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above takeOffer.fundsBox.address=Trade wallet address: takeOffer.fundsBox.balance=Trade wallet balance: -# TODO remove takeOffer.fundsBox.buy.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.buy.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid in to a locked deposit address. At the end of a successful trade you will get back your security deposit and the bitcoin amount you sold will be transferred \ to the BTC buyer. -# TODO remove takeOffer.fundsBox.sell.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.sell.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid into a locked deposit address. At the end of a successful trade you will get back your security deposit. takeOffer.fundsBox.tradeAmount=Amount to sell: takeOffer.fundsBox.securityDeposit=Security deposit: -takeOffer.fundsBox.offerFee=Take offer fee: +takeOffer.fundsBox.offerFee=Take offerPayload fee: takeOffer.fundsBox.networkFee=Mining fee: takeOffer.fundsBox.total=Total: # TODO remove takeOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove takeOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove takeOffer.fundsBox.takeOffer=Take offer -takeOffer.fundsBox.takeOfferSpinnerInfo=Take offer in progress ... +# TODO remove takeOffer.fundsBox.takeOffer=Take offerPayload +takeOffer.fundsBox.takeOfferSpinnerInfo=Take offerPayload in progress ... takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.title=Advanced settings @@ -197,12 +197,12 @@ takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove takeOffer.advancedBox.county=Payments account country: -# TODO remove takeOffer.advancedBox.info=These are the offer restrictions your trading partner has defined in his offer. \ +# TODO remove takeOffer.advancedBox.info=These are the offerPayload restrictions your trading partner has defined in his offerPayload. \ Your settings match those constraints and you are able to trade with him. -takeOffer.success.headline=You have successfully taken an offer. +takeOffer.success.headline=You have successfully taken an offerPayload. takeOffer.success.info=You can see the status of your trade at the \"Portfolio\" screen under \"Open trades\". -takeOffer.error.message=An error occurred when taking the offer.\n\n{0} +takeOffer.error.message=An error occurred when taking the offerPayload.\n\n{0} # Payment methods # remove N/A=Not available diff --git a/common/src/main/resources/i18n/in_dev/displayStrings_dk.properties b/common/src/main/resources/i18n/in_dev/displayStrings_dk.properties index 667d211f9d..d4887f0589 100644 --- a/common/src/main/resources/i18n/in_dev/displayStrings_dk.properties +++ b/common/src/main/resources/i18n/in_dev/displayStrings_dk.properties @@ -93,42 +93,42 @@ validation.bankIdNumber={0} must consist of {1} numbers. validation.accountNr=Account number must consist of {0} numbers. validation.accountNrChars=Account number must consist of {0} characters. -# Create offer +# Create offerPayload createOffer.amount.prompt=Enter amount in BTC createOffer.price.prompt=Enter price createOffer.volume.prompt=Enter amount in {0} # TODO remove createOffer.minAmount.prompt=Enter min. amount -# TODO remove createOffer.amountPriceBox.title=Create your offer +# TODO remove createOffer.amountPriceBox.title=Create your offerPayload createOffer.amountPriceBox.amountDescription=Amount of bitcoin to {0} createOffer.amountPriceBox.priceDescriptionFiat=Fixed price per {0} createOffer.amountPriceBox.buy.volumeDescription=Amount in {0} to spend createOffer.amountPriceBox.sell.volumeDescription=Amount in {0} to receive createOffer.amountPriceBox.minAmountDescription=Minimum amount of BTC -# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. -# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. +# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. +# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. # TODO remove createOffer.amountPriceBox.next=Next step # TODO remove createOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. # TODO remove createOffer.amountPriceBox.warning.invalidFiatDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted. # TODO remove createOffer.amountPriceBox.warning.adjustedVolume=The total volume you have entered leads to invalid fractional bitcoin amounts. The amount has been adjusted and a new total volume be calculated from it. -createOffer.amountPriceBox.error.message=An error occurred when placing the offer:\n\n{0} +createOffer.amountPriceBox.error.message=An error occurred when placing the offerPayload:\n\n{0} # TODO remove createOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount. # TODO remove createOffer.validation.minAmountLargerThanAmount=Minimum amount cannot be larger than amount. -createOffer.fundsBox.title=Fund your offer +createOffer.fundsBox.title=Fund your offerPayload createOffer.fundsBox.totalsNeeded=Funds needed: createOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above createOffer.fundsBox.address=Trade wallet address: createOffer.fundsBox.balance=Trade wallet balance: -# TODO remove createOffer.fundsBox.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offer gets executed. If you cancel your offer you can withdraw your funds from that trading wallet. The only payment made when placing an offer is the offer fee payment. https://bisq.io/faq/#6 +# TODO remove createOffer.fundsBox.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offerPayload gets executed. If you cancel your offerPayload you can withdraw your funds from that trading wallet. The only payment made when placing an offerPayload is the offerPayload fee payment. https://bisq.io/faq/#6 createOffer.fundsBox.tradeAmount=Trade amount: createOffer.fundsBox.securityDeposit=Security deposit: -createOffer.fundsBox.offerFee=Create offer fee: +createOffer.fundsBox.offerFee=Create offerPayload fee: createOffer.fundsBox.networkFee=Mining fee: createOffer.fundsBox.total=Total: # TODO remove createOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove createOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove createOffer.fundsBox.placeOffer=Place offer +# TODO remove createOffer.fundsBox.placeOffer=Place offerPayload createOffer.fundsBox.placeOfferSpinnerInfo=Offer publishing is in progress ... createOffer.fundsBox.paymentLabel=bisq trade with ID {0} @@ -139,20 +139,20 @@ createOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove createOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove createOffer.advancedBox.county=Payments account country: -# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offer restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). +# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offerPayload restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). -createOffer.success.headline=Your offer has been published +createOffer.success.headline=Your offerPayload has been published createOffer.success.info=You can manage your open offers in the \"Portfolio\" screen under \"My open offers\". -# TODO remove createOffer.error.message=An error occurred when placing the offer.\n\n{0} +# TODO remove createOffer.error.message=An error occurred when placing the offerPayload.\n\n{0} -# Take offer +# Take offerPayload takeOffer.amount.prompt=Enter amount in BTC # TODO remove takeOffer.price.prompt=Enter price # TODO remove takeOffer.volume.prompt=Enter amount in {0} # TODO remove takeOffer.minAmount.prompt=Enter min. amount -# TODO remove takeOffer.amountPriceBox.title=Take offer +# TODO remove takeOffer.amountPriceBox.title=Take offerPayload # TODO remove takeOffer.amountPriceBox.subTitle=Buy bitcoin takeOffer.amountPriceBox.buy.amountDescription=Amount of bitcoin to sell takeOffer.amountPriceBox.sell.amountDescription=Amount of bitcoin to buy @@ -164,30 +164,30 @@ takeOffer.amountPriceBox.amountRangeDescription=Possible amount range # TODO remove takeOffer.amountPriceBox.sell.info=Enter the amount of bitcoin you want to buy. You can choose an amount between the minimum amount and the amount. # TODO remove takeOffer.amountPriceBox.next=Next step takeOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. -takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offer. -takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offer. +takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offerPayload. +takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offerPayload. takeOffer.validation.amountLargerThanOfferAmountMinusFee=That input amount would create dust change for the BTC seller. takeOffer.fundsBox.title=Fund your trade -takeOffer.fundsBox.isOfferAvailable=Check if offer is available ... +takeOffer.fundsBox.isOfferAvailable=Check if offerPayload is available ... takeOffer.fundsBox.totalsNeeded=Funds needed: # TODO remove takeOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above takeOffer.fundsBox.address=Trade wallet address: takeOffer.fundsBox.balance=Trade wallet balance: -# TODO remove takeOffer.fundsBox.buy.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.buy.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid in to a locked deposit address. At the end of a successful trade you will get back your security deposit and the bitcoin amount you sold will be transferred \ to the BTC buyer. -# TODO remove takeOffer.fundsBox.sell.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.sell.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid into a locked deposit address. At the end of a successful trade you will get back your security deposit. takeOffer.fundsBox.tradeAmount=Amount to sell: takeOffer.fundsBox.securityDeposit=Security deposit: -takeOffer.fundsBox.offerFee=Take offer fee: +takeOffer.fundsBox.offerFee=Take offerPayload fee: takeOffer.fundsBox.networkFee=Mining fee: takeOffer.fundsBox.total=Total: # TODO remove takeOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove takeOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove takeOffer.fundsBox.takeOffer=Take offer -takeOffer.fundsBox.takeOfferSpinnerInfo=Take offer in progress ... +# TODO remove takeOffer.fundsBox.takeOffer=Take offerPayload +takeOffer.fundsBox.takeOfferSpinnerInfo=Take offerPayload in progress ... takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.title=Advanced settings @@ -197,12 +197,12 @@ takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove takeOffer.advancedBox.county=Payments account country: -# TODO remove takeOffer.advancedBox.info=These are the offer restrictions your trading partner has defined in his offer. \ +# TODO remove takeOffer.advancedBox.info=These are the offerPayload restrictions your trading partner has defined in his offerPayload. \ Your settings match those constraints and you are able to trade with him. -takeOffer.success.headline=You have successfully taken an offer. +takeOffer.success.headline=You have successfully taken an offerPayload. takeOffer.success.info=You can see the status of your trade at the \"Portfolio\" screen under \"Open trades\". -takeOffer.error.message=An error occurred when taking the offer.\n\n{0} +takeOffer.error.message=An error occurred when taking the offerPayload.\n\n{0} # Payment methods # remove N/A=Not available diff --git a/common/src/main/resources/i18n/in_dev/displayStrings_en.properties b/common/src/main/resources/i18n/in_dev/displayStrings_en.properties index c241a59ac9..3ab43fc256 100644 --- a/common/src/main/resources/i18n/in_dev/displayStrings_en.properties +++ b/common/src/main/resources/i18n/in_dev/displayStrings_en.properties @@ -93,42 +93,42 @@ validation.bankIdNumber={0} must consist of {1} numbers. validation.accountNr=Account number must consist of {0} numbers. validation.accountNrChars=Account number must consist of {0} characters. -# Create offer +# Create offerPayload createOffer.amount.prompt=Enter amount in BTC createOffer.price.prompt=Enter price createOffer.volume.prompt=Enter amount in {0} # TODO remove createOffer.minAmount.prompt=Enter min. amount -# TODO remove createOffer.amountPriceBox.title=Create your offer +# TODO remove createOffer.amountPriceBox.title=Create your offerPayload createOffer.amountPriceBox.amountDescription=Amount of bitcoin to {0} createOffer.amountPriceBox.priceDescriptionFiat=Fixed price per {0} createOffer.amountPriceBox.buy.volumeDescription=Amount in {0} to spend createOffer.amountPriceBox.sell.volumeDescription=Amount in {0} to receive createOffer.amountPriceBox.minAmountDescription=Minimum amount of BTC -# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. -# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. +# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. +# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. # TODO remove createOffer.amountPriceBox.next=Next step # TODO remove createOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. # TODO remove createOffer.amountPriceBox.warning.invalidFiatDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted. # TODO remove createOffer.amountPriceBox.warning.adjustedVolume=The total volume you have entered leads to invalid fractional bitcoin amounts. The amount has been adjusted and a new total volume be calculated from it. -createOffer.amountPriceBox.error.message=An error occurred when placing the offer:\n\n{0} +createOffer.amountPriceBox.error.message=An error occurred when placing the offerPayload:\n\n{0} # TODO remove createOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount. # TODO remove createOffer.validation.minAmountLargerThanAmount=Minimum amount cannot be larger than amount. -createOffer.fundsBox.title=Fund your offer +createOffer.fundsBox.title=Fund your offerPayload createOffer.fundsBox.totalsNeeded=Funds needed: createOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above createOffer.fundsBox.address=Trade wallet address: createOffer.fundsBox.balance=Trade wallet balance: -# TODO remove createOffer.fundsBox.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offer gets executed. If you cancel your offer you can withdraw your funds from that trading wallet. The only payment made when placing an offer is the offer fee payment. https://bisq.io/faq/#6 +# TODO remove createOffer.fundsBox.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offerPayload gets executed. If you cancel your offerPayload you can withdraw your funds from that trading wallet. The only payment made when placing an offerPayload is the offerPayload fee payment. https://bisq.io/faq/#6 createOffer.fundsBox.tradeAmount=Trade amount: createOffer.fundsBox.securityDeposit=Security deposit: -createOffer.fundsBox.offerFee=Create offer fee: +createOffer.fundsBox.offerFee=Create offerPayload fee: createOffer.fundsBox.networkFee=Mining fee: createOffer.fundsBox.total=Total: # TODO remove createOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove createOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove createOffer.fundsBox.placeOffer=Place offer +# TODO remove createOffer.fundsBox.placeOffer=Place offerPayload createOffer.fundsBox.placeOfferSpinnerInfo=Offer publishing is in progress ... createOffer.fundsBox.paymentLabel=bisq trade with ID {0} @@ -139,20 +139,20 @@ createOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove createOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove createOffer.advancedBox.county=Payments account country: -# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offer restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). +# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offerPayload restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). -createOffer.success.headline=Your offer has been published +createOffer.success.headline=Your offerPayload has been published createOffer.success.info=You can manage your open offers in the \"Portfolio\" screen under \"My open offers\". -# TODO remove createOffer.error.message=An error occurred when placing the offer.\n\n{0} +# TODO remove createOffer.error.message=An error occurred when placing the offerPayload.\n\n{0} -# Take offer +# Take offerPayload takeOffer.amount.prompt=Enter amount in BTC # TODO remove takeOffer.price.prompt=Enter price # TODO remove takeOffer.volume.prompt=Enter amount in {0} # TODO remove takeOffer.minAmount.prompt=Enter min. amount -# TODO remove takeOffer.amountPriceBox.title=Take offer +# TODO remove takeOffer.amountPriceBox.title=Take offerPayload # TODO remove takeOffer.amountPriceBox.subTitle=Buy bitcoin takeOffer.amountPriceBox.buy.amountDescription=Amount of bitcoin to sell takeOffer.amountPriceBox.sell.amountDescription=Amount of bitcoin to buy @@ -164,30 +164,30 @@ takeOffer.amountPriceBox.amountRangeDescription=Possible amount range # TODO remove takeOffer.amountPriceBox.sell.info=Enter the amount of bitcoin you want to buy. You can choose an amount between the minimum amount and the amount. # TODO remove takeOffer.amountPriceBox.next=Next step takeOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. -takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offer. -takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offer. +takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offerPayload. +takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offerPayload. takeOffer.validation.amountLargerThanOfferAmountMinusFee=That input amount would create dust change for the BTC seller. takeOffer.fundsBox.title=Fund your trade -takeOffer.fundsBox.isOfferAvailable=Check if offer is available ... +takeOffer.fundsBox.isOfferAvailable=Check if offerPayload is available ... takeOffer.fundsBox.totalsNeeded=Funds needed: # TODO remove takeOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above takeOffer.fundsBox.address=Trade wallet address: takeOffer.fundsBox.balance=Trade wallet balance: -# TODO remove takeOffer.fundsBox.buy.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.buy.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid in to a locked deposit address. At the end of a successful trade you will get back your security deposit and the bitcoin amount you sold will be transferred \ to the BTC buyer. -# TODO remove takeOffer.fundsBox.sell.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.sell.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid into a locked deposit address. At the end of a successful trade you will get back your security deposit. takeOffer.fundsBox.tradeAmount=Amount to sell: takeOffer.fundsBox.securityDeposit=Security deposit: -takeOffer.fundsBox.offerFee=Take offer fee: +takeOffer.fundsBox.offerFee=Take offerPayload fee: takeOffer.fundsBox.networkFee=Mining fee: takeOffer.fundsBox.total=Total: # TODO remove takeOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove takeOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove takeOffer.fundsBox.takeOffer=Take offer -takeOffer.fundsBox.takeOfferSpinnerInfo=Take offer in progress ... +# TODO remove takeOffer.fundsBox.takeOffer=Take offerPayload +takeOffer.fundsBox.takeOfferSpinnerInfo=Take offerPayload in progress ... takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.title=Advanced settings @@ -197,12 +197,12 @@ takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove takeOffer.advancedBox.county=Payments account country: -# TODO remove takeOffer.advancedBox.info=These are the offer restrictions your trading partner has defined in his offer. \ +# TODO remove takeOffer.advancedBox.info=These are the offerPayload restrictions your trading partner has defined in his offerPayload. \ Your settings match those constraints and you are able to trade with him. -takeOffer.success.headline=You have successfully taken an offer. +takeOffer.success.headline=You have successfully taken an offerPayload. takeOffer.success.info=You can see the status of your trade at the \"Portfolio\" screen under \"Open trades\". -takeOffer.error.message=An error occurred when taking the offer.\n\n{0} +takeOffer.error.message=An error occurred when taking the offerPayload.\n\n{0} # Payment methods # remove N/A=Not available diff --git a/common/src/main/resources/i18n/in_dev/displayStrings_es.properties b/common/src/main/resources/i18n/in_dev/displayStrings_es.properties index 297899a4c5..3c85cfae11 100644 --- a/common/src/main/resources/i18n/in_dev/displayStrings_es.properties +++ b/common/src/main/resources/i18n/in_dev/displayStrings_es.properties @@ -91,7 +91,7 @@ validation.bankIdNumber={0} debe consistir en {1} números. validation.accountNr=El número de cuenta debe consistir en {0} números. validation.accountNrChars=El número de cuenta debe consistir en {0} caracteres. -# Create offer +# Create offerPayload createOffer.amount.prompt=Introducir cantidad en BTC createOffer.price.prompt=Introducir precio createOffer.volume.prompt=Introducir cantidad en {0} @@ -145,7 +145,7 @@ createOffer.success.info=Puede establecer sus ofertas abiertas la ventana \"Port # TODO remove createOffer.error.message=Ocurrió un error al publicar la orden.\n\n{0} -# Take offer +# Take offerPayload takeOffer.amount.prompt=Introducir cantidad en BTC # TODO remove takeOffer.price.prompt=Introducir precio # TODO remove takeOffer.volume.prompt=Introducir cantidad en {0} diff --git a/common/src/main/resources/i18n/in_dev/displayStrings_fi.properties b/common/src/main/resources/i18n/in_dev/displayStrings_fi.properties index ccd7c4eb2b..3e0b43b09b 100644 --- a/common/src/main/resources/i18n/in_dev/displayStrings_fi.properties +++ b/common/src/main/resources/i18n/in_dev/displayStrings_fi.properties @@ -93,42 +93,42 @@ validation.bankIdNumber={0} must consist of {1} numbers. validation.accountNr=Account number must consist of {0} numbers. validation.accountNrChars=Account number must consist of {0} characters. -# Create offer +# Create offerPayload createOffer.amount.prompt=Enter amount in BTC createOffer.price.prompt=Enter price createOffer.volume.prompt=Enter amount in {0} # TODO remove createOffer.minAmount.prompt=Enter min. amount -# TODO remove createOffer.amountPriceBox.title=Create your offer +# TODO remove createOffer.amountPriceBox.title=Create your offerPayload createOffer.amountPriceBox.amountDescription=Amount of bitcoin to {0} createOffer.amountPriceBox.priceDescriptionFiat=Fixed price per {0} createOffer.amountPriceBox.buy.volumeDescription=Amount in {0} to spend createOffer.amountPriceBox.sell.volumeDescription=Amount in {0} to receive createOffer.amountPriceBox.minAmountDescription=Minimum amount of BTC -# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. -# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. +# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. +# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. # TODO remove createOffer.amountPriceBox.next=Next step # TODO remove createOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. # TODO remove createOffer.amountPriceBox.warning.invalidFiatDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted. # TODO remove createOffer.amountPriceBox.warning.adjustedVolume=The total volume you have entered leads to invalid fractional bitcoin amounts. The amount has been adjusted and a new total volume be calculated from it. -createOffer.amountPriceBox.error.message=An error occurred when placing the offer:\n\n{0} +createOffer.amountPriceBox.error.message=An error occurred when placing the offerPayload:\n\n{0} # TODO remove createOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount. # TODO remove createOffer.validation.minAmountLargerThanAmount=Minimum amount cannot be larger than amount. -createOffer.fundsBox.title=Fund your offer +createOffer.fundsBox.title=Fund your offerPayload createOffer.fundsBox.totalsNeeded=Funds needed: createOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above createOffer.fundsBox.address=Trade wallet address: createOffer.fundsBox.balance=Trade wallet balance: -# TODO remove createOffer.fundsBox.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offer gets executed. If you cancel your offer you can withdraw your funds from that trading wallet. The only payment made when placing an offer is the offer fee payment. https://bisq.io/faq/#6 +# TODO remove createOffer.fundsBox.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offerPayload gets executed. If you cancel your offerPayload you can withdraw your funds from that trading wallet. The only payment made when placing an offerPayload is the offerPayload fee payment. https://bisq.io/faq/#6 createOffer.fundsBox.tradeAmount=Trade amount: createOffer.fundsBox.securityDeposit=Security deposit: -createOffer.fundsBox.offerFee=Create offer fee: +createOffer.fundsBox.offerFee=Create offerPayload fee: createOffer.fundsBox.networkFee=Mining fee: createOffer.fundsBox.total=Total: # TODO remove createOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove createOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove createOffer.fundsBox.placeOffer=Place offer +# TODO remove createOffer.fundsBox.placeOffer=Place offerPayload createOffer.fundsBox.placeOfferSpinnerInfo=Offer publishing is in progress ... createOffer.fundsBox.paymentLabel=bisq trade with ID {0} @@ -139,20 +139,20 @@ createOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove createOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove createOffer.advancedBox.county=Payments account country: -# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offer restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). +# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offerPayload restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). -createOffer.success.headline=Your offer has been published +createOffer.success.headline=Your offerPayload has been published createOffer.success.info=You can manage your open offers in the \"Portfolio\" screen under \"My open offers\". -# TODO remove createOffer.error.message=An error occurred when placing the offer.\n\n{0} +# TODO remove createOffer.error.message=An error occurred when placing the offerPayload.\n\n{0} -# Take offer +# Take offerPayload takeOffer.amount.prompt=Enter amount in BTC # TODO remove takeOffer.price.prompt=Enter price # TODO remove takeOffer.volume.prompt=Enter amount in {0} # TODO remove takeOffer.minAmount.prompt=Enter min. amount -# TODO remove takeOffer.amountPriceBox.title=Take offer +# TODO remove takeOffer.amountPriceBox.title=Take offerPayload # TODO remove takeOffer.amountPriceBox.subTitle=Buy bitcoin takeOffer.amountPriceBox.buy.amountDescription=Amount of bitcoin to sell takeOffer.amountPriceBox.sell.amountDescription=Amount of bitcoin to buy @@ -164,30 +164,30 @@ takeOffer.amountPriceBox.amountRangeDescription=Possible amount range # TODO remove takeOffer.amountPriceBox.sell.info=Enter the amount of bitcoin you want to buy. You can choose an amount between the minimum amount and the amount. # TODO remove takeOffer.amountPriceBox.next=Next step takeOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. -takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offer. -takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offer. +takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offerPayload. +takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offerPayload. takeOffer.validation.amountLargerThanOfferAmountMinusFee=That input amount would create dust change for the BTC seller. takeOffer.fundsBox.title=Fund your trade -takeOffer.fundsBox.isOfferAvailable=Check if offer is available ... +takeOffer.fundsBox.isOfferAvailable=Check if offerPayload is available ... takeOffer.fundsBox.totalsNeeded=Funds needed: # TODO remove takeOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above takeOffer.fundsBox.address=Trade wallet address: takeOffer.fundsBox.balance=Trade wallet balance: -# TODO remove takeOffer.fundsBox.buy.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.buy.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid in to a locked deposit address. At the end of a successful trade you will get back your security deposit and the bitcoin amount you sold will be transferred \ to the BTC buyer. -# TODO remove takeOffer.fundsBox.sell.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.sell.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid into a locked deposit address. At the end of a successful trade you will get back your security deposit. takeOffer.fundsBox.tradeAmount=Amount to sell: takeOffer.fundsBox.securityDeposit=Security deposit: -takeOffer.fundsBox.offerFee=Take offer fee: +takeOffer.fundsBox.offerFee=Take offerPayload fee: takeOffer.fundsBox.networkFee=Mining fee: takeOffer.fundsBox.total=Total: # TODO remove takeOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove takeOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove takeOffer.fundsBox.takeOffer=Take offer -takeOffer.fundsBox.takeOfferSpinnerInfo=Take offer in progress ... +# TODO remove takeOffer.fundsBox.takeOffer=Take offerPayload +takeOffer.fundsBox.takeOfferSpinnerInfo=Take offerPayload in progress ... takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.title=Advanced settings @@ -197,12 +197,12 @@ takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove takeOffer.advancedBox.county=Payments account country: -# TODO remove takeOffer.advancedBox.info=These are the offer restrictions your trading partner has defined in his offer. \ +# TODO remove takeOffer.advancedBox.info=These are the offerPayload restrictions your trading partner has defined in his offerPayload. \ Your settings match those constraints and you are able to trade with him. -takeOffer.success.headline=You have successfully taken an offer. +takeOffer.success.headline=You have successfully taken an offerPayload. takeOffer.success.info=You can see the status of your trade at the \"Portfolio\" screen under \"Open trades\". -takeOffer.error.message=An error occurred when taking the offer.\n\n{0} +takeOffer.error.message=An error occurred when taking the offerPayload.\n\n{0} # Payment methods # remove N/A=Not available diff --git a/common/src/main/resources/i18n/in_dev/displayStrings_fr.properties b/common/src/main/resources/i18n/in_dev/displayStrings_fr.properties index f01a7457c1..bd238723e4 100644 --- a/common/src/main/resources/i18n/in_dev/displayStrings_fr.properties +++ b/common/src/main/resources/i18n/in_dev/displayStrings_fr.properties @@ -93,42 +93,42 @@ validation.bankIdNumber={0} must consist of {1} numbers. validation.accountNr=Account number must consist of {0} numbers. validation.accountNrChars=Account number must consist of {0} characters. -# Create offer +# Create offerPayload createOffer.amount.prompt=Enter amount in BTC createOffer.price.prompt=Enter price createOffer.volume.prompt=Enter amount in {0} # TODO remove createOffer.minAmount.prompt=Enter min. amount -# TODO remove createOffer.amountPriceBox.title=Create your offer +# TODO remove createOffer.amountPriceBox.title=Create your offerPayload createOffer.amountPriceBox.amountDescription=Amount of bitcoin to {0} createOffer.amountPriceBox.priceDescriptionFiat=Fixed price per {0} createOffer.amountPriceBox.buy.volumeDescription=Amount in {0} to spend createOffer.amountPriceBox.sell.volumeDescription=Amount in {0} to receive createOffer.amountPriceBox.minAmountDescription=Minimum amount of BTC -# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. -# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. +# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. +# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. # TODO remove createOffer.amountPriceBox.next=Next step # TODO remove createOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. # TODO remove createOffer.amountPriceBox.warning.invalidFiatDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted. # TODO remove createOffer.amountPriceBox.warning.adjustedVolume=The total volume you have entered leads to invalid fractional bitcoin amounts. The amount has been adjusted and a new total volume be calculated from it. -createOffer.amountPriceBox.error.message=An error occurred when placing the offer:\n\n{0} +createOffer.amountPriceBox.error.message=An error occurred when placing the offerPayload:\n\n{0} # TODO remove createOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount. # TODO remove createOffer.validation.minAmountLargerThanAmount=Minimum amount cannot be larger than amount. -createOffer.fundsBox.title=Fund your offer +createOffer.fundsBox.title=Fund your offerPayload createOffer.fundsBox.totalsNeeded=Funds needed: createOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above createOffer.fundsBox.address=Trade wallet address: createOffer.fundsBox.balance=Trade wallet balance: -# TODO remove createOffer.fundsBox.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offer gets executed. If you cancel your offer you can withdraw your funds from that trading wallet. The only payment made when placing an offer is the offer fee payment. https://bisq.io/faq/#6 +# TODO remove createOffer.fundsBox.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offerPayload gets executed. If you cancel your offerPayload you can withdraw your funds from that trading wallet. The only payment made when placing an offerPayload is the offerPayload fee payment. https://bisq.io/faq/#6 createOffer.fundsBox.tradeAmount=Trade amount: createOffer.fundsBox.securityDeposit=Security deposit: -createOffer.fundsBox.offerFee=Create offer fee: +createOffer.fundsBox.offerFee=Create offerPayload fee: createOffer.fundsBox.networkFee=Mining fee: createOffer.fundsBox.total=Total: # TODO remove createOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove createOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove createOffer.fundsBox.placeOffer=Place offer +# TODO remove createOffer.fundsBox.placeOffer=Place offerPayload createOffer.fundsBox.placeOfferSpinnerInfo=Offer publishing is in progress ... createOffer.fundsBox.paymentLabel=bisq trade with ID {0} @@ -139,20 +139,20 @@ createOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove createOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove createOffer.advancedBox.county=Payments account country: -# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offer restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). +# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offerPayload restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). -createOffer.success.headline=Your offer has been published +createOffer.success.headline=Your offerPayload has been published createOffer.success.info=You can manage your open offers in the \"Portfolio\" screen under \"My open offers\". -# TODO remove createOffer.error.message=An error occurred when placing the offer.\n\n{0} +# TODO remove createOffer.error.message=An error occurred when placing the offerPayload.\n\n{0} -# Take offer +# Take offerPayload takeOffer.amount.prompt=Enter amount in BTC # TODO remove takeOffer.price.prompt=Enter price # TODO remove takeOffer.volume.prompt=Enter amount in {0} # TODO remove takeOffer.minAmount.prompt=Enter min. amount -# TODO remove takeOffer.amountPriceBox.title=Take offer +# TODO remove takeOffer.amountPriceBox.title=Take offerPayload # TODO remove takeOffer.amountPriceBox.subTitle=Buy bitcoin takeOffer.amountPriceBox.buy.amountDescription=Amount of bitcoin to sell takeOffer.amountPriceBox.sell.amountDescription=Amount of bitcoin to buy @@ -164,30 +164,30 @@ takeOffer.amountPriceBox.amountRangeDescription=Possible amount range # TODO remove takeOffer.amountPriceBox.sell.info=Enter the amount of bitcoin you want to buy. You can choose an amount between the minimum amount and the amount. # TODO remove takeOffer.amountPriceBox.next=Next step takeOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. -takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offer. -takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offer. +takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offerPayload. +takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offerPayload. takeOffer.validation.amountLargerThanOfferAmountMinusFee=That input amount would create dust change for the BTC seller. takeOffer.fundsBox.title=Fund your trade -takeOffer.fundsBox.isOfferAvailable=Check if offer is available ... +takeOffer.fundsBox.isOfferAvailable=Check if offerPayload is available ... takeOffer.fundsBox.totalsNeeded=Funds needed: # TODO remove takeOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above takeOffer.fundsBox.address=Trade wallet address: takeOffer.fundsBox.balance=Trade wallet balance: -# TODO remove takeOffer.fundsBox.buy.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.buy.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid in to a locked deposit address. At the end of a successful trade you will get back your security deposit and the bitcoin amount you sold will be transferred \ to the BTC buyer. -# TODO remove takeOffer.fundsBox.sell.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.sell.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid into a locked deposit address. At the end of a successful trade you will get back your security deposit. takeOffer.fundsBox.tradeAmount=Amount to sell: takeOffer.fundsBox.securityDeposit=Security deposit: -takeOffer.fundsBox.offerFee=Take offer fee: +takeOffer.fundsBox.offerFee=Take offerPayload fee: takeOffer.fundsBox.networkFee=Mining fee: takeOffer.fundsBox.total=Total: # TODO remove takeOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove takeOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove takeOffer.fundsBox.takeOffer=Take offer -takeOffer.fundsBox.takeOfferSpinnerInfo=Take offer in progress ... +# TODO remove takeOffer.fundsBox.takeOffer=Take offerPayload +takeOffer.fundsBox.takeOfferSpinnerInfo=Take offerPayload in progress ... takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.title=Advanced settings @@ -197,12 +197,12 @@ takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove takeOffer.advancedBox.county=Payments account country: -# TODO remove takeOffer.advancedBox.info=These are the offer restrictions your trading partner has defined in his offer. \ +# TODO remove takeOffer.advancedBox.info=These are the offerPayload restrictions your trading partner has defined in his offerPayload. \ Your settings match those constraints and you are able to trade with him. -takeOffer.success.headline=You have successfully taken an offer. +takeOffer.success.headline=You have successfully taken an offerPayload. takeOffer.success.info=You can see the status of your trade at the \"Portfolio\" screen under \"Open trades\". -takeOffer.error.message=An error occurred when taking the offer.\n\n{0} +takeOffer.error.message=An error occurred when taking the offerPayload.\n\n{0} # Payment methods # remove N/A=Not available diff --git a/common/src/main/resources/i18n/in_dev/displayStrings_ge.properties b/common/src/main/resources/i18n/in_dev/displayStrings_ge.properties index 526253e0a8..de5b3cc208 100644 --- a/common/src/main/resources/i18n/in_dev/displayStrings_ge.properties +++ b/common/src/main/resources/i18n/in_dev/displayStrings_ge.properties @@ -93,42 +93,42 @@ validation.bankIdNumber={0} must consist of {1} numbers. validation.accountNr=Account number must consist of {0} numbers. validation.accountNrChars=Account number must consist of {0} characters. -# Create offer +# Create offerPayload createOffer.amount.prompt=Enter amount in BTC createOffer.price.prompt=Enter price createOffer.volume.prompt=Enter amount in {0} # TODO remove createOffer.minAmount.prompt=Enter min. amount -# TODO remove createOffer.amountPriceBox.title=Create your offer +# TODO remove createOffer.amountPriceBox.title=Create your offerPayload createOffer.amountPriceBox.amountDescription=Amount of bitcoin to {0} createOffer.amountPriceBox.priceDescriptionFiat=Fixed price per {0} createOffer.amountPriceBox.buy.volumeDescription=Amount in {0} to spend createOffer.amountPriceBox.sell.volumeDescription=Amount in {0} to receive createOffer.amountPriceBox.minAmountDescription=Minimum amount of BTC -# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. -# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. +# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. +# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. # TODO remove createOffer.amountPriceBox.next=Next step # TODO remove createOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. # TODO remove createOffer.amountPriceBox.warning.invalidFiatDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted. # TODO remove createOffer.amountPriceBox.warning.adjustedVolume=The total volume you have entered leads to invalid fractional bitcoin amounts. The amount has been adjusted and a new total volume be calculated from it. -createOffer.amountPriceBox.error.message=An error occurred when placing the offer:\n\n{0} +createOffer.amountPriceBox.error.message=An error occurred when placing the offerPayload:\n\n{0} # TODO remove createOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount. # TODO remove createOffer.validation.minAmountLargerThanAmount=Minimum amount cannot be larger than amount. -createOffer.fundsBox.title=Fund your offer +createOffer.fundsBox.title=Fund your offerPayload createOffer.fundsBox.totalsNeeded=Funds needed: createOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above createOffer.fundsBox.address=Trade wallet address: createOffer.fundsBox.balance=Trade wallet balance: -# TODO remove createOffer.fundsBox.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offer gets executed. If you cancel your offer you can withdraw your funds from that trading wallet. The only payment made when placing an offer is the offer fee payment. https://bisq.io/faq/#6 +# TODO remove createOffer.fundsBox.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offerPayload gets executed. If you cancel your offerPayload you can withdraw your funds from that trading wallet. The only payment made when placing an offerPayload is the offerPayload fee payment. https://bisq.io/faq/#6 createOffer.fundsBox.tradeAmount=Trade amount: createOffer.fundsBox.securityDeposit=Security deposit: -createOffer.fundsBox.offerFee=Create offer fee: +createOffer.fundsBox.offerFee=Create offerPayload fee: createOffer.fundsBox.networkFee=Mining fee: createOffer.fundsBox.total=Total: # TODO remove createOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove createOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove createOffer.fundsBox.placeOffer=Place offer +# TODO remove createOffer.fundsBox.placeOffer=Place offerPayload createOffer.fundsBox.placeOfferSpinnerInfo=Offer publishing is in progress ... createOffer.fundsBox.paymentLabel=bisq trade with ID {0} @@ -139,20 +139,20 @@ createOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove createOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove createOffer.advancedBox.county=Payments account country: -# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offer restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). +# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offerPayload restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). -createOffer.success.headline=Your offer has been published +createOffer.success.headline=Your offerPayload has been published createOffer.success.info=You can manage your open offers in the \"Portfolio\" screen under \"My open offers\". -# TODO remove createOffer.error.message=An error occurred when placing the offer.\n\n{0} +# TODO remove createOffer.error.message=An error occurred when placing the offerPayload.\n\n{0} -# Take offer +# Take offerPayload takeOffer.amount.prompt=Enter amount in BTC # TODO remove takeOffer.price.prompt=Enter price # TODO remove takeOffer.volume.prompt=Enter amount in {0} # TODO remove takeOffer.minAmount.prompt=Enter min. amount -# TODO remove takeOffer.amountPriceBox.title=Take offer +# TODO remove takeOffer.amountPriceBox.title=Take offerPayload # TODO remove takeOffer.amountPriceBox.subTitle=Buy bitcoin takeOffer.amountPriceBox.buy.amountDescription=Amount of bitcoin to sell takeOffer.amountPriceBox.sell.amountDescription=Amount of bitcoin to buy @@ -164,30 +164,30 @@ takeOffer.amountPriceBox.amountRangeDescription=Possible amount range # TODO remove takeOffer.amountPriceBox.sell.info=Enter the amount of bitcoin you want to buy. You can choose an amount between the minimum amount and the amount. # TODO remove takeOffer.amountPriceBox.next=Next step takeOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. -takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offer. -takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offer. +takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offerPayload. +takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offerPayload. takeOffer.validation.amountLargerThanOfferAmountMinusFee=That input amount would create dust change for the BTC seller. takeOffer.fundsBox.title=Fund your trade -takeOffer.fundsBox.isOfferAvailable=Check if offer is available ... +takeOffer.fundsBox.isOfferAvailable=Check if offerPayload is available ... takeOffer.fundsBox.totalsNeeded=Funds needed: # TODO remove takeOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above takeOffer.fundsBox.address=Trade wallet address: takeOffer.fundsBox.balance=Trade wallet balance: -# TODO remove takeOffer.fundsBox.buy.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.buy.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid in to a locked deposit address. At the end of a successful trade you will get back your security deposit and the bitcoin amount you sold will be transferred \ to the BTC buyer. -# TODO remove takeOffer.fundsBox.sell.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.sell.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid into a locked deposit address. At the end of a successful trade you will get back your security deposit. takeOffer.fundsBox.tradeAmount=Amount to sell: takeOffer.fundsBox.securityDeposit=Security deposit: -takeOffer.fundsBox.offerFee=Take offer fee: +takeOffer.fundsBox.offerFee=Take offerPayload fee: takeOffer.fundsBox.networkFee=Mining fee: takeOffer.fundsBox.total=Total: # TODO remove takeOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove takeOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove takeOffer.fundsBox.takeOffer=Take offer -takeOffer.fundsBox.takeOfferSpinnerInfo=Take offer in progress ... +# TODO remove takeOffer.fundsBox.takeOffer=Take offerPayload +takeOffer.fundsBox.takeOfferSpinnerInfo=Take offerPayload in progress ... takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.title=Advanced settings @@ -197,12 +197,12 @@ takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove takeOffer.advancedBox.county=Payments account country: -# TODO remove takeOffer.advancedBox.info=These are the offer restrictions your trading partner has defined in his offer. \ +# TODO remove takeOffer.advancedBox.info=These are the offerPayload restrictions your trading partner has defined in his offerPayload. \ Your settings match those constraints and you are able to trade with him. -takeOffer.success.headline=You have successfully taken an offer. +takeOffer.success.headline=You have successfully taken an offerPayload. takeOffer.success.info=You can see the status of your trade at the \"Portfolio\" screen under \"Open trades\". -takeOffer.error.message=An error occurred when taking the offer.\n\n{0} +takeOffer.error.message=An error occurred when taking the offerPayload.\n\n{0} # Payment methods # remove N/A=Not available diff --git a/common/src/main/resources/i18n/in_dev/displayStrings_gr.properties b/common/src/main/resources/i18n/in_dev/displayStrings_gr.properties index e48f14fbe8..d316e560c1 100644 --- a/common/src/main/resources/i18n/in_dev/displayStrings_gr.properties +++ b/common/src/main/resources/i18n/in_dev/displayStrings_gr.properties @@ -93,42 +93,42 @@ validation.bankIdNumber={0} must consist of {1} numbers. validation.accountNr=Account number must consist of {0} numbers. validation.accountNrChars=Account number must consist of {0} characters. -# Create offer +# Create offerPayload createOffer.amount.prompt=Enter amount in BTC createOffer.price.prompt=Enter price createOffer.volume.prompt=Enter amount in {0} # TODO remove createOffer.minAmount.prompt=Enter min. amount -# TODO remove createOffer.amountPriceBox.title=Create your offer +# TODO remove createOffer.amountPriceBox.title=Create your offerPayload createOffer.amountPriceBox.amountDescription=Amount of bitcoin to {0} createOffer.amountPriceBox.priceDescriptionFiat=Fixed price per {0} createOffer.amountPriceBox.buy.volumeDescription=Amount in {0} to spend createOffer.amountPriceBox.sell.volumeDescription=Amount in {0} to receive createOffer.amountPriceBox.minAmountDescription=Minimum amount of BTC -# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. -# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. +# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. +# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. # TODO remove createOffer.amountPriceBox.next=Next step # TODO remove createOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. # TODO remove createOffer.amountPriceBox.warning.invalidFiatDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted. # TODO remove createOffer.amountPriceBox.warning.adjustedVolume=The total volume you have entered leads to invalid fractional bitcoin amounts. The amount has been adjusted and a new total volume be calculated from it. -createOffer.amountPriceBox.error.message=An error occurred when placing the offer:\n\n{0} +createOffer.amountPriceBox.error.message=An error occurred when placing the offerPayload:\n\n{0} # TODO remove createOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount. # TODO remove createOffer.validation.minAmountLargerThanAmount=Minimum amount cannot be larger than amount. -createOffer.fundsBox.title=Fund your offer +createOffer.fundsBox.title=Fund your offerPayload createOffer.fundsBox.totalsNeeded=Funds needed: createOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above createOffer.fundsBox.address=Trade wallet address: createOffer.fundsBox.balance=Trade wallet balance: -# TODO remove createOffer.fundsBox.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offer gets executed. If you cancel your offer you can withdraw your funds from that trading wallet. The only payment made when placing an offer is the offer fee payment. https://bisq.io/faq/#6 +# TODO remove createOffer.fundsBox.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offerPayload gets executed. If you cancel your offerPayload you can withdraw your funds from that trading wallet. The only payment made when placing an offerPayload is the offerPayload fee payment. https://bisq.io/faq/#6 createOffer.fundsBox.tradeAmount=Trade amount: createOffer.fundsBox.securityDeposit=Security deposit: -createOffer.fundsBox.offerFee=Create offer fee: +createOffer.fundsBox.offerFee=Create offerPayload fee: createOffer.fundsBox.networkFee=Mining fee: createOffer.fundsBox.total=Total: # TODO remove createOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove createOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove createOffer.fundsBox.placeOffer=Place offer +# TODO remove createOffer.fundsBox.placeOffer=Place offerPayload createOffer.fundsBox.placeOfferSpinnerInfo=Offer publishing is in progress ... createOffer.fundsBox.paymentLabel=bisq trade with ID {0} @@ -139,20 +139,20 @@ createOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove createOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove createOffer.advancedBox.county=Payments account country: -# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offer restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). +# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offerPayload restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). -createOffer.success.headline=Your offer has been published +createOffer.success.headline=Your offerPayload has been published createOffer.success.info=You can manage your open offers in the \"Portfolio\" screen under \"My open offers\". -# TODO remove createOffer.error.message=An error occurred when placing the offer.\n\n{0} +# TODO remove createOffer.error.message=An error occurred when placing the offerPayload.\n\n{0} -# Take offer +# Take offerPayload takeOffer.amount.prompt=Enter amount in BTC # TODO remove takeOffer.price.prompt=Enter price # TODO remove takeOffer.volume.prompt=Enter amount in {0} # TODO remove takeOffer.minAmount.prompt=Enter min. amount -# TODO remove takeOffer.amountPriceBox.title=Take offer +# TODO remove takeOffer.amountPriceBox.title=Take offerPayload # TODO remove takeOffer.amountPriceBox.subTitle=Buy bitcoin takeOffer.amountPriceBox.buy.amountDescription=Amount of bitcoin to sell takeOffer.amountPriceBox.sell.amountDescription=Amount of bitcoin to buy @@ -164,30 +164,30 @@ takeOffer.amountPriceBox.amountRangeDescription=Possible amount range # TODO remove takeOffer.amountPriceBox.sell.info=Enter the amount of bitcoin you want to buy. You can choose an amount between the minimum amount and the amount. # TODO remove takeOffer.amountPriceBox.next=Next step takeOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. -takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offer. -takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offer. +takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offerPayload. +takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offerPayload. takeOffer.validation.amountLargerThanOfferAmountMinusFee=That input amount would create dust change for the BTC seller. takeOffer.fundsBox.title=Fund your trade -takeOffer.fundsBox.isOfferAvailable=Check if offer is available ... +takeOffer.fundsBox.isOfferAvailable=Check if offerPayload is available ... takeOffer.fundsBox.totalsNeeded=Funds needed: # TODO remove takeOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above takeOffer.fundsBox.address=Trade wallet address: takeOffer.fundsBox.balance=Trade wallet balance: -# TODO remove takeOffer.fundsBox.buy.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.buy.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid in to a locked deposit address. At the end of a successful trade you will get back your security deposit and the bitcoin amount you sold will be transferred \ to the BTC buyer. -# TODO remove takeOffer.fundsBox.sell.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.sell.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid into a locked deposit address. At the end of a successful trade you will get back your security deposit. takeOffer.fundsBox.tradeAmount=Amount to sell: takeOffer.fundsBox.securityDeposit=Security deposit: -takeOffer.fundsBox.offerFee=Take offer fee: +takeOffer.fundsBox.offerFee=Take offerPayload fee: takeOffer.fundsBox.networkFee=Mining fee: takeOffer.fundsBox.total=Total: # TODO remove takeOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove takeOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove takeOffer.fundsBox.takeOffer=Take offer -takeOffer.fundsBox.takeOfferSpinnerInfo=Take offer in progress ... +# TODO remove takeOffer.fundsBox.takeOffer=Take offerPayload +takeOffer.fundsBox.takeOfferSpinnerInfo=Take offerPayload in progress ... takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.title=Advanced settings @@ -197,12 +197,12 @@ takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove takeOffer.advancedBox.county=Payments account country: -# TODO remove takeOffer.advancedBox.info=These are the offer restrictions your trading partner has defined in his offer. \ +# TODO remove takeOffer.advancedBox.info=These are the offerPayload restrictions your trading partner has defined in his offerPayload. \ Your settings match those constraints and you are able to trade with him. -takeOffer.success.headline=You have successfully taken an offer. +takeOffer.success.headline=You have successfully taken an offerPayload. takeOffer.success.info=You can see the status of your trade at the \"Portfolio\" screen under \"Open trades\". -takeOffer.error.message=An error occurred when taking the offer.\n\n{0} +takeOffer.error.message=An error occurred when taking the offerPayload.\n\n{0} # Payment methods # remove N/A=Not available diff --git a/common/src/main/resources/i18n/in_dev/displayStrings_hr.properties b/common/src/main/resources/i18n/in_dev/displayStrings_hr.properties index df285e9706..6a9435078b 100644 --- a/common/src/main/resources/i18n/in_dev/displayStrings_hr.properties +++ b/common/src/main/resources/i18n/in_dev/displayStrings_hr.properties @@ -91,7 +91,7 @@ validation.bankIdNumber={0} se mora sastojati od {1} brojeva validation.accountNr=Broj računa se mora sastojati od {0} brojeva validation.accountNrChars=Broj računa se mora sastojati od {0} znakova -# Create offer +# Create offerPayload createOffer.amount.prompt=Unesite iznos BTC-a createOffer.price.prompt=Unesite cijenu createOffer.volume.prompt=Unesite iznos u {0} @@ -145,7 +145,7 @@ createOffer.success.info=Možete upravljati otvorenim ponudama u \"Portfelj\" ek # TODO remove createOffer.error.message=Dogodila se greška prilikom objave ponude.\n\n{0} -# Take offer +# Take offerPayload takeOffer.amount.prompt=Unesite cijenu u BTC # TODO remove takeOffer.price.prompt=Unesite cijenu # TODO remove takeOffer.volume.prompt=Unesite iznos u {0} diff --git a/common/src/main/resources/i18n/in_dev/displayStrings_hu.properties b/common/src/main/resources/i18n/in_dev/displayStrings_hu.properties index 1814e123e2..46192625f8 100644 --- a/common/src/main/resources/i18n/in_dev/displayStrings_hu.properties +++ b/common/src/main/resources/i18n/in_dev/displayStrings_hu.properties @@ -93,42 +93,42 @@ validation.bankIdNumber={0} must consist of {1} numbers. validation.accountNr=Account number must consist of {0} numbers. validation.accountNrChars=Account number must consist of {0} characters. -# Create offer +# Create offerPayload createOffer.amount.prompt=Enter amount in BTC createOffer.price.prompt=Enter price createOffer.volume.prompt=Enter amount in {0} # TODO remove createOffer.minAmount.prompt=Enter min. amount -# TODO remove createOffer.amountPriceBox.title=Create your offer +# TODO remove createOffer.amountPriceBox.title=Create your offerPayload createOffer.amountPriceBox.amountDescription=Amount of bitcoin to {0} createOffer.amountPriceBox.priceDescriptionFiat=Fixed price per {0} createOffer.amountPriceBox.buy.volumeDescription=Amount in {0} to spend createOffer.amountPriceBox.sell.volumeDescription=Amount in {0} to receive createOffer.amountPriceBox.minAmountDescription=Minimum amount of BTC -# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. -# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. +# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. +# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. # TODO remove createOffer.amountPriceBox.next=Next step # TODO remove createOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. # TODO remove createOffer.amountPriceBox.warning.invalidFiatDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted. # TODO remove createOffer.amountPriceBox.warning.adjustedVolume=The total volume you have entered leads to invalid fractional bitcoin amounts. The amount has been adjusted and a new total volume be calculated from it. -createOffer.amountPriceBox.error.message=An error occurred when placing the offer:\n\n{0} +createOffer.amountPriceBox.error.message=An error occurred when placing the offerPayload:\n\n{0} # TODO remove createOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount. # TODO remove createOffer.validation.minAmountLargerThanAmount=Minimum amount cannot be larger than amount. -createOffer.fundsBox.title=Fund your offer +createOffer.fundsBox.title=Fund your offerPayload createOffer.fundsBox.totalsNeeded=Funds needed: createOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above createOffer.fundsBox.address=Trade wallet address: createOffer.fundsBox.balance=Trade wallet balance: -# TODO remove createOffer.fundsBox.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offer gets executed. If you cancel your offer you can withdraw your funds from that trading wallet. The only payment made when placing an offer is the offer fee payment. https://bisq.io/faq/#6 +# TODO remove createOffer.fundsBox.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offerPayload gets executed. If you cancel your offerPayload you can withdraw your funds from that trading wallet. The only payment made when placing an offerPayload is the offerPayload fee payment. https://bisq.io/faq/#6 createOffer.fundsBox.tradeAmount=Trade amount: createOffer.fundsBox.securityDeposit=Security deposit: -createOffer.fundsBox.offerFee=Create offer fee: +createOffer.fundsBox.offerFee=Create offerPayload fee: createOffer.fundsBox.networkFee=Mining fee: createOffer.fundsBox.total=Total: # TODO remove createOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove createOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove createOffer.fundsBox.placeOffer=Place offer +# TODO remove createOffer.fundsBox.placeOffer=Place offerPayload createOffer.fundsBox.placeOfferSpinnerInfo=Offer publishing is in progress ... createOffer.fundsBox.paymentLabel=bisq trade with ID {0} @@ -139,20 +139,20 @@ createOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove createOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove createOffer.advancedBox.county=Payments account country: -# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offer restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). +# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offerPayload restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). -createOffer.success.headline=Your offer has been published +createOffer.success.headline=Your offerPayload has been published createOffer.success.info=You can manage your open offers in the \"Portfolio\" screen under \"My open offers\". -# TODO remove createOffer.error.message=An error occurred when placing the offer.\n\n{0} +# TODO remove createOffer.error.message=An error occurred when placing the offerPayload.\n\n{0} -# Take offer +# Take offerPayload takeOffer.amount.prompt=Enter amount in BTC # TODO remove takeOffer.price.prompt=Enter price # TODO remove takeOffer.volume.prompt=Enter amount in {0} # TODO remove takeOffer.minAmount.prompt=Enter min. amount -# TODO remove takeOffer.amountPriceBox.title=Take offer +# TODO remove takeOffer.amountPriceBox.title=Take offerPayload # TODO remove takeOffer.amountPriceBox.subTitle=Buy bitcoin takeOffer.amountPriceBox.buy.amountDescription=Amount of bitcoin to sell takeOffer.amountPriceBox.sell.amountDescription=Amount of bitcoin to buy @@ -164,30 +164,30 @@ takeOffer.amountPriceBox.amountRangeDescription=Possible amount range # TODO remove takeOffer.amountPriceBox.sell.info=Enter the amount of bitcoin you want to buy. You can choose an amount between the minimum amount and the amount. # TODO remove takeOffer.amountPriceBox.next=Next step takeOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. -takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offer. -takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offer. +takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offerPayload. +takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offerPayload. takeOffer.validation.amountLargerThanOfferAmountMinusFee=That input amount would create dust change for the BTC seller. takeOffer.fundsBox.title=Fund your trade -takeOffer.fundsBox.isOfferAvailable=Check if offer is available ... +takeOffer.fundsBox.isOfferAvailable=Check if offerPayload is available ... takeOffer.fundsBox.totalsNeeded=Funds needed: # TODO remove takeOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above takeOffer.fundsBox.address=Trade wallet address: takeOffer.fundsBox.balance=Trade wallet balance: -# TODO remove takeOffer.fundsBox.buy.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.buy.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid in to a locked deposit address. At the end of a successful trade you will get back your security deposit and the bitcoin amount you sold will be transferred \ to the BTC buyer. -# TODO remove takeOffer.fundsBox.sell.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.sell.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid into a locked deposit address. At the end of a successful trade you will get back your security deposit. takeOffer.fundsBox.tradeAmount=Amount to sell: takeOffer.fundsBox.securityDeposit=Security deposit: -takeOffer.fundsBox.offerFee=Take offer fee: +takeOffer.fundsBox.offerFee=Take offerPayload fee: takeOffer.fundsBox.networkFee=Mining fee: takeOffer.fundsBox.total=Total: # TODO remove takeOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove takeOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove takeOffer.fundsBox.takeOffer=Take offer -takeOffer.fundsBox.takeOfferSpinnerInfo=Take offer in progress ... +# TODO remove takeOffer.fundsBox.takeOffer=Take offerPayload +takeOffer.fundsBox.takeOfferSpinnerInfo=Take offerPayload in progress ... takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.title=Advanced settings @@ -197,12 +197,12 @@ takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove takeOffer.advancedBox.county=Payments account country: -# TODO remove takeOffer.advancedBox.info=These are the offer restrictions your trading partner has defined in his offer. \ +# TODO remove takeOffer.advancedBox.info=These are the offerPayload restrictions your trading partner has defined in his offerPayload. \ Your settings match those constraints and you are able to trade with him. -takeOffer.success.headline=You have successfully taken an offer. +takeOffer.success.headline=You have successfully taken an offerPayload. takeOffer.success.info=You can see the status of your trade at the \"Portfolio\" screen under \"Open trades\". -takeOffer.error.message=An error occurred when taking the offer.\n\n{0} +takeOffer.error.message=An error occurred when taking the offerPayload.\n\n{0} # Payment methods # remove N/A=Not available diff --git a/common/src/main/resources/i18n/in_dev/displayStrings_id.properties b/common/src/main/resources/i18n/in_dev/displayStrings_id.properties index 3ddff4e623..fdefcf7452 100644 --- a/common/src/main/resources/i18n/in_dev/displayStrings_id.properties +++ b/common/src/main/resources/i18n/in_dev/displayStrings_id.properties @@ -93,42 +93,42 @@ validation.bankIdNumber={0} must consist of {1} numbers. validation.accountNr=Account number must consist of {0} numbers. validation.accountNrChars=Account number must consist of {0} characters. -# Create offer +# Create offerPayload createOffer.amount.prompt=Enter amount in BTC createOffer.price.prompt=Enter price createOffer.volume.prompt=Enter amount in {0} # TODO remove createOffer.minAmount.prompt=Enter min. amount -# TODO remove createOffer.amountPriceBox.title=Create your offer +# TODO remove createOffer.amountPriceBox.title=Create your offerPayload createOffer.amountPriceBox.amountDescription=Amount of bitcoin to {0} createOffer.amountPriceBox.priceDescriptionFiat=Fixed price per {0} createOffer.amountPriceBox.buy.volumeDescription=Amount in {0} to spend createOffer.amountPriceBox.sell.volumeDescription=Amount in {0} to receive createOffer.amountPriceBox.minAmountDescription=Minimum amount of BTC -# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. -# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. +# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. +# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. # TODO remove createOffer.amountPriceBox.next=Next step # TODO remove createOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. # TODO remove createOffer.amountPriceBox.warning.invalidFiatDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted. # TODO remove createOffer.amountPriceBox.warning.adjustedVolume=The total volume you have entered leads to invalid fractional bitcoin amounts. The amount has been adjusted and a new total volume be calculated from it. -createOffer.amountPriceBox.error.message=An error occurred when placing the offer:\n\n{0} +createOffer.amountPriceBox.error.message=An error occurred when placing the offerPayload:\n\n{0} # TODO remove createOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount. # TODO remove createOffer.validation.minAmountLargerThanAmount=Minimum amount cannot be larger than amount. -createOffer.fundsBox.title=Fund your offer +createOffer.fundsBox.title=Fund your offerPayload createOffer.fundsBox.totalsNeeded=Funds needed: createOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above createOffer.fundsBox.address=Trade wallet address: createOffer.fundsBox.balance=Trade wallet balance: -# TODO remove createOffer.fundsBox.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offer gets executed. If you cancel your offer you can withdraw your funds from that trading wallet. The only payment made when placing an offer is the offer fee payment. https://bisq.io/faq/#6 +# TODO remove createOffer.fundsBox.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offerPayload gets executed. If you cancel your offerPayload you can withdraw your funds from that trading wallet. The only payment made when placing an offerPayload is the offerPayload fee payment. https://bisq.io/faq/#6 createOffer.fundsBox.tradeAmount=Trade amount: createOffer.fundsBox.securityDeposit=Security deposit: -createOffer.fundsBox.offerFee=Create offer fee: +createOffer.fundsBox.offerFee=Create offerPayload fee: createOffer.fundsBox.networkFee=Mining fee: createOffer.fundsBox.total=Total: # TODO remove createOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove createOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove createOffer.fundsBox.placeOffer=Place offer +# TODO remove createOffer.fundsBox.placeOffer=Place offerPayload createOffer.fundsBox.placeOfferSpinnerInfo=Offer publishing is in progress ... createOffer.fundsBox.paymentLabel=bisq trade with ID {0} @@ -139,20 +139,20 @@ createOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove createOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove createOffer.advancedBox.county=Payments account country: -# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offer restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). +# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offerPayload restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). -createOffer.success.headline=Your offer has been published +createOffer.success.headline=Your offerPayload has been published createOffer.success.info=You can manage your open offers in the \"Portfolio\" screen under \"My open offers\". -# TODO remove createOffer.error.message=An error occurred when placing the offer.\n\n{0} +# TODO remove createOffer.error.message=An error occurred when placing the offerPayload.\n\n{0} -# Take offer +# Take offerPayload takeOffer.amount.prompt=Enter amount in BTC # TODO remove takeOffer.price.prompt=Enter price # TODO remove takeOffer.volume.prompt=Enter amount in {0} # TODO remove takeOffer.minAmount.prompt=Enter min. amount -# TODO remove takeOffer.amountPriceBox.title=Take offer +# TODO remove takeOffer.amountPriceBox.title=Take offerPayload # TODO remove takeOffer.amountPriceBox.subTitle=Buy bitcoin takeOffer.amountPriceBox.buy.amountDescription=Amount of bitcoin to sell takeOffer.amountPriceBox.sell.amountDescription=Amount of bitcoin to buy @@ -164,30 +164,30 @@ takeOffer.amountPriceBox.amountRangeDescription=Possible amount range # TODO remove takeOffer.amountPriceBox.sell.info=Enter the amount of bitcoin you want to buy. You can choose an amount between the minimum amount and the amount. # TODO remove takeOffer.amountPriceBox.next=Next step takeOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. -takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offer. -takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offer. +takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offerPayload. +takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offerPayload. takeOffer.validation.amountLargerThanOfferAmountMinusFee=That input amount would create dust change for the BTC seller. takeOffer.fundsBox.title=Fund your trade -takeOffer.fundsBox.isOfferAvailable=Check if offer is available ... +takeOffer.fundsBox.isOfferAvailable=Check if offerPayload is available ... takeOffer.fundsBox.totalsNeeded=Funds needed: # TODO remove takeOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above takeOffer.fundsBox.address=Trade wallet address: takeOffer.fundsBox.balance=Trade wallet balance: -# TODO remove takeOffer.fundsBox.buy.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.buy.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid in to a locked deposit address. At the end of a successful trade you will get back your security deposit and the bitcoin amount you sold will be transferred \ to the BTC buyer. -# TODO remove takeOffer.fundsBox.sell.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.sell.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid into a locked deposit address. At the end of a successful trade you will get back your security deposit. takeOffer.fundsBox.tradeAmount=Amount to sell: takeOffer.fundsBox.securityDeposit=Security deposit: -takeOffer.fundsBox.offerFee=Take offer fee: +takeOffer.fundsBox.offerFee=Take offerPayload fee: takeOffer.fundsBox.networkFee=Mining fee: takeOffer.fundsBox.total=Total: # TODO remove takeOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove takeOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove takeOffer.fundsBox.takeOffer=Take offer -takeOffer.fundsBox.takeOfferSpinnerInfo=Take offer in progress ... +# TODO remove takeOffer.fundsBox.takeOffer=Take offerPayload +takeOffer.fundsBox.takeOfferSpinnerInfo=Take offerPayload in progress ... takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.title=Advanced settings @@ -197,12 +197,12 @@ takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove takeOffer.advancedBox.county=Payments account country: -# TODO remove takeOffer.advancedBox.info=These are the offer restrictions your trading partner has defined in his offer. \ +# TODO remove takeOffer.advancedBox.info=These are the offerPayload restrictions your trading partner has defined in his offerPayload. \ Your settings match those constraints and you are able to trade with him. -takeOffer.success.headline=You have successfully taken an offer. +takeOffer.success.headline=You have successfully taken an offerPayload. takeOffer.success.info=You can see the status of your trade at the \"Portfolio\" screen under \"Open trades\". -takeOffer.error.message=An error occurred when taking the offer.\n\n{0} +takeOffer.error.message=An error occurred when taking the offerPayload.\n\n{0} # Payment methods # remove N/A=Not available diff --git a/common/src/main/resources/i18n/in_dev/displayStrings_ie.properties b/common/src/main/resources/i18n/in_dev/displayStrings_ie.properties index 94d9040917..d8d0c57d5a 100644 --- a/common/src/main/resources/i18n/in_dev/displayStrings_ie.properties +++ b/common/src/main/resources/i18n/in_dev/displayStrings_ie.properties @@ -93,42 +93,42 @@ validation.bankIdNumber={0} must consist of {1} numbers. validation.accountNr=Account number must consist of {0} numbers. validation.accountNrChars=Account number must consist of {0} characters. -# Create offer +# Create offerPayload createOffer.amount.prompt=Enter amount in BTC createOffer.price.prompt=Enter price createOffer.volume.prompt=Enter amount in {0} # TODO remove createOffer.minAmount.prompt=Enter min. amount -# TODO remove createOffer.amountPriceBox.title=Create your offer +# TODO remove createOffer.amountPriceBox.title=Create your offerPayload createOffer.amountPriceBox.amountDescription=Amount of bitcoin to {0} createOffer.amountPriceBox.priceDescriptionFiat=Fixed price per {0} createOffer.amountPriceBox.buy.volumeDescription=Amount in {0} to spend createOffer.amountPriceBox.sell.volumeDescription=Amount in {0} to receive createOffer.amountPriceBox.minAmountDescription=Minimum amount of BTC -# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. -# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. +# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. +# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. # TODO remove createOffer.amountPriceBox.next=Next step # TODO remove createOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. # TODO remove createOffer.amountPriceBox.warning.invalidFiatDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted. # TODO remove createOffer.amountPriceBox.warning.adjustedVolume=The total volume you have entered leads to invalid fractional bitcoin amounts. The amount has been adjusted and a new total volume be calculated from it. -createOffer.amountPriceBox.error.message=An error occurred when placing the offer:\n\n{0} +createOffer.amountPriceBox.error.message=An error occurred when placing the offerPayload:\n\n{0} # TODO remove createOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount. # TODO remove createOffer.validation.minAmountLargerThanAmount=Minimum amount cannot be larger than amount. -createOffer.fundsBox.title=Fund your offer +createOffer.fundsBox.title=Fund your offerPayload createOffer.fundsBox.totalsNeeded=Funds needed: createOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above createOffer.fundsBox.address=Trade wallet address: createOffer.fundsBox.balance=Trade wallet balance: -# TODO remove createOffer.fundsBox.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offer gets executed. If you cancel your offer you can withdraw your funds from that trading wallet. The only payment made when placing an offer is the offer fee payment. https://bisq.io/faq/#6 +# TODO remove createOffer.fundsBox.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offerPayload gets executed. If you cancel your offerPayload you can withdraw your funds from that trading wallet. The only payment made when placing an offerPayload is the offerPayload fee payment. https://bisq.io/faq/#6 createOffer.fundsBox.tradeAmount=Trade amount: createOffer.fundsBox.securityDeposit=Security deposit: -createOffer.fundsBox.offerFee=Create offer fee: +createOffer.fundsBox.offerFee=Create offerPayload fee: createOffer.fundsBox.networkFee=Mining fee: createOffer.fundsBox.total=Total: # TODO remove createOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove createOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove createOffer.fundsBox.placeOffer=Place offer +# TODO remove createOffer.fundsBox.placeOffer=Place offerPayload createOffer.fundsBox.placeOfferSpinnerInfo=Offer publishing is in progress ... createOffer.fundsBox.paymentLabel=bisq trade with ID {0} @@ -139,20 +139,20 @@ createOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove createOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove createOffer.advancedBox.county=Payments account country: -# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offer restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). +# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offerPayload restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). -createOffer.success.headline=Your offer has been published +createOffer.success.headline=Your offerPayload has been published createOffer.success.info=You can manage your open offers in the \"Portfolio\" screen under \"My open offers\". -# TODO remove createOffer.error.message=An error occurred when placing the offer.\n\n{0} +# TODO remove createOffer.error.message=An error occurred when placing the offerPayload.\n\n{0} -# Take offer +# Take offerPayload takeOffer.amount.prompt=Enter amount in BTC # TODO remove takeOffer.price.prompt=Enter price # TODO remove takeOffer.volume.prompt=Enter amount in {0} # TODO remove takeOffer.minAmount.prompt=Enter min. amount -# TODO remove takeOffer.amountPriceBox.title=Take offer +# TODO remove takeOffer.amountPriceBox.title=Take offerPayload # TODO remove takeOffer.amountPriceBox.subTitle=Buy bitcoin takeOffer.amountPriceBox.buy.amountDescription=Amount of bitcoin to sell takeOffer.amountPriceBox.sell.amountDescription=Amount of bitcoin to buy @@ -164,30 +164,30 @@ takeOffer.amountPriceBox.amountRangeDescription=Possible amount range # TODO remove takeOffer.amountPriceBox.sell.info=Enter the amount of bitcoin you want to buy. You can choose an amount between the minimum amount and the amount. # TODO remove takeOffer.amountPriceBox.next=Next step takeOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. -takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offer. -takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offer. +takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offerPayload. +takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offerPayload. takeOffer.validation.amountLargerThanOfferAmountMinusFee=That input amount would create dust change for the BTC seller. takeOffer.fundsBox.title=Fund your trade -takeOffer.fundsBox.isOfferAvailable=Check if offer is available ... +takeOffer.fundsBox.isOfferAvailable=Check if offerPayload is available ... takeOffer.fundsBox.totalsNeeded=Funds needed: # TODO remove takeOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above takeOffer.fundsBox.address=Trade wallet address: takeOffer.fundsBox.balance=Trade wallet balance: -# TODO remove takeOffer.fundsBox.buy.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.buy.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid in to a locked deposit address. At the end of a successful trade you will get back your security deposit and the bitcoin amount you sold will be transferred \ to the BTC buyer. -# TODO remove takeOffer.fundsBox.sell.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.sell.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid into a locked deposit address. At the end of a successful trade you will get back your security deposit. takeOffer.fundsBox.tradeAmount=Amount to sell: takeOffer.fundsBox.securityDeposit=Security deposit: -takeOffer.fundsBox.offerFee=Take offer fee: +takeOffer.fundsBox.offerFee=Take offerPayload fee: takeOffer.fundsBox.networkFee=Mining fee: takeOffer.fundsBox.total=Total: # TODO remove takeOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove takeOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove takeOffer.fundsBox.takeOffer=Take offer -takeOffer.fundsBox.takeOfferSpinnerInfo=Take offer in progress ... +# TODO remove takeOffer.fundsBox.takeOffer=Take offerPayload +takeOffer.fundsBox.takeOfferSpinnerInfo=Take offerPayload in progress ... takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.title=Advanced settings @@ -197,12 +197,12 @@ takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove takeOffer.advancedBox.county=Payments account country: -# TODO remove takeOffer.advancedBox.info=These are the offer restrictions your trading partner has defined in his offer. \ +# TODO remove takeOffer.advancedBox.info=These are the offerPayload restrictions your trading partner has defined in his offerPayload. \ Your settings match those constraints and you are able to trade with him. -takeOffer.success.headline=You have successfully taken an offer. +takeOffer.success.headline=You have successfully taken an offerPayload. takeOffer.success.info=You can see the status of your trade at the \"Portfolio\" screen under \"Open trades\". -takeOffer.error.message=An error occurred when taking the offer.\n\n{0} +takeOffer.error.message=An error occurred when taking the offerPayload.\n\n{0} # Payment methods # remove N/A=Not available diff --git a/common/src/main/resources/i18n/in_dev/displayStrings_in.properties b/common/src/main/resources/i18n/in_dev/displayStrings_in.properties index 1977f94ce0..4f2fdfcb7b 100644 --- a/common/src/main/resources/i18n/in_dev/displayStrings_in.properties +++ b/common/src/main/resources/i18n/in_dev/displayStrings_in.properties @@ -93,42 +93,42 @@ validation.bankIdNumber={0} must consist of {1} numbers. validation.accountNr=Account number must consist of {0} numbers. validation.accountNrChars=Account number must consist of {0} characters. -# Create offer +# Create offerPayload createOffer.amount.prompt=Enter amount in BTC createOffer.price.prompt=Enter price createOffer.volume.prompt=Enter amount in {0} # TODO remove createOffer.minAmount.prompt=Enter min. amount -# TODO remove createOffer.amountPriceBox.title=Create your offer +# TODO remove createOffer.amountPriceBox.title=Create your offerPayload createOffer.amountPriceBox.amountDescription=Amount of bitcoin to {0} createOffer.amountPriceBox.priceDescriptionFiat=Fixed price per {0} createOffer.amountPriceBox.buy.volumeDescription=Amount in {0} to spend createOffer.amountPriceBox.sell.volumeDescription=Amount in {0} to receive createOffer.amountPriceBox.minAmountDescription=Minimum amount of BTC -# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. -# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. +# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. +# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. # TODO remove createOffer.amountPriceBox.next=Next step # TODO remove createOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. # TODO remove createOffer.amountPriceBox.warning.invalidFiatDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted. # TODO remove createOffer.amountPriceBox.warning.adjustedVolume=The total volume you have entered leads to invalid fractional bitcoin amounts. The amount has been adjusted and a new total volume be calculated from it. -createOffer.amountPriceBox.error.message=An error occurred when placing the offer:\n\n{0} +createOffer.amountPriceBox.error.message=An error occurred when placing the offerPayload:\n\n{0} # TODO remove createOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount. # TODO remove createOffer.validation.minAmountLargerThanAmount=Minimum amount cannot be larger than amount. -createOffer.fundsBox.title=Fund your offer +createOffer.fundsBox.title=Fund your offerPayload createOffer.fundsBox.totalsNeeded=Funds needed: createOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above createOffer.fundsBox.address=Trade wallet address: createOffer.fundsBox.balance=Trade wallet balance: -# TODO remove createOffer.fundsBox.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offer gets executed. If you cancel your offer you can withdraw your funds from that trading wallet. The only payment made when placing an offer is the offer fee payment. https://bisq.io/faq/#6 +# TODO remove createOffer.fundsBox.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offerPayload gets executed. If you cancel your offerPayload you can withdraw your funds from that trading wallet. The only payment made when placing an offerPayload is the offerPayload fee payment. https://bisq.io/faq/#6 createOffer.fundsBox.tradeAmount=Trade amount: createOffer.fundsBox.securityDeposit=Security deposit: -createOffer.fundsBox.offerFee=Create offer fee: +createOffer.fundsBox.offerFee=Create offerPayload fee: createOffer.fundsBox.networkFee=Mining fee: createOffer.fundsBox.total=Total: # TODO remove createOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove createOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove createOffer.fundsBox.placeOffer=Place offer +# TODO remove createOffer.fundsBox.placeOffer=Place offerPayload createOffer.fundsBox.placeOfferSpinnerInfo=Offer publishing is in progress ... createOffer.fundsBox.paymentLabel=bisq trade with ID {0} @@ -139,20 +139,20 @@ createOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove createOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove createOffer.advancedBox.county=Payments account country: -# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offer restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). +# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offerPayload restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). -createOffer.success.headline=Your offer has been published +createOffer.success.headline=Your offerPayload has been published createOffer.success.info=You can manage your open offers in the \"Portfolio\" screen under \"My open offers\". -# TODO remove createOffer.error.message=An error occurred when placing the offer.\n\n{0} +# TODO remove createOffer.error.message=An error occurred when placing the offerPayload.\n\n{0} -# Take offer +# Take offerPayload takeOffer.amount.prompt=Enter amount in BTC # TODO remove takeOffer.price.prompt=Enter price # TODO remove takeOffer.volume.prompt=Enter amount in {0} # TODO remove takeOffer.minAmount.prompt=Enter min. amount -# TODO remove takeOffer.amountPriceBox.title=Take offer +# TODO remove takeOffer.amountPriceBox.title=Take offerPayload # TODO remove takeOffer.amountPriceBox.subTitle=Buy bitcoin takeOffer.amountPriceBox.buy.amountDescription=Amount of bitcoin to sell takeOffer.amountPriceBox.sell.amountDescription=Amount of bitcoin to buy @@ -164,30 +164,30 @@ takeOffer.amountPriceBox.amountRangeDescription=Possible amount range # TODO remove takeOffer.amountPriceBox.sell.info=Enter the amount of bitcoin you want to buy. You can choose an amount between the minimum amount and the amount. # TODO remove takeOffer.amountPriceBox.next=Next step takeOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. -takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offer. -takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offer. +takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offerPayload. +takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offerPayload. takeOffer.validation.amountLargerThanOfferAmountMinusFee=That input amount would create dust change for the BTC seller. takeOffer.fundsBox.title=Fund your trade -takeOffer.fundsBox.isOfferAvailable=Check if offer is available ... +takeOffer.fundsBox.isOfferAvailable=Check if offerPayload is available ... takeOffer.fundsBox.totalsNeeded=Funds needed: # TODO remove takeOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above takeOffer.fundsBox.address=Trade wallet address: takeOffer.fundsBox.balance=Trade wallet balance: -# TODO remove takeOffer.fundsBox.buy.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.buy.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid in to a locked deposit address. At the end of a successful trade you will get back your security deposit and the bitcoin amount you sold will be transferred \ to the BTC buyer. -# TODO remove takeOffer.fundsBox.sell.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.sell.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid into a locked deposit address. At the end of a successful trade you will get back your security deposit. takeOffer.fundsBox.tradeAmount=Amount to sell: takeOffer.fundsBox.securityDeposit=Security deposit: -takeOffer.fundsBox.offerFee=Take offer fee: +takeOffer.fundsBox.offerFee=Take offerPayload fee: takeOffer.fundsBox.networkFee=Mining fee: takeOffer.fundsBox.total=Total: # TODO remove takeOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove takeOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove takeOffer.fundsBox.takeOffer=Take offer -takeOffer.fundsBox.takeOfferSpinnerInfo=Take offer in progress ... +# TODO remove takeOffer.fundsBox.takeOffer=Take offerPayload +takeOffer.fundsBox.takeOfferSpinnerInfo=Take offerPayload in progress ... takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.title=Advanced settings @@ -197,12 +197,12 @@ takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove takeOffer.advancedBox.county=Payments account country: -# TODO remove takeOffer.advancedBox.info=These are the offer restrictions your trading partner has defined in his offer. \ +# TODO remove takeOffer.advancedBox.info=These are the offerPayload restrictions your trading partner has defined in his offerPayload. \ Your settings match those constraints and you are able to trade with him. -takeOffer.success.headline=You have successfully taken an offer. +takeOffer.success.headline=You have successfully taken an offerPayload. takeOffer.success.info=You can see the status of your trade at the \"Portfolio\" screen under \"Open trades\". -takeOffer.error.message=An error occurred when taking the offer.\n\n{0} +takeOffer.error.message=An error occurred when taking the offerPayload.\n\n{0} # Payment methods # remove N/A=Not available diff --git a/common/src/main/resources/i18n/in_dev/displayStrings_is.properties b/common/src/main/resources/i18n/in_dev/displayStrings_is.properties index 9bfa0a013f..f9cef4f879 100644 --- a/common/src/main/resources/i18n/in_dev/displayStrings_is.properties +++ b/common/src/main/resources/i18n/in_dev/displayStrings_is.properties @@ -93,42 +93,42 @@ validation.bankIdNumber={0} must consist of {1} numbers. validation.accountNr=Account number must consist of {0} numbers. validation.accountNrChars=Account number must consist of {0} characters. -# Create offer +# Create offerPayload createOffer.amount.prompt=Enter amount in BTC createOffer.price.prompt=Enter price createOffer.volume.prompt=Enter amount in {0} # TODO remove createOffer.minAmount.prompt=Enter min. amount -# TODO remove createOffer.amountPriceBox.title=Create your offer +# TODO remove createOffer.amountPriceBox.title=Create your offerPayload createOffer.amountPriceBox.amountDescription=Amount of bitcoin to {0} createOffer.amountPriceBox.priceDescriptionFiat=Fixed price per {0} createOffer.amountPriceBox.buy.volumeDescription=Amount in {0} to spend createOffer.amountPriceBox.sell.volumeDescription=Amount in {0} to receive createOffer.amountPriceBox.minAmountDescription=Minimum amount of BTC -# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. -# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. +# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. +# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. # TODO remove createOffer.amountPriceBox.next=Next step # TODO remove createOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. # TODO remove createOffer.amountPriceBox.warning.invalidFiatDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted. # TODO remove createOffer.amountPriceBox.warning.adjustedVolume=The total volume you have entered leads to invalid fractional bitcoin amounts. The amount has been adjusted and a new total volume be calculated from it. -createOffer.amountPriceBox.error.message=An error occurred when placing the offer:\n\n{0} +createOffer.amountPriceBox.error.message=An error occurred when placing the offerPayload:\n\n{0} # TODO remove createOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount. # TODO remove createOffer.validation.minAmountLargerThanAmount=Minimum amount cannot be larger than amount. -createOffer.fundsBox.title=Fund your offer +createOffer.fundsBox.title=Fund your offerPayload createOffer.fundsBox.totalsNeeded=Funds needed: createOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above createOffer.fundsBox.address=Trade wallet address: createOffer.fundsBox.balance=Trade wallet balance: -# TODO remove createOffer.fundsBox.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offer gets executed. If you cancel your offer you can withdraw your funds from that trading wallet. The only payment made when placing an offer is the offer fee payment. https://bisq.io/faq/#6 +# TODO remove createOffer.fundsBox.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offerPayload gets executed. If you cancel your offerPayload you can withdraw your funds from that trading wallet. The only payment made when placing an offerPayload is the offerPayload fee payment. https://bisq.io/faq/#6 createOffer.fundsBox.tradeAmount=Trade amount: createOffer.fundsBox.securityDeposit=Security deposit: -createOffer.fundsBox.offerFee=Create offer fee: +createOffer.fundsBox.offerFee=Create offerPayload fee: createOffer.fundsBox.networkFee=Mining fee: createOffer.fundsBox.total=Total: # TODO remove createOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove createOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove createOffer.fundsBox.placeOffer=Place offer +# TODO remove createOffer.fundsBox.placeOffer=Place offerPayload createOffer.fundsBox.placeOfferSpinnerInfo=Offer publishing is in progress ... createOffer.fundsBox.paymentLabel=bisq trade with ID {0} @@ -139,20 +139,20 @@ createOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove createOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove createOffer.advancedBox.county=Payments account country: -# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offer restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). +# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offerPayload restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). -createOffer.success.headline=Your offer has been published +createOffer.success.headline=Your offerPayload has been published createOffer.success.info=You can manage your open offers in the \"Portfolio\" screen under \"My open offers\". -# TODO remove createOffer.error.message=An error occurred when placing the offer.\n\n{0} +# TODO remove createOffer.error.message=An error occurred when placing the offerPayload.\n\n{0} -# Take offer +# Take offerPayload takeOffer.amount.prompt=Enter amount in BTC # TODO remove takeOffer.price.prompt=Enter price # TODO remove takeOffer.volume.prompt=Enter amount in {0} # TODO remove takeOffer.minAmount.prompt=Enter min. amount -# TODO remove takeOffer.amountPriceBox.title=Take offer +# TODO remove takeOffer.amountPriceBox.title=Take offerPayload # TODO remove takeOffer.amountPriceBox.subTitle=Buy bitcoin takeOffer.amountPriceBox.buy.amountDescription=Amount of bitcoin to sell takeOffer.amountPriceBox.sell.amountDescription=Amount of bitcoin to buy @@ -164,30 +164,30 @@ takeOffer.amountPriceBox.amountRangeDescription=Possible amount range # TODO remove takeOffer.amountPriceBox.sell.info=Enter the amount of bitcoin you want to buy. You can choose an amount between the minimum amount and the amount. # TODO remove takeOffer.amountPriceBox.next=Next step takeOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. -takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offer. -takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offer. +takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offerPayload. +takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offerPayload. takeOffer.validation.amountLargerThanOfferAmountMinusFee=That input amount would create dust change for the BTC seller. takeOffer.fundsBox.title=Fund your trade -takeOffer.fundsBox.isOfferAvailable=Check if offer is available ... +takeOffer.fundsBox.isOfferAvailable=Check if offerPayload is available ... takeOffer.fundsBox.totalsNeeded=Funds needed: # TODO remove takeOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above takeOffer.fundsBox.address=Trade wallet address: takeOffer.fundsBox.balance=Trade wallet balance: -# TODO remove takeOffer.fundsBox.buy.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.buy.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid in to a locked deposit address. At the end of a successful trade you will get back your security deposit and the bitcoin amount you sold will be transferred \ to the BTC buyer. -# TODO remove takeOffer.fundsBox.sell.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.sell.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid into a locked deposit address. At the end of a successful trade you will get back your security deposit. takeOffer.fundsBox.tradeAmount=Amount to sell: takeOffer.fundsBox.securityDeposit=Security deposit: -takeOffer.fundsBox.offerFee=Take offer fee: +takeOffer.fundsBox.offerFee=Take offerPayload fee: takeOffer.fundsBox.networkFee=Mining fee: takeOffer.fundsBox.total=Total: # TODO remove takeOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove takeOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove takeOffer.fundsBox.takeOffer=Take offer -takeOffer.fundsBox.takeOfferSpinnerInfo=Take offer in progress ... +# TODO remove takeOffer.fundsBox.takeOffer=Take offerPayload +takeOffer.fundsBox.takeOfferSpinnerInfo=Take offerPayload in progress ... takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.title=Advanced settings @@ -197,12 +197,12 @@ takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove takeOffer.advancedBox.county=Payments account country: -# TODO remove takeOffer.advancedBox.info=These are the offer restrictions your trading partner has defined in his offer. \ +# TODO remove takeOffer.advancedBox.info=These are the offerPayload restrictions your trading partner has defined in his offerPayload. \ Your settings match those constraints and you are able to trade with him. -takeOffer.success.headline=You have successfully taken an offer. +takeOffer.success.headline=You have successfully taken an offerPayload. takeOffer.success.info=You can see the status of your trade at the \"Portfolio\" screen under \"Open trades\". -takeOffer.error.message=An error occurred when taking the offer.\n\n{0} +takeOffer.error.message=An error occurred when taking the offerPayload.\n\n{0} # Payment methods # remove N/A=Not available diff --git a/common/src/main/resources/i18n/in_dev/displayStrings_it.properties b/common/src/main/resources/i18n/in_dev/displayStrings_it.properties index 27850e7890..6981e5559e 100644 --- a/common/src/main/resources/i18n/in_dev/displayStrings_it.properties +++ b/common/src/main/resources/i18n/in_dev/displayStrings_it.properties @@ -93,7 +93,7 @@ validation.bankIdNumber={0} deve consistere in {1} numeri. validation.accountNr=Il numero dell'account deve consistere in {0} numeri. validation.accountNrChars=Il numero dell'account deve consistere in {0} caratteri. -# Create offer +# Create offerPayload createOffer.amount.prompt=Inserire l'importo in BTC createOffer.price.prompt=Inserire prezzo createOffer.volume.prompt=Inserire prezzo in {0} @@ -146,7 +146,7 @@ createOffer.success.info=Puoi gestire le tue offerte perte nella schermata \"Por # TODO remove createOffer.error.message=Si è verificato un errore durante l'immissione dell'offerta.\n\n{0} -# Take offer +# Take offerPayload takeOffer.amount.prompt=Inserire importo in BTC # TODO remove takeOffer.price.prompt=Inserire prezzo # TODO remove takeOffer.volume.prompt=Inserire importo in {0} diff --git a/common/src/main/resources/i18n/in_dev/displayStrings_jp.properties b/common/src/main/resources/i18n/in_dev/displayStrings_jp.properties index 2d6c0deffe..f6d79ce45c 100644 --- a/common/src/main/resources/i18n/in_dev/displayStrings_jp.properties +++ b/common/src/main/resources/i18n/in_dev/displayStrings_jp.properties @@ -93,42 +93,42 @@ validation.bankIdNumber={0} must consist of {1} numbers. validation.accountNr=Account number must consist of {0} numbers. validation.accountNrChars=Account number must consist of {0} characters. -# Create offer +# Create offerPayload createOffer.amount.prompt=Enter amount in BTC createOffer.price.prompt=Enter price createOffer.volume.prompt=Enter amount in {0} # TODO remove createOffer.minAmount.prompt=Enter min. amount -# TODO remove createOffer.amountPriceBox.title=Create your offer +# TODO remove createOffer.amountPriceBox.title=Create your offerPayload createOffer.amountPriceBox.amountDescription=Amount of bitcoin to {0} createOffer.amountPriceBox.priceDescriptionFiat=Fixed price per {0} createOffer.amountPriceBox.buy.volumeDescription=Amount in {0} to spend createOffer.amountPriceBox.sell.volumeDescription=Amount in {0} to receive createOffer.amountPriceBox.minAmountDescription=Minimum amount of BTC -# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. -# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. +# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. +# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. # TODO remove createOffer.amountPriceBox.next=Next step # TODO remove createOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. # TODO remove createOffer.amountPriceBox.warning.invalidFiatDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted. # TODO remove createOffer.amountPriceBox.warning.adjustedVolume=The total volume you have entered leads to invalid fractional bitcoin amounts. The amount has been adjusted and a new total volume be calculated from it. -createOffer.amountPriceBox.error.message=An error occurred when placing the offer:\n\n{0} +createOffer.amountPriceBox.error.message=An error occurred when placing the offerPayload:\n\n{0} # TODO remove createOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount. # TODO remove createOffer.validation.minAmountLargerThanAmount=Minimum amount cannot be larger than amount. -createOffer.fundsBox.title=Fund your offer +createOffer.fundsBox.title=Fund your offerPayload createOffer.fundsBox.totalsNeeded=Funds needed: createOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above createOffer.fundsBox.address=Trade wallet address: createOffer.fundsBox.balance=Trade wallet balance: -# TODO remove createOffer.fundsBox.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offer gets executed. If you cancel your offer you can withdraw your funds from that trading wallet. The only payment made when placing an offer is the offer fee payment. https://bisq.io/faq/#6 +# TODO remove createOffer.fundsBox.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offerPayload gets executed. If you cancel your offerPayload you can withdraw your funds from that trading wallet. The only payment made when placing an offerPayload is the offerPayload fee payment. https://bisq.io/faq/#6 createOffer.fundsBox.tradeAmount=Trade amount: createOffer.fundsBox.securityDeposit=Security deposit: -createOffer.fundsBox.offerFee=Create offer fee: +createOffer.fundsBox.offerFee=Create offerPayload fee: createOffer.fundsBox.networkFee=Mining fee: createOffer.fundsBox.total=Total: # TODO remove createOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove createOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove createOffer.fundsBox.placeOffer=Place offer +# TODO remove createOffer.fundsBox.placeOffer=Place offerPayload createOffer.fundsBox.placeOfferSpinnerInfo=Offer publishing is in progress ... createOffer.fundsBox.paymentLabel=bisq trade with ID {0} @@ -139,20 +139,20 @@ createOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove createOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove createOffer.advancedBox.county=Payments account country: -# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offer restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). +# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offerPayload restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). -createOffer.success.headline=Your offer has been published +createOffer.success.headline=Your offerPayload has been published createOffer.success.info=You can manage your open offers in the \"Portfolio\" screen under \"My open offers\". -# TODO remove createOffer.error.message=An error occurred when placing the offer.\n\n{0} +# TODO remove createOffer.error.message=An error occurred when placing the offerPayload.\n\n{0} -# Take offer +# Take offerPayload takeOffer.amount.prompt=Enter amount in BTC # TODO remove takeOffer.price.prompt=Enter price # TODO remove takeOffer.volume.prompt=Enter amount in {0} # TODO remove takeOffer.minAmount.prompt=Enter min. amount -# TODO remove takeOffer.amountPriceBox.title=Take offer +# TODO remove takeOffer.amountPriceBox.title=Take offerPayload # TODO remove takeOffer.amountPriceBox.subTitle=Buy bitcoin takeOffer.amountPriceBox.buy.amountDescription=Amount of bitcoin to sell takeOffer.amountPriceBox.sell.amountDescription=Amount of bitcoin to buy @@ -164,30 +164,30 @@ takeOffer.amountPriceBox.amountRangeDescription=Possible amount range # TODO remove takeOffer.amountPriceBox.sell.info=Enter the amount of bitcoin you want to buy. You can choose an amount between the minimum amount and the amount. # TODO remove takeOffer.amountPriceBox.next=Next step takeOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. -takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offer. -takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offer. +takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offerPayload. +takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offerPayload. takeOffer.validation.amountLargerThanOfferAmountMinusFee=That input amount would create dust change for the BTC seller. takeOffer.fundsBox.title=Fund your trade -takeOffer.fundsBox.isOfferAvailable=Check if offer is available ... +takeOffer.fundsBox.isOfferAvailable=Check if offerPayload is available ... takeOffer.fundsBox.totalsNeeded=Funds needed: # TODO remove takeOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above takeOffer.fundsBox.address=Trade wallet address: takeOffer.fundsBox.balance=Trade wallet balance: -# TODO remove takeOffer.fundsBox.buy.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.buy.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid in to a locked deposit address. At the end of a successful trade you will get back your security deposit and the bitcoin amount you sold will be transferred \ to the BTC buyer. -# TODO remove takeOffer.fundsBox.sell.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.sell.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid into a locked deposit address. At the end of a successful trade you will get back your security deposit. takeOffer.fundsBox.tradeAmount=Amount to sell: takeOffer.fundsBox.securityDeposit=Security deposit: -takeOffer.fundsBox.offerFee=Take offer fee: +takeOffer.fundsBox.offerFee=Take offerPayload fee: takeOffer.fundsBox.networkFee=Mining fee: takeOffer.fundsBox.total=Total: # TODO remove takeOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove takeOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove takeOffer.fundsBox.takeOffer=Take offer -takeOffer.fundsBox.takeOfferSpinnerInfo=Take offer in progress ... +# TODO remove takeOffer.fundsBox.takeOffer=Take offerPayload +takeOffer.fundsBox.takeOfferSpinnerInfo=Take offerPayload in progress ... takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.title=Advanced settings @@ -197,12 +197,12 @@ takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove takeOffer.advancedBox.county=Payments account country: -# TODO remove takeOffer.advancedBox.info=These are the offer restrictions your trading partner has defined in his offer. \ +# TODO remove takeOffer.advancedBox.info=These are the offerPayload restrictions your trading partner has defined in his offerPayload. \ Your settings match those constraints and you are able to trade with him. -takeOffer.success.headline=You have successfully taken an offer. +takeOffer.success.headline=You have successfully taken an offerPayload. takeOffer.success.info=You can see the status of your trade at the \"Portfolio\" screen under \"Open trades\". -takeOffer.error.message=An error occurred when taking the offer.\n\n{0} +takeOffer.error.message=An error occurred when taking the offerPayload.\n\n{0} # Payment methods # remove N/A=Not available diff --git a/common/src/main/resources/i18n/in_dev/displayStrings_kg.properties b/common/src/main/resources/i18n/in_dev/displayStrings_kg.properties index a226039ddb..1e62f995ee 100644 --- a/common/src/main/resources/i18n/in_dev/displayStrings_kg.properties +++ b/common/src/main/resources/i18n/in_dev/displayStrings_kg.properties @@ -93,42 +93,42 @@ validation.bankIdNumber={0} must consist of {1} numbers. validation.accountNr=Account number must consist of {0} numbers. validation.accountNrChars=Account number must consist of {0} characters. -# Create offer +# Create offerPayload createOffer.amount.prompt=Enter amount in BTC createOffer.price.prompt=Enter price createOffer.volume.prompt=Enter amount in {0} # TODO remove createOffer.minAmount.prompt=Enter min. amount -# TODO remove createOffer.amountPriceBox.title=Create your offer +# TODO remove createOffer.amountPriceBox.title=Create your offerPayload createOffer.amountPriceBox.amountDescription=Amount of bitcoin to {0} createOffer.amountPriceBox.priceDescriptionFiat=Fixed price per {0} createOffer.amountPriceBox.buy.volumeDescription=Amount in {0} to spend createOffer.amountPriceBox.sell.volumeDescription=Amount in {0} to receive createOffer.amountPriceBox.minAmountDescription=Minimum amount of BTC -# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. -# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. +# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. +# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. # TODO remove createOffer.amountPriceBox.next=Next step # TODO remove createOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. # TODO remove createOffer.amountPriceBox.warning.invalidFiatDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted. # TODO remove createOffer.amountPriceBox.warning.adjustedVolume=The total volume you have entered leads to invalid fractional bitcoin amounts. The amount has been adjusted and a new total volume be calculated from it. -createOffer.amountPriceBox.error.message=An error occurred when placing the offer:\n\n{0} +createOffer.amountPriceBox.error.message=An error occurred when placing the offerPayload:\n\n{0} # TODO remove createOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount. # TODO remove createOffer.validation.minAmountLargerThanAmount=Minimum amount cannot be larger than amount. -createOffer.fundsBox.title=Fund your offer +createOffer.fundsBox.title=Fund your offerPayload createOffer.fundsBox.totalsNeeded=Funds needed: createOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above createOffer.fundsBox.address=Trade wallet address: createOffer.fundsBox.balance=Trade wallet balance: -# TODO remove createOffer.fundsBox.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offer gets executed. If you cancel your offer you can withdraw your funds from that trading wallet. The only payment made when placing an offer is the offer fee payment. https://bisq.io/faq/#6 +# TODO remove createOffer.fundsBox.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offerPayload gets executed. If you cancel your offerPayload you can withdraw your funds from that trading wallet. The only payment made when placing an offerPayload is the offerPayload fee payment. https://bisq.io/faq/#6 createOffer.fundsBox.tradeAmount=Trade amount: createOffer.fundsBox.securityDeposit=Security deposit: -createOffer.fundsBox.offerFee=Create offer fee: +createOffer.fundsBox.offerFee=Create offerPayload fee: createOffer.fundsBox.networkFee=Mining fee: createOffer.fundsBox.total=Total: # TODO remove createOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove createOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove createOffer.fundsBox.placeOffer=Place offer +# TODO remove createOffer.fundsBox.placeOffer=Place offerPayload createOffer.fundsBox.placeOfferSpinnerInfo=Offer publishing is in progress ... createOffer.fundsBox.paymentLabel=bisq trade with ID {0} @@ -139,20 +139,20 @@ createOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove createOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove createOffer.advancedBox.county=Payments account country: -# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offer restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). +# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offerPayload restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). -createOffer.success.headline=Your offer has been published +createOffer.success.headline=Your offerPayload has been published createOffer.success.info=You can manage your open offers in the \"Portfolio\" screen under \"My open offers\". -# TODO remove createOffer.error.message=An error occurred when placing the offer.\n\n{0} +# TODO remove createOffer.error.message=An error occurred when placing the offerPayload.\n\n{0} -# Take offer +# Take offerPayload takeOffer.amount.prompt=Enter amount in BTC # TODO remove takeOffer.price.prompt=Enter price # TODO remove takeOffer.volume.prompt=Enter amount in {0} # TODO remove takeOffer.minAmount.prompt=Enter min. amount -# TODO remove takeOffer.amountPriceBox.title=Take offer +# TODO remove takeOffer.amountPriceBox.title=Take offerPayload # TODO remove takeOffer.amountPriceBox.subTitle=Buy bitcoin takeOffer.amountPriceBox.buy.amountDescription=Amount of bitcoin to sell takeOffer.amountPriceBox.sell.amountDescription=Amount of bitcoin to buy @@ -164,30 +164,30 @@ takeOffer.amountPriceBox.amountRangeDescription=Possible amount range # TODO remove takeOffer.amountPriceBox.sell.info=Enter the amount of bitcoin you want to buy. You can choose an amount between the minimum amount and the amount. # TODO remove takeOffer.amountPriceBox.next=Next step takeOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. -takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offer. -takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offer. +takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offerPayload. +takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offerPayload. takeOffer.validation.amountLargerThanOfferAmountMinusFee=That input amount would create dust change for the BTC seller. takeOffer.fundsBox.title=Fund your trade -takeOffer.fundsBox.isOfferAvailable=Check if offer is available ... +takeOffer.fundsBox.isOfferAvailable=Check if offerPayload is available ... takeOffer.fundsBox.totalsNeeded=Funds needed: # TODO remove takeOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above takeOffer.fundsBox.address=Trade wallet address: takeOffer.fundsBox.balance=Trade wallet balance: -# TODO remove takeOffer.fundsBox.buy.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.buy.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid in to a locked deposit address. At the end of a successful trade you will get back your security deposit and the bitcoin amount you sold will be transferred \ to the BTC buyer. -# TODO remove takeOffer.fundsBox.sell.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.sell.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid into a locked deposit address. At the end of a successful trade you will get back your security deposit. takeOffer.fundsBox.tradeAmount=Amount to sell: takeOffer.fundsBox.securityDeposit=Security deposit: -takeOffer.fundsBox.offerFee=Take offer fee: +takeOffer.fundsBox.offerFee=Take offerPayload fee: takeOffer.fundsBox.networkFee=Mining fee: takeOffer.fundsBox.total=Total: # TODO remove takeOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove takeOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove takeOffer.fundsBox.takeOffer=Take offer -takeOffer.fundsBox.takeOfferSpinnerInfo=Take offer in progress ... +# TODO remove takeOffer.fundsBox.takeOffer=Take offerPayload +takeOffer.fundsBox.takeOfferSpinnerInfo=Take offerPayload in progress ... takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.title=Advanced settings @@ -197,12 +197,12 @@ takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove takeOffer.advancedBox.county=Payments account country: -# TODO remove takeOffer.advancedBox.info=These are the offer restrictions your trading partner has defined in his offer. \ +# TODO remove takeOffer.advancedBox.info=These are the offerPayload restrictions your trading partner has defined in his offerPayload. \ Your settings match those constraints and you are able to trade with him. -takeOffer.success.headline=You have successfully taken an offer. +takeOffer.success.headline=You have successfully taken an offerPayload. takeOffer.success.info=You can see the status of your trade at the \"Portfolio\" screen under \"Open trades\". -takeOffer.error.message=An error occurred when taking the offer.\n\n{0} +takeOffer.error.message=An error occurred when taking the offerPayload.\n\n{0} # Payment methods # remove N/A=Not available diff --git a/common/src/main/resources/i18n/in_dev/displayStrings_kr.properties b/common/src/main/resources/i18n/in_dev/displayStrings_kr.properties index a27e329c5c..753c534c11 100644 --- a/common/src/main/resources/i18n/in_dev/displayStrings_kr.properties +++ b/common/src/main/resources/i18n/in_dev/displayStrings_kr.properties @@ -93,42 +93,42 @@ validation.bankIdNumber={0} must consist of {1} numbers. validation.accountNr=Account number must consist of {0} numbers. validation.accountNrChars=Account number must consist of {0} characters. -# Create offer +# Create offerPayload createOffer.amount.prompt=Enter amount in BTC createOffer.price.prompt=Enter price createOffer.volume.prompt=Enter amount in {0} # TODO remove createOffer.minAmount.prompt=Enter min. amount -# TODO remove createOffer.amountPriceBox.title=Create your offer +# TODO remove createOffer.amountPriceBox.title=Create your offerPayload createOffer.amountPriceBox.amountDescription=Amount of bitcoin to {0} createOffer.amountPriceBox.priceDescriptionFiat=Fixed price per {0} createOffer.amountPriceBox.buy.volumeDescription=Amount in {0} to spend createOffer.amountPriceBox.sell.volumeDescription=Amount in {0} to receive createOffer.amountPriceBox.minAmountDescription=Minimum amount of BTC -# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. -# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. +# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. +# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. # TODO remove createOffer.amountPriceBox.next=Next step # TODO remove createOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. # TODO remove createOffer.amountPriceBox.warning.invalidFiatDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted. # TODO remove createOffer.amountPriceBox.warning.adjustedVolume=The total volume you have entered leads to invalid fractional bitcoin amounts. The amount has been adjusted and a new total volume be calculated from it. -createOffer.amountPriceBox.error.message=An error occurred when placing the offer:\n\n{0} +createOffer.amountPriceBox.error.message=An error occurred when placing the offerPayload:\n\n{0} # TODO remove createOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount. # TODO remove createOffer.validation.minAmountLargerThanAmount=Minimum amount cannot be larger than amount. -createOffer.fundsBox.title=Fund your offer +createOffer.fundsBox.title=Fund your offerPayload createOffer.fundsBox.totalsNeeded=Funds needed: createOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above createOffer.fundsBox.address=Trade wallet address: createOffer.fundsBox.balance=Trade wallet balance: -# TODO remove createOffer.fundsBox.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offer gets executed. If you cancel your offer you can withdraw your funds from that trading wallet. The only payment made when placing an offer is the offer fee payment. https://bisq.io/faq/#6 +# TODO remove createOffer.fundsBox.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offerPayload gets executed. If you cancel your offerPayload you can withdraw your funds from that trading wallet. The only payment made when placing an offerPayload is the offerPayload fee payment. https://bisq.io/faq/#6 createOffer.fundsBox.tradeAmount=Trade amount: createOffer.fundsBox.securityDeposit=Security deposit: -createOffer.fundsBox.offerFee=Create offer fee: +createOffer.fundsBox.offerFee=Create offerPayload fee: createOffer.fundsBox.networkFee=Mining fee: createOffer.fundsBox.total=Total: # TODO remove createOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove createOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove createOffer.fundsBox.placeOffer=Place offer +# TODO remove createOffer.fundsBox.placeOffer=Place offerPayload createOffer.fundsBox.placeOfferSpinnerInfo=Offer publishing is in progress ... createOffer.fundsBox.paymentLabel=bisq trade with ID {0} @@ -139,20 +139,20 @@ createOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove createOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove createOffer.advancedBox.county=Payments account country: -# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offer restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). +# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offerPayload restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). -createOffer.success.headline=Your offer has been published +createOffer.success.headline=Your offerPayload has been published createOffer.success.info=You can manage your open offers in the \"Portfolio\" screen under \"My open offers\". -# TODO remove createOffer.error.message=An error occurred when placing the offer.\n\n{0} +# TODO remove createOffer.error.message=An error occurred when placing the offerPayload.\n\n{0} -# Take offer +# Take offerPayload takeOffer.amount.prompt=Enter amount in BTC # TODO remove takeOffer.price.prompt=Enter price # TODO remove takeOffer.volume.prompt=Enter amount in {0} # TODO remove takeOffer.minAmount.prompt=Enter min. amount -# TODO remove takeOffer.amountPriceBox.title=Take offer +# TODO remove takeOffer.amountPriceBox.title=Take offerPayload # TODO remove takeOffer.amountPriceBox.subTitle=Buy bitcoin takeOffer.amountPriceBox.buy.amountDescription=Amount of bitcoin to sell takeOffer.amountPriceBox.sell.amountDescription=Amount of bitcoin to buy @@ -164,30 +164,30 @@ takeOffer.amountPriceBox.amountRangeDescription=Possible amount range # TODO remove takeOffer.amountPriceBox.sell.info=Enter the amount of bitcoin you want to buy. You can choose an amount between the minimum amount and the amount. # TODO remove takeOffer.amountPriceBox.next=Next step takeOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. -takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offer. -takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offer. +takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offerPayload. +takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offerPayload. takeOffer.validation.amountLargerThanOfferAmountMinusFee=That input amount would create dust change for the BTC seller. takeOffer.fundsBox.title=Fund your trade -takeOffer.fundsBox.isOfferAvailable=Check if offer is available ... +takeOffer.fundsBox.isOfferAvailable=Check if offerPayload is available ... takeOffer.fundsBox.totalsNeeded=Funds needed: # TODO remove takeOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above takeOffer.fundsBox.address=Trade wallet address: takeOffer.fundsBox.balance=Trade wallet balance: -# TODO remove takeOffer.fundsBox.buy.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.buy.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid in to a locked deposit address. At the end of a successful trade you will get back your security deposit and the bitcoin amount you sold will be transferred \ to the BTC buyer. -# TODO remove takeOffer.fundsBox.sell.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.sell.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid into a locked deposit address. At the end of a successful trade you will get back your security deposit. takeOffer.fundsBox.tradeAmount=Amount to sell: takeOffer.fundsBox.securityDeposit=Security deposit: -takeOffer.fundsBox.offerFee=Take offer fee: +takeOffer.fundsBox.offerFee=Take offerPayload fee: takeOffer.fundsBox.networkFee=Mining fee: takeOffer.fundsBox.total=Total: # TODO remove takeOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove takeOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove takeOffer.fundsBox.takeOffer=Take offer -takeOffer.fundsBox.takeOfferSpinnerInfo=Take offer in progress ... +# TODO remove takeOffer.fundsBox.takeOffer=Take offerPayload +takeOffer.fundsBox.takeOfferSpinnerInfo=Take offerPayload in progress ... takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.title=Advanced settings @@ -197,12 +197,12 @@ takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove takeOffer.advancedBox.county=Payments account country: -# TODO remove takeOffer.advancedBox.info=These are the offer restrictions your trading partner has defined in his offer. \ +# TODO remove takeOffer.advancedBox.info=These are the offerPayload restrictions your trading partner has defined in his offerPayload. \ Your settings match those constraints and you are able to trade with him. -takeOffer.success.headline=You have successfully taken an offer. +takeOffer.success.headline=You have successfully taken an offerPayload. takeOffer.success.info=You can see the status of your trade at the \"Portfolio\" screen under \"Open trades\". -takeOffer.error.message=An error occurred when taking the offer.\n\n{0} +takeOffer.error.message=An error occurred when taking the offerPayload.\n\n{0} # Payment methods # remove N/A=Not available diff --git a/common/src/main/resources/i18n/in_dev/displayStrings_kz.properties b/common/src/main/resources/i18n/in_dev/displayStrings_kz.properties index 8aa09d32b6..c4517feead 100644 --- a/common/src/main/resources/i18n/in_dev/displayStrings_kz.properties +++ b/common/src/main/resources/i18n/in_dev/displayStrings_kz.properties @@ -93,42 +93,42 @@ validation.bankIdNumber={0} must consist of {1} numbers. validation.accountNr=Account number must consist of {0} numbers. validation.accountNrChars=Account number must consist of {0} characters. -# Create offer +# Create offerPayload createOffer.amount.prompt=Enter amount in BTC createOffer.price.prompt=Enter price createOffer.volume.prompt=Enter amount in {0} # TODO remove createOffer.minAmount.prompt=Enter min. amount -# TODO remove createOffer.amountPriceBox.title=Create your offer +# TODO remove createOffer.amountPriceBox.title=Create your offerPayload createOffer.amountPriceBox.amountDescription=Amount of bitcoin to {0} createOffer.amountPriceBox.priceDescriptionFiat=Fixed price per {0} createOffer.amountPriceBox.buy.volumeDescription=Amount in {0} to spend createOffer.amountPriceBox.sell.volumeDescription=Amount in {0} to receive createOffer.amountPriceBox.minAmountDescription=Minimum amount of BTC -# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. -# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. +# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. +# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. # TODO remove createOffer.amountPriceBox.next=Next step # TODO remove createOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. # TODO remove createOffer.amountPriceBox.warning.invalidFiatDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted. # TODO remove createOffer.amountPriceBox.warning.adjustedVolume=The total volume you have entered leads to invalid fractional bitcoin amounts. The amount has been adjusted and a new total volume be calculated from it. -createOffer.amountPriceBox.error.message=An error occurred when placing the offer:\n\n{0} +createOffer.amountPriceBox.error.message=An error occurred when placing the offerPayload:\n\n{0} # TODO remove createOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount. # TODO remove createOffer.validation.minAmountLargerThanAmount=Minimum amount cannot be larger than amount. -createOffer.fundsBox.title=Fund your offer +createOffer.fundsBox.title=Fund your offerPayload createOffer.fundsBox.totalsNeeded=Funds needed: createOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above createOffer.fundsBox.address=Trade wallet address: createOffer.fundsBox.balance=Trade wallet balance: -# TODO remove createOffer.fundsBox.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offer gets executed. If you cancel your offer you can withdraw your funds from that trading wallet. The only payment made when placing an offer is the offer fee payment. https://bisq.io/faq/#6 +# TODO remove createOffer.fundsBox.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offerPayload gets executed. If you cancel your offerPayload you can withdraw your funds from that trading wallet. The only payment made when placing an offerPayload is the offerPayload fee payment. https://bisq.io/faq/#6 createOffer.fundsBox.tradeAmount=Trade amount: createOffer.fundsBox.securityDeposit=Security deposit: -createOffer.fundsBox.offerFee=Create offer fee: +createOffer.fundsBox.offerFee=Create offerPayload fee: createOffer.fundsBox.networkFee=Mining fee: createOffer.fundsBox.total=Total: # TODO remove createOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove createOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove createOffer.fundsBox.placeOffer=Place offer +# TODO remove createOffer.fundsBox.placeOffer=Place offerPayload createOffer.fundsBox.placeOfferSpinnerInfo=Offer publishing is in progress ... createOffer.fundsBox.paymentLabel=bisq trade with ID {0} @@ -139,20 +139,20 @@ createOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove createOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove createOffer.advancedBox.county=Payments account country: -# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offer restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). +# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offerPayload restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). -createOffer.success.headline=Your offer has been published +createOffer.success.headline=Your offerPayload has been published createOffer.success.info=You can manage your open offers in the \"Portfolio\" screen under \"My open offers\". -# TODO remove createOffer.error.message=An error occurred when placing the offer.\n\n{0} +# TODO remove createOffer.error.message=An error occurred when placing the offerPayload.\n\n{0} -# Take offer +# Take offerPayload takeOffer.amount.prompt=Enter amount in BTC # TODO remove takeOffer.price.prompt=Enter price # TODO remove takeOffer.volume.prompt=Enter amount in {0} # TODO remove takeOffer.minAmount.prompt=Enter min. amount -# TODO remove takeOffer.amountPriceBox.title=Take offer +# TODO remove takeOffer.amountPriceBox.title=Take offerPayload # TODO remove takeOffer.amountPriceBox.subTitle=Buy bitcoin takeOffer.amountPriceBox.buy.amountDescription=Amount of bitcoin to sell takeOffer.amountPriceBox.sell.amountDescription=Amount of bitcoin to buy @@ -164,30 +164,30 @@ takeOffer.amountPriceBox.amountRangeDescription=Possible amount range # TODO remove takeOffer.amountPriceBox.sell.info=Enter the amount of bitcoin you want to buy. You can choose an amount between the minimum amount and the amount. # TODO remove takeOffer.amountPriceBox.next=Next step takeOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. -takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offer. -takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offer. +takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offerPayload. +takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offerPayload. takeOffer.validation.amountLargerThanOfferAmountMinusFee=That input amount would create dust change for the BTC seller. takeOffer.fundsBox.title=Fund your trade -takeOffer.fundsBox.isOfferAvailable=Check if offer is available ... +takeOffer.fundsBox.isOfferAvailable=Check if offerPayload is available ... takeOffer.fundsBox.totalsNeeded=Funds needed: # TODO remove takeOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above takeOffer.fundsBox.address=Trade wallet address: takeOffer.fundsBox.balance=Trade wallet balance: -# TODO remove takeOffer.fundsBox.buy.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.buy.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid in to a locked deposit address. At the end of a successful trade you will get back your security deposit and the bitcoin amount you sold will be transferred \ to the BTC buyer. -# TODO remove takeOffer.fundsBox.sell.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.sell.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid into a locked deposit address. At the end of a successful trade you will get back your security deposit. takeOffer.fundsBox.tradeAmount=Amount to sell: takeOffer.fundsBox.securityDeposit=Security deposit: -takeOffer.fundsBox.offerFee=Take offer fee: +takeOffer.fundsBox.offerFee=Take offerPayload fee: takeOffer.fundsBox.networkFee=Mining fee: takeOffer.fundsBox.total=Total: # TODO remove takeOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove takeOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove takeOffer.fundsBox.takeOffer=Take offer -takeOffer.fundsBox.takeOfferSpinnerInfo=Take offer in progress ... +# TODO remove takeOffer.fundsBox.takeOffer=Take offerPayload +takeOffer.fundsBox.takeOfferSpinnerInfo=Take offerPayload in progress ... takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.title=Advanced settings @@ -197,12 +197,12 @@ takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove takeOffer.advancedBox.county=Payments account country: -# TODO remove takeOffer.advancedBox.info=These are the offer restrictions your trading partner has defined in his offer. \ +# TODO remove takeOffer.advancedBox.info=These are the offerPayload restrictions your trading partner has defined in his offerPayload. \ Your settings match those constraints and you are able to trade with him. -takeOffer.success.headline=You have successfully taken an offer. +takeOffer.success.headline=You have successfully taken an offerPayload. takeOffer.success.info=You can see the status of your trade at the \"Portfolio\" screen under \"Open trades\". -takeOffer.error.message=An error occurred when taking the offer.\n\n{0} +takeOffer.error.message=An error occurred when taking the offerPayload.\n\n{0} # Payment methods # remove N/A=Not available diff --git a/common/src/main/resources/i18n/in_dev/displayStrings_lt.properties b/common/src/main/resources/i18n/in_dev/displayStrings_lt.properties index 821448b580..84c1b69bfa 100644 --- a/common/src/main/resources/i18n/in_dev/displayStrings_lt.properties +++ b/common/src/main/resources/i18n/in_dev/displayStrings_lt.properties @@ -93,42 +93,42 @@ validation.bankIdNumber={0} must consist of {1} numbers. validation.accountNr=Account number must consist of {0} numbers. validation.accountNrChars=Account number must consist of {0} characters. -# Create offer +# Create offerPayload createOffer.amount.prompt=Enter amount in BTC createOffer.price.prompt=Enter price createOffer.volume.prompt=Enter amount in {0} # TODO remove createOffer.minAmount.prompt=Enter min. amount -# TODO remove createOffer.amountPriceBox.title=Create your offer +# TODO remove createOffer.amountPriceBox.title=Create your offerPayload createOffer.amountPriceBox.amountDescription=Amount of bitcoin to {0} createOffer.amountPriceBox.priceDescriptionFiat=Fixed price per {0} createOffer.amountPriceBox.buy.volumeDescription=Amount in {0} to spend createOffer.amountPriceBox.sell.volumeDescription=Amount in {0} to receive createOffer.amountPriceBox.minAmountDescription=Minimum amount of BTC -# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. -# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. +# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. +# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. # TODO remove createOffer.amountPriceBox.next=Next step # TODO remove createOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. # TODO remove createOffer.amountPriceBox.warning.invalidFiatDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted. # TODO remove createOffer.amountPriceBox.warning.adjustedVolume=The total volume you have entered leads to invalid fractional bitcoin amounts. The amount has been adjusted and a new total volume be calculated from it. -createOffer.amountPriceBox.error.message=An error occurred when placing the offer:\n\n{0} +createOffer.amountPriceBox.error.message=An error occurred when placing the offerPayload:\n\n{0} # TODO remove createOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount. # TODO remove createOffer.validation.minAmountLargerThanAmount=Minimum amount cannot be larger than amount. -createOffer.fundsBox.title=Fund your offer +createOffer.fundsBox.title=Fund your offerPayload createOffer.fundsBox.totalsNeeded=Funds needed: createOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above createOffer.fundsBox.address=Trade wallet address: createOffer.fundsBox.balance=Trade wallet balance: -# TODO remove createOffer.fundsBox.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offer gets executed. If you cancel your offer you can withdraw your funds from that trading wallet. The only payment made when placing an offer is the offer fee payment. https://bisq.io/faq/#6 +# TODO remove createOffer.fundsBox.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offerPayload gets executed. If you cancel your offerPayload you can withdraw your funds from that trading wallet. The only payment made when placing an offerPayload is the offerPayload fee payment. https://bisq.io/faq/#6 createOffer.fundsBox.tradeAmount=Trade amount: createOffer.fundsBox.securityDeposit=Security deposit: -createOffer.fundsBox.offerFee=Create offer fee: +createOffer.fundsBox.offerFee=Create offerPayload fee: createOffer.fundsBox.networkFee=Mining fee: createOffer.fundsBox.total=Total: # TODO remove createOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove createOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove createOffer.fundsBox.placeOffer=Place offer +# TODO remove createOffer.fundsBox.placeOffer=Place offerPayload createOffer.fundsBox.placeOfferSpinnerInfo=Offer publishing is in progress ... createOffer.fundsBox.paymentLabel=bisq trade with ID {0} @@ -139,20 +139,20 @@ createOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove createOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove createOffer.advancedBox.county=Payments account country: -# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offer restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). +# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offerPayload restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). -createOffer.success.headline=Your offer has been published +createOffer.success.headline=Your offerPayload has been published createOffer.success.info=You can manage your open offers in the \"Portfolio\" screen under \"My open offers\". -# TODO remove createOffer.error.message=An error occurred when placing the offer.\n\n{0} +# TODO remove createOffer.error.message=An error occurred when placing the offerPayload.\n\n{0} -# Take offer +# Take offerPayload takeOffer.amount.prompt=Enter amount in BTC # TODO remove takeOffer.price.prompt=Enter price # TODO remove takeOffer.volume.prompt=Enter amount in {0} # TODO remove takeOffer.minAmount.prompt=Enter min. amount -# TODO remove takeOffer.amountPriceBox.title=Take offer +# TODO remove takeOffer.amountPriceBox.title=Take offerPayload # TODO remove takeOffer.amountPriceBox.subTitle=Buy bitcoin takeOffer.amountPriceBox.buy.amountDescription=Amount of bitcoin to sell takeOffer.amountPriceBox.sell.amountDescription=Amount of bitcoin to buy @@ -164,30 +164,30 @@ takeOffer.amountPriceBox.amountRangeDescription=Possible amount range # TODO remove takeOffer.amountPriceBox.sell.info=Enter the amount of bitcoin you want to buy. You can choose an amount between the minimum amount and the amount. # TODO remove takeOffer.amountPriceBox.next=Next step takeOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. -takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offer. -takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offer. +takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offerPayload. +takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offerPayload. takeOffer.validation.amountLargerThanOfferAmountMinusFee=That input amount would create dust change for the BTC seller. takeOffer.fundsBox.title=Fund your trade -takeOffer.fundsBox.isOfferAvailable=Check if offer is available ... +takeOffer.fundsBox.isOfferAvailable=Check if offerPayload is available ... takeOffer.fundsBox.totalsNeeded=Funds needed: # TODO remove takeOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above takeOffer.fundsBox.address=Trade wallet address: takeOffer.fundsBox.balance=Trade wallet balance: -# TODO remove takeOffer.fundsBox.buy.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.buy.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid in to a locked deposit address. At the end of a successful trade you will get back your security deposit and the bitcoin amount you sold will be transferred \ to the BTC buyer. -# TODO remove takeOffer.fundsBox.sell.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.sell.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid into a locked deposit address. At the end of a successful trade you will get back your security deposit. takeOffer.fundsBox.tradeAmount=Amount to sell: takeOffer.fundsBox.securityDeposit=Security deposit: -takeOffer.fundsBox.offerFee=Take offer fee: +takeOffer.fundsBox.offerFee=Take offerPayload fee: takeOffer.fundsBox.networkFee=Mining fee: takeOffer.fundsBox.total=Total: # TODO remove takeOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove takeOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove takeOffer.fundsBox.takeOffer=Take offer -takeOffer.fundsBox.takeOfferSpinnerInfo=Take offer in progress ... +# TODO remove takeOffer.fundsBox.takeOffer=Take offerPayload +takeOffer.fundsBox.takeOfferSpinnerInfo=Take offerPayload in progress ... takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.title=Advanced settings @@ -197,12 +197,12 @@ takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove takeOffer.advancedBox.county=Payments account country: -# TODO remove takeOffer.advancedBox.info=These are the offer restrictions your trading partner has defined in his offer. \ +# TODO remove takeOffer.advancedBox.info=These are the offerPayload restrictions your trading partner has defined in his offerPayload. \ Your settings match those constraints and you are able to trade with him. -takeOffer.success.headline=You have successfully taken an offer. +takeOffer.success.headline=You have successfully taken an offerPayload. takeOffer.success.info=You can see the status of your trade at the \"Portfolio\" screen under \"Open trades\". -takeOffer.error.message=An error occurred when taking the offer.\n\n{0} +takeOffer.error.message=An error occurred when taking the offerPayload.\n\n{0} # Payment methods # remove N/A=Not available diff --git a/common/src/main/resources/i18n/in_dev/displayStrings_my.properties b/common/src/main/resources/i18n/in_dev/displayStrings_my.properties index 53d53b57eb..2010453865 100644 --- a/common/src/main/resources/i18n/in_dev/displayStrings_my.properties +++ b/common/src/main/resources/i18n/in_dev/displayStrings_my.properties @@ -93,42 +93,42 @@ validation.bankIdNumber={0} must consist of {1} numbers. validation.accountNr=Account number must consist of {0} numbers. validation.accountNrChars=Account number must consist of {0} characters. -# Create offer +# Create offerPayload createOffer.amount.prompt=Enter amount in BTC createOffer.price.prompt=Enter price createOffer.volume.prompt=Enter amount in {0} # TODO remove createOffer.minAmount.prompt=Enter min. amount -# TODO remove createOffer.amountPriceBox.title=Create your offer +# TODO remove createOffer.amountPriceBox.title=Create your offerPayload createOffer.amountPriceBox.amountDescription=Amount of bitcoin to {0} createOffer.amountPriceBox.priceDescriptionFiat=Fixed price per {0} createOffer.amountPriceBox.buy.volumeDescription=Amount in {0} to spend createOffer.amountPriceBox.sell.volumeDescription=Amount in {0} to receive createOffer.amountPriceBox.minAmountDescription=Minimum amount of BTC -# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. -# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. +# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. +# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. # TODO remove createOffer.amountPriceBox.next=Next step # TODO remove createOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. # TODO remove createOffer.amountPriceBox.warning.invalidFiatDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted. # TODO remove createOffer.amountPriceBox.warning.adjustedVolume=The total volume you have entered leads to invalid fractional bitcoin amounts. The amount has been adjusted and a new total volume be calculated from it. -createOffer.amountPriceBox.error.message=An error occurred when placing the offer:\n\n{0} +createOffer.amountPriceBox.error.message=An error occurred when placing the offerPayload:\n\n{0} # TODO remove createOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount. # TODO remove createOffer.validation.minAmountLargerThanAmount=Minimum amount cannot be larger than amount. -createOffer.fundsBox.title=Fund your offer +createOffer.fundsBox.title=Fund your offerPayload createOffer.fundsBox.totalsNeeded=Funds needed: createOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above createOffer.fundsBox.address=Trade wallet address: createOffer.fundsBox.balance=Trade wallet balance: -# TODO remove createOffer.fundsBox.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offer gets executed. If you cancel your offer you can withdraw your funds from that trading wallet. The only payment made when placing an offer is the offer fee payment. https://bisq.io/faq/#6 +# TODO remove createOffer.fundsBox.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offerPayload gets executed. If you cancel your offerPayload you can withdraw your funds from that trading wallet. The only payment made when placing an offerPayload is the offerPayload fee payment. https://bisq.io/faq/#6 createOffer.fundsBox.tradeAmount=Trade amount: createOffer.fundsBox.securityDeposit=Security deposit: -createOffer.fundsBox.offerFee=Create offer fee: +createOffer.fundsBox.offerFee=Create offerPayload fee: createOffer.fundsBox.networkFee=Mining fee: createOffer.fundsBox.total=Total: # TODO remove createOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove createOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove createOffer.fundsBox.placeOffer=Place offer +# TODO remove createOffer.fundsBox.placeOffer=Place offerPayload createOffer.fundsBox.placeOfferSpinnerInfo=Offer publishing is in progress ... createOffer.fundsBox.paymentLabel=bisq trade with ID {0} @@ -139,20 +139,20 @@ createOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove createOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove createOffer.advancedBox.county=Payments account country: -# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offer restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). +# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offerPayload restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). -createOffer.success.headline=Your offer has been published +createOffer.success.headline=Your offerPayload has been published createOffer.success.info=You can manage your open offers in the \"Portfolio\" screen under \"My open offers\". -# TODO remove createOffer.error.message=An error occurred when placing the offer.\n\n{0} +# TODO remove createOffer.error.message=An error occurred when placing the offerPayload.\n\n{0} -# Take offer +# Take offerPayload takeOffer.amount.prompt=Enter amount in BTC # TODO remove takeOffer.price.prompt=Enter price # TODO remove takeOffer.volume.prompt=Enter amount in {0} # TODO remove takeOffer.minAmount.prompt=Enter min. amount -# TODO remove takeOffer.amountPriceBox.title=Take offer +# TODO remove takeOffer.amountPriceBox.title=Take offerPayload # TODO remove takeOffer.amountPriceBox.subTitle=Buy bitcoin takeOffer.amountPriceBox.buy.amountDescription=Amount of bitcoin to sell takeOffer.amountPriceBox.sell.amountDescription=Amount of bitcoin to buy @@ -164,30 +164,30 @@ takeOffer.amountPriceBox.amountRangeDescription=Possible amount range # TODO remove takeOffer.amountPriceBox.sell.info=Enter the amount of bitcoin you want to buy. You can choose an amount between the minimum amount and the amount. # TODO remove takeOffer.amountPriceBox.next=Next step takeOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. -takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offer. -takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offer. +takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offerPayload. +takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offerPayload. takeOffer.validation.amountLargerThanOfferAmountMinusFee=That input amount would create dust change for the BTC seller. takeOffer.fundsBox.title=Fund your trade -takeOffer.fundsBox.isOfferAvailable=Check if offer is available ... +takeOffer.fundsBox.isOfferAvailable=Check if offerPayload is available ... takeOffer.fundsBox.totalsNeeded=Funds needed: # TODO remove takeOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above takeOffer.fundsBox.address=Trade wallet address: takeOffer.fundsBox.balance=Trade wallet balance: -# TODO remove takeOffer.fundsBox.buy.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.buy.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid in to a locked deposit address. At the end of a successful trade you will get back your security deposit and the bitcoin amount you sold will be transferred \ to the BTC buyer. -# TODO remove takeOffer.fundsBox.sell.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.sell.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid into a locked deposit address. At the end of a successful trade you will get back your security deposit. takeOffer.fundsBox.tradeAmount=Amount to sell: takeOffer.fundsBox.securityDeposit=Security deposit: -takeOffer.fundsBox.offerFee=Take offer fee: +takeOffer.fundsBox.offerFee=Take offerPayload fee: takeOffer.fundsBox.networkFee=Mining fee: takeOffer.fundsBox.total=Total: # TODO remove takeOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove takeOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove takeOffer.fundsBox.takeOffer=Take offer -takeOffer.fundsBox.takeOfferSpinnerInfo=Take offer in progress ... +# TODO remove takeOffer.fundsBox.takeOffer=Take offerPayload +takeOffer.fundsBox.takeOfferSpinnerInfo=Take offerPayload in progress ... takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.title=Advanced settings @@ -197,12 +197,12 @@ takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove takeOffer.advancedBox.county=Payments account country: -# TODO remove takeOffer.advancedBox.info=These are the offer restrictions your trading partner has defined in his offer. \ +# TODO remove takeOffer.advancedBox.info=These are the offerPayload restrictions your trading partner has defined in his offerPayload. \ Your settings match those constraints and you are able to trade with him. -takeOffer.success.headline=You have successfully taken an offer. +takeOffer.success.headline=You have successfully taken an offerPayload. takeOffer.success.info=You can see the status of your trade at the \"Portfolio\" screen under \"Open trades\". -takeOffer.error.message=An error occurred when taking the offer.\n\n{0} +takeOffer.error.message=An error occurred when taking the offerPayload.\n\n{0} # Payment methods # remove N/A=Not available diff --git a/common/src/main/resources/i18n/in_dev/displayStrings_nl.properties b/common/src/main/resources/i18n/in_dev/displayStrings_nl.properties index 0fa004e4bb..4e9128bbfa 100644 --- a/common/src/main/resources/i18n/in_dev/displayStrings_nl.properties +++ b/common/src/main/resources/i18n/in_dev/displayStrings_nl.properties @@ -93,42 +93,42 @@ validation.bankIdNumber={0} must consist of {1} numbers. validation.accountNr=Account number must consist of {0} numbers. validation.accountNrChars=Account number must consist of {0} characters. -# Create offer +# Create offerPayload createOffer.amount.prompt=Enter amount in BTC createOffer.price.prompt=Enter price createOffer.volume.prompt=Enter amount in {0} # TODO remove createOffer.minAmount.prompt=Enter min. amount -# TODO remove createOffer.amountPriceBox.title=Create your offer +# TODO remove createOffer.amountPriceBox.title=Create your offerPayload createOffer.amountPriceBox.amountDescription=Amount of bitcoin to {0} createOffer.amountPriceBox.priceDescriptionFiat=Fixed price per {0} createOffer.amountPriceBox.buy.volumeDescription=Amount in {0} to spend createOffer.amountPriceBox.sell.volumeDescription=Amount in {0} to receive createOffer.amountPriceBox.minAmountDescription=Minimum amount of BTC -# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. -# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. +# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. +# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. # TODO remove createOffer.amountPriceBox.next=Next step # TODO remove createOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. # TODO remove createOffer.amountPriceBox.warning.invalidFiatDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted. # TODO remove createOffer.amountPriceBox.warning.adjustedVolume=The total volume you have entered leads to invalid fractional bitcoin amounts. The amount has been adjusted and a new total volume be calculated from it. -createOffer.amountPriceBox.error.message=An error occurred when placing the offer:\n\n{0} +createOffer.amountPriceBox.error.message=An error occurred when placing the offerPayload:\n\n{0} # TODO remove createOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount. # TODO remove createOffer.validation.minAmountLargerThanAmount=Minimum amount cannot be larger than amount. -createOffer.fundsBox.title=Fund your offer +createOffer.fundsBox.title=Fund your offerPayload createOffer.fundsBox.totalsNeeded=Funds needed: createOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above createOffer.fundsBox.address=Trade wallet address: createOffer.fundsBox.balance=Trade wallet balance: -# TODO remove createOffer.fundsBox.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offer gets executed. If you cancel your offer you can withdraw your funds from that trading wallet. The only payment made when placing an offer is the offer fee payment. https://bisq.io/faq/#6 +# TODO remove createOffer.fundsBox.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offerPayload gets executed. If you cancel your offerPayload you can withdraw your funds from that trading wallet. The only payment made when placing an offerPayload is the offerPayload fee payment. https://bisq.io/faq/#6 createOffer.fundsBox.tradeAmount=Trade amount: createOffer.fundsBox.securityDeposit=Security deposit: -createOffer.fundsBox.offerFee=Create offer fee: +createOffer.fundsBox.offerFee=Create offerPayload fee: createOffer.fundsBox.networkFee=Mining fee: createOffer.fundsBox.total=Total: # TODO remove createOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove createOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove createOffer.fundsBox.placeOffer=Place offer +# TODO remove createOffer.fundsBox.placeOffer=Place offerPayload createOffer.fundsBox.placeOfferSpinnerInfo=Offer publishing is in progress ... createOffer.fundsBox.paymentLabel=bisq trade with ID {0} @@ -139,20 +139,20 @@ createOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove createOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove createOffer.advancedBox.county=Payments account country: -# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offer restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). +# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offerPayload restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). -createOffer.success.headline=Your offer has been published +createOffer.success.headline=Your offerPayload has been published createOffer.success.info=You can manage your open offers in the \"Portfolio\" screen under \"My open offers\". -# TODO remove createOffer.error.message=An error occurred when placing the offer.\n\n{0} +# TODO remove createOffer.error.message=An error occurred when placing the offerPayload.\n\n{0} -# Take offer +# Take offerPayload takeOffer.amount.prompt=Enter amount in BTC # TODO remove takeOffer.price.prompt=Enter price # TODO remove takeOffer.volume.prompt=Enter amount in {0} # TODO remove takeOffer.minAmount.prompt=Enter min. amount -# TODO remove takeOffer.amountPriceBox.title=Take offer +# TODO remove takeOffer.amountPriceBox.title=Take offerPayload # TODO remove takeOffer.amountPriceBox.subTitle=Buy bitcoin takeOffer.amountPriceBox.buy.amountDescription=Amount of bitcoin to sell takeOffer.amountPriceBox.sell.amountDescription=Amount of bitcoin to buy @@ -164,30 +164,30 @@ takeOffer.amountPriceBox.amountRangeDescription=Possible amount range # TODO remove takeOffer.amountPriceBox.sell.info=Enter the amount of bitcoin you want to buy. You can choose an amount between the minimum amount and the amount. # TODO remove takeOffer.amountPriceBox.next=Next step takeOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. -takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offer. -takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offer. +takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offerPayload. +takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offerPayload. takeOffer.validation.amountLargerThanOfferAmountMinusFee=That input amount would create dust change for the BTC seller. takeOffer.fundsBox.title=Fund your trade -takeOffer.fundsBox.isOfferAvailable=Check if offer is available ... +takeOffer.fundsBox.isOfferAvailable=Check if offerPayload is available ... takeOffer.fundsBox.totalsNeeded=Funds needed: # TODO remove takeOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above takeOffer.fundsBox.address=Trade wallet address: takeOffer.fundsBox.balance=Trade wallet balance: -# TODO remove takeOffer.fundsBox.buy.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.buy.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid in to a locked deposit address. At the end of a successful trade you will get back your security deposit and the bitcoin amount you sold will be transferred \ to the BTC buyer. -# TODO remove takeOffer.fundsBox.sell.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.sell.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid into a locked deposit address. At the end of a successful trade you will get back your security deposit. takeOffer.fundsBox.tradeAmount=Amount to sell: takeOffer.fundsBox.securityDeposit=Security deposit: -takeOffer.fundsBox.offerFee=Take offer fee: +takeOffer.fundsBox.offerFee=Take offerPayload fee: takeOffer.fundsBox.networkFee=Mining fee: takeOffer.fundsBox.total=Total: # TODO remove takeOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove takeOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove takeOffer.fundsBox.takeOffer=Take offer -takeOffer.fundsBox.takeOfferSpinnerInfo=Take offer in progress ... +# TODO remove takeOffer.fundsBox.takeOffer=Take offerPayload +takeOffer.fundsBox.takeOfferSpinnerInfo=Take offerPayload in progress ... takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.title=Advanced settings @@ -197,12 +197,12 @@ takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove takeOffer.advancedBox.county=Payments account country: -# TODO remove takeOffer.advancedBox.info=These are the offer restrictions your trading partner has defined in his offer. \ +# TODO remove takeOffer.advancedBox.info=These are the offerPayload restrictions your trading partner has defined in his offerPayload. \ Your settings match those constraints and you are able to trade with him. -takeOffer.success.headline=You have successfully taken an offer. +takeOffer.success.headline=You have successfully taken an offerPayload. takeOffer.success.info=You can see the status of your trade at the \"Portfolio\" screen under \"Open trades\". -takeOffer.error.message=An error occurred when taking the offer.\n\n{0} +takeOffer.error.message=An error occurred when taking the offerPayload.\n\n{0} # Payment methods # remove N/A=Not available diff --git a/common/src/main/resources/i18n/in_dev/displayStrings_no.properties b/common/src/main/resources/i18n/in_dev/displayStrings_no.properties index 1f53facc13..6110293af5 100644 --- a/common/src/main/resources/i18n/in_dev/displayStrings_no.properties +++ b/common/src/main/resources/i18n/in_dev/displayStrings_no.properties @@ -93,42 +93,42 @@ validation.bankIdNumber={0} must consist of {1} numbers. validation.accountNr=Account number must consist of {0} numbers. validation.accountNrChars=Account number must consist of {0} characters. -# Create offer +# Create offerPayload createOffer.amount.prompt=Enter amount in BTC createOffer.price.prompt=Enter price createOffer.volume.prompt=Enter amount in {0} # TODO remove createOffer.minAmount.prompt=Enter min. amount -# TODO remove createOffer.amountPriceBox.title=Create your offer +# TODO remove createOffer.amountPriceBox.title=Create your offerPayload createOffer.amountPriceBox.amountDescription=Amount of bitcoin to {0} createOffer.amountPriceBox.priceDescriptionFiat=Fixed price per {0} createOffer.amountPriceBox.buy.volumeDescription=Amount in {0} to spend createOffer.amountPriceBox.sell.volumeDescription=Amount in {0} to receive createOffer.amountPriceBox.minAmountDescription=Minimum amount of BTC -# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. -# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. +# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. +# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. # TODO remove createOffer.amountPriceBox.next=Next step # TODO remove createOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. # TODO remove createOffer.amountPriceBox.warning.invalidFiatDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted. # TODO remove createOffer.amountPriceBox.warning.adjustedVolume=The total volume you have entered leads to invalid fractional bitcoin amounts. The amount has been adjusted and a new total volume be calculated from it. -createOffer.amountPriceBox.error.message=An error occurred when placing the offer:\n\n{0} +createOffer.amountPriceBox.error.message=An error occurred when placing the offerPayload:\n\n{0} # TODO remove createOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount. # TODO remove createOffer.validation.minAmountLargerThanAmount=Minimum amount cannot be larger than amount. -createOffer.fundsBox.title=Fund your offer +createOffer.fundsBox.title=Fund your offerPayload createOffer.fundsBox.totalsNeeded=Funds needed: createOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above createOffer.fundsBox.address=Trade wallet address: createOffer.fundsBox.balance=Trade wallet balance: -# TODO remove createOffer.fundsBox.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offer gets executed. If you cancel your offer you can withdraw your funds from that trading wallet. The only payment made when placing an offer is the offer fee payment. https://bisq.io/faq/#6 +# TODO remove createOffer.fundsBox.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offerPayload gets executed. If you cancel your offerPayload you can withdraw your funds from that trading wallet. The only payment made when placing an offerPayload is the offerPayload fee payment. https://bisq.io/faq/#6 createOffer.fundsBox.tradeAmount=Trade amount: createOffer.fundsBox.securityDeposit=Security deposit: -createOffer.fundsBox.offerFee=Create offer fee: +createOffer.fundsBox.offerFee=Create offerPayload fee: createOffer.fundsBox.networkFee=Mining fee: createOffer.fundsBox.total=Total: # TODO remove createOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove createOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove createOffer.fundsBox.placeOffer=Place offer +# TODO remove createOffer.fundsBox.placeOffer=Place offerPayload createOffer.fundsBox.placeOfferSpinnerInfo=Offer publishing is in progress ... createOffer.fundsBox.paymentLabel=bisq trade with ID {0} @@ -139,20 +139,20 @@ createOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove createOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove createOffer.advancedBox.county=Payments account country: -# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offer restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). +# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offerPayload restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). -createOffer.success.headline=Your offer has been published +createOffer.success.headline=Your offerPayload has been published createOffer.success.info=You can manage your open offers in the \"Portfolio\" screen under \"My open offers\". -# TODO remove createOffer.error.message=An error occurred when placing the offer.\n\n{0} +# TODO remove createOffer.error.message=An error occurred when placing the offerPayload.\n\n{0} -# Take offer +# Take offerPayload takeOffer.amount.prompt=Enter amount in BTC # TODO remove takeOffer.price.prompt=Enter price # TODO remove takeOffer.volume.prompt=Enter amount in {0} # TODO remove takeOffer.minAmount.prompt=Enter min. amount -# TODO remove takeOffer.amountPriceBox.title=Take offer +# TODO remove takeOffer.amountPriceBox.title=Take offerPayload # TODO remove takeOffer.amountPriceBox.subTitle=Buy bitcoin takeOffer.amountPriceBox.buy.amountDescription=Amount of bitcoin to sell takeOffer.amountPriceBox.sell.amountDescription=Amount of bitcoin to buy @@ -164,30 +164,30 @@ takeOffer.amountPriceBox.amountRangeDescription=Possible amount range # TODO remove takeOffer.amountPriceBox.sell.info=Enter the amount of bitcoin you want to buy. You can choose an amount between the minimum amount and the amount. # TODO remove takeOffer.amountPriceBox.next=Next step takeOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. -takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offer. -takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offer. +takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offerPayload. +takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offerPayload. takeOffer.validation.amountLargerThanOfferAmountMinusFee=That input amount would create dust change for the BTC seller. takeOffer.fundsBox.title=Fund your trade -takeOffer.fundsBox.isOfferAvailable=Check if offer is available ... +takeOffer.fundsBox.isOfferAvailable=Check if offerPayload is available ... takeOffer.fundsBox.totalsNeeded=Funds needed: # TODO remove takeOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above takeOffer.fundsBox.address=Trade wallet address: takeOffer.fundsBox.balance=Trade wallet balance: -# TODO remove takeOffer.fundsBox.buy.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.buy.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid in to a locked deposit address. At the end of a successful trade you will get back your security deposit and the bitcoin amount you sold will be transferred \ to the BTC buyer. -# TODO remove takeOffer.fundsBox.sell.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.sell.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid into a locked deposit address. At the end of a successful trade you will get back your security deposit. takeOffer.fundsBox.tradeAmount=Amount to sell: takeOffer.fundsBox.securityDeposit=Security deposit: -takeOffer.fundsBox.offerFee=Take offer fee: +takeOffer.fundsBox.offerFee=Take offerPayload fee: takeOffer.fundsBox.networkFee=Mining fee: takeOffer.fundsBox.total=Total: # TODO remove takeOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove takeOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove takeOffer.fundsBox.takeOffer=Take offer -takeOffer.fundsBox.takeOfferSpinnerInfo=Take offer in progress ... +# TODO remove takeOffer.fundsBox.takeOffer=Take offerPayload +takeOffer.fundsBox.takeOfferSpinnerInfo=Take offerPayload in progress ... takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.title=Advanced settings @@ -197,12 +197,12 @@ takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove takeOffer.advancedBox.county=Payments account country: -# TODO remove takeOffer.advancedBox.info=These are the offer restrictions your trading partner has defined in his offer. \ +# TODO remove takeOffer.advancedBox.info=These are the offerPayload restrictions your trading partner has defined in his offerPayload. \ Your settings match those constraints and you are able to trade with him. -takeOffer.success.headline=You have successfully taken an offer. +takeOffer.success.headline=You have successfully taken an offerPayload. takeOffer.success.info=You can see the status of your trade at the \"Portfolio\" screen under \"Open trades\". -takeOffer.error.message=An error occurred when taking the offer.\n\n{0} +takeOffer.error.message=An error occurred when taking the offerPayload.\n\n{0} # Payment methods # remove N/A=Not available diff --git a/common/src/main/resources/i18n/in_dev/displayStrings_nz.properties b/common/src/main/resources/i18n/in_dev/displayStrings_nz.properties index fa5a3b8272..8da7c919ed 100644 --- a/common/src/main/resources/i18n/in_dev/displayStrings_nz.properties +++ b/common/src/main/resources/i18n/in_dev/displayStrings_nz.properties @@ -93,42 +93,42 @@ validation.bankIdNumber={0} must consist of {1} numbers. validation.accountNr=Account number must consist of {0} numbers. validation.accountNrChars=Account number must consist of {0} characters. -# Create offer +# Create offerPayload createOffer.amount.prompt=Enter amount in BTC createOffer.price.prompt=Enter price createOffer.volume.prompt=Enter amount in {0} # TODO remove createOffer.minAmount.prompt=Enter min. amount -# TODO remove createOffer.amountPriceBox.title=Create your offer +# TODO remove createOffer.amountPriceBox.title=Create your offerPayload createOffer.amountPriceBox.amountDescription=Amount of bitcoin to {0} createOffer.amountPriceBox.priceDescriptionFiat=Fixed price per {0} createOffer.amountPriceBox.buy.volumeDescription=Amount in {0} to spend createOffer.amountPriceBox.sell.volumeDescription=Amount in {0} to receive createOffer.amountPriceBox.minAmountDescription=Minimum amount of BTC -# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. -# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. +# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. +# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. # TODO remove createOffer.amountPriceBox.next=Next step # TODO remove createOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. # TODO remove createOffer.amountPriceBox.warning.invalidFiatDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted. # TODO remove createOffer.amountPriceBox.warning.adjustedVolume=The total volume you have entered leads to invalid fractional bitcoin amounts. The amount has been adjusted and a new total volume be calculated from it. -createOffer.amountPriceBox.error.message=An error occurred when placing the offer:\n\n{0} +createOffer.amountPriceBox.error.message=An error occurred when placing the offerPayload:\n\n{0} # TODO remove createOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount. # TODO remove createOffer.validation.minAmountLargerThanAmount=Minimum amount cannot be larger than amount. -createOffer.fundsBox.title=Fund your offer +createOffer.fundsBox.title=Fund your offerPayload createOffer.fundsBox.totalsNeeded=Funds needed: createOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above createOffer.fundsBox.address=Trade wallet address: createOffer.fundsBox.balance=Trade wallet balance: -# TODO remove createOffer.fundsBox.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offer gets executed. If you cancel your offer you can withdraw your funds from that trading wallet. The only payment made when placing an offer is the offer fee payment. https://bisq.io/faq/#6 +# TODO remove createOffer.fundsBox.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offerPayload gets executed. If you cancel your offerPayload you can withdraw your funds from that trading wallet. The only payment made when placing an offerPayload is the offerPayload fee payment. https://bisq.io/faq/#6 createOffer.fundsBox.tradeAmount=Trade amount: createOffer.fundsBox.securityDeposit=Security deposit: -createOffer.fundsBox.offerFee=Create offer fee: +createOffer.fundsBox.offerFee=Create offerPayload fee: createOffer.fundsBox.networkFee=Mining fee: createOffer.fundsBox.total=Total: # TODO remove createOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove createOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove createOffer.fundsBox.placeOffer=Place offer +# TODO remove createOffer.fundsBox.placeOffer=Place offerPayload createOffer.fundsBox.placeOfferSpinnerInfo=Offer publishing is in progress ... createOffer.fundsBox.paymentLabel=bisq trade with ID {0} @@ -139,20 +139,20 @@ createOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove createOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove createOffer.advancedBox.county=Payments account country: -# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offer restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). +# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offerPayload restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). -createOffer.success.headline=Your offer has been published +createOffer.success.headline=Your offerPayload has been published createOffer.success.info=You can manage your open offers in the \"Portfolio\" screen under \"My open offers\". -# TODO remove createOffer.error.message=An error occurred when placing the offer.\n\n{0} +# TODO remove createOffer.error.message=An error occurred when placing the offerPayload.\n\n{0} -# Take offer +# Take offerPayload takeOffer.amount.prompt=Enter amount in BTC # TODO remove takeOffer.price.prompt=Enter price # TODO remove takeOffer.volume.prompt=Enter amount in {0} # TODO remove takeOffer.minAmount.prompt=Enter min. amount -# TODO remove takeOffer.amountPriceBox.title=Take offer +# TODO remove takeOffer.amountPriceBox.title=Take offerPayload # TODO remove takeOffer.amountPriceBox.subTitle=Buy bitcoin takeOffer.amountPriceBox.buy.amountDescription=Amount of bitcoin to sell takeOffer.amountPriceBox.sell.amountDescription=Amount of bitcoin to buy @@ -164,30 +164,30 @@ takeOffer.amountPriceBox.amountRangeDescription=Possible amount range # TODO remove takeOffer.amountPriceBox.sell.info=Enter the amount of bitcoin you want to buy. You can choose an amount between the minimum amount and the amount. # TODO remove takeOffer.amountPriceBox.next=Next step takeOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. -takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offer. -takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offer. +takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offerPayload. +takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offerPayload. takeOffer.validation.amountLargerThanOfferAmountMinusFee=That input amount would create dust change for the BTC seller. takeOffer.fundsBox.title=Fund your trade -takeOffer.fundsBox.isOfferAvailable=Check if offer is available ... +takeOffer.fundsBox.isOfferAvailable=Check if offerPayload is available ... takeOffer.fundsBox.totalsNeeded=Funds needed: # TODO remove takeOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above takeOffer.fundsBox.address=Trade wallet address: takeOffer.fundsBox.balance=Trade wallet balance: -# TODO remove takeOffer.fundsBox.buy.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.buy.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid in to a locked deposit address. At the end of a successful trade you will get back your security deposit and the bitcoin amount you sold will be transferred \ to the BTC buyer. -# TODO remove takeOffer.fundsBox.sell.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.sell.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid into a locked deposit address. At the end of a successful trade you will get back your security deposit. takeOffer.fundsBox.tradeAmount=Amount to sell: takeOffer.fundsBox.securityDeposit=Security deposit: -takeOffer.fundsBox.offerFee=Take offer fee: +takeOffer.fundsBox.offerFee=Take offerPayload fee: takeOffer.fundsBox.networkFee=Mining fee: takeOffer.fundsBox.total=Total: # TODO remove takeOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove takeOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove takeOffer.fundsBox.takeOffer=Take offer -takeOffer.fundsBox.takeOfferSpinnerInfo=Take offer in progress ... +# TODO remove takeOffer.fundsBox.takeOffer=Take offerPayload +takeOffer.fundsBox.takeOfferSpinnerInfo=Take offerPayload in progress ... takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.title=Advanced settings @@ -197,12 +197,12 @@ takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove takeOffer.advancedBox.county=Payments account country: -# TODO remove takeOffer.advancedBox.info=These are the offer restrictions your trading partner has defined in his offer. \ +# TODO remove takeOffer.advancedBox.info=These are the offerPayload restrictions your trading partner has defined in his offerPayload. \ Your settings match those constraints and you are able to trade with him. -takeOffer.success.headline=You have successfully taken an offer. +takeOffer.success.headline=You have successfully taken an offerPayload. takeOffer.success.info=You can see the status of your trade at the \"Portfolio\" screen under \"Open trades\". -takeOffer.error.message=An error occurred when taking the offer.\n\n{0} +takeOffer.error.message=An error occurred when taking the offerPayload.\n\n{0} # Payment methods # remove N/A=Not available diff --git a/common/src/main/resources/i18n/in_dev/displayStrings_ph.properties b/common/src/main/resources/i18n/in_dev/displayStrings_ph.properties index 8eb5c1cee1..9e44b29621 100644 --- a/common/src/main/resources/i18n/in_dev/displayStrings_ph.properties +++ b/common/src/main/resources/i18n/in_dev/displayStrings_ph.properties @@ -93,42 +93,42 @@ validation.bankIdNumber={0} must consist of {1} numbers. validation.accountNr=Account number must consist of {0} numbers. validation.accountNrChars=Account number must consist of {0} characters. -# Create offer +# Create offerPayload createOffer.amount.prompt=Enter amount in BTC createOffer.price.prompt=Enter price createOffer.volume.prompt=Enter amount in {0} # TODO remove createOffer.minAmount.prompt=Enter min. amount -# TODO remove createOffer.amountPriceBox.title=Create your offer +# TODO remove createOffer.amountPriceBox.title=Create your offerPayload createOffer.amountPriceBox.amountDescription=Amount of bitcoin to {0} createOffer.amountPriceBox.priceDescriptionFiat=Fixed price per {0} createOffer.amountPriceBox.buy.volumeDescription=Amount in {0} to spend createOffer.amountPriceBox.sell.volumeDescription=Amount in {0} to receive createOffer.amountPriceBox.minAmountDescription=Minimum amount of BTC -# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. -# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. +# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. +# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. # TODO remove createOffer.amountPriceBox.next=Next step # TODO remove createOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. # TODO remove createOffer.amountPriceBox.warning.invalidFiatDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted. # TODO remove createOffer.amountPriceBox.warning.adjustedVolume=The total volume you have entered leads to invalid fractional bitcoin amounts. The amount has been adjusted and a new total volume be calculated from it. -createOffer.amountPriceBox.error.message=An error occurred when placing the offer:\n\n{0} +createOffer.amountPriceBox.error.message=An error occurred when placing the offerPayload:\n\n{0} # TODO remove createOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount. # TODO remove createOffer.validation.minAmountLargerThanAmount=Minimum amount cannot be larger than amount. -createOffer.fundsBox.title=Fund your offer +createOffer.fundsBox.title=Fund your offerPayload createOffer.fundsBox.totalsNeeded=Funds needed: createOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above createOffer.fundsBox.address=Trade wallet address: createOffer.fundsBox.balance=Trade wallet balance: -# TODO remove createOffer.fundsBox.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offer gets executed. If you cancel your offer you can withdraw your funds from that trading wallet. The only payment made when placing an offer is the offer fee payment. https://bisq.io/faq/#6 +# TODO remove createOffer.fundsBox.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offerPayload gets executed. If you cancel your offerPayload you can withdraw your funds from that trading wallet. The only payment made when placing an offerPayload is the offerPayload fee payment. https://bisq.io/faq/#6 createOffer.fundsBox.tradeAmount=Trade amount: createOffer.fundsBox.securityDeposit=Security deposit: -createOffer.fundsBox.offerFee=Create offer fee: +createOffer.fundsBox.offerFee=Create offerPayload fee: createOffer.fundsBox.networkFee=Mining fee: createOffer.fundsBox.total=Total: # TODO remove createOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove createOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove createOffer.fundsBox.placeOffer=Place offer +# TODO remove createOffer.fundsBox.placeOffer=Place offerPayload createOffer.fundsBox.placeOfferSpinnerInfo=Offer publishing is in progress ... createOffer.fundsBox.paymentLabel=bisq trade with ID {0} @@ -139,20 +139,20 @@ createOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove createOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove createOffer.advancedBox.county=Payments account country: -# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offer restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). +# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offerPayload restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). -createOffer.success.headline=Your offer has been published +createOffer.success.headline=Your offerPayload has been published createOffer.success.info=You can manage your open offers in the \"Portfolio\" screen under \"My open offers\". -# TODO remove createOffer.error.message=An error occurred when placing the offer.\n\n{0} +# TODO remove createOffer.error.message=An error occurred when placing the offerPayload.\n\n{0} -# Take offer +# Take offerPayload takeOffer.amount.prompt=Enter amount in BTC # TODO remove takeOffer.price.prompt=Enter price # TODO remove takeOffer.volume.prompt=Enter amount in {0} # TODO remove takeOffer.minAmount.prompt=Enter min. amount -# TODO remove takeOffer.amountPriceBox.title=Take offer +# TODO remove takeOffer.amountPriceBox.title=Take offerPayload # TODO remove takeOffer.amountPriceBox.subTitle=Buy bitcoin takeOffer.amountPriceBox.buy.amountDescription=Amount of bitcoin to sell takeOffer.amountPriceBox.sell.amountDescription=Amount of bitcoin to buy @@ -164,30 +164,30 @@ takeOffer.amountPriceBox.amountRangeDescription=Possible amount range # TODO remove takeOffer.amountPriceBox.sell.info=Enter the amount of bitcoin you want to buy. You can choose an amount between the minimum amount and the amount. # TODO remove takeOffer.amountPriceBox.next=Next step takeOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. -takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offer. -takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offer. +takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offerPayload. +takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offerPayload. takeOffer.validation.amountLargerThanOfferAmountMinusFee=That input amount would create dust change for the BTC seller. takeOffer.fundsBox.title=Fund your trade -takeOffer.fundsBox.isOfferAvailable=Check if offer is available ... +takeOffer.fundsBox.isOfferAvailable=Check if offerPayload is available ... takeOffer.fundsBox.totalsNeeded=Funds needed: # TODO remove takeOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above takeOffer.fundsBox.address=Trade wallet address: takeOffer.fundsBox.balance=Trade wallet balance: -# TODO remove takeOffer.fundsBox.buy.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.buy.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid in to a locked deposit address. At the end of a successful trade you will get back your security deposit and the bitcoin amount you sold will be transferred \ to the BTC buyer. -# TODO remove takeOffer.fundsBox.sell.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.sell.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid into a locked deposit address. At the end of a successful trade you will get back your security deposit. takeOffer.fundsBox.tradeAmount=Amount to sell: takeOffer.fundsBox.securityDeposit=Security deposit: -takeOffer.fundsBox.offerFee=Take offer fee: +takeOffer.fundsBox.offerFee=Take offerPayload fee: takeOffer.fundsBox.networkFee=Mining fee: takeOffer.fundsBox.total=Total: # TODO remove takeOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove takeOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove takeOffer.fundsBox.takeOffer=Take offer -takeOffer.fundsBox.takeOfferSpinnerInfo=Take offer in progress ... +# TODO remove takeOffer.fundsBox.takeOffer=Take offerPayload +takeOffer.fundsBox.takeOfferSpinnerInfo=Take offerPayload in progress ... takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.title=Advanced settings @@ -197,12 +197,12 @@ takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove takeOffer.advancedBox.county=Payments account country: -# TODO remove takeOffer.advancedBox.info=These are the offer restrictions your trading partner has defined in his offer. \ +# TODO remove takeOffer.advancedBox.info=These are the offerPayload restrictions your trading partner has defined in his offerPayload. \ Your settings match those constraints and you are able to trade with him. -takeOffer.success.headline=You have successfully taken an offer. +takeOffer.success.headline=You have successfully taken an offerPayload. takeOffer.success.info=You can see the status of your trade at the \"Portfolio\" screen under \"Open trades\". -takeOffer.error.message=An error occurred when taking the offer.\n\n{0} +takeOffer.error.message=An error occurred when taking the offerPayload.\n\n{0} # Payment methods # remove N/A=Not available diff --git a/common/src/main/resources/i18n/in_dev/displayStrings_pl.properties b/common/src/main/resources/i18n/in_dev/displayStrings_pl.properties index 0916944218..a88585f701 100644 --- a/common/src/main/resources/i18n/in_dev/displayStrings_pl.properties +++ b/common/src/main/resources/i18n/in_dev/displayStrings_pl.properties @@ -93,42 +93,42 @@ validation.bankIdNumber={0} must consist of {1} numbers. validation.accountNr=Account number must consist of {0} numbers. validation.accountNrChars=Account number must consist of {0} characters. -# Create offer +# Create offerPayload createOffer.amount.prompt=Enter amount in BTC createOffer.price.prompt=Enter price createOffer.volume.prompt=Enter amount in {0} # TODO remove createOffer.minAmount.prompt=Enter min. amount -# TODO remove createOffer.amountPriceBox.title=Create your offer +# TODO remove createOffer.amountPriceBox.title=Create your offerPayload createOffer.amountPriceBox.amountDescription=Amount of bitcoin to {0} createOffer.amountPriceBox.priceDescriptionFiat=Fixed price per {0} createOffer.amountPriceBox.buy.volumeDescription=Amount in {0} to spend createOffer.amountPriceBox.sell.volumeDescription=Amount in {0} to receive createOffer.amountPriceBox.minAmountDescription=Minimum amount of BTC -# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. -# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. +# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. +# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. # TODO remove createOffer.amountPriceBox.next=Next step # TODO remove createOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. # TODO remove createOffer.amountPriceBox.warning.invalidFiatDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted. # TODO remove createOffer.amountPriceBox.warning.adjustedVolume=The total volume you have entered leads to invalid fractional bitcoin amounts. The amount has been adjusted and a new total volume be calculated from it. -createOffer.amountPriceBox.error.message=An error occurred when placing the offer:\n\n{0} +createOffer.amountPriceBox.error.message=An error occurred when placing the offerPayload:\n\n{0} # TODO remove createOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount. # TODO remove createOffer.validation.minAmountLargerThanAmount=Minimum amount cannot be larger than amount. -createOffer.fundsBox.title=Fund your offer +createOffer.fundsBox.title=Fund your offerPayload createOffer.fundsBox.totalsNeeded=Funds needed: createOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above createOffer.fundsBox.address=Trade wallet address: createOffer.fundsBox.balance=Trade wallet balance: -# TODO remove createOffer.fundsBox.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offer gets executed. If you cancel your offer you can withdraw your funds from that trading wallet. The only payment made when placing an offer is the offer fee payment. https://bisq.io/faq/#6 +# TODO remove createOffer.fundsBox.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offerPayload gets executed. If you cancel your offerPayload you can withdraw your funds from that trading wallet. The only payment made when placing an offerPayload is the offerPayload fee payment. https://bisq.io/faq/#6 createOffer.fundsBox.tradeAmount=Trade amount: createOffer.fundsBox.securityDeposit=Security deposit: -createOffer.fundsBox.offerFee=Create offer fee: +createOffer.fundsBox.offerFee=Create offerPayload fee: createOffer.fundsBox.networkFee=Mining fee: createOffer.fundsBox.total=Total: # TODO remove createOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove createOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove createOffer.fundsBox.placeOffer=Place offer +# TODO remove createOffer.fundsBox.placeOffer=Place offerPayload createOffer.fundsBox.placeOfferSpinnerInfo=Offer publishing is in progress ... createOffer.fundsBox.paymentLabel=bisq trade with ID {0} @@ -139,20 +139,20 @@ createOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove createOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove createOffer.advancedBox.county=Payments account country: -# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offer restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). +# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offerPayload restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). -createOffer.success.headline=Your offer has been published +createOffer.success.headline=Your offerPayload has been published createOffer.success.info=You can manage your open offers in the \"Portfolio\" screen under \"My open offers\". -# TODO remove createOffer.error.message=An error occurred when placing the offer.\n\n{0} +# TODO remove createOffer.error.message=An error occurred when placing the offerPayload.\n\n{0} -# Take offer +# Take offerPayload takeOffer.amount.prompt=Enter amount in BTC # TODO remove takeOffer.price.prompt=Enter price # TODO remove takeOffer.volume.prompt=Enter amount in {0} # TODO remove takeOffer.minAmount.prompt=Enter min. amount -# TODO remove takeOffer.amountPriceBox.title=Take offer +# TODO remove takeOffer.amountPriceBox.title=Take offerPayload # TODO remove takeOffer.amountPriceBox.subTitle=Buy bitcoin takeOffer.amountPriceBox.buy.amountDescription=Amount of bitcoin to sell takeOffer.amountPriceBox.sell.amountDescription=Amount of bitcoin to buy @@ -164,30 +164,30 @@ takeOffer.amountPriceBox.amountRangeDescription=Possible amount range # TODO remove takeOffer.amountPriceBox.sell.info=Enter the amount of bitcoin you want to buy. You can choose an amount between the minimum amount and the amount. # TODO remove takeOffer.amountPriceBox.next=Next step takeOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. -takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offer. -takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offer. +takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offerPayload. +takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offerPayload. takeOffer.validation.amountLargerThanOfferAmountMinusFee=That input amount would create dust change for the BTC seller. takeOffer.fundsBox.title=Fund your trade -takeOffer.fundsBox.isOfferAvailable=Check if offer is available ... +takeOffer.fundsBox.isOfferAvailable=Check if offerPayload is available ... takeOffer.fundsBox.totalsNeeded=Funds needed: # TODO remove takeOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above takeOffer.fundsBox.address=Trade wallet address: takeOffer.fundsBox.balance=Trade wallet balance: -# TODO remove takeOffer.fundsBox.buy.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.buy.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid in to a locked deposit address. At the end of a successful trade you will get back your security deposit and the bitcoin amount you sold will be transferred \ to the BTC buyer. -# TODO remove takeOffer.fundsBox.sell.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.sell.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid into a locked deposit address. At the end of a successful trade you will get back your security deposit. takeOffer.fundsBox.tradeAmount=Amount to sell: takeOffer.fundsBox.securityDeposit=Security deposit: -takeOffer.fundsBox.offerFee=Take offer fee: +takeOffer.fundsBox.offerFee=Take offerPayload fee: takeOffer.fundsBox.networkFee=Mining fee: takeOffer.fundsBox.total=Total: # TODO remove takeOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove takeOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove takeOffer.fundsBox.takeOffer=Take offer -takeOffer.fundsBox.takeOfferSpinnerInfo=Take offer in progress ... +# TODO remove takeOffer.fundsBox.takeOffer=Take offerPayload +takeOffer.fundsBox.takeOfferSpinnerInfo=Take offerPayload in progress ... takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.title=Advanced settings @@ -197,12 +197,12 @@ takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove takeOffer.advancedBox.county=Payments account country: -# TODO remove takeOffer.advancedBox.info=These are the offer restrictions your trading partner has defined in his offer. \ +# TODO remove takeOffer.advancedBox.info=These are the offerPayload restrictions your trading partner has defined in his offerPayload. \ Your settings match those constraints and you are able to trade with him. -takeOffer.success.headline=You have successfully taken an offer. +takeOffer.success.headline=You have successfully taken an offerPayload. takeOffer.success.info=You can see the status of your trade at the \"Portfolio\" screen under \"Open trades\". -takeOffer.error.message=An error occurred when taking the offer.\n\n{0} +takeOffer.error.message=An error occurred when taking the offerPayload.\n\n{0} # Payment methods # remove N/A=Not available diff --git a/common/src/main/resources/i18n/in_dev/displayStrings_pt.properties b/common/src/main/resources/i18n/in_dev/displayStrings_pt.properties index 07edfc966c..bfe532a581 100644 --- a/common/src/main/resources/i18n/in_dev/displayStrings_pt.properties +++ b/common/src/main/resources/i18n/in_dev/displayStrings_pt.properties @@ -40,7 +40,7 @@ validation.bankIdNumber={0} tem de ser constituído por {1} números validation.accountNr=O número de conta tem de ser constituído por {0} números validation.accountNrChars=O número de conta tem de ser constituído por {0} caractéres -# Create offer +# Create offerPayload createOffer.amount.prompt=Introduza o montante de BTC createOffer.price.prompt=Introduza o preço createOffer.volume.prompt=Introduza o montante em {0} @@ -94,7 +94,7 @@ createOffer.success.info=Você pode gerir as suas ofertas no \"Portfolio\" por b # TODO remove createOffer.error.message=Um erro ocorreu ao criar a oferta.\n\n{0} -# Take offer +# Take offerPayload takeOffer.amount.prompt=Introduza o montante em BTC # TODO remove takeOffer.price.prompt=Introduza o preço # TODO remove takeOffer.volume.prompt=Introduza o montante em {0} diff --git a/common/src/main/resources/i18n/in_dev/displayStrings_ro.properties b/common/src/main/resources/i18n/in_dev/displayStrings_ro.properties index ea63a819d7..62a0cb8e56 100644 --- a/common/src/main/resources/i18n/in_dev/displayStrings_ro.properties +++ b/common/src/main/resources/i18n/in_dev/displayStrings_ro.properties @@ -93,42 +93,42 @@ validation.bankIdNumber={0} must consist of {1} numbers. validation.accountNr=Account number must consist of {0} numbers. validation.accountNrChars=Account number must consist of {0} characters. -# Create offer +# Create offerPayload createOffer.amount.prompt=Enter amount in BTC createOffer.price.prompt=Enter price createOffer.volume.prompt=Enter amount in {0} # TODO remove createOffer.minAmount.prompt=Enter min. amount -# TODO remove createOffer.amountPriceBox.title=Create your offer +# TODO remove createOffer.amountPriceBox.title=Create your offerPayload createOffer.amountPriceBox.amountDescription=Amount of bitcoin to {0} createOffer.amountPriceBox.priceDescriptionFiat=Fixed price per {0} createOffer.amountPriceBox.buy.volumeDescription=Amount in {0} to spend createOffer.amountPriceBox.sell.volumeDescription=Amount in {0} to receive createOffer.amountPriceBox.minAmountDescription=Minimum amount of BTC -# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. -# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. +# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. +# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. # TODO remove createOffer.amountPriceBox.next=Next step # TODO remove createOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. # TODO remove createOffer.amountPriceBox.warning.invalidFiatDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted. # TODO remove createOffer.amountPriceBox.warning.adjustedVolume=The total volume you have entered leads to invalid fractional bitcoin amounts. The amount has been adjusted and a new total volume be calculated from it. -createOffer.amountPriceBox.error.message=An error occurred when placing the offer:\n\n{0} +createOffer.amountPriceBox.error.message=An error occurred when placing the offerPayload:\n\n{0} # TODO remove createOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount. # TODO remove createOffer.validation.minAmountLargerThanAmount=Minimum amount cannot be larger than amount. -createOffer.fundsBox.title=Fund your offer +createOffer.fundsBox.title=Fund your offerPayload createOffer.fundsBox.totalsNeeded=Funds needed: createOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above createOffer.fundsBox.address=Trade wallet address: createOffer.fundsBox.balance=Trade wallet balance: -# TODO remove createOffer.fundsBox.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offer gets executed. If you cancel your offer you can withdraw your funds from that trading wallet. The only payment made when placing an offer is the offer fee payment. https://bisq.io/faq/#6 +# TODO remove createOffer.fundsBox.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offerPayload gets executed. If you cancel your offerPayload you can withdraw your funds from that trading wallet. The only payment made when placing an offerPayload is the offerPayload fee payment. https://bisq.io/faq/#6 createOffer.fundsBox.tradeAmount=Trade amount: createOffer.fundsBox.securityDeposit=Security deposit: -createOffer.fundsBox.offerFee=Create offer fee: +createOffer.fundsBox.offerFee=Create offerPayload fee: createOffer.fundsBox.networkFee=Mining fee: createOffer.fundsBox.total=Total: # TODO remove createOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove createOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove createOffer.fundsBox.placeOffer=Place offer +# TODO remove createOffer.fundsBox.placeOffer=Place offerPayload createOffer.fundsBox.placeOfferSpinnerInfo=Offer publishing is in progress ... createOffer.fundsBox.paymentLabel=bisq trade with ID {0} @@ -139,20 +139,20 @@ createOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove createOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove createOffer.advancedBox.county=Payments account country: -# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offer restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). +# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offerPayload restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). -createOffer.success.headline=Your offer has been published +createOffer.success.headline=Your offerPayload has been published createOffer.success.info=You can manage your open offers in the \"Portfolio\" screen under \"My open offers\". -# TODO remove createOffer.error.message=An error occurred when placing the offer.\n\n{0} +# TODO remove createOffer.error.message=An error occurred when placing the offerPayload.\n\n{0} -# Take offer +# Take offerPayload takeOffer.amount.prompt=Enter amount in BTC # TODO remove takeOffer.price.prompt=Enter price # TODO remove takeOffer.volume.prompt=Enter amount in {0} # TODO remove takeOffer.minAmount.prompt=Enter min. amount -# TODO remove takeOffer.amountPriceBox.title=Take offer +# TODO remove takeOffer.amountPriceBox.title=Take offerPayload # TODO remove takeOffer.amountPriceBox.subTitle=Buy bitcoin takeOffer.amountPriceBox.buy.amountDescription=Amount of bitcoin to sell takeOffer.amountPriceBox.sell.amountDescription=Amount of bitcoin to buy @@ -164,30 +164,30 @@ takeOffer.amountPriceBox.amountRangeDescription=Possible amount range # TODO remove takeOffer.amountPriceBox.sell.info=Enter the amount of bitcoin you want to buy. You can choose an amount between the minimum amount and the amount. # TODO remove takeOffer.amountPriceBox.next=Next step takeOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. -takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offer. -takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offer. +takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offerPayload. +takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offerPayload. takeOffer.validation.amountLargerThanOfferAmountMinusFee=That input amount would create dust change for the BTC seller. takeOffer.fundsBox.title=Fund your trade -takeOffer.fundsBox.isOfferAvailable=Check if offer is available ... +takeOffer.fundsBox.isOfferAvailable=Check if offerPayload is available ... takeOffer.fundsBox.totalsNeeded=Funds needed: # TODO remove takeOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above takeOffer.fundsBox.address=Trade wallet address: takeOffer.fundsBox.balance=Trade wallet balance: -# TODO remove takeOffer.fundsBox.buy.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.buy.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid in to a locked deposit address. At the end of a successful trade you will get back your security deposit and the bitcoin amount you sold will be transferred \ to the BTC buyer. -# TODO remove takeOffer.fundsBox.sell.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.sell.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid into a locked deposit address. At the end of a successful trade you will get back your security deposit. takeOffer.fundsBox.tradeAmount=Amount to sell: takeOffer.fundsBox.securityDeposit=Security deposit: -takeOffer.fundsBox.offerFee=Take offer fee: +takeOffer.fundsBox.offerFee=Take offerPayload fee: takeOffer.fundsBox.networkFee=Mining fee: takeOffer.fundsBox.total=Total: # TODO remove takeOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove takeOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove takeOffer.fundsBox.takeOffer=Take offer -takeOffer.fundsBox.takeOfferSpinnerInfo=Take offer in progress ... +# TODO remove takeOffer.fundsBox.takeOffer=Take offerPayload +takeOffer.fundsBox.takeOfferSpinnerInfo=Take offerPayload in progress ... takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.title=Advanced settings @@ -197,12 +197,12 @@ takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove takeOffer.advancedBox.county=Payments account country: -# TODO remove takeOffer.advancedBox.info=These are the offer restrictions your trading partner has defined in his offer. \ +# TODO remove takeOffer.advancedBox.info=These are the offerPayload restrictions your trading partner has defined in his offerPayload. \ Your settings match those constraints and you are able to trade with him. -takeOffer.success.headline=You have successfully taken an offer. +takeOffer.success.headline=You have successfully taken an offerPayload. takeOffer.success.info=You can see the status of your trade at the \"Portfolio\" screen under \"Open trades\". -takeOffer.error.message=An error occurred when taking the offer.\n\n{0} +takeOffer.error.message=An error occurred when taking the offerPayload.\n\n{0} # Payment methods # remove N/A=Not available diff --git a/common/src/main/resources/i18n/in_dev/displayStrings_ru.properties b/common/src/main/resources/i18n/in_dev/displayStrings_ru.properties index 0476df4797..7466d8e9fb 100644 --- a/common/src/main/resources/i18n/in_dev/displayStrings_ru.properties +++ b/common/src/main/resources/i18n/in_dev/displayStrings_ru.properties @@ -93,42 +93,42 @@ validation.bankIdNumber={0} must consist of {1} numbers. validation.accountNr=Account number must consist of {0} numbers. validation.accountNrChars=Account number must consist of {0} characters. -# Create offer +# Create offerPayload createOffer.amount.prompt=Enter amount in BTC createOffer.price.prompt=Enter price createOffer.volume.prompt=Enter amount in {0} # TODO remove createOffer.minAmount.prompt=Enter min. amount -# TODO remove createOffer.amountPriceBox.title=Create your offer +# TODO remove createOffer.amountPriceBox.title=Create your offerPayload createOffer.amountPriceBox.amountDescription=Amount of bitcoin to {0} createOffer.amountPriceBox.priceDescriptionFiat=Fixed price per {0} createOffer.amountPriceBox.buy.volumeDescription=Amount in {0} to spend createOffer.amountPriceBox.sell.volumeDescription=Amount in {0} to receive createOffer.amountPriceBox.minAmountDescription=Minimum amount of BTC -# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. -# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. +# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. +# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. # TODO remove createOffer.amountPriceBox.next=Next step # TODO remove createOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. # TODO remove createOffer.amountPriceBox.warning.invalidFiatDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted. # TODO remove createOffer.amountPriceBox.warning.adjustedVolume=The total volume you have entered leads to invalid fractional bitcoin amounts. The amount has been adjusted and a new total volume be calculated from it. -createOffer.amountPriceBox.error.message=An error occurred when placing the offer:\n\n{0} +createOffer.amountPriceBox.error.message=An error occurred when placing the offerPayload:\n\n{0} # TODO remove createOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount. # TODO remove createOffer.validation.minAmountLargerThanAmount=Minimum amount cannot be larger than amount. -createOffer.fundsBox.title=Fund your offer +createOffer.fundsBox.title=Fund your offerPayload createOffer.fundsBox.totalsNeeded=Funds needed: createOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above createOffer.fundsBox.address=Trade wallet address: createOffer.fundsBox.balance=Trade wallet balance: -# TODO remove createOffer.fundsBox.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offer gets executed. If you cancel your offer you can withdraw your funds from that trading wallet. The only payment made when placing an offer is the offer fee payment. https://bisq.io/faq/#6 +# TODO remove createOffer.fundsBox.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offerPayload gets executed. If you cancel your offerPayload you can withdraw your funds from that trading wallet. The only payment made when placing an offerPayload is the offerPayload fee payment. https://bisq.io/faq/#6 createOffer.fundsBox.tradeAmount=Trade amount: createOffer.fundsBox.securityDeposit=Security deposit: -createOffer.fundsBox.offerFee=Create offer fee: +createOffer.fundsBox.offerFee=Create offerPayload fee: createOffer.fundsBox.networkFee=Mining fee: createOffer.fundsBox.total=Total: # TODO remove createOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove createOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove createOffer.fundsBox.placeOffer=Place offer +# TODO remove createOffer.fundsBox.placeOffer=Place offerPayload createOffer.fundsBox.placeOfferSpinnerInfo=Offer publishing is in progress ... createOffer.fundsBox.paymentLabel=bisq trade with ID {0} @@ -139,20 +139,20 @@ createOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove createOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove createOffer.advancedBox.county=Payments account country: -# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offer restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). +# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offerPayload restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). -createOffer.success.headline=Your offer has been published +createOffer.success.headline=Your offerPayload has been published createOffer.success.info=You can manage your open offers in the \"Portfolio\" screen under \"My open offers\". -# TODO remove createOffer.error.message=An error occurred when placing the offer.\n\n{0} +# TODO remove createOffer.error.message=An error occurred when placing the offerPayload.\n\n{0} -# Take offer +# Take offerPayload takeOffer.amount.prompt=Enter amount in BTC # TODO remove takeOffer.price.prompt=Enter price # TODO remove takeOffer.volume.prompt=Enter amount in {0} # TODO remove takeOffer.minAmount.prompt=Enter min. amount -# TODO remove takeOffer.amountPriceBox.title=Take offer +# TODO remove takeOffer.amountPriceBox.title=Take offerPayload # TODO remove takeOffer.amountPriceBox.subTitle=Buy bitcoin takeOffer.amountPriceBox.buy.amountDescription=Amount of bitcoin to sell takeOffer.amountPriceBox.sell.amountDescription=Amount of bitcoin to buy @@ -164,30 +164,30 @@ takeOffer.amountPriceBox.amountRangeDescription=Possible amount range # TODO remove takeOffer.amountPriceBox.sell.info=Enter the amount of bitcoin you want to buy. You can choose an amount between the minimum amount and the amount. # TODO remove takeOffer.amountPriceBox.next=Next step takeOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. -takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offer. -takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offer. +takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offerPayload. +takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offerPayload. takeOffer.validation.amountLargerThanOfferAmountMinusFee=That input amount would create dust change for the BTC seller. takeOffer.fundsBox.title=Fund your trade -takeOffer.fundsBox.isOfferAvailable=Check if offer is available ... +takeOffer.fundsBox.isOfferAvailable=Check if offerPayload is available ... takeOffer.fundsBox.totalsNeeded=Funds needed: # TODO remove takeOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above takeOffer.fundsBox.address=Trade wallet address: takeOffer.fundsBox.balance=Trade wallet balance: -# TODO remove takeOffer.fundsBox.buy.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.buy.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid in to a locked deposit address. At the end of a successful trade you will get back your security deposit and the bitcoin amount you sold will be transferred \ to the BTC buyer. -# TODO remove takeOffer.fundsBox.sell.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.sell.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid into a locked deposit address. At the end of a successful trade you will get back your security deposit. takeOffer.fundsBox.tradeAmount=Amount to sell: takeOffer.fundsBox.securityDeposit=Security deposit: -takeOffer.fundsBox.offerFee=Take offer fee: +takeOffer.fundsBox.offerFee=Take offerPayload fee: takeOffer.fundsBox.networkFee=Mining fee: takeOffer.fundsBox.total=Total: # TODO remove takeOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove takeOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove takeOffer.fundsBox.takeOffer=Take offer -takeOffer.fundsBox.takeOfferSpinnerInfo=Take offer in progress ... +# TODO remove takeOffer.fundsBox.takeOffer=Take offerPayload +takeOffer.fundsBox.takeOfferSpinnerInfo=Take offerPayload in progress ... takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.title=Advanced settings @@ -197,12 +197,12 @@ takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove takeOffer.advancedBox.county=Payments account country: -# TODO remove takeOffer.advancedBox.info=These are the offer restrictions your trading partner has defined in his offer. \ +# TODO remove takeOffer.advancedBox.info=These are the offerPayload restrictions your trading partner has defined in his offerPayload. \ Your settings match those constraints and you are able to trade with him. -takeOffer.success.headline=You have successfully taken an offer. +takeOffer.success.headline=You have successfully taken an offerPayload. takeOffer.success.info=You can see the status of your trade at the \"Portfolio\" screen under \"Open trades\". -takeOffer.error.message=An error occurred when taking the offer.\n\n{0} +takeOffer.error.message=An error occurred when taking the offerPayload.\n\n{0} # Payment methods # remove N/A=Not available diff --git a/common/src/main/resources/i18n/in_dev/displayStrings_se.properties b/common/src/main/resources/i18n/in_dev/displayStrings_se.properties index 57aa062e1c..38b041e875 100644 --- a/common/src/main/resources/i18n/in_dev/displayStrings_se.properties +++ b/common/src/main/resources/i18n/in_dev/displayStrings_se.properties @@ -93,42 +93,42 @@ validation.bankIdNumber={0} must consist of {1} numbers. validation.accountNr=Account number must consist of {0} numbers. validation.accountNrChars=Account number must consist of {0} characters. -# Create offer +# Create offerPayload createOffer.amount.prompt=Enter amount in BTC createOffer.price.prompt=Enter price createOffer.volume.prompt=Enter amount in {0} # TODO remove createOffer.minAmount.prompt=Enter min. amount -# TODO remove createOffer.amountPriceBox.title=Create your offer +# TODO remove createOffer.amountPriceBox.title=Create your offerPayload createOffer.amountPriceBox.amountDescription=Amount of bitcoin to {0} createOffer.amountPriceBox.priceDescriptionFiat=Fixed price per {0} createOffer.amountPriceBox.buy.volumeDescription=Amount in {0} to spend createOffer.amountPriceBox.sell.volumeDescription=Amount in {0} to receive createOffer.amountPriceBox.minAmountDescription=Minimum amount of BTC -# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. -# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. +# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. +# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. # TODO remove createOffer.amountPriceBox.next=Next step # TODO remove createOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. # TODO remove createOffer.amountPriceBox.warning.invalidFiatDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted. # TODO remove createOffer.amountPriceBox.warning.adjustedVolume=The total volume you have entered leads to invalid fractional bitcoin amounts. The amount has been adjusted and a new total volume be calculated from it. -createOffer.amountPriceBox.error.message=An error occurred when placing the offer:\n\n{0} +createOffer.amountPriceBox.error.message=An error occurred when placing the offerPayload:\n\n{0} # TODO remove createOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount. # TODO remove createOffer.validation.minAmountLargerThanAmount=Minimum amount cannot be larger than amount. -createOffer.fundsBox.title=Fund your offer +createOffer.fundsBox.title=Fund your offerPayload createOffer.fundsBox.totalsNeeded=Funds needed: createOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above createOffer.fundsBox.address=Trade wallet address: createOffer.fundsBox.balance=Trade wallet balance: -# TODO remove createOffer.fundsBox.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offer gets executed. If you cancel your offer you can withdraw your funds from that trading wallet. The only payment made when placing an offer is the offer fee payment. https://bisq.io/faq/#6 +# TODO remove createOffer.fundsBox.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offerPayload gets executed. If you cancel your offerPayload you can withdraw your funds from that trading wallet. The only payment made when placing an offerPayload is the offerPayload fee payment. https://bisq.io/faq/#6 createOffer.fundsBox.tradeAmount=Trade amount: createOffer.fundsBox.securityDeposit=Security deposit: -createOffer.fundsBox.offerFee=Create offer fee: +createOffer.fundsBox.offerFee=Create offerPayload fee: createOffer.fundsBox.networkFee=Mining fee: createOffer.fundsBox.total=Total: # TODO remove createOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove createOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove createOffer.fundsBox.placeOffer=Place offer +# TODO remove createOffer.fundsBox.placeOffer=Place offerPayload createOffer.fundsBox.placeOfferSpinnerInfo=Offer publishing is in progress ... createOffer.fundsBox.paymentLabel=bisq trade with ID {0} @@ -139,20 +139,20 @@ createOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove createOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove createOffer.advancedBox.county=Payments account country: -# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offer restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). +# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offerPayload restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). -createOffer.success.headline=Your offer has been published +createOffer.success.headline=Your offerPayload has been published createOffer.success.info=You can manage your open offers in the \"Portfolio\" screen under \"My open offers\". -# TODO remove createOffer.error.message=An error occurred when placing the offer.\n\n{0} +# TODO remove createOffer.error.message=An error occurred when placing the offerPayload.\n\n{0} -# Take offer +# Take offerPayload takeOffer.amount.prompt=Enter amount in BTC # TODO remove takeOffer.price.prompt=Enter price # TODO remove takeOffer.volume.prompt=Enter amount in {0} # TODO remove takeOffer.minAmount.prompt=Enter min. amount -# TODO remove takeOffer.amountPriceBox.title=Take offer +# TODO remove takeOffer.amountPriceBox.title=Take offerPayload # TODO remove takeOffer.amountPriceBox.subTitle=Buy bitcoin takeOffer.amountPriceBox.buy.amountDescription=Amount of bitcoin to sell takeOffer.amountPriceBox.sell.amountDescription=Amount of bitcoin to buy @@ -164,30 +164,30 @@ takeOffer.amountPriceBox.amountRangeDescription=Possible amount range # TODO remove takeOffer.amountPriceBox.sell.info=Enter the amount of bitcoin you want to buy. You can choose an amount between the minimum amount and the amount. # TODO remove takeOffer.amountPriceBox.next=Next step takeOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. -takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offer. -takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offer. +takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offerPayload. +takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offerPayload. takeOffer.validation.amountLargerThanOfferAmountMinusFee=That input amount would create dust change for the BTC seller. takeOffer.fundsBox.title=Fund your trade -takeOffer.fundsBox.isOfferAvailable=Check if offer is available ... +takeOffer.fundsBox.isOfferAvailable=Check if offerPayload is available ... takeOffer.fundsBox.totalsNeeded=Funds needed: # TODO remove takeOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above takeOffer.fundsBox.address=Trade wallet address: takeOffer.fundsBox.balance=Trade wallet balance: -# TODO remove takeOffer.fundsBox.buy.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.buy.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid in to a locked deposit address. At the end of a successful trade you will get back your security deposit and the bitcoin amount you sold will be transferred \ to the BTC buyer. -# TODO remove takeOffer.fundsBox.sell.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.sell.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid into a locked deposit address. At the end of a successful trade you will get back your security deposit. takeOffer.fundsBox.tradeAmount=Amount to sell: takeOffer.fundsBox.securityDeposit=Security deposit: -takeOffer.fundsBox.offerFee=Take offer fee: +takeOffer.fundsBox.offerFee=Take offerPayload fee: takeOffer.fundsBox.networkFee=Mining fee: takeOffer.fundsBox.total=Total: # TODO remove takeOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove takeOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove takeOffer.fundsBox.takeOffer=Take offer -takeOffer.fundsBox.takeOfferSpinnerInfo=Take offer in progress ... +# TODO remove takeOffer.fundsBox.takeOffer=Take offerPayload +takeOffer.fundsBox.takeOfferSpinnerInfo=Take offerPayload in progress ... takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.title=Advanced settings @@ -197,12 +197,12 @@ takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove takeOffer.advancedBox.county=Payments account country: -# TODO remove takeOffer.advancedBox.info=These are the offer restrictions your trading partner has defined in his offer. \ +# TODO remove takeOffer.advancedBox.info=These are the offerPayload restrictions your trading partner has defined in his offerPayload. \ Your settings match those constraints and you are able to trade with him. -takeOffer.success.headline=You have successfully taken an offer. +takeOffer.success.headline=You have successfully taken an offerPayload. takeOffer.success.info=You can see the status of your trade at the \"Portfolio\" screen under \"Open trades\". -takeOffer.error.message=An error occurred when taking the offer.\n\n{0} +takeOffer.error.message=An error occurred when taking the offerPayload.\n\n{0} # Payment methods # remove N/A=Not available diff --git a/common/src/main/resources/i18n/in_dev/displayStrings_th.properties b/common/src/main/resources/i18n/in_dev/displayStrings_th.properties index 7c6783641e..1dc8f261f1 100644 --- a/common/src/main/resources/i18n/in_dev/displayStrings_th.properties +++ b/common/src/main/resources/i18n/in_dev/displayStrings_th.properties @@ -93,42 +93,42 @@ validation.bankIdNumber={0} must consist of {1} numbers. validation.accountNr=Account number must consist of {0} numbers. validation.accountNrChars=Account number must consist of {0} characters. -# Create offer +# Create offerPayload createOffer.amount.prompt=Enter amount in BTC createOffer.price.prompt=Enter price createOffer.volume.prompt=Enter amount in {0} # TODO remove createOffer.minAmount.prompt=Enter min. amount -# TODO remove createOffer.amountPriceBox.title=Create your offer +# TODO remove createOffer.amountPriceBox.title=Create your offerPayload createOffer.amountPriceBox.amountDescription=Amount of bitcoin to {0} createOffer.amountPriceBox.priceDescriptionFiat=Fixed price per {0} createOffer.amountPriceBox.buy.volumeDescription=Amount in {0} to spend createOffer.amountPriceBox.sell.volumeDescription=Amount in {0} to receive createOffer.amountPriceBox.minAmountDescription=Minimum amount of BTC -# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. -# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. +# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. +# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. # TODO remove createOffer.amountPriceBox.next=Next step # TODO remove createOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. # TODO remove createOffer.amountPriceBox.warning.invalidFiatDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted. # TODO remove createOffer.amountPriceBox.warning.adjustedVolume=The total volume you have entered leads to invalid fractional bitcoin amounts. The amount has been adjusted and a new total volume be calculated from it. -createOffer.amountPriceBox.error.message=An error occurred when placing the offer:\n\n{0} +createOffer.amountPriceBox.error.message=An error occurred when placing the offerPayload:\n\n{0} # TODO remove createOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount. # TODO remove createOffer.validation.minAmountLargerThanAmount=Minimum amount cannot be larger than amount. -createOffer.fundsBox.title=Fund your offer +createOffer.fundsBox.title=Fund your offerPayload createOffer.fundsBox.totalsNeeded=Funds needed: createOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above createOffer.fundsBox.address=Trade wallet address: createOffer.fundsBox.balance=Trade wallet balance: -# TODO remove createOffer.fundsBox.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offer gets executed. If you cancel your offer you can withdraw your funds from that trading wallet. The only payment made when placing an offer is the offer fee payment. https://bisq.io/faq/#6 +# TODO remove createOffer.fundsBox.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offerPayload gets executed. If you cancel your offerPayload you can withdraw your funds from that trading wallet. The only payment made when placing an offerPayload is the offerPayload fee payment. https://bisq.io/faq/#6 createOffer.fundsBox.tradeAmount=Trade amount: createOffer.fundsBox.securityDeposit=Security deposit: -createOffer.fundsBox.offerFee=Create offer fee: +createOffer.fundsBox.offerFee=Create offerPayload fee: createOffer.fundsBox.networkFee=Mining fee: createOffer.fundsBox.total=Total: # TODO remove createOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove createOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove createOffer.fundsBox.placeOffer=Place offer +# TODO remove createOffer.fundsBox.placeOffer=Place offerPayload createOffer.fundsBox.placeOfferSpinnerInfo=Offer publishing is in progress ... createOffer.fundsBox.paymentLabel=bisq trade with ID {0} @@ -139,20 +139,20 @@ createOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove createOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove createOffer.advancedBox.county=Payments account country: -# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offer restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). +# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offerPayload restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). -createOffer.success.headline=Your offer has been published +createOffer.success.headline=Your offerPayload has been published createOffer.success.info=You can manage your open offers in the \"Portfolio\" screen under \"My open offers\". -# TODO remove createOffer.error.message=An error occurred when placing the offer.\n\n{0} +# TODO remove createOffer.error.message=An error occurred when placing the offerPayload.\n\n{0} -# Take offer +# Take offerPayload takeOffer.amount.prompt=Enter amount in BTC # TODO remove takeOffer.price.prompt=Enter price # TODO remove takeOffer.volume.prompt=Enter amount in {0} # TODO remove takeOffer.minAmount.prompt=Enter min. amount -# TODO remove takeOffer.amountPriceBox.title=Take offer +# TODO remove takeOffer.amountPriceBox.title=Take offerPayload # TODO remove takeOffer.amountPriceBox.subTitle=Buy bitcoin takeOffer.amountPriceBox.buy.amountDescription=Amount of bitcoin to sell takeOffer.amountPriceBox.sell.amountDescription=Amount of bitcoin to buy @@ -164,30 +164,30 @@ takeOffer.amountPriceBox.amountRangeDescription=Possible amount range # TODO remove takeOffer.amountPriceBox.sell.info=Enter the amount of bitcoin you want to buy. You can choose an amount between the minimum amount and the amount. # TODO remove takeOffer.amountPriceBox.next=Next step takeOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. -takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offer. -takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offer. +takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offerPayload. +takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offerPayload. takeOffer.validation.amountLargerThanOfferAmountMinusFee=That input amount would create dust change for the BTC seller. takeOffer.fundsBox.title=Fund your trade -takeOffer.fundsBox.isOfferAvailable=Check if offer is available ... +takeOffer.fundsBox.isOfferAvailable=Check if offerPayload is available ... takeOffer.fundsBox.totalsNeeded=Funds needed: # TODO remove takeOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above takeOffer.fundsBox.address=Trade wallet address: takeOffer.fundsBox.balance=Trade wallet balance: -# TODO remove takeOffer.fundsBox.buy.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.buy.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid in to a locked deposit address. At the end of a successful trade you will get back your security deposit and the bitcoin amount you sold will be transferred \ to the BTC buyer. -# TODO remove takeOffer.fundsBox.sell.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.sell.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid into a locked deposit address. At the end of a successful trade you will get back your security deposit. takeOffer.fundsBox.tradeAmount=Amount to sell: takeOffer.fundsBox.securityDeposit=Security deposit: -takeOffer.fundsBox.offerFee=Take offer fee: +takeOffer.fundsBox.offerFee=Take offerPayload fee: takeOffer.fundsBox.networkFee=Mining fee: takeOffer.fundsBox.total=Total: # TODO remove takeOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove takeOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove takeOffer.fundsBox.takeOffer=Take offer -takeOffer.fundsBox.takeOfferSpinnerInfo=Take offer in progress ... +# TODO remove takeOffer.fundsBox.takeOffer=Take offerPayload +takeOffer.fundsBox.takeOfferSpinnerInfo=Take offerPayload in progress ... takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.title=Advanced settings @@ -197,12 +197,12 @@ takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove takeOffer.advancedBox.county=Payments account country: -# TODO remove takeOffer.advancedBox.info=These are the offer restrictions your trading partner has defined in his offer. \ +# TODO remove takeOffer.advancedBox.info=These are the offerPayload restrictions your trading partner has defined in his offerPayload. \ Your settings match those constraints and you are able to trade with him. -takeOffer.success.headline=You have successfully taken an offer. +takeOffer.success.headline=You have successfully taken an offerPayload. takeOffer.success.info=You can see the status of your trade at the \"Portfolio\" screen under \"Open trades\". -takeOffer.error.message=An error occurred when taking the offer.\n\n{0} +takeOffer.error.message=An error occurred when taking the offerPayload.\n\n{0} # Payment methods # remove N/A=Not available diff --git a/common/src/main/resources/i18n/in_dev/displayStrings_ua.properties b/common/src/main/resources/i18n/in_dev/displayStrings_ua.properties index 336b092091..089ef0c4c0 100644 --- a/common/src/main/resources/i18n/in_dev/displayStrings_ua.properties +++ b/common/src/main/resources/i18n/in_dev/displayStrings_ua.properties @@ -93,42 +93,42 @@ validation.bankIdNumber={0} must consist of {1} numbers. validation.accountNr=Account number must consist of {0} numbers. validation.accountNrChars=Account number must consist of {0} characters. -# Create offer +# Create offerPayload createOffer.amount.prompt=Enter amount in BTC createOffer.price.prompt=Enter price createOffer.volume.prompt=Enter amount in {0} # TODO remove createOffer.minAmount.prompt=Enter min. amount -# TODO remove createOffer.amountPriceBox.title=Create your offer +# TODO remove createOffer.amountPriceBox.title=Create your offerPayload createOffer.amountPriceBox.amountDescription=Amount of bitcoin to {0} createOffer.amountPriceBox.priceDescriptionFiat=Fixed price per {0} createOffer.amountPriceBox.buy.volumeDescription=Amount in {0} to spend createOffer.amountPriceBox.sell.volumeDescription=Amount in {0} to receive createOffer.amountPriceBox.minAmountDescription=Minimum amount of BTC -# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. -# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. +# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. +# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. # TODO remove createOffer.amountPriceBox.next=Next step # TODO remove createOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. # TODO remove createOffer.amountPriceBox.warning.invalidFiatDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted. # TODO remove createOffer.amountPriceBox.warning.adjustedVolume=The total volume you have entered leads to invalid fractional bitcoin amounts. The amount has been adjusted and a new total volume be calculated from it. -createOffer.amountPriceBox.error.message=An error occurred when placing the offer:\n\n{0} +createOffer.amountPriceBox.error.message=An error occurred when placing the offerPayload:\n\n{0} # TODO remove createOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount. # TODO remove createOffer.validation.minAmountLargerThanAmount=Minimum amount cannot be larger than amount. -createOffer.fundsBox.title=Fund your offer +createOffer.fundsBox.title=Fund your offerPayload createOffer.fundsBox.totalsNeeded=Funds needed: createOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above createOffer.fundsBox.address=Trade wallet address: createOffer.fundsBox.balance=Trade wallet balance: -# TODO remove createOffer.fundsBox.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offer gets executed. If you cancel your offer you can withdraw your funds from that trading wallet. The only payment made when placing an offer is the offer fee payment. https://bisq.io/faq/#6 +# TODO remove createOffer.fundsBox.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offerPayload gets executed. If you cancel your offerPayload you can withdraw your funds from that trading wallet. The only payment made when placing an offerPayload is the offerPayload fee payment. https://bisq.io/faq/#6 createOffer.fundsBox.tradeAmount=Trade amount: createOffer.fundsBox.securityDeposit=Security deposit: -createOffer.fundsBox.offerFee=Create offer fee: +createOffer.fundsBox.offerFee=Create offerPayload fee: createOffer.fundsBox.networkFee=Mining fee: createOffer.fundsBox.total=Total: # TODO remove createOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove createOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove createOffer.fundsBox.placeOffer=Place offer +# TODO remove createOffer.fundsBox.placeOffer=Place offerPayload createOffer.fundsBox.placeOfferSpinnerInfo=Offer publishing is in progress ... createOffer.fundsBox.paymentLabel=bisq trade with ID {0} @@ -139,20 +139,20 @@ createOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove createOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove createOffer.advancedBox.county=Payments account country: -# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offer restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). +# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offerPayload restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). -createOffer.success.headline=Your offer has been published +createOffer.success.headline=Your offerPayload has been published createOffer.success.info=You can manage your open offers in the \"Portfolio\" screen under \"My open offers\". -# TODO remove createOffer.error.message=An error occurred when placing the offer.\n\n{0} +# TODO remove createOffer.error.message=An error occurred when placing the offerPayload.\n\n{0} -# Take offer +# Take offerPayload takeOffer.amount.prompt=Enter amount in BTC # TODO remove takeOffer.price.prompt=Enter price # TODO remove takeOffer.volume.prompt=Enter amount in {0} # TODO remove takeOffer.minAmount.prompt=Enter min. amount -# TODO remove takeOffer.amountPriceBox.title=Take offer +# TODO remove takeOffer.amountPriceBox.title=Take offerPayload # TODO remove takeOffer.amountPriceBox.subTitle=Buy bitcoin takeOffer.amountPriceBox.buy.amountDescription=Amount of bitcoin to sell takeOffer.amountPriceBox.sell.amountDescription=Amount of bitcoin to buy @@ -164,30 +164,30 @@ takeOffer.amountPriceBox.amountRangeDescription=Possible amount range # TODO remove takeOffer.amountPriceBox.sell.info=Enter the amount of bitcoin you want to buy. You can choose an amount between the minimum amount and the amount. # TODO remove takeOffer.amountPriceBox.next=Next step takeOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. -takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offer. -takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offer. +takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offerPayload. +takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offerPayload. takeOffer.validation.amountLargerThanOfferAmountMinusFee=That input amount would create dust change for the BTC seller. takeOffer.fundsBox.title=Fund your trade -takeOffer.fundsBox.isOfferAvailable=Check if offer is available ... +takeOffer.fundsBox.isOfferAvailable=Check if offerPayload is available ... takeOffer.fundsBox.totalsNeeded=Funds needed: # TODO remove takeOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above takeOffer.fundsBox.address=Trade wallet address: takeOffer.fundsBox.balance=Trade wallet balance: -# TODO remove takeOffer.fundsBox.buy.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.buy.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid in to a locked deposit address. At the end of a successful trade you will get back your security deposit and the bitcoin amount you sold will be transferred \ to the BTC buyer. -# TODO remove takeOffer.fundsBox.sell.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.sell.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid into a locked deposit address. At the end of a successful trade you will get back your security deposit. takeOffer.fundsBox.tradeAmount=Amount to sell: takeOffer.fundsBox.securityDeposit=Security deposit: -takeOffer.fundsBox.offerFee=Take offer fee: +takeOffer.fundsBox.offerFee=Take offerPayload fee: takeOffer.fundsBox.networkFee=Mining fee: takeOffer.fundsBox.total=Total: # TODO remove takeOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove takeOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove takeOffer.fundsBox.takeOffer=Take offer -takeOffer.fundsBox.takeOfferSpinnerInfo=Take offer in progress ... +# TODO remove takeOffer.fundsBox.takeOffer=Take offerPayload +takeOffer.fundsBox.takeOfferSpinnerInfo=Take offerPayload in progress ... takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.title=Advanced settings @@ -197,12 +197,12 @@ takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove takeOffer.advancedBox.county=Payments account country: -# TODO remove takeOffer.advancedBox.info=These are the offer restrictions your trading partner has defined in his offer. \ +# TODO remove takeOffer.advancedBox.info=These are the offerPayload restrictions your trading partner has defined in his offerPayload. \ Your settings match those constraints and you are able to trade with him. -takeOffer.success.headline=You have successfully taken an offer. +takeOffer.success.headline=You have successfully taken an offerPayload. takeOffer.success.info=You can see the status of your trade at the \"Portfolio\" screen under \"Open trades\". -takeOffer.error.message=An error occurred when taking the offer.\n\n{0} +takeOffer.error.message=An error occurred when taking the offerPayload.\n\n{0} # Payment methods # remove N/A=Not available diff --git a/common/src/main/resources/i18n/in_dev/displayStrings_uz.properties b/common/src/main/resources/i18n/in_dev/displayStrings_uz.properties index 7bec88c214..68ff888d49 100644 --- a/common/src/main/resources/i18n/in_dev/displayStrings_uz.properties +++ b/common/src/main/resources/i18n/in_dev/displayStrings_uz.properties @@ -93,42 +93,42 @@ validation.bankIdNumber={0} must consist of {1} numbers. validation.accountNr=Account number must consist of {0} numbers. validation.accountNrChars=Account number must consist of {0} characters. -# Create offer +# Create offerPayload createOffer.amount.prompt=Enter amount in BTC createOffer.price.prompt=Enter price createOffer.volume.prompt=Enter amount in {0} # TODO remove createOffer.minAmount.prompt=Enter min. amount -# TODO remove createOffer.amountPriceBox.title=Create your offer +# TODO remove createOffer.amountPriceBox.title=Create your offerPayload createOffer.amountPriceBox.amountDescription=Amount of bitcoin to {0} createOffer.amountPriceBox.priceDescriptionFiat=Fixed price per {0} createOffer.amountPriceBox.buy.volumeDescription=Amount in {0} to spend createOffer.amountPriceBox.sell.volumeDescription=Amount in {0} to receive createOffer.amountPriceBox.minAmountDescription=Minimum amount of BTC -# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. -# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. +# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. +# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. # TODO remove createOffer.amountPriceBox.next=Next step # TODO remove createOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. # TODO remove createOffer.amountPriceBox.warning.invalidFiatDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted. # TODO remove createOffer.amountPriceBox.warning.adjustedVolume=The total volume you have entered leads to invalid fractional bitcoin amounts. The amount has been adjusted and a new total volume be calculated from it. -createOffer.amountPriceBox.error.message=An error occurred when placing the offer:\n\n{0} +createOffer.amountPriceBox.error.message=An error occurred when placing the offerPayload:\n\n{0} # TODO remove createOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount. # TODO remove createOffer.validation.minAmountLargerThanAmount=Minimum amount cannot be larger than amount. -createOffer.fundsBox.title=Fund your offer +createOffer.fundsBox.title=Fund your offerPayload createOffer.fundsBox.totalsNeeded=Funds needed: createOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above createOffer.fundsBox.address=Trade wallet address: createOffer.fundsBox.balance=Trade wallet balance: -# TODO remove createOffer.fundsBox.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offer gets executed. If you cancel your offer you can withdraw your funds from that trading wallet. The only payment made when placing an offer is the offer fee payment. https://bisq.io/faq/#6 +# TODO remove createOffer.fundsBox.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offerPayload gets executed. If you cancel your offerPayload you can withdraw your funds from that trading wallet. The only payment made when placing an offerPayload is the offerPayload fee payment. https://bisq.io/faq/#6 createOffer.fundsBox.tradeAmount=Trade amount: createOffer.fundsBox.securityDeposit=Security deposit: -createOffer.fundsBox.offerFee=Create offer fee: +createOffer.fundsBox.offerFee=Create offerPayload fee: createOffer.fundsBox.networkFee=Mining fee: createOffer.fundsBox.total=Total: # TODO remove createOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove createOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove createOffer.fundsBox.placeOffer=Place offer +# TODO remove createOffer.fundsBox.placeOffer=Place offerPayload createOffer.fundsBox.placeOfferSpinnerInfo=Offer publishing is in progress ... createOffer.fundsBox.paymentLabel=bisq trade with ID {0} @@ -139,20 +139,20 @@ createOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove createOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove createOffer.advancedBox.county=Payments account country: -# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offer restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). +# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offerPayload restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). -createOffer.success.headline=Your offer has been published +createOffer.success.headline=Your offerPayload has been published createOffer.success.info=You can manage your open offers in the \"Portfolio\" screen under \"My open offers\". -# TODO remove createOffer.error.message=An error occurred when placing the offer.\n\n{0} +# TODO remove createOffer.error.message=An error occurred when placing the offerPayload.\n\n{0} -# Take offer +# Take offerPayload takeOffer.amount.prompt=Enter amount in BTC # TODO remove takeOffer.price.prompt=Enter price # TODO remove takeOffer.volume.prompt=Enter amount in {0} # TODO remove takeOffer.minAmount.prompt=Enter min. amount -# TODO remove takeOffer.amountPriceBox.title=Take offer +# TODO remove takeOffer.amountPriceBox.title=Take offerPayload # TODO remove takeOffer.amountPriceBox.subTitle=Buy bitcoin takeOffer.amountPriceBox.buy.amountDescription=Amount of bitcoin to sell takeOffer.amountPriceBox.sell.amountDescription=Amount of bitcoin to buy @@ -164,30 +164,30 @@ takeOffer.amountPriceBox.amountRangeDescription=Possible amount range # TODO remove takeOffer.amountPriceBox.sell.info=Enter the amount of bitcoin you want to buy. You can choose an amount between the minimum amount and the amount. # TODO remove takeOffer.amountPriceBox.next=Next step takeOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. -takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offer. -takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offer. +takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offerPayload. +takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offerPayload. takeOffer.validation.amountLargerThanOfferAmountMinusFee=That input amount would create dust change for the BTC seller. takeOffer.fundsBox.title=Fund your trade -takeOffer.fundsBox.isOfferAvailable=Check if offer is available ... +takeOffer.fundsBox.isOfferAvailable=Check if offerPayload is available ... takeOffer.fundsBox.totalsNeeded=Funds needed: # TODO remove takeOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above takeOffer.fundsBox.address=Trade wallet address: takeOffer.fundsBox.balance=Trade wallet balance: -# TODO remove takeOffer.fundsBox.buy.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.buy.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid in to a locked deposit address. At the end of a successful trade you will get back your security deposit and the bitcoin amount you sold will be transferred \ to the BTC buyer. -# TODO remove takeOffer.fundsBox.sell.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.sell.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid into a locked deposit address. At the end of a successful trade you will get back your security deposit. takeOffer.fundsBox.tradeAmount=Amount to sell: takeOffer.fundsBox.securityDeposit=Security deposit: -takeOffer.fundsBox.offerFee=Take offer fee: +takeOffer.fundsBox.offerFee=Take offerPayload fee: takeOffer.fundsBox.networkFee=Mining fee: takeOffer.fundsBox.total=Total: # TODO remove takeOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove takeOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove takeOffer.fundsBox.takeOffer=Take offer -takeOffer.fundsBox.takeOfferSpinnerInfo=Take offer in progress ... +# TODO remove takeOffer.fundsBox.takeOffer=Take offerPayload +takeOffer.fundsBox.takeOfferSpinnerInfo=Take offerPayload in progress ... takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.title=Advanced settings @@ -197,12 +197,12 @@ takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove takeOffer.advancedBox.county=Payments account country: -# TODO remove takeOffer.advancedBox.info=These are the offer restrictions your trading partner has defined in his offer. \ +# TODO remove takeOffer.advancedBox.info=These are the offerPayload restrictions your trading partner has defined in his offerPayload. \ Your settings match those constraints and you are able to trade with him. -takeOffer.success.headline=You have successfully taken an offer. +takeOffer.success.headline=You have successfully taken an offerPayload. takeOffer.success.info=You can see the status of your trade at the \"Portfolio\" screen under \"Open trades\". -takeOffer.error.message=An error occurred when taking the offer.\n\n{0} +takeOffer.error.message=An error occurred when taking the offerPayload.\n\n{0} # Payment methods # remove N/A=Not available diff --git a/common/src/main/resources/i18n/in_dev/displayStrings_vn.properties b/common/src/main/resources/i18n/in_dev/displayStrings_vn.properties index eae51d7850..33fafa18ff 100644 --- a/common/src/main/resources/i18n/in_dev/displayStrings_vn.properties +++ b/common/src/main/resources/i18n/in_dev/displayStrings_vn.properties @@ -93,42 +93,42 @@ validation.bankIdNumber={0} must consist of {1} numbers. validation.accountNr=Account number must consist of {0} numbers. validation.accountNrChars=Account number must consist of {0} characters. -# Create offer +# Create offerPayload createOffer.amount.prompt=Enter amount in BTC createOffer.price.prompt=Enter price createOffer.volume.prompt=Enter amount in {0} # TODO remove createOffer.minAmount.prompt=Enter min. amount -# TODO remove createOffer.amountPriceBox.title=Create your offer +# TODO remove createOffer.amountPriceBox.title=Create your offerPayload createOffer.amountPriceBox.amountDescription=Amount of bitcoin to {0} createOffer.amountPriceBox.priceDescriptionFiat=Fixed price per {0} createOffer.amountPriceBox.buy.volumeDescription=Amount in {0} to spend createOffer.amountPriceBox.sell.volumeDescription=Amount in {0} to receive createOffer.amountPriceBox.minAmountDescription=Minimum amount of BTC -# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. -# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. +# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. +# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. # TODO remove createOffer.amountPriceBox.next=Next step # TODO remove createOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. # TODO remove createOffer.amountPriceBox.warning.invalidFiatDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted. # TODO remove createOffer.amountPriceBox.warning.adjustedVolume=The total volume you have entered leads to invalid fractional bitcoin amounts. The amount has been adjusted and a new total volume be calculated from it. -createOffer.amountPriceBox.error.message=An error occurred when placing the offer:\n\n{0} +createOffer.amountPriceBox.error.message=An error occurred when placing the offerPayload:\n\n{0} # TODO remove createOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount. # TODO remove createOffer.validation.minAmountLargerThanAmount=Minimum amount cannot be larger than amount. -createOffer.fundsBox.title=Fund your offer +createOffer.fundsBox.title=Fund your offerPayload createOffer.fundsBox.totalsNeeded=Funds needed: createOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above createOffer.fundsBox.address=Trade wallet address: createOffer.fundsBox.balance=Trade wallet balance: -# TODO remove createOffer.fundsBox.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offer gets executed. If you cancel your offer you can withdraw your funds from that trading wallet. The only payment made when placing an offer is the offer fee payment. https://bisq.io/faq/#6 +# TODO remove createOffer.fundsBox.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offerPayload gets executed. If you cancel your offerPayload you can withdraw your funds from that trading wallet. The only payment made when placing an offerPayload is the offerPayload fee payment. https://bisq.io/faq/#6 createOffer.fundsBox.tradeAmount=Trade amount: createOffer.fundsBox.securityDeposit=Security deposit: -createOffer.fundsBox.offerFee=Create offer fee: +createOffer.fundsBox.offerFee=Create offerPayload fee: createOffer.fundsBox.networkFee=Mining fee: createOffer.fundsBox.total=Total: # TODO remove createOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove createOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove createOffer.fundsBox.placeOffer=Place offer +# TODO remove createOffer.fundsBox.placeOffer=Place offerPayload createOffer.fundsBox.placeOfferSpinnerInfo=Offer publishing is in progress ... createOffer.fundsBox.paymentLabel=bisq trade with ID {0} @@ -139,20 +139,20 @@ createOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove createOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove createOffer.advancedBox.county=Payments account country: -# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offer restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). +# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offerPayload restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). -createOffer.success.headline=Your offer has been published +createOffer.success.headline=Your offerPayload has been published createOffer.success.info=You can manage your open offers in the \"Portfolio\" screen under \"My open offers\". -# TODO remove createOffer.error.message=An error occurred when placing the offer.\n\n{0} +# TODO remove createOffer.error.message=An error occurred when placing the offerPayload.\n\n{0} -# Take offer +# Take offerPayload takeOffer.amount.prompt=Enter amount in BTC # TODO remove takeOffer.price.prompt=Enter price # TODO remove takeOffer.volume.prompt=Enter amount in {0} # TODO remove takeOffer.minAmount.prompt=Enter min. amount -# TODO remove takeOffer.amountPriceBox.title=Take offer +# TODO remove takeOffer.amountPriceBox.title=Take offerPayload # TODO remove takeOffer.amountPriceBox.subTitle=Buy bitcoin takeOffer.amountPriceBox.buy.amountDescription=Amount of bitcoin to sell takeOffer.amountPriceBox.sell.amountDescription=Amount of bitcoin to buy @@ -164,30 +164,30 @@ takeOffer.amountPriceBox.amountRangeDescription=Possible amount range # TODO remove takeOffer.amountPriceBox.sell.info=Enter the amount of bitcoin you want to buy. You can choose an amount between the minimum amount and the amount. # TODO remove takeOffer.amountPriceBox.next=Next step takeOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. -takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offer. -takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offer. +takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offerPayload. +takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offerPayload. takeOffer.validation.amountLargerThanOfferAmountMinusFee=That input amount would create dust change for the BTC seller. takeOffer.fundsBox.title=Fund your trade -takeOffer.fundsBox.isOfferAvailable=Check if offer is available ... +takeOffer.fundsBox.isOfferAvailable=Check if offerPayload is available ... takeOffer.fundsBox.totalsNeeded=Funds needed: # TODO remove takeOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above takeOffer.fundsBox.address=Trade wallet address: takeOffer.fundsBox.balance=Trade wallet balance: -# TODO remove takeOffer.fundsBox.buy.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.buy.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid in to a locked deposit address. At the end of a successful trade you will get back your security deposit and the bitcoin amount you sold will be transferred \ to the BTC buyer. -# TODO remove takeOffer.fundsBox.sell.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.sell.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid into a locked deposit address. At the end of a successful trade you will get back your security deposit. takeOffer.fundsBox.tradeAmount=Amount to sell: takeOffer.fundsBox.securityDeposit=Security deposit: -takeOffer.fundsBox.offerFee=Take offer fee: +takeOffer.fundsBox.offerFee=Take offerPayload fee: takeOffer.fundsBox.networkFee=Mining fee: takeOffer.fundsBox.total=Total: # TODO remove takeOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove takeOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove takeOffer.fundsBox.takeOffer=Take offer -takeOffer.fundsBox.takeOfferSpinnerInfo=Take offer in progress ... +# TODO remove takeOffer.fundsBox.takeOffer=Take offerPayload +takeOffer.fundsBox.takeOfferSpinnerInfo=Take offerPayload in progress ... takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.title=Advanced settings @@ -197,12 +197,12 @@ takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove takeOffer.advancedBox.county=Payments account country: -# TODO remove takeOffer.advancedBox.info=These are the offer restrictions your trading partner has defined in his offer. \ +# TODO remove takeOffer.advancedBox.info=These are the offerPayload restrictions your trading partner has defined in his offerPayload. \ Your settings match those constraints and you are able to trade with him. -takeOffer.success.headline=You have successfully taken an offer. +takeOffer.success.headline=You have successfully taken an offerPayload. takeOffer.success.info=You can see the status of your trade at the \"Portfolio\" screen under \"Open trades\". -takeOffer.error.message=An error occurred when taking the offer.\n\n{0} +takeOffer.error.message=An error occurred when taking the offerPayload.\n\n{0} # Payment methods # remove N/A=Not available diff --git a/core/src/main/java/io/bisq/alert/AlertManager.java b/core/src/main/java/io/bisq/alert/AlertManager.java index f90bfa1e25..9da7fdc4d7 100644 --- a/core/src/main/java/io/bisq/alert/AlertManager.java +++ b/core/src/main/java/io/bisq/alert/AlertManager.java @@ -21,9 +21,9 @@ import com.google.inject.Inject; import com.google.inject.name.Named; import io.bisq.app.AppOptionKeys; import io.bisq.app.DevEnv; -import io.bisq.common.crypto.KeyRing; +import io.bisq.messages.crypto.KeyRing; import io.bisq.messages.alert.Alert; -import io.bisq.p2p.P2PService; +import io.bisq.p2p.storage.P2PService; import io.bisq.p2p.storage.HashMapChangedListener; import io.bisq.p2p.storage.storageentry.ProtectedStorageEntry; import io.bisq.user.User; diff --git a/core/src/main/java/io/bisq/alert/PrivateNotificationManager.java b/core/src/main/java/io/bisq/alert/PrivateNotificationManager.java index aa8b2e2abb..4800939c80 100644 --- a/core/src/main/java/io/bisq/alert/PrivateNotificationManager.java +++ b/core/src/main/java/io/bisq/alert/PrivateNotificationManager.java @@ -21,15 +21,15 @@ import com.google.inject.Inject; import com.google.inject.name.Named; import io.bisq.app.AppOptionKeys; import io.bisq.app.DevEnv; -import io.bisq.common.crypto.KeyRing; -import io.bisq.common.crypto.PubKeyRing; -import io.bisq.crypto.DecryptedMsgWithPubKey; +import io.bisq.messages.crypto.KeyRing; +import io.bisq.messages.crypto.PubKeyRing; +import io.bisq.messages.DecryptedMsgWithPubKey; import io.bisq.messages.Message; import io.bisq.messages.alert.PrivateNotification; import io.bisq.messages.alert.PrivateNotificationMessage; -import io.bisq.p2p.NodeAddress; -import io.bisq.p2p.P2PService; -import io.bisq.p2p.messaging.SendMailboxMessageListener; +import io.bisq.messages.NodeAddress; +import io.bisq.p2p.storage.P2PService; +import io.bisq.messages.p2p.messaging.SendMailboxMessageListener; import javafx.beans.property.ObjectProperty; import javafx.beans.property.ReadOnlyObjectProperty; import javafx.beans.property.SimpleObjectProperty; diff --git a/core/src/main/java/io/bisq/app/BisqExecutable.java b/core/src/main/java/io/bisq/app/BisqExecutable.java index b601329f82..c11902ade8 100644 --- a/core/src/main/java/io/bisq/app/BisqExecutable.java +++ b/core/src/main/java/io/bisq/app/BisqExecutable.java @@ -24,7 +24,7 @@ import io.bisq.messages.btc.BitcoinNetwork; import io.bisq.messages.btc.BtcOptionKeys; import io.bisq.messages.dao.blockchain.RpcOptionKeys; import io.bisq.network.NetworkOptionKeys; -import io.bisq.p2p.P2PService; +import io.bisq.p2p.storage.P2PService; import io.bisq.util.joptsimple.EnumValueConverter; import joptsimple.OptionException; import joptsimple.OptionParser; diff --git a/core/src/main/java/io/bisq/arbitration/ArbitratorManager.java b/core/src/main/java/io/bisq/arbitration/ArbitratorManager.java index e025015a71..683399ba2d 100644 --- a/core/src/main/java/io/bisq/arbitration/ArbitratorManager.java +++ b/core/src/main/java/io/bisq/arbitration/ArbitratorManager.java @@ -21,14 +21,14 @@ import com.google.inject.Inject; import io.bisq.app.DevEnv; import io.bisq.common.Timer; import io.bisq.common.UserThread; -import io.bisq.common.crypto.KeyRing; +import io.bisq.messages.crypto.KeyRing; import io.bisq.common.handlers.ErrorMessageHandler; import io.bisq.common.handlers.ResultHandler; import io.bisq.messages.arbitration.Arbitrator; -import io.bisq.messages.user.Preferences; +import io.bisq.user.Preferences; import io.bisq.p2p.BootstrapListener; -import io.bisq.p2p.NodeAddress; -import io.bisq.p2p.P2PService; +import io.bisq.messages.NodeAddress; +import io.bisq.p2p.storage.P2PService; import io.bisq.p2p.storage.HashMapChangedListener; import io.bisq.p2p.storage.storageentry.ProtectedStorageEntry; import io.bisq.user.User; diff --git a/core/src/main/java/io/bisq/arbitration/ArbitratorService.java b/core/src/main/java/io/bisq/arbitration/ArbitratorService.java index 61e4932610..a9b96cd27a 100644 --- a/core/src/main/java/io/bisq/arbitration/ArbitratorService.java +++ b/core/src/main/java/io/bisq/arbitration/ArbitratorService.java @@ -20,8 +20,8 @@ package io.bisq.arbitration; import io.bisq.common.handlers.ErrorMessageHandler; import io.bisq.common.handlers.ResultHandler; import io.bisq.messages.arbitration.Arbitrator; -import io.bisq.p2p.NodeAddress; -import io.bisq.p2p.P2PService; +import io.bisq.messages.NodeAddress; +import io.bisq.p2p.storage.P2PService; import io.bisq.p2p.storage.HashMapChangedListener; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/core/src/main/java/io/bisq/arbitration/DisputeManager.java b/core/src/main/java/io/bisq/arbitration/DisputeManager.java index dd66720b6d..a72db6ecfd 100644 --- a/core/src/main/java/io/bisq/arbitration/DisputeManager.java +++ b/core/src/main/java/io/bisq/arbitration/DisputeManager.java @@ -27,20 +27,20 @@ import io.bisq.btc.wallet.BtcWalletService; import io.bisq.btc.wallet.TradeWalletService; import io.bisq.common.Timer; import io.bisq.common.UserThread; -import io.bisq.common.crypto.KeyRing; -import io.bisq.common.crypto.PubKeyRing; +import io.bisq.messages.crypto.KeyRing; +import io.bisq.messages.crypto.PubKeyRing; import io.bisq.common.handlers.FaultHandler; import io.bisq.common.handlers.ResultHandler; -import io.bisq.crypto.DecryptedMsgWithPubKey; +import io.bisq.messages.DecryptedMsgWithPubKey; import io.bisq.locale.Res; import io.bisq.messages.Message; import io.bisq.messages.arbitration.*; import io.bisq.messages.arbitration.payload.Attachment; import io.bisq.messages.trade.payload.Contract; import io.bisq.p2p.BootstrapListener; -import io.bisq.p2p.NodeAddress; -import io.bisq.p2p.P2PService; -import io.bisq.p2p.messaging.SendMailboxMessageListener; +import io.bisq.messages.NodeAddress; +import io.bisq.p2p.storage.P2PService; +import io.bisq.messages.p2p.messaging.SendMailboxMessageListener; import io.bisq.storage.Storage; import io.bisq.trade.Tradable; import io.bisq.trade.Trade; @@ -632,7 +632,7 @@ public class DisputeManager { else { Optional openOfferOptional = openOfferManager.getOpenOfferById(dispute.getTradeId()); if (openOfferOptional.isPresent()) - openOfferManager.closeOpenOffer(openOfferOptional.get().getOffer()); + openOfferManager.closeOpenOffer(openOfferOptional.get().getOffer().getOfferPayload()); } } diff --git a/core/src/main/java/io/bisq/btc/BitcoinModule.java b/core/src/main/java/io/bisq/btc/BitcoinModule.java index 456db48a3c..cd9bedd47e 100644 --- a/core/src/main/java/io/bisq/btc/BitcoinModule.java +++ b/core/src/main/java/io/bisq/btc/BitcoinModule.java @@ -28,8 +28,8 @@ import io.bisq.btc.wallet.WalletsSetup; import io.bisq.http.HttpClient; import io.bisq.messages.btc.BtcOptionKeys; import io.bisq.messages.btc.UserAgent; -import io.bisq.messages.btc.provider.fee.FeeService; -import io.bisq.messages.provider.price.PriceFeedService; +import io.bisq.provider.fee.FeeService; +import io.bisq.provider.price.PriceFeedService; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.core.env.Environment; diff --git a/core/src/main/java/io/bisq/btc/blockchain/providers/BlockchainTxProvider.java b/core/src/main/java/io/bisq/btc/blockchain/providers/BlockchainTxProvider.java index 5e86adaf41..16e007de5a 100644 --- a/core/src/main/java/io/bisq/btc/blockchain/providers/BlockchainTxProvider.java +++ b/core/src/main/java/io/bisq/btc/blockchain/providers/BlockchainTxProvider.java @@ -2,7 +2,7 @@ package io.bisq.btc.blockchain.providers; import io.bisq.http.HttpClient; import io.bisq.http.HttpException; -import io.bisq.messages.btc.provider.HttpClientProvider; +import io.bisq.provider.HttpClientProvider; import org.bitcoinj.core.Coin; import java.io.IOException; diff --git a/core/src/main/java/io/bisq/btc/provider/squ/BsqUtxoFeedProvider.java b/core/src/main/java/io/bisq/btc/provider/squ/BsqUtxoFeedProvider.java index a40f317afe..8aedb22ad4 100644 --- a/core/src/main/java/io/bisq/btc/provider/squ/BsqUtxoFeedProvider.java +++ b/core/src/main/java/io/bisq/btc/provider/squ/BsqUtxoFeedProvider.java @@ -3,7 +3,7 @@ package io.bisq.btc.provider.squ; import io.bisq.common.util.Tuple2; import io.bisq.http.HttpClient; import io.bisq.http.HttpException; -import io.bisq.messages.btc.provider.HttpClientProvider; +import io.bisq.provider.HttpClientProvider; import org.bitcoinj.core.Coin; import org.bitcoinj.core.Sha256Hash; import org.bitcoinj.core.UTXO; diff --git a/core/src/main/java/io/bisq/btc/provider/squ/BsqUtxoFeedService.java b/core/src/main/java/io/bisq/btc/provider/squ/BsqUtxoFeedService.java index 7e595117a5..91d4ff6811 100644 --- a/core/src/main/java/io/bisq/btc/provider/squ/BsqUtxoFeedService.java +++ b/core/src/main/java/io/bisq/btc/provider/squ/BsqUtxoFeedService.java @@ -26,7 +26,7 @@ import io.bisq.common.UserThread; import io.bisq.common.handlers.FaultHandler; import io.bisq.common.util.Tuple2; import io.bisq.http.HttpClient; -import io.bisq.messages.btc.provider.ProvidersRepository; +import io.bisq.provider.ProvidersRepository; import org.bitcoinj.core.UTXO; import org.jetbrains.annotations.NotNull; import org.slf4j.Logger; diff --git a/core/src/main/java/io/bisq/btc/wallet/BsqWalletService.java b/core/src/main/java/io/bisq/btc/wallet/BsqWalletService.java index 3fe7f3cfc6..075774f3b3 100644 --- a/core/src/main/java/io/bisq/btc/wallet/BsqWalletService.java +++ b/core/src/main/java/io/bisq/btc/wallet/BsqWalletService.java @@ -26,8 +26,8 @@ import io.bisq.common.handlers.ResultHandler; import io.bisq.dao.blockchain.BsqBlockchainManager; import io.bisq.dao.blockchain.BsqUTXO; import io.bisq.messages.btc.Restrictions; -import io.bisq.messages.btc.provider.fee.FeeService; -import io.bisq.messages.user.Preferences; +import io.bisq.provider.fee.FeeService; +import io.bisq.user.Preferences; import org.bitcoinj.core.*; import org.bitcoinj.script.Script; import org.bitcoinj.wallet.CoinSelection; diff --git a/core/src/main/java/io/bisq/btc/wallet/BtcWalletService.java b/core/src/main/java/io/bisq/btc/wallet/BtcWalletService.java index ef46009865..b5589d5903 100644 --- a/core/src/main/java/io/bisq/btc/wallet/BtcWalletService.java +++ b/core/src/main/java/io/bisq/btc/wallet/BtcWalletService.java @@ -28,8 +28,8 @@ import io.bisq.btc.exceptions.TransactionVerificationException; import io.bisq.btc.exceptions.WalletException; import io.bisq.common.handlers.ErrorMessageHandler; import io.bisq.messages.btc.Restrictions; -import io.bisq.messages.btc.provider.fee.FeeService; -import io.bisq.messages.user.Preferences; +import io.bisq.provider.fee.FeeService; +import io.bisq.user.Preferences; import org.bitcoinj.core.*; import org.bitcoinj.crypto.DeterministicKey; import org.bitcoinj.crypto.KeyCrypterScrypt; diff --git a/core/src/main/java/io/bisq/btc/wallet/TradeWalletService.java b/core/src/main/java/io/bisq/btc/wallet/TradeWalletService.java index a073ef866b..e2ba1a503b 100644 --- a/core/src/main/java/io/bisq/btc/wallet/TradeWalletService.java +++ b/core/src/main/java/io/bisq/btc/wallet/TradeWalletService.java @@ -31,7 +31,7 @@ import io.bisq.btc.exceptions.TransactionVerificationException; import io.bisq.btc.exceptions.WalletException; import io.bisq.common.util.Utilities; import io.bisq.messages.btc.data.RawTransactionInput; -import io.bisq.messages.user.Preferences; +import io.bisq.user.Preferences; import org.bitcoinj.core.*; import org.bitcoinj.crypto.DeterministicKey; import org.bitcoinj.crypto.TransactionSignature; @@ -240,7 +240,7 @@ public class TradeWalletService { // Find the needed inputs to pay the output, optionally add 1 change output. // Normally only 1 input and no change output is used, but we support multiple inputs and 1 change output. - // Our spending transaction output is from the create offer fee payment. + // Our spending transaction output is from the create offer fee payment. addAvailableInputsAndChangeOutputs(dummyTX, takersAddress, takersChangeAddress, txFee); // The completeTx() call signs the input, but we don't want to pass over signed tx inputs so we remove the signature diff --git a/core/src/main/java/io/bisq/btc/wallet/WalletService.java b/core/src/main/java/io/bisq/btc/wallet/WalletService.java index 72a4bc22c8..52c4d97856 100644 --- a/core/src/main/java/io/bisq/btc/wallet/WalletService.java +++ b/core/src/main/java/io/bisq/btc/wallet/WalletService.java @@ -27,8 +27,8 @@ import io.bisq.btc.listeners.TxConfidenceListener; import io.bisq.common.handlers.ErrorMessageHandler; import io.bisq.common.handlers.ResultHandler; import io.bisq.common.util.Utilities; -import io.bisq.messages.btc.provider.fee.FeeService; -import io.bisq.messages.user.Preferences; +import io.bisq.provider.fee.FeeService; +import io.bisq.user.Preferences; import org.bitcoinj.core.*; import org.bitcoinj.crypto.DeterministicKey; import org.bitcoinj.crypto.KeyCrypter; diff --git a/core/src/main/java/io/bisq/btc/wallet/WalletsSetup.java b/core/src/main/java/io/bisq/btc/wallet/WalletsSetup.java index 337b2fcc14..fb5d9e983a 100644 --- a/core/src/main/java/io/bisq/btc/wallet/WalletsSetup.java +++ b/core/src/main/java/io/bisq/btc/wallet/WalletsSetup.java @@ -32,7 +32,7 @@ import io.bisq.common.handlers.ExceptionHandler; import io.bisq.common.handlers.ResultHandler; import io.bisq.messages.btc.BtcOptionKeys; import io.bisq.messages.btc.UserAgent; -import io.bisq.messages.user.Preferences; +import io.bisq.user.Preferences; import io.bisq.network.DnsLookupTor; import io.bisq.network.NetworkOptionKeys; import io.bisq.network.Socks5MultiDiscovery; diff --git a/core/src/main/java/io/bisq/dao/compensation/CompensationRequestManager.java b/core/src/main/java/io/bisq/dao/compensation/CompensationRequestManager.java index f9ceca9b44..4d059cd341 100644 --- a/core/src/main/java/io/bisq/dao/compensation/CompensationRequestManager.java +++ b/core/src/main/java/io/bisq/dao/compensation/CompensationRequestManager.java @@ -24,9 +24,9 @@ import io.bisq.btc.wallet.BtcWalletService; import io.bisq.dao.DaoPeriodService; import io.bisq.dao.vote.VotingDefaultValues; import io.bisq.messages.dao.compensation.payload.CompensationRequestPayload; -import io.bisq.p2p.P2PService; +import io.bisq.p2p.storage.P2PService; import io.bisq.p2p.storage.HashMapChangedListener; -import io.bisq.p2p.storage.payload.StoragePayload; +import io.bisq.payload.StoragePayload; import io.bisq.p2p.storage.storageentry.ProtectedStorageEntry; import io.bisq.storage.Storage; import javafx.collections.FXCollections; diff --git a/core/src/main/java/io/bisq/dao/vote/VotingManager.java b/core/src/main/java/io/bisq/dao/vote/VotingManager.java index 61370917c9..97c100bead 100644 --- a/core/src/main/java/io/bisq/dao/vote/VotingManager.java +++ b/core/src/main/java/io/bisq/dao/vote/VotingManager.java @@ -26,7 +26,7 @@ import io.bisq.common.util.Utilities; import io.bisq.dao.DaoPeriodService; import io.bisq.dao.compensation.CompensationRequest; import io.bisq.dao.compensation.CompensationRequestManager; -import io.bisq.messages.btc.provider.fee.FeeService; +import io.bisq.provider.fee.FeeService; import io.bisq.messages.dao.compensation.payload.CompensationRequestPayload; import io.bisq.storage.Storage; import org.apache.commons.lang3.StringUtils; diff --git a/core/src/main/java/io/bisq/filter/FilterManager.java b/core/src/main/java/io/bisq/filter/FilterManager.java index bba3e30ce9..6c214ab3be 100644 --- a/core/src/main/java/io/bisq/filter/FilterManager.java +++ b/core/src/main/java/io/bisq/filter/FilterManager.java @@ -21,11 +21,11 @@ import com.google.inject.Inject; import com.google.inject.name.Named; import io.bisq.app.AppOptionKeys; import io.bisq.app.DevEnv; -import io.bisq.common.crypto.KeyRing; +import io.bisq.messages.crypto.KeyRing; import io.bisq.common.wire.proto.Messages; import io.bisq.messages.filter.payload.Filter; import io.bisq.messages.filter.payload.PaymentAccountFilter; -import io.bisq.p2p.P2PService; +import io.bisq.p2p.storage.P2PService; import io.bisq.p2p.storage.HashMapChangedListener; import io.bisq.p2p.storage.storageentry.ProtectedStorageEntry; import io.bisq.user.User; diff --git a/core/src/main/java/io/bisq/payment/AliPayAccount.java b/core/src/main/java/io/bisq/payment/AliPayAccount.java index d3c8de5f36..c93575b951 100644 --- a/core/src/main/java/io/bisq/payment/AliPayAccount.java +++ b/core/src/main/java/io/bisq/payment/AliPayAccount.java @@ -18,10 +18,11 @@ package io.bisq.payment; import io.bisq.app.Version; -import io.bisq.messages.locale.FiatCurrency; +import io.bisq.locale.FiatCurrency; import io.bisq.messages.payment.PaymentMethod; import io.bisq.messages.payment.payload.AliPayAccountContractData; import io.bisq.messages.payment.payload.PaymentAccountContractData; +import io.bisq.user.Preferences; public final class AliPayAccount extends PaymentAccount { // That object is saved to disc. We need to take care of changes to not break deserialization. @@ -29,7 +30,7 @@ public final class AliPayAccount extends PaymentAccount { public AliPayAccount() { super(PaymentMethod.ALI_PAY); - setSingleTradeCurrency(new FiatCurrency("CNY")); + setSingleTradeCurrency(new FiatCurrency("CNY", Preferences.getDefaultLocale())); } @Override diff --git a/core/src/main/java/io/bisq/payment/ChaseQuickPayAccount.java b/core/src/main/java/io/bisq/payment/ChaseQuickPayAccount.java index eef3fa2124..df22f4d69e 100644 --- a/core/src/main/java/io/bisq/payment/ChaseQuickPayAccount.java +++ b/core/src/main/java/io/bisq/payment/ChaseQuickPayAccount.java @@ -18,10 +18,11 @@ package io.bisq.payment; import io.bisq.app.Version; -import io.bisq.messages.locale.FiatCurrency; +import io.bisq.locale.FiatCurrency; import io.bisq.messages.payment.PaymentMethod; import io.bisq.messages.payment.payload.ChaseQuickPayAccountContractData; import io.bisq.messages.payment.payload.PaymentAccountContractData; +import io.bisq.user.Preferences; public final class ChaseQuickPayAccount extends PaymentAccount { // That object is saved to disc. We need to take care of changes to not break deserialization. @@ -29,7 +30,7 @@ public final class ChaseQuickPayAccount extends PaymentAccount { public ChaseQuickPayAccount() { super(PaymentMethod.CHASE_QUICK_PAY); - setSingleTradeCurrency(new FiatCurrency("USD")); + setSingleTradeCurrency(new FiatCurrency("USD", Preferences.getDefaultLocale())); } @Override diff --git a/core/src/main/java/io/bisq/payment/ClearXchangeAccount.java b/core/src/main/java/io/bisq/payment/ClearXchangeAccount.java index c4434268cb..af5f7d84a1 100644 --- a/core/src/main/java/io/bisq/payment/ClearXchangeAccount.java +++ b/core/src/main/java/io/bisq/payment/ClearXchangeAccount.java @@ -18,10 +18,11 @@ package io.bisq.payment; import io.bisq.app.Version; -import io.bisq.messages.locale.FiatCurrency; +import io.bisq.locale.FiatCurrency; import io.bisq.messages.payment.PaymentMethod; import io.bisq.messages.payment.payload.ClearXchangeAccountContractData; import io.bisq.messages.payment.payload.PaymentAccountContractData; +import io.bisq.user.Preferences; public final class ClearXchangeAccount extends PaymentAccount { // That object is saved to disc. We need to take care of changes to not break deserialization. @@ -29,7 +30,7 @@ public final class ClearXchangeAccount extends PaymentAccount { public ClearXchangeAccount() { super(PaymentMethod.CLEAR_X_CHANGE); - setSingleTradeCurrency(new FiatCurrency("USD")); + setSingleTradeCurrency(new FiatCurrency("USD", Preferences.getDefaultLocale())); } @Override diff --git a/core/src/main/java/io/bisq/payment/CountryBasedPaymentAccount.java b/core/src/main/java/io/bisq/payment/CountryBasedPaymentAccount.java index 761088c8ae..ee369f9394 100644 --- a/core/src/main/java/io/bisq/payment/CountryBasedPaymentAccount.java +++ b/core/src/main/java/io/bisq/payment/CountryBasedPaymentAccount.java @@ -18,7 +18,7 @@ package io.bisq.payment; import io.bisq.app.Version; -import io.bisq.messages.locale.Country; +import io.bisq.locale.Country; import io.bisq.messages.payment.PaymentMethod; import io.bisq.messages.payment.payload.CountryBasedPaymentAccountContractData; import org.jetbrains.annotations.NotNull; diff --git a/core/src/main/java/io/bisq/payment/FasterPaymentsAccount.java b/core/src/main/java/io/bisq/payment/FasterPaymentsAccount.java index b4b451297f..85dd476584 100644 --- a/core/src/main/java/io/bisq/payment/FasterPaymentsAccount.java +++ b/core/src/main/java/io/bisq/payment/FasterPaymentsAccount.java @@ -18,10 +18,11 @@ package io.bisq.payment; import io.bisq.app.Version; -import io.bisq.messages.locale.FiatCurrency; +import io.bisq.locale.FiatCurrency; import io.bisq.messages.payment.PaymentMethod; import io.bisq.messages.payment.payload.FasterPaymentsAccountContractData; import io.bisq.messages.payment.payload.PaymentAccountContractData; +import io.bisq.user.Preferences; public final class FasterPaymentsAccount extends PaymentAccount { // That object is saved to disc. We need to take care of changes to not break deserialization. @@ -29,7 +30,7 @@ public final class FasterPaymentsAccount extends PaymentAccount { public FasterPaymentsAccount() { super(PaymentMethod.FASTER_PAYMENTS); - setSingleTradeCurrency(new FiatCurrency("GBP")); + setSingleTradeCurrency(new FiatCurrency("GBP", Preferences.getDefaultLocale())); } @Override diff --git a/core/src/main/java/io/bisq/payment/InteracETransferAccount.java b/core/src/main/java/io/bisq/payment/InteracETransferAccount.java index b693f06a14..59433c7b2f 100644 --- a/core/src/main/java/io/bisq/payment/InteracETransferAccount.java +++ b/core/src/main/java/io/bisq/payment/InteracETransferAccount.java @@ -18,10 +18,11 @@ package io.bisq.payment; import io.bisq.app.Version; -import io.bisq.messages.locale.FiatCurrency; +import io.bisq.locale.FiatCurrency; import io.bisq.messages.payment.PaymentMethod; import io.bisq.messages.payment.payload.InteracETransferAccountContractData; import io.bisq.messages.payment.payload.PaymentAccountContractData; +import io.bisq.user.Preferences; public final class InteracETransferAccount extends PaymentAccount { // That object is saved to disc. We need to take care of changes to not break deserialization. @@ -29,7 +30,7 @@ public final class InteracETransferAccount extends PaymentAccount { public InteracETransferAccount() { super(PaymentMethod.INTERAC_E_TRANSFER); - setSingleTradeCurrency(new FiatCurrency("CAD")); + setSingleTradeCurrency(new FiatCurrency("CAD", Preferences.getDefaultLocale())); } @Override diff --git a/core/src/main/java/io/bisq/payment/OKPayAccount.java b/core/src/main/java/io/bisq/payment/OKPayAccount.java index 185d5f6e0c..b4752562da 100644 --- a/core/src/main/java/io/bisq/payment/OKPayAccount.java +++ b/core/src/main/java/io/bisq/payment/OKPayAccount.java @@ -18,10 +18,11 @@ package io.bisq.payment; import io.bisq.app.Version; -import io.bisq.messages.locale.CurrencyUtil; +import io.bisq.locale.CurrencyUtil; import io.bisq.messages.payment.PaymentMethod; import io.bisq.messages.payment.payload.OKPayAccountContractData; import io.bisq.messages.payment.payload.PaymentAccountContractData; +import io.bisq.user.Preferences; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -34,7 +35,7 @@ public final class OKPayAccount extends PaymentAccount { public OKPayAccount() { super(PaymentMethod.OK_PAY); - tradeCurrencies.addAll(CurrencyUtil.getAllOKPayCurrencies()); + tradeCurrencies.addAll(CurrencyUtil.getAllOKPayCurrencies(Preferences.getDefaultLocale())); } @Override diff --git a/core/src/main/java/io/bisq/payment/PaymentAccount.java b/core/src/main/java/io/bisq/payment/PaymentAccount.java index 78796dbd83..0cb5b49dd6 100644 --- a/core/src/main/java/io/bisq/payment/PaymentAccount.java +++ b/core/src/main/java/io/bisq/payment/PaymentAccount.java @@ -19,7 +19,7 @@ package io.bisq.payment; import io.bisq.app.Version; import io.bisq.common.persistance.Persistable; -import io.bisq.messages.locale.TradeCurrency; +import io.bisq.locale.TradeCurrency; import io.bisq.messages.payment.PaymentMethod; import io.bisq.messages.payment.payload.PaymentAccountContractData; import org.slf4j.Logger; diff --git a/core/src/main/java/io/bisq/payment/PaymentAccountUtil.java b/core/src/main/java/io/bisq/payment/PaymentAccountUtil.java index d6052804f6..981fa96a5f 100644 --- a/core/src/main/java/io/bisq/payment/PaymentAccountUtil.java +++ b/core/src/main/java/io/bisq/payment/PaymentAccountUtil.java @@ -1,8 +1,8 @@ package io.bisq.payment; -import io.bisq.messages.locale.TradeCurrency; +import io.bisq.locale.TradeCurrency; import io.bisq.messages.payment.PaymentMethod; -import io.bisq.messages.trade.offer.payload.Offer; +import io.bisq.p2p.protocol.availability.Offer; import javafx.collections.FXCollections; import javafx.collections.ObservableList; import org.slf4j.Logger; diff --git a/core/src/main/java/io/bisq/payment/PerfectMoneyAccount.java b/core/src/main/java/io/bisq/payment/PerfectMoneyAccount.java index 98c6cdeee6..5558622e4c 100644 --- a/core/src/main/java/io/bisq/payment/PerfectMoneyAccount.java +++ b/core/src/main/java/io/bisq/payment/PerfectMoneyAccount.java @@ -18,10 +18,11 @@ package io.bisq.payment; import io.bisq.app.Version; -import io.bisq.messages.locale.FiatCurrency; +import io.bisq.locale.FiatCurrency; import io.bisq.messages.payment.PaymentMethod; import io.bisq.messages.payment.payload.PaymentAccountContractData; import io.bisq.messages.payment.payload.PerfectMoneyAccountContractData; +import io.bisq.user.Preferences; public final class PerfectMoneyAccount extends PaymentAccount { // That object is saved to disc. We need to take care of changes to not break deserialization. @@ -29,7 +30,7 @@ public final class PerfectMoneyAccount extends PaymentAccount { public PerfectMoneyAccount() { super(PaymentMethod.PERFECT_MONEY); - setSingleTradeCurrency(new FiatCurrency("USD")); + setSingleTradeCurrency(new FiatCurrency("USD", Preferences.getDefaultLocale())); } @Override diff --git a/core/src/main/java/io/bisq/payment/SepaAccount.java b/core/src/main/java/io/bisq/payment/SepaAccount.java index 2fbb3d5533..9702ae46ac 100644 --- a/core/src/main/java/io/bisq/payment/SepaAccount.java +++ b/core/src/main/java/io/bisq/payment/SepaAccount.java @@ -18,9 +18,11 @@ package io.bisq.payment; import io.bisq.app.Version; +import io.bisq.locale.CountryUtil; import io.bisq.messages.payment.PaymentMethod; import io.bisq.messages.payment.payload.PaymentAccountContractData; import io.bisq.messages.payment.payload.SepaAccountContractData; +import io.bisq.user.Preferences; import java.util.List; @@ -34,7 +36,8 @@ public final class SepaAccount extends CountryBasedPaymentAccount implements Ban @Override protected PaymentAccountContractData setContractData() { - return new SepaAccountContractData(paymentMethod.getId(), id, paymentMethod.getMaxTradePeriod()); + return new SepaAccountContractData(paymentMethod.getId(), id, paymentMethod.getMaxTradePeriod(), + CountryUtil.getAllSepaCountries(Preferences.getDefaultLocale())); } @Override diff --git a/core/src/main/java/io/bisq/payment/SwishAccount.java b/core/src/main/java/io/bisq/payment/SwishAccount.java index 4b67fbc127..3340e193a8 100644 --- a/core/src/main/java/io/bisq/payment/SwishAccount.java +++ b/core/src/main/java/io/bisq/payment/SwishAccount.java @@ -18,10 +18,11 @@ package io.bisq.payment; import io.bisq.app.Version; -import io.bisq.messages.locale.FiatCurrency; +import io.bisq.locale.FiatCurrency; import io.bisq.messages.payment.PaymentMethod; import io.bisq.messages.payment.payload.PaymentAccountContractData; import io.bisq.messages.payment.payload.SwishAccountContractData; +import io.bisq.user.Preferences; public final class SwishAccount extends PaymentAccount { // That object is saved to disc. We need to take care of changes to not break deserialization. @@ -29,7 +30,7 @@ public final class SwishAccount extends PaymentAccount { public SwishAccount() { super(PaymentMethod.SWISH); - setSingleTradeCurrency(new FiatCurrency("SEK")); + setSingleTradeCurrency(new FiatCurrency("SEK", Preferences.getDefaultLocale())); } @Override diff --git a/core/src/main/java/io/bisq/payment/USPostalMoneyOrderAccount.java b/core/src/main/java/io/bisq/payment/USPostalMoneyOrderAccount.java index a2a4f20dd2..eba98e6d99 100644 --- a/core/src/main/java/io/bisq/payment/USPostalMoneyOrderAccount.java +++ b/core/src/main/java/io/bisq/payment/USPostalMoneyOrderAccount.java @@ -18,10 +18,11 @@ package io.bisq.payment; import io.bisq.app.Version; -import io.bisq.messages.locale.FiatCurrency; +import io.bisq.locale.FiatCurrency; import io.bisq.messages.payment.PaymentMethod; import io.bisq.messages.payment.payload.PaymentAccountContractData; import io.bisq.messages.payment.payload.USPostalMoneyOrderAccountContractData; +import io.bisq.user.Preferences; public final class USPostalMoneyOrderAccount extends PaymentAccount { // That object is saved to disc. We need to take care of changes to not break deserialization. @@ -29,7 +30,7 @@ public final class USPostalMoneyOrderAccount extends PaymentAccount { public USPostalMoneyOrderAccount() { super(PaymentMethod.US_POSTAL_MONEY_ORDER); - setSingleTradeCurrency(new FiatCurrency("USD")); + setSingleTradeCurrency(new FiatCurrency("USD", Preferences.getDefaultLocale())); } @Override diff --git a/core/src/main/java/io/bisq/trade/BuyerAsOffererTrade.java b/core/src/main/java/io/bisq/trade/BuyerAsOffererTrade.java index 066edde637..76170bac65 100644 --- a/core/src/main/java/io/bisq/trade/BuyerAsOffererTrade.java +++ b/core/src/main/java/io/bisq/trade/BuyerAsOffererTrade.java @@ -18,9 +18,9 @@ package io.bisq.trade; import io.bisq.app.Version; +import io.bisq.messages.NodeAddress; import io.bisq.messages.protocol.trade.TradeMessage; -import io.bisq.messages.trade.offer.payload.Offer; -import io.bisq.p2p.NodeAddress; +import io.bisq.p2p.protocol.availability.Offer; import io.bisq.storage.Storage; import io.bisq.trade.protocol.trade.BuyerAsOffererProtocol; import io.bisq.trade.protocol.trade.OffererProtocol; diff --git a/core/src/main/java/io/bisq/trade/BuyerAsTakerTrade.java b/core/src/main/java/io/bisq/trade/BuyerAsTakerTrade.java index c29a264b51..7e16295680 100644 --- a/core/src/main/java/io/bisq/trade/BuyerAsTakerTrade.java +++ b/core/src/main/java/io/bisq/trade/BuyerAsTakerTrade.java @@ -18,8 +18,8 @@ package io.bisq.trade; import io.bisq.app.Version; -import io.bisq.messages.trade.offer.payload.Offer; -import io.bisq.p2p.NodeAddress; +import io.bisq.messages.NodeAddress; +import io.bisq.p2p.protocol.availability.Offer; import io.bisq.storage.Storage; import io.bisq.trade.protocol.trade.BuyerAsTakerProtocol; import io.bisq.trade.protocol.trade.TakerProtocol; diff --git a/core/src/main/java/io/bisq/trade/BuyerTrade.java b/core/src/main/java/io/bisq/trade/BuyerTrade.java index 65e45fec97..3a22db235a 100644 --- a/core/src/main/java/io/bisq/trade/BuyerTrade.java +++ b/core/src/main/java/io/bisq/trade/BuyerTrade.java @@ -20,8 +20,8 @@ package io.bisq.trade; import io.bisq.app.Version; import io.bisq.common.handlers.ErrorMessageHandler; import io.bisq.common.handlers.ResultHandler; -import io.bisq.messages.trade.offer.payload.Offer; -import io.bisq.p2p.NodeAddress; +import io.bisq.messages.NodeAddress; +import io.bisq.p2p.protocol.availability.Offer; import io.bisq.storage.Storage; import io.bisq.trade.protocol.trade.BuyerProtocol; import org.bitcoinj.core.Coin; diff --git a/core/src/main/java/io/bisq/trade/OffererTrade.java b/core/src/main/java/io/bisq/trade/OffererTrade.java index 31eedb48ef..33f6c9504b 100644 --- a/core/src/main/java/io/bisq/trade/OffererTrade.java +++ b/core/src/main/java/io/bisq/trade/OffererTrade.java @@ -19,7 +19,7 @@ package io.bisq.trade; import io.bisq.messages.protocol.trade.TradeMessage; -import io.bisq.p2p.NodeAddress; +import io.bisq.messages.NodeAddress; public interface OffererTrade { void handleTakeOfferRequest(TradeMessage message, NodeAddress peerNodeAddress); diff --git a/core/src/main/java/io/bisq/trade/SellerAsOffererTrade.java b/core/src/main/java/io/bisq/trade/SellerAsOffererTrade.java index 86247bd6ea..a172c647e4 100644 --- a/core/src/main/java/io/bisq/trade/SellerAsOffererTrade.java +++ b/core/src/main/java/io/bisq/trade/SellerAsOffererTrade.java @@ -18,9 +18,9 @@ package io.bisq.trade; import io.bisq.app.Version; +import io.bisq.messages.NodeAddress; import io.bisq.messages.protocol.trade.TradeMessage; -import io.bisq.messages.trade.offer.payload.Offer; -import io.bisq.p2p.NodeAddress; +import io.bisq.p2p.protocol.availability.Offer; import io.bisq.storage.Storage; import io.bisq.trade.protocol.trade.OffererProtocol; import io.bisq.trade.protocol.trade.SellerAsOffererProtocol; diff --git a/core/src/main/java/io/bisq/trade/SellerAsTakerTrade.java b/core/src/main/java/io/bisq/trade/SellerAsTakerTrade.java index 497db0fb48..31313e2471 100644 --- a/core/src/main/java/io/bisq/trade/SellerAsTakerTrade.java +++ b/core/src/main/java/io/bisq/trade/SellerAsTakerTrade.java @@ -18,8 +18,8 @@ package io.bisq.trade; import io.bisq.app.Version; -import io.bisq.messages.trade.offer.payload.Offer; -import io.bisq.p2p.NodeAddress; +import io.bisq.messages.NodeAddress; +import io.bisq.p2p.protocol.availability.Offer; import io.bisq.storage.Storage; import io.bisq.trade.protocol.trade.SellerAsTakerProtocol; import io.bisq.trade.protocol.trade.TakerProtocol; diff --git a/core/src/main/java/io/bisq/trade/SellerTrade.java b/core/src/main/java/io/bisq/trade/SellerTrade.java index 682008ab1b..73915d13c4 100644 --- a/core/src/main/java/io/bisq/trade/SellerTrade.java +++ b/core/src/main/java/io/bisq/trade/SellerTrade.java @@ -20,8 +20,8 @@ package io.bisq.trade; import io.bisq.app.Version; import io.bisq.common.handlers.ErrorMessageHandler; import io.bisq.common.handlers.ResultHandler; -import io.bisq.messages.trade.offer.payload.Offer; -import io.bisq.p2p.NodeAddress; +import io.bisq.messages.NodeAddress; +import io.bisq.p2p.protocol.availability.Offer; import io.bisq.storage.Storage; import io.bisq.trade.protocol.trade.SellerProtocol; import org.bitcoinj.core.Coin; diff --git a/core/src/main/java/io/bisq/trade/Tradable.java b/core/src/main/java/io/bisq/trade/Tradable.java index bfa20a06d9..673e80d615 100644 --- a/core/src/main/java/io/bisq/trade/Tradable.java +++ b/core/src/main/java/io/bisq/trade/Tradable.java @@ -18,7 +18,7 @@ package io.bisq.trade; import io.bisq.common.persistance.Persistable; -import io.bisq.messages.trade.offer.payload.Offer; +import io.bisq.p2p.protocol.availability.Offer; import java.util.Date; diff --git a/core/src/main/java/io/bisq/trade/Trade.java b/core/src/main/java/io/bisq/trade/Trade.java index 81a2fcec0b..dbb6d9d3d9 100644 --- a/core/src/main/java/io/bisq/trade/Trade.java +++ b/core/src/main/java/io/bisq/trade/Trade.java @@ -26,15 +26,15 @@ import io.bisq.app.Version; import io.bisq.arbitration.ArbitratorManager; import io.bisq.btc.wallet.BtcWalletService; import io.bisq.btc.wallet.TradeWalletService; -import io.bisq.common.crypto.KeyRing; import io.bisq.common.taskrunner.Model; -import io.bisq.crypto.DecryptedMsgWithPubKey; import io.bisq.filter.FilterManager; +import io.bisq.messages.DecryptedMsgWithPubKey; +import io.bisq.messages.NodeAddress; import io.bisq.messages.arbitration.Arbitrator; -import io.bisq.messages.trade.offer.payload.Offer; +import io.bisq.messages.crypto.KeyRing; import io.bisq.messages.trade.payload.Contract; -import io.bisq.p2p.NodeAddress; -import io.bisq.p2p.P2PService; +import io.bisq.p2p.protocol.availability.Offer; +import io.bisq.p2p.storage.P2PService; import io.bisq.storage.Storage; import io.bisq.trade.offer.OpenOfferManager; import io.bisq.trade.protocol.trade.ProcessModel; diff --git a/core/src/main/java/io/bisq/trade/TradeManager.java b/core/src/main/java/io/bisq/trade/TradeManager.java index 931ec642d6..964a780274 100644 --- a/core/src/main/java/io/bisq/trade/TradeManager.java +++ b/core/src/main/java/io/bisq/trade/TradeManager.java @@ -25,24 +25,25 @@ import io.bisq.btc.AddressEntryException; import io.bisq.btc.wallet.BtcWalletService; import io.bisq.btc.wallet.TradeWalletService; import io.bisq.common.UserThread; -import io.bisq.common.crypto.KeyRing; import io.bisq.common.handlers.ErrorMessageHandler; import io.bisq.common.handlers.FaultHandler; import io.bisq.common.handlers.ResultHandler; -import io.bisq.crypto.DecryptedMsgWithPubKey; import io.bisq.filter.FilterManager; +import io.bisq.messages.DecryptedDirectMessageListener; +import io.bisq.messages.DecryptedMsgWithPubKey; import io.bisq.messages.Message; -import io.bisq.messages.protocol.availability.OfferAvailabilityModel; +import io.bisq.messages.NodeAddress; +import io.bisq.messages.crypto.KeyRing; +import io.bisq.messages.p2p.messaging.DecryptedMailboxListener; import io.bisq.messages.protocol.trade.TradeMessage; -import io.bisq.messages.provider.price.PriceFeedService; -import io.bisq.messages.trade.offer.payload.Offer; +import io.bisq.messages.trade.offer.payload.OfferPayload; import io.bisq.messages.trade.protocol.trade.messages.PayDepositRequest; import io.bisq.messages.trade.statistics.payload.TradeStatistics; import io.bisq.p2p.BootstrapListener; -import io.bisq.p2p.NodeAddress; -import io.bisq.p2p.P2PService; -import io.bisq.p2p.messaging.DecryptedDirectMessageListener; -import io.bisq.p2p.messaging.DecryptedMailboxListener; +import io.bisq.p2p.protocol.availability.Offer; +import io.bisq.p2p.protocol.availability.OfferAvailabilityModel; +import io.bisq.p2p.storage.P2PService; +import io.bisq.provider.price.PriceFeedService; import io.bisq.storage.Storage; import io.bisq.trade.closed.ClosedTradableManager; import io.bisq.trade.failed.FailedTradesManager; @@ -234,7 +235,7 @@ public class TradeManager { private void publishTradeStatistics(List trades) { for (int i = 0; i < trades.size(); i++) { Trade trade = trades.get(i); - TradeStatistics tradeStatistics = new TradeStatistics(trade.getOffer(), + TradeStatistics tradeStatistics = new TradeStatistics(trade.getOffer().getOfferPayload(), trade.getTradePrice(), trade.getTradeAmount(), trade.getDate(), @@ -275,7 +276,7 @@ public class TradeManager { checkArgument(message instanceof PayDepositRequest, "message must be PayDepositRequest"); PayDepositRequest payDepositRequest = (PayDepositRequest) message; Trade trade; - if (offer.getDirection() == Offer.Direction.BUY) + if (offer.getDirection() == OfferPayload.Direction.BUY) trade = new BuyerAsOffererTrade(offer, payDepositRequest.txFee, payDepositRequest.takeOfferFee, tradableListStorage); else trade = new SellerAsOffererTrade(offer, payDepositRequest.txFee, payDepositRequest.takeOfferFee, tradableListStorage); @@ -344,7 +345,7 @@ public class TradeManager { final OfferAvailabilityModel model = getOfferAvailabilityModel(offer); offer.checkOfferAvailability(model, () -> { - if (offer.getState() == Offer.State.AVAILABLE) + if (offer.getState() == OfferPayload.State.AVAILABLE) createTrade(amount, txFee, takeOfferFee, tradePrice, fundsNeededForTrade, offer, paymentAccountId, useSavingsWallet, model, tradeResultHandler); }, errorMessageHandler::handleErrorMessage); @@ -361,7 +362,7 @@ public class TradeManager { OfferAvailabilityModel model, TradeResultHandler tradeResultHandler) { Trade trade; - if (offer.getDirection() == Offer.Direction.BUY) + if (offer.getDirection() == OfferPayload.Direction.BUY) trade = new SellerAsTakerTrade(offer, amount, txFee, takeOfferFee, tradePrice, model.getPeerNodeAddress(), tradableListStorage); else trade = new BuyerAsTakerTrade(offer, amount, txFee, takeOfferFee, tradePrice, model.getPeerNodeAddress(), tradableListStorage); @@ -474,9 +475,9 @@ public class TradeManager { public boolean isBuyer(Offer offer) { // If I am the offerer, we use the offer direction, otherwise the mirrored direction if (isMyOffer(offer)) - return offer.getDirection() == Offer.Direction.BUY; + return offer.getDirection() == OfferPayload.Direction.BUY; else - return offer.getDirection() == Offer.Direction.SELL; + return offer.getDirection() == OfferPayload.Direction.SELL; } public Optional getTradeById(String tradeId) { diff --git a/core/src/main/java/io/bisq/trade/closed/ClosedTradableManager.java b/core/src/main/java/io/bisq/trade/closed/ClosedTradableManager.java index 79badd995b..56932174e3 100644 --- a/core/src/main/java/io/bisq/trade/closed/ClosedTradableManager.java +++ b/core/src/main/java/io/bisq/trade/closed/ClosedTradableManager.java @@ -18,9 +18,9 @@ package io.bisq.trade.closed; import com.google.inject.Inject; -import io.bisq.common.crypto.KeyRing; -import io.bisq.messages.provider.price.PriceFeedService; -import io.bisq.messages.trade.offer.payload.Offer; +import io.bisq.messages.crypto.KeyRing; +import io.bisq.p2p.protocol.availability.Offer; +import io.bisq.provider.price.PriceFeedService; import io.bisq.storage.Storage; import io.bisq.trade.Tradable; import io.bisq.trade.TradableList; diff --git a/core/src/main/java/io/bisq/trade/failed/FailedTradesManager.java b/core/src/main/java/io/bisq/trade/failed/FailedTradesManager.java index d22a7511b4..2b6ac61a95 100644 --- a/core/src/main/java/io/bisq/trade/failed/FailedTradesManager.java +++ b/core/src/main/java/io/bisq/trade/failed/FailedTradesManager.java @@ -18,9 +18,9 @@ package io.bisq.trade.failed; import com.google.inject.Inject; -import io.bisq.common.crypto.KeyRing; -import io.bisq.messages.provider.price.PriceFeedService; -import io.bisq.messages.trade.offer.payload.Offer; +import io.bisq.messages.crypto.KeyRing; +import io.bisq.p2p.protocol.availability.Offer; +import io.bisq.provider.price.PriceFeedService; import io.bisq.storage.Storage; import io.bisq.trade.TradableList; import io.bisq.trade.Trade; diff --git a/core/src/main/java/io/bisq/trade/offer/OfferBookService.java b/core/src/main/java/io/bisq/trade/offer/OfferBookService.java index 48e3edd48b..40f962e2a1 100644 --- a/core/src/main/java/io/bisq/trade/offer/OfferBookService.java +++ b/core/src/main/java/io/bisq/trade/offer/OfferBookService.java @@ -23,12 +23,13 @@ import io.bisq.common.UserThread; import io.bisq.common.handlers.ErrorMessageHandler; import io.bisq.common.handlers.ResultHandler; import io.bisq.common.util.Utilities; -import io.bisq.messages.provider.price.PriceFeedService; -import io.bisq.messages.trade.offer.payload.Offer; +import io.bisq.messages.trade.offer.payload.OfferPayload; import io.bisq.p2p.BootstrapListener; -import io.bisq.p2p.P2PService; +import io.bisq.p2p.protocol.availability.Offer; import io.bisq.p2p.storage.HashMapChangedListener; +import io.bisq.p2p.storage.P2PService; import io.bisq.p2p.storage.storageentry.ProtectedStorageEntry; +import io.bisq.provider.price.PriceFeedService; import io.bisq.storage.PlainTextWrapper; import io.bisq.storage.Storage; import org.slf4j.Logger; @@ -76,8 +77,8 @@ public class OfferBookService { @Override public void onAdded(ProtectedStorageEntry data) { offerBookChangedListeners.stream().forEach(listener -> { - if (data.getStoragePayload() instanceof Offer) { - Offer offer = (Offer) data.getStoragePayload(); + if (data.getStoragePayload() instanceof OfferPayload) { + Offer offer = new Offer((OfferPayload) data.getStoragePayload()); offer.setPriceFeedService(priceFeedService); listener.onAdded(offer); } @@ -87,8 +88,8 @@ public class OfferBookService { @Override public void onRemoved(ProtectedStorageEntry data) { offerBookChangedListeners.stream().forEach(listener -> { - if (data.getStoragePayload() instanceof Offer) - listener.onRemoved((Offer) data.getStoragePayload()); + if (data.getStoragePayload() instanceof OfferPayload) + listener.onRemoved(new Offer((OfferPayload) data.getStoragePayload())); }); } }); @@ -122,28 +123,28 @@ public class OfferBookService { /////////////////////////////////////////////////////////////////////////////////////////// public void addOffer(Offer offer, ResultHandler resultHandler, ErrorMessageHandler errorMessageHandler) { - boolean result = p2PService.addData(offer, true); + boolean result = p2PService.addData(offer.getOfferPayload(), true); if (result) { - log.trace("Add offer to network was successful. Offer ID = " + offer.getId()); + log.trace("Add offer to network was successful. OfferPayload ID = " + offer.getId()); resultHandler.handleResult(); } else { errorMessageHandler.handleErrorMessage("Add offer failed"); } } - public void refreshTTL(Offer offer, ResultHandler resultHandler, ErrorMessageHandler errorMessageHandler) { + public void refreshTTL(OfferPayload offer, ResultHandler resultHandler, ErrorMessageHandler errorMessageHandler) { boolean result = p2PService.refreshTTL(offer, true); if (result) { - log.trace("Refresh TTL was successful. Offer ID = " + offer.getId()); + log.trace("Refresh TTL was successful. OfferPayload ID = " + offer.getId()); resultHandler.handleResult(); } else { errorMessageHandler.handleErrorMessage("Refresh TTL failed."); } } - public void removeOffer(Offer offer, @Nullable ResultHandler resultHandler, @Nullable ErrorMessageHandler errorMessageHandler) { + public void removeOffer(OfferPayload offer, @Nullable ResultHandler resultHandler, @Nullable ErrorMessageHandler errorMessageHandler) { if (p2PService.removeData(offer, true)) { - log.trace("Remove offer from network was successful. Offer ID = " + offer.getId()); + log.trace("Remove offer from network was successful. OfferPayload ID = " + offer.getId()); if (resultHandler != null) resultHandler.handleResult(); } else { @@ -154,16 +155,16 @@ public class OfferBookService { public List getOffers() { return p2PService.getDataMap().values().stream() - .filter(data -> data.getStoragePayload() instanceof Offer) + .filter(data -> data.getStoragePayload() instanceof OfferPayload) .map(data -> { - Offer offer = (Offer) data.getStoragePayload(); + Offer offer = new Offer((OfferPayload) data.getStoragePayload()); offer.setPriceFeedService(priceFeedService); return offer; }) .collect(Collectors.toList()); } - public void removeOfferAtShutDown(Offer offer) { + public void removeOfferAtShutDown(OfferPayload offer) { log.debug("removeOfferAtShutDown " + offer); removeOffer(offer, null, null); } @@ -185,7 +186,7 @@ public class OfferBookService { // We filter the case that it is a MarketBasedPrice but the price is not available // That should only be possible if the price feed provider is not available final List offerForJsonList = getOffers().stream() - .filter(offer -> !offer.getUseMarketBasedPrice() || priceFeedService.getMarketPrice(offer.getCurrencyCode()) != null) + .filter(offer -> !offer.isUseMarketBasedPrice() || priceFeedService.getMarketPrice(offer.getCurrencyCode()) != null) .map(offer -> { try { return new OfferForJson(offer.getDirection(), @@ -195,7 +196,7 @@ public class OfferBookService { offer.getPrice(), offer.getDate(), offer.getId(), - offer.getUseMarketBasedPrice(), + offer.isUseMarketBasedPrice(), offer.getMarketPriceMargin(), offer.getPaymentMethod(), offer.getOfferFeePaymentTxID() diff --git a/core/src/main/java/io/bisq/trade/offer/OfferForJson.java b/core/src/main/java/io/bisq/trade/offer/OfferForJson.java index 3581ce4bce..ab2cc626ce 100644 --- a/core/src/main/java/io/bisq/trade/offer/OfferForJson.java +++ b/core/src/main/java/io/bisq/trade/offer/OfferForJson.java @@ -1,9 +1,9 @@ package io.bisq.trade.offer; import io.bisq.common.util.MathUtils; -import io.bisq.messages.locale.CurrencyUtil; +import io.bisq.locale.CurrencyUtil; import io.bisq.messages.payment.PaymentMethod; -import io.bisq.messages.trade.offer.payload.Offer; +import io.bisq.messages.trade.offer.payload.OfferPayload; import org.bitcoinj.core.Coin; import org.bitcoinj.utils.ExchangeRate; import org.bitcoinj.utils.Fiat; @@ -18,7 +18,7 @@ import java.util.Date; public class OfferForJson { private static final Logger log = LoggerFactory.getLogger(OfferForJson.class); - public final Offer.Direction direction; + public final OfferPayload.Direction direction; public final String currencyCode; public final long minAmount; public final long amount; @@ -32,7 +32,7 @@ public class OfferForJson { // primaryMarket fields are based on industry standard where primaryMarket is always in the focus (in the app BTC is always in the focus - will be changed in a larger refactoring once) public String currencyPair; - public Offer.Direction primaryMarketDirection; + public OfferPayload.Direction primaryMarketDirection; public String priceDisplayString; public String primaryMarketAmountDisplayString; @@ -47,7 +47,7 @@ public class OfferForJson { public long primaryMarketMinVolume; - public OfferForJson(Offer.Direction direction, + public OfferForJson(OfferPayload.Direction direction, String currencyCode, Coin minAmount, Coin amount, @@ -89,7 +89,7 @@ public class OfferForJson { MonetaryFormat coinFormat = MonetaryFormat.BTC.minDecimals(2).repeatOptionalDecimals(1, 6); final Fiat priceAsFiat = getPriceAsFiat(); if (CurrencyUtil.isCryptoCurrency(currencyCode)) { - primaryMarketDirection = direction == Offer.Direction.BUY ? Offer.Direction.SELL : Offer.Direction.BUY; + primaryMarketDirection = direction == OfferPayload.Direction.BUY ? OfferPayload.Direction.SELL : OfferPayload.Direction.BUY; currencyPair = currencyCode + "/" + "BTC"; DecimalFormat decimalFormat = new DecimalFormat("#.#"); diff --git a/core/src/main/java/io/bisq/trade/offer/OpenOffer.java b/core/src/main/java/io/bisq/trade/offer/OpenOffer.java index b99b436314..9a98a75c22 100644 --- a/core/src/main/java/io/bisq/trade/offer/OpenOffer.java +++ b/core/src/main/java/io/bisq/trade/offer/OpenOffer.java @@ -20,7 +20,7 @@ package io.bisq.trade.offer; import io.bisq.app.Version; import io.bisq.common.Timer; import io.bisq.common.UserThread; -import io.bisq.messages.trade.offer.payload.Offer; +import io.bisq.p2p.protocol.availability.Offer; import io.bisq.storage.Storage; import io.bisq.trade.Tradable; import io.bisq.trade.TradableList; @@ -36,7 +36,7 @@ public final class OpenOffer implements Tradable { private static final Logger log = LoggerFactory.getLogger(OpenOffer.class); - // Timeout for offer reservation during takeoffer process. If deposit tx is not completed in that time we reset the offer to AVAILABLE state. + // Timeout for offer reservation during takeoffer process. If deposit tx is not completed in that time we reset the offer to AVAILABLE state. private static final long TIMEOUT_SEC = 30; transient private Timer timeoutTimer; diff --git a/core/src/main/java/io/bisq/trade/offer/OpenOfferManager.java b/core/src/main/java/io/bisq/trade/offer/OpenOfferManager.java index eae4fc5520..ef4d2ee965 100644 --- a/core/src/main/java/io/bisq/trade/offer/OpenOfferManager.java +++ b/core/src/main/java/io/bisq/trade/offer/OpenOfferManager.java @@ -25,24 +25,25 @@ import io.bisq.btc.wallet.BtcWalletService; import io.bisq.btc.wallet.TradeWalletService; import io.bisq.common.Timer; import io.bisq.common.UserThread; -import io.bisq.common.crypto.KeyRing; +import io.bisq.messages.crypto.KeyRing; import io.bisq.common.handlers.ErrorMessageHandler; import io.bisq.common.handlers.ResultHandler; -import io.bisq.crypto.DecryptedMsgWithPubKey; +import io.bisq.messages.DecryptedMsgWithPubKey; import io.bisq.messages.Message; import io.bisq.messages.availability.AvailabilityResult; import io.bisq.messages.availability.OfferAvailabilityRequest; import io.bisq.messages.availability.OfferAvailabilityResponse; -import io.bisq.messages.provider.price.PriceFeedService; +import io.bisq.p2p.protocol.availability.Offer; +import io.bisq.provider.price.PriceFeedService; import io.bisq.messages.trade.exceptions.MarketPriceNotAvailableException; import io.bisq.messages.trade.exceptions.TradePriceOutOfToleranceException; -import io.bisq.messages.trade.offer.payload.Offer; -import io.bisq.messages.user.Preferences; +import io.bisq.messages.trade.offer.payload.OfferPayload; +import io.bisq.user.Preferences; import io.bisq.p2p.BootstrapListener; -import io.bisq.p2p.NodeAddress; -import io.bisq.p2p.P2PService; -import io.bisq.p2p.messaging.DecryptedDirectMessageListener; -import io.bisq.p2p.messaging.SendDirectMessageListener; +import io.bisq.messages.NodeAddress; +import io.bisq.p2p.storage.P2PService; +import io.bisq.messages.DecryptedDirectMessageListener; +import io.bisq.messages.p2p.messaging.SendDirectMessageListener; import io.bisq.p2p.peers.PeerManager; import io.bisq.storage.Storage; import io.bisq.trade.TradableList; @@ -159,7 +160,7 @@ public class OpenOfferManager implements PeerManager.Listener, DecryptedDirectMe final int size = openOffers.size(); if (offerBookService.isBootstrapped()) { - openOffers.forEach(openOffer -> offerBookService.removeOfferAtShutDown(openOffer.getOffer())); + openOffers.forEach(openOffer -> offerBookService.removeOfferAtShutDown(openOffer.getOffer().getOfferPayload())); if (completeHandler != null) UserThread.runAfter(completeHandler::run, size * 200 + 500, TimeUnit.MILLISECONDS); } else { @@ -214,7 +215,7 @@ public class OpenOfferManager implements PeerManager.Listener, DecryptedDirectMe // We republish after a bit as it might be that our connected node still has the offer in the data map // but other peers have it already removed because of expired TTL. - // Those other not directly connected peers would not get the broadcast of the new offer, as the first + // Those other not directly connected peers would not get the broadcast of the new offer, as the first // connected peer (seed node) does nto broadcast if it has the data in the map. // To update quickly to the whole network we repeat the republishOffers call after a few seconds when we // are better connected to the network. There is no guarantee that all peers will receive it but we have @@ -288,11 +289,11 @@ public class OpenOfferManager implements PeerManager.Listener, DecryptedDirectMe if (openOfferOptional.isPresent()) { removeOpenOffer(openOfferOptional.get(), resultHandler, errorMessageHandler); } else { - log.warn("Offer was not found in our list of open offers. We still try to remove it from the offerbook."); - errorMessageHandler.handleErrorMessage("Offer was not found in our list of open offers. " + + log.warn("OfferPayload was not found in our list of open offers. We still try to remove it from the offerbook."); + errorMessageHandler.handleErrorMessage("OfferPayload was not found in our list of open offers. " + "We still try to remove it from the offerbook."); - offerBookService.removeOffer(offer, - () -> offer.setState(Offer.State.REMOVED), + offerBookService.removeOffer(offer.getOfferPayload(), + () -> offer.setState(OfferPayload.State.REMOVED), null); } } @@ -300,9 +301,9 @@ public class OpenOfferManager implements PeerManager.Listener, DecryptedDirectMe // Remove from my offers public void removeOpenOffer(OpenOffer openOffer, ResultHandler resultHandler, ErrorMessageHandler errorMessageHandler) { Offer offer = openOffer.getOffer(); - offerBookService.removeOffer(offer, + offerBookService.removeOffer(offer.getOfferPayload(), () -> { - offer.setState(Offer.State.REMOVED); + offer.setState(OfferPayload.State.REMOVED); openOffer.setState(OpenOffer.State.CANCELED); openOffers.remove(openOffer); closedTradableManager.add(openOffer); @@ -314,11 +315,11 @@ public class OpenOfferManager implements PeerManager.Listener, DecryptedDirectMe } // Close openOffer after deposit published - public void closeOpenOffer(Offer offer) { + public void closeOpenOffer(OfferPayload offer) { findOpenOffer(offer.getId()).ifPresent(openOffer -> { openOffers.remove(openOffer); openOffer.setState(OpenOffer.State.CLOSED); - offerBookService.removeOffer(openOffer.getOffer(), + offerBookService.removeOffer(openOffer.getOffer().getOfferPayload(), () -> log.trace("Successful removed offer"), log::error); }); @@ -351,7 +352,7 @@ public class OpenOfferManager implements PeerManager.Listener, DecryptedDirectMe /////////////////////////////////////////////////////////////////////////////////////////// - // Offer Availability + // OfferPayload Availability /////////////////////////////////////////////////////////////////////////////////////////// private void handleOfferAvailabilityRequest(OfferAvailabilityRequest message, NodeAddress sender) { @@ -454,7 +455,7 @@ public class OpenOfferManager implements PeerManager.Listener, DecryptedDirectMe // The openOffer.getId().contains("_") check is because there was once a version // where we encoded the version nr in the offer id with a "_" as separator. // That caused several issues and was reverted. So if there are still old offers out with that - // special offer ID format those must not be published as they cause failed taker attempts + // special offer ID format those must not be published as they cause failed taker attempts // with lost taker fee. String id = openOffer.getId(); if (id != null && !id.contains("_")) @@ -550,7 +551,7 @@ public class OpenOfferManager implements PeerManager.Listener, DecryptedDirectMe } private void refreshOffer(OpenOffer openOffer) { - offerBookService.refreshTTL(openOffer.getOffer(), + offerBookService.refreshTTL(openOffer.getOffer().getOfferPayload(), () -> log.debug("Successful refreshed TTL for offer"), log::warn); } diff --git a/core/src/main/java/io/bisq/trade/protocol/placeoffer/PlaceOfferModel.java b/core/src/main/java/io/bisq/trade/protocol/placeoffer/PlaceOfferModel.java index 122d8cfdc7..8f49f07beb 100644 --- a/core/src/main/java/io/bisq/trade/protocol/placeoffer/PlaceOfferModel.java +++ b/core/src/main/java/io/bisq/trade/protocol/placeoffer/PlaceOfferModel.java @@ -20,7 +20,7 @@ package io.bisq.trade.protocol.placeoffer; import io.bisq.btc.wallet.BtcWalletService; import io.bisq.btc.wallet.TradeWalletService; import io.bisq.common.taskrunner.Model; -import io.bisq.messages.trade.offer.payload.Offer; +import io.bisq.p2p.protocol.availability.Offer; import io.bisq.trade.offer.OfferBookService; import io.bisq.user.User; import org.bitcoinj.core.Coin; diff --git a/core/src/main/java/io/bisq/trade/protocol/placeoffer/PlaceOfferProtocol.java b/core/src/main/java/io/bisq/trade/protocol/placeoffer/PlaceOfferProtocol.java index 9b9d66d509..2317441334 100644 --- a/core/src/main/java/io/bisq/trade/protocol/placeoffer/PlaceOfferProtocol.java +++ b/core/src/main/java/io/bisq/trade/protocol/placeoffer/PlaceOfferProtocol.java @@ -59,10 +59,10 @@ public class PlaceOfferProtocol { log.error(errorMessage); if (model.offerAddedToOfferBook) { - model.offerBookService.removeOffer(model.offer, + model.offerBookService.removeOffer(model.offer.getOfferPayload(), () -> { model.offerAddedToOfferBook = false; - log.debug("Offer removed from offer book."); + log.debug("OfferPayload removed from offer book."); }, log::error); } diff --git a/core/src/main/java/io/bisq/trade/protocol/placeoffer/tasks/BroadcastCreateOfferFeeTx.java b/core/src/main/java/io/bisq/trade/protocol/placeoffer/tasks/BroadcastCreateOfferFeeTx.java index c1ab3ff67f..c01caca608 100644 --- a/core/src/main/java/io/bisq/trade/protocol/placeoffer/tasks/BroadcastCreateOfferFeeTx.java +++ b/core/src/main/java/io/bisq/trade/protocol/placeoffer/tasks/BroadcastCreateOfferFeeTx.java @@ -20,7 +20,7 @@ package io.bisq.trade.protocol.placeoffer.tasks; import com.google.common.util.concurrent.FutureCallback; import io.bisq.common.taskrunner.Task; import io.bisq.common.taskrunner.TaskRunner; -import io.bisq.messages.trade.offer.payload.Offer; +import io.bisq.messages.trade.offer.payload.OfferPayload; import io.bisq.trade.protocol.placeoffer.PlaceOfferModel; import org.bitcoinj.core.Transaction; import org.jetbrains.annotations.NotNull; @@ -48,7 +48,7 @@ public class BroadcastCreateOfferFeeTx extends Task { log.debug("Broadcast of offer fee payment succeeded: transaction = " + transaction.toString()); if (model.getTransaction().getHashAsString().equals(transaction.getHashAsString())) { - model.offer.setState(Offer.State.OFFER_FEE_PAID); + model.offer.setState(OfferPayload.State.OFFER_FEE_PAID); // No tx malleability happened after broadcast (still not in blockchain) complete(); } else { @@ -56,7 +56,7 @@ public class BroadcastCreateOfferFeeTx extends Task { // Tx malleability happened after broadcast. We first remove the malleable offer. // Then we publish the changed offer to the P2P network again after setting the new TxId. // Normally we use a delay for broadcasting to the peers, but at shut down we want to get it fast out - model.offerBookService.removeOffer(model.offer, + model.offerBookService.removeOffer(model.offer.getOfferPayload(), () -> { log.debug("We store now the changed txID to the offer and add that again."); // We store now the changed txID to the offer and add that again. @@ -106,8 +106,8 @@ public class BroadcastCreateOfferFeeTx extends Task { private void updateStateOnFault() { if (!removeOfferFailed && !addOfferFailed) { // If broadcast fails we need to remove offer from offerbook - model.offerBookService.removeOffer(model.offer, - () -> log.debug("Offer removed from offerbook because broadcast failed."), + model.offerBookService.removeOffer(model.offer.getOfferPayload(), + () -> log.debug("OfferPayload removed from offerbook because broadcast failed."), errorMessage -> log.error("removeOffer failed. " + errorMessage)); } } diff --git a/core/src/main/java/io/bisq/trade/protocol/placeoffer/tasks/CreateOfferFeeTx.java b/core/src/main/java/io/bisq/trade/protocol/placeoffer/tasks/CreateOfferFeeTx.java index d1bbf477e2..33e74efe7a 100644 --- a/core/src/main/java/io/bisq/trade/protocol/placeoffer/tasks/CreateOfferFeeTx.java +++ b/core/src/main/java/io/bisq/trade/protocol/placeoffer/tasks/CreateOfferFeeTx.java @@ -21,9 +21,9 @@ import io.bisq.btc.AddressEntry; import io.bisq.btc.wallet.BtcWalletService; import io.bisq.common.taskrunner.Task; import io.bisq.common.taskrunner.TaskRunner; +import io.bisq.messages.NodeAddress; import io.bisq.messages.arbitration.Arbitrator; -import io.bisq.messages.trade.offer.payload.Offer; -import io.bisq.p2p.NodeAddress; +import io.bisq.p2p.protocol.availability.Offer; import io.bisq.trade.protocol.placeoffer.PlaceOfferModel; import io.bisq.trade.protocol.trade.ArbitrationSelectionRule; import org.bitcoinj.core.Address; @@ -47,7 +47,7 @@ public class CreateOfferFeeTx extends Task { try { runInterceptHook(); - NodeAddress selectedArbitratorNodeAddress = ArbitrationSelectionRule.select(model.user.getAcceptedArbitratorAddresses(), model.offer); + NodeAddress selectedArbitratorNodeAddress = ArbitrationSelectionRule.select(model.user.getAcceptedArbitratorAddresses(), model.offer.getOfferPayload()); log.debug("selectedArbitratorAddress " + selectedArbitratorNodeAddress); Arbitrator selectedArbitrator = model.user.getAcceptedArbitratorByAddress(selectedArbitratorNodeAddress); checkNotNull(selectedArbitrator, "selectedArbitrator must not be null at CreateOfferFeeTx"); diff --git a/core/src/main/java/io/bisq/trade/protocol/trade/ArbitrationSelectionRule.java b/core/src/main/java/io/bisq/trade/protocol/trade/ArbitrationSelectionRule.java index f800e049a7..98f49b86ea 100644 --- a/core/src/main/java/io/bisq/trade/protocol/trade/ArbitrationSelectionRule.java +++ b/core/src/main/java/io/bisq/trade/protocol/trade/ArbitrationSelectionRule.java @@ -17,8 +17,8 @@ package io.bisq.trade.protocol.trade; -import io.bisq.messages.trade.offer.payload.Offer; -import io.bisq.p2p.NodeAddress; +import io.bisq.messages.trade.offer.payload.OfferPayload; +import io.bisq.messages.NodeAddress; import org.bitcoinj.core.Sha256Hash; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -33,7 +33,7 @@ import static com.google.common.base.Preconditions.checkArgument; public class ArbitrationSelectionRule { private static final Logger log = LoggerFactory.getLogger(ArbitrationSelectionRule.class); - public static NodeAddress select(List acceptedArbitratorNodeAddresses, Offer offer) { + public static NodeAddress select(List acceptedArbitratorNodeAddresses, OfferPayload offer) { List candidates = new ArrayList<>(); for (NodeAddress offerArbitratorNodeAddress : offer.getArbitratorNodeAddresses()) { candidates.addAll(acceptedArbitratorNodeAddresses.stream().filter(offerArbitratorNodeAddress::equals).collect(Collectors.toList())); diff --git a/core/src/main/java/io/bisq/trade/protocol/trade/BuyerAsOffererProtocol.java b/core/src/main/java/io/bisq/trade/protocol/trade/BuyerAsOffererProtocol.java index 825727ea4f..50d4ad6c6d 100644 --- a/core/src/main/java/io/bisq/trade/protocol/trade/BuyerAsOffererProtocol.java +++ b/core/src/main/java/io/bisq/trade/protocol/trade/BuyerAsOffererProtocol.java @@ -24,8 +24,8 @@ import io.bisq.messages.protocol.trade.TradeMessage; import io.bisq.messages.trade.protocol.trade.messages.DepositTxPublishedMessage; import io.bisq.messages.trade.protocol.trade.messages.FinalizePayoutTxRequest; import io.bisq.messages.trade.protocol.trade.messages.PayDepositRequest; -import io.bisq.p2p.NodeAddress; -import io.bisq.p2p.messaging.MailboxMessage; +import io.bisq.messages.NodeAddress; +import io.bisq.messages.p2p.messaging.MailboxMessage; import io.bisq.trade.BuyerAsOffererTrade; import io.bisq.trade.Trade; import io.bisq.trade.protocol.trade.tasks.buyer.*; diff --git a/core/src/main/java/io/bisq/trade/protocol/trade/BuyerAsTakerProtocol.java b/core/src/main/java/io/bisq/trade/protocol/trade/BuyerAsTakerProtocol.java index f516dac44e..99c061be19 100644 --- a/core/src/main/java/io/bisq/trade/protocol/trade/BuyerAsTakerProtocol.java +++ b/core/src/main/java/io/bisq/trade/protocol/trade/BuyerAsTakerProtocol.java @@ -24,8 +24,8 @@ import io.bisq.messages.Message; import io.bisq.messages.protocol.trade.TradeMessage; import io.bisq.messages.trade.protocol.trade.messages.FinalizePayoutTxRequest; import io.bisq.messages.trade.protocol.trade.messages.PublishDepositTxRequest; -import io.bisq.p2p.NodeAddress; -import io.bisq.p2p.messaging.MailboxMessage; +import io.bisq.messages.NodeAddress; +import io.bisq.messages.p2p.messaging.MailboxMessage; import io.bisq.trade.BuyerAsTakerTrade; import io.bisq.trade.Trade; import io.bisq.trade.protocol.trade.tasks.buyer.*; diff --git a/core/src/main/java/io/bisq/trade/protocol/trade/OffererProtocol.java b/core/src/main/java/io/bisq/trade/protocol/trade/OffererProtocol.java index fac101a047..13fe5e57a9 100644 --- a/core/src/main/java/io/bisq/trade/protocol/trade/OffererProtocol.java +++ b/core/src/main/java/io/bisq/trade/protocol/trade/OffererProtocol.java @@ -19,7 +19,7 @@ package io.bisq.trade.protocol.trade; import io.bisq.messages.protocol.trade.TradeMessage; -import io.bisq.p2p.NodeAddress; +import io.bisq.messages.NodeAddress; public interface OffererProtocol { void handleTakeOfferRequest(TradeMessage message, NodeAddress taker); diff --git a/core/src/main/java/io/bisq/trade/protocol/trade/ProcessModel.java b/core/src/main/java/io/bisq/trade/protocol/trade/ProcessModel.java index afc0c7f336..702283cc06 100644 --- a/core/src/main/java/io/bisq/trade/protocol/trade/ProcessModel.java +++ b/core/src/main/java/io/bisq/trade/protocol/trade/ProcessModel.java @@ -21,17 +21,17 @@ import io.bisq.app.Version; import io.bisq.arbitration.ArbitratorManager; import io.bisq.btc.wallet.BtcWalletService; import io.bisq.btc.wallet.TradeWalletService; -import io.bisq.common.crypto.KeyRing; -import io.bisq.common.crypto.PubKeyRing; import io.bisq.common.taskrunner.Model; import io.bisq.filter.FilterManager; +import io.bisq.messages.NodeAddress; import io.bisq.messages.btc.data.RawTransactionInput; +import io.bisq.messages.crypto.KeyRing; +import io.bisq.messages.crypto.PubKeyRing; import io.bisq.messages.filter.payload.PaymentAccountFilter; import io.bisq.messages.payment.payload.PaymentAccountContractData; import io.bisq.messages.protocol.trade.TradeMessage; -import io.bisq.messages.trade.offer.payload.Offer; -import io.bisq.p2p.NodeAddress; -import io.bisq.p2p.P2PService; +import io.bisq.p2p.protocol.availability.Offer; +import io.bisq.p2p.storage.P2PService; import io.bisq.payment.PaymentAccount; import io.bisq.trade.OffererTrade; import io.bisq.trade.Trade; diff --git a/core/src/main/java/io/bisq/trade/protocol/trade/SellerAsOffererProtocol.java b/core/src/main/java/io/bisq/trade/protocol/trade/SellerAsOffererProtocol.java index 3f209578a7..7e3725660e 100644 --- a/core/src/main/java/io/bisq/trade/protocol/trade/SellerAsOffererProtocol.java +++ b/core/src/main/java/io/bisq/trade/protocol/trade/SellerAsOffererProtocol.java @@ -26,8 +26,8 @@ import io.bisq.messages.trade.protocol.trade.messages.DepositTxPublishedMessage; import io.bisq.messages.trade.protocol.trade.messages.FiatTransferStartedMessage; import io.bisq.messages.trade.protocol.trade.messages.PayDepositRequest; import io.bisq.messages.trade.protocol.trade.messages.PayoutTxFinalizedMessage; -import io.bisq.p2p.NodeAddress; -import io.bisq.p2p.messaging.MailboxMessage; +import io.bisq.messages.NodeAddress; +import io.bisq.messages.p2p.messaging.MailboxMessage; import io.bisq.trade.SellerAsOffererTrade; import io.bisq.trade.Trade; import io.bisq.trade.protocol.trade.tasks.offerer.*; diff --git a/core/src/main/java/io/bisq/trade/protocol/trade/SellerAsTakerProtocol.java b/core/src/main/java/io/bisq/trade/protocol/trade/SellerAsTakerProtocol.java index ef86bc2dc8..60bdebc084 100644 --- a/core/src/main/java/io/bisq/trade/protocol/trade/SellerAsTakerProtocol.java +++ b/core/src/main/java/io/bisq/trade/protocol/trade/SellerAsTakerProtocol.java @@ -25,8 +25,8 @@ import io.bisq.messages.protocol.trade.TradeMessage; import io.bisq.messages.trade.protocol.trade.messages.FiatTransferStartedMessage; import io.bisq.messages.trade.protocol.trade.messages.PayoutTxFinalizedMessage; import io.bisq.messages.trade.protocol.trade.messages.PublishDepositTxRequest; -import io.bisq.p2p.NodeAddress; -import io.bisq.p2p.messaging.MailboxMessage; +import io.bisq.messages.NodeAddress; +import io.bisq.messages.p2p.messaging.MailboxMessage; import io.bisq.trade.SellerAsTakerTrade; import io.bisq.trade.Trade; import io.bisq.trade.protocol.trade.tasks.seller.*; diff --git a/core/src/main/java/io/bisq/trade/protocol/trade/TradeProtocol.java b/core/src/main/java/io/bisq/trade/protocol/trade/TradeProtocol.java index f9f65a3c04..c2fb778cc6 100644 --- a/core/src/main/java/io/bisq/trade/protocol/trade/TradeProtocol.java +++ b/core/src/main/java/io/bisq/trade/protocol/trade/TradeProtocol.java @@ -19,12 +19,12 @@ package io.bisq.trade.protocol.trade; import io.bisq.common.Timer; import io.bisq.common.UserThread; -import io.bisq.common.crypto.PubKeyRing; -import io.bisq.crypto.DecryptedMsgWithPubKey; +import io.bisq.messages.crypto.PubKeyRing; +import io.bisq.messages.DecryptedMsgWithPubKey; import io.bisq.messages.Message; import io.bisq.messages.protocol.trade.TradeMessage; -import io.bisq.p2p.NodeAddress; -import io.bisq.p2p.messaging.DecryptedDirectMessageListener; +import io.bisq.messages.NodeAddress; +import io.bisq.messages.DecryptedDirectMessageListener; import io.bisq.trade.OffererTrade; import io.bisq.trade.Trade; import io.bisq.trade.TradeManager; @@ -139,7 +139,7 @@ public abstract class TradeProtocol { log.debug("cleanupTradable tradeState=" + tradeState); boolean isOffererTrade = trade instanceof OffererTrade; if (isOffererTrade && (tradeState == Trade.State.OFFERER_SENT_PUBLISH_DEPOSIT_TX_REQUEST || tradeState == Trade.State.DEPOSIT_SEEN_IN_NETWORK)) - processModel.getOpenOfferManager().closeOpenOffer(trade.getOffer()); + processModel.getOpenOfferManager().closeOpenOffer(trade.getOffer().getOfferPayload()); //boolean isTakerTrade = trade instanceof TakerTrade; diff --git a/core/src/main/java/io/bisq/trade/protocol/trade/TradingPeer.java b/core/src/main/java/io/bisq/trade/protocol/trade/TradingPeer.java index 1ad00a6ee9..adc4544ce9 100644 --- a/core/src/main/java/io/bisq/trade/protocol/trade/TradingPeer.java +++ b/core/src/main/java/io/bisq/trade/protocol/trade/TradingPeer.java @@ -18,7 +18,7 @@ package io.bisq.trade.protocol.trade; import io.bisq.app.Version; -import io.bisq.common.crypto.PubKeyRing; +import io.bisq.messages.crypto.PubKeyRing; import io.bisq.common.persistance.Persistable; import io.bisq.messages.btc.data.RawTransactionInput; import io.bisq.messages.payment.payload.PaymentAccountContractData; diff --git a/core/src/main/java/io/bisq/trade/protocol/trade/tasks/TradeTask.java b/core/src/main/java/io/bisq/trade/protocol/trade/tasks/TradeTask.java index d194c69868..5a07d0d188 100644 --- a/core/src/main/java/io/bisq/trade/protocol/trade/tasks/TradeTask.java +++ b/core/src/main/java/io/bisq/trade/protocol/trade/tasks/TradeTask.java @@ -19,8 +19,8 @@ package io.bisq.trade.protocol.trade.tasks; import io.bisq.common.taskrunner.Task; import io.bisq.common.taskrunner.TaskRunner; -import io.bisq.crypto.DecryptedMsgWithPubKey; -import io.bisq.p2p.messaging.MailboxMessage; +import io.bisq.messages.DecryptedMsgWithPubKey; +import io.bisq.messages.p2p.messaging.MailboxMessage; import io.bisq.trade.Trade; import io.bisq.trade.protocol.trade.ProcessModel; import org.slf4j.Logger; diff --git a/core/src/main/java/io/bisq/trade/protocol/trade/tasks/buyer/OffererCreatesAndSignsDepositTxAsBuyer.java b/core/src/main/java/io/bisq/trade/protocol/trade/tasks/buyer/OffererCreatesAndSignsDepositTxAsBuyer.java index 9bbdd29209..235933280e 100644 --- a/core/src/main/java/io/bisq/trade/protocol/trade/tasks/buyer/OffererCreatesAndSignsDepositTxAsBuyer.java +++ b/core/src/main/java/io/bisq/trade/protocol/trade/tasks/buyer/OffererCreatesAndSignsDepositTxAsBuyer.java @@ -20,7 +20,7 @@ package io.bisq.trade.protocol.trade.tasks.buyer; import io.bisq.btc.AddressEntry; import io.bisq.btc.data.PreparedDepositTxAndOffererInputs; import io.bisq.btc.wallet.BtcWalletService; -import io.bisq.common.crypto.Hash; +import io.bisq.messages.crypto.Hash; import io.bisq.common.taskrunner.TaskRunner; import io.bisq.trade.Trade; import io.bisq.trade.protocol.trade.TradingPeer; diff --git a/core/src/main/java/io/bisq/trade/protocol/trade/tasks/buyer/SendFiatTransferStartedMessage.java b/core/src/main/java/io/bisq/trade/protocol/trade/tasks/buyer/SendFiatTransferStartedMessage.java index 676251b046..7cbc7b4973 100644 --- a/core/src/main/java/io/bisq/trade/protocol/trade/tasks/buyer/SendFiatTransferStartedMessage.java +++ b/core/src/main/java/io/bisq/trade/protocol/trade/tasks/buyer/SendFiatTransferStartedMessage.java @@ -21,7 +21,7 @@ import io.bisq.btc.AddressEntry; import io.bisq.btc.wallet.BtcWalletService; import io.bisq.common.taskrunner.TaskRunner; import io.bisq.messages.trade.protocol.trade.messages.FiatTransferStartedMessage; -import io.bisq.p2p.messaging.SendMailboxMessageListener; +import io.bisq.messages.p2p.messaging.SendMailboxMessageListener; import io.bisq.trade.Trade; import io.bisq.trade.protocol.trade.tasks.TradeTask; import org.slf4j.Logger; diff --git a/core/src/main/java/io/bisq/trade/protocol/trade/tasks/buyer/SendPayoutTxFinalizedMessage.java b/core/src/main/java/io/bisq/trade/protocol/trade/tasks/buyer/SendPayoutTxFinalizedMessage.java index 17b122c6ee..cea7cb2e9f 100644 --- a/core/src/main/java/io/bisq/trade/protocol/trade/tasks/buyer/SendPayoutTxFinalizedMessage.java +++ b/core/src/main/java/io/bisq/trade/protocol/trade/tasks/buyer/SendPayoutTxFinalizedMessage.java @@ -19,7 +19,7 @@ package io.bisq.trade.protocol.trade.tasks.buyer; import io.bisq.common.taskrunner.TaskRunner; import io.bisq.messages.trade.protocol.trade.messages.PayoutTxFinalizedMessage; -import io.bisq.p2p.messaging.SendMailboxMessageListener; +import io.bisq.messages.p2p.messaging.SendMailboxMessageListener; import io.bisq.trade.Trade; import io.bisq.trade.protocol.trade.tasks.TradeTask; import org.slf4j.Logger; diff --git a/core/src/main/java/io/bisq/trade/protocol/trade/tasks/buyer/TakerSignAndPublishDepositTxAsBuyer.java b/core/src/main/java/io/bisq/trade/protocol/trade/tasks/buyer/TakerSignAndPublishDepositTxAsBuyer.java index 279b4e8ed4..8efdb5e420 100644 --- a/core/src/main/java/io/bisq/trade/protocol/trade/tasks/buyer/TakerSignAndPublishDepositTxAsBuyer.java +++ b/core/src/main/java/io/bisq/trade/protocol/trade/tasks/buyer/TakerSignAndPublishDepositTxAsBuyer.java @@ -20,7 +20,7 @@ package io.bisq.trade.protocol.trade.tasks.buyer; import com.google.common.util.concurrent.FutureCallback; import io.bisq.btc.AddressEntry; import io.bisq.btc.wallet.BtcWalletService; -import io.bisq.common.crypto.Hash; +import io.bisq.messages.crypto.Hash; import io.bisq.common.taskrunner.TaskRunner; import io.bisq.messages.btc.data.RawTransactionInput; import io.bisq.trade.Trade; diff --git a/core/src/main/java/io/bisq/trade/protocol/trade/tasks/offerer/CreateAndSignContract.java b/core/src/main/java/io/bisq/trade/protocol/trade/tasks/offerer/CreateAndSignContract.java index dac1360f2c..33c45afa3f 100644 --- a/core/src/main/java/io/bisq/trade/protocol/trade/tasks/offerer/CreateAndSignContract.java +++ b/core/src/main/java/io/bisq/trade/protocol/trade/tasks/offerer/CreateAndSignContract.java @@ -25,7 +25,7 @@ import io.bisq.common.taskrunner.TaskRunner; import io.bisq.common.util.Utilities; import io.bisq.messages.payment.payload.PaymentAccountContractData; import io.bisq.messages.trade.payload.Contract; -import io.bisq.p2p.NodeAddress; +import io.bisq.messages.NodeAddress; import io.bisq.trade.BuyerAsOffererTrade; import io.bisq.trade.Trade; import io.bisq.trade.protocol.trade.TradingPeer; @@ -65,7 +65,7 @@ public class CreateAndSignContract extends TradeTask { AddressEntry offererAddressEntry = walletService.getOrCreateAddressEntry(id, AddressEntry.Context.MULTI_SIG); byte[] offererMultiSigPubKey = offererAddressEntry.getPubKey(); Contract contract = new Contract( - processModel.getOffer(), + processModel.getOffer().getOfferPayload(), trade.getTradeAmount(), trade.getTradePrice(), trade.getTakeOfferFeeTxId(), diff --git a/core/src/main/java/io/bisq/trade/protocol/trade/tasks/offerer/ProcessDepositTxPublishedMessage.java b/core/src/main/java/io/bisq/trade/protocol/trade/tasks/offerer/ProcessDepositTxPublishedMessage.java index 590ad127d2..6ba6afb1d5 100644 --- a/core/src/main/java/io/bisq/trade/protocol/trade/tasks/offerer/ProcessDepositTxPublishedMessage.java +++ b/core/src/main/java/io/bisq/trade/protocol/trade/tasks/offerer/ProcessDepositTxPublishedMessage.java @@ -57,7 +57,7 @@ public class ProcessDepositTxPublishedMessage extends TradeTask { BtcWalletService.printTx("depositTx received from peer", walletTx); if (trade instanceof OffererTrade) - processModel.getOpenOfferManager().closeOpenOffer(trade.getOffer()); + processModel.getOpenOfferManager().closeOpenOffer(trade.getOffer().getOfferPayload()); // update to the latest peer address of our peer if the message is correct trade.setTradingPeerNodeAddress(processModel.getTempTradingPeerNodeAddress()); diff --git a/core/src/main/java/io/bisq/trade/protocol/trade/tasks/offerer/PublishTradeStatistics.java b/core/src/main/java/io/bisq/trade/protocol/trade/tasks/offerer/PublishTradeStatistics.java index 47017121c0..deb5e0fd7d 100644 --- a/core/src/main/java/io/bisq/trade/protocol/trade/tasks/offerer/PublishTradeStatistics.java +++ b/core/src/main/java/io/bisq/trade/protocol/trade/tasks/offerer/PublishTradeStatistics.java @@ -32,7 +32,7 @@ public class PublishTradeStatistics extends TradeTask { try { runInterceptHook(); // Offerer is responsible for publishing. Only in case the offerer uses an old version the taker publishes. - TradeStatistics tradeStatistics = new TradeStatistics(trade.getOffer(), + TradeStatistics tradeStatistics = new TradeStatistics(trade.getOffer().getOfferPayload(), trade.getTradePrice(), trade.getTradeAmount(), trade.getDate(), diff --git a/core/src/main/java/io/bisq/trade/protocol/trade/tasks/offerer/SendPublishDepositTxRequest.java b/core/src/main/java/io/bisq/trade/protocol/trade/tasks/offerer/SendPublishDepositTxRequest.java index 68f9e5f976..c131147350 100644 --- a/core/src/main/java/io/bisq/trade/protocol/trade/tasks/offerer/SendPublishDepositTxRequest.java +++ b/core/src/main/java/io/bisq/trade/protocol/trade/tasks/offerer/SendPublishDepositTxRequest.java @@ -21,7 +21,7 @@ import io.bisq.btc.AddressEntry; import io.bisq.btc.wallet.BtcWalletService; import io.bisq.common.taskrunner.TaskRunner; import io.bisq.messages.trade.protocol.trade.messages.PublishDepositTxRequest; -import io.bisq.p2p.messaging.SendDirectMessageListener; +import io.bisq.messages.p2p.messaging.SendDirectMessageListener; import io.bisq.trade.Trade; import io.bisq.trade.protocol.trade.tasks.TradeTask; import org.slf4j.Logger; diff --git a/core/src/main/java/io/bisq/trade/protocol/trade/tasks/offerer/SetupDepositBalanceListener.java b/core/src/main/java/io/bisq/trade/protocol/trade/tasks/offerer/SetupDepositBalanceListener.java index fb2506fa4c..2f65bfee94 100644 --- a/core/src/main/java/io/bisq/trade/protocol/trade/tasks/offerer/SetupDepositBalanceListener.java +++ b/core/src/main/java/io/bisq/trade/protocol/trade/tasks/offerer/SetupDepositBalanceListener.java @@ -91,7 +91,7 @@ public class SetupDepositBalanceListener extends TradeTask { Trade.State tradeState = trade.getState(); if (balance.compareTo(Coin.ZERO) == 0) { if (trade instanceof OffererTrade) { - processModel.getOpenOfferManager().closeOpenOffer(trade.getOffer()); + processModel.getOpenOfferManager().closeOpenOffer(trade.getOffer().getOfferPayload()); if (tradeState == Trade.State.OFFERER_SENT_PUBLISH_DEPOSIT_TX_REQUEST) { trade.setState(Trade.State.DEPOSIT_SEEN_IN_NETWORK); diff --git a/core/src/main/java/io/bisq/trade/protocol/trade/tasks/offerer/VerifyArbitrationSelection.java b/core/src/main/java/io/bisq/trade/protocol/trade/tasks/offerer/VerifyArbitrationSelection.java index f45fd49e8e..6763c1f548 100644 --- a/core/src/main/java/io/bisq/trade/protocol/trade/tasks/offerer/VerifyArbitrationSelection.java +++ b/core/src/main/java/io/bisq/trade/protocol/trade/tasks/offerer/VerifyArbitrationSelection.java @@ -39,7 +39,7 @@ public class VerifyArbitrationSelection extends TradeTask { runInterceptHook(); if (trade.getArbitratorNodeAddress().equals(ArbitrationSelectionRule.select(processModel.getTakerAcceptedArbitratorNodeAddresses(), - processModel.getOffer()))) + processModel.getOffer().getOfferPayload()))) complete(); else failed("Arbitrator selection verification failed"); diff --git a/core/src/main/java/io/bisq/trade/protocol/trade/tasks/seller/OffererCreatesAndSignsDepositTxAsSeller.java b/core/src/main/java/io/bisq/trade/protocol/trade/tasks/seller/OffererCreatesAndSignsDepositTxAsSeller.java index 6213acdd52..650064d1c8 100644 --- a/core/src/main/java/io/bisq/trade/protocol/trade/tasks/seller/OffererCreatesAndSignsDepositTxAsSeller.java +++ b/core/src/main/java/io/bisq/trade/protocol/trade/tasks/seller/OffererCreatesAndSignsDepositTxAsSeller.java @@ -20,7 +20,7 @@ package io.bisq.trade.protocol.trade.tasks.seller; import io.bisq.btc.AddressEntry; import io.bisq.btc.data.PreparedDepositTxAndOffererInputs; import io.bisq.btc.wallet.BtcWalletService; -import io.bisq.common.crypto.Hash; +import io.bisq.messages.crypto.Hash; import io.bisq.common.taskrunner.TaskRunner; import io.bisq.trade.Trade; import io.bisq.trade.protocol.trade.TradingPeer; diff --git a/core/src/main/java/io/bisq/trade/protocol/trade/tasks/seller/SendFinalizePayoutTxRequest.java b/core/src/main/java/io/bisq/trade/protocol/trade/tasks/seller/SendFinalizePayoutTxRequest.java index 3e01022e32..3388668605 100644 --- a/core/src/main/java/io/bisq/trade/protocol/trade/tasks/seller/SendFinalizePayoutTxRequest.java +++ b/core/src/main/java/io/bisq/trade/protocol/trade/tasks/seller/SendFinalizePayoutTxRequest.java @@ -21,7 +21,7 @@ import io.bisq.btc.AddressEntry; import io.bisq.btc.wallet.BtcWalletService; import io.bisq.common.taskrunner.TaskRunner; import io.bisq.messages.trade.protocol.trade.messages.FinalizePayoutTxRequest; -import io.bisq.p2p.messaging.SendMailboxMessageListener; +import io.bisq.messages.p2p.messaging.SendMailboxMessageListener; import io.bisq.trade.Trade; import io.bisq.trade.protocol.trade.tasks.TradeTask; import org.slf4j.Logger; diff --git a/core/src/main/java/io/bisq/trade/protocol/trade/tasks/seller/SignAndPublishDepositTxAsSeller.java b/core/src/main/java/io/bisq/trade/protocol/trade/tasks/seller/SignAndPublishDepositTxAsSeller.java index c1f46cbbf5..0bc548e373 100644 --- a/core/src/main/java/io/bisq/trade/protocol/trade/tasks/seller/SignAndPublishDepositTxAsSeller.java +++ b/core/src/main/java/io/bisq/trade/protocol/trade/tasks/seller/SignAndPublishDepositTxAsSeller.java @@ -20,7 +20,7 @@ package io.bisq.trade.protocol.trade.tasks.seller; import com.google.common.util.concurrent.FutureCallback; import io.bisq.btc.AddressEntry; import io.bisq.btc.wallet.BtcWalletService; -import io.bisq.common.crypto.Hash; +import io.bisq.messages.crypto.Hash; import io.bisq.common.taskrunner.TaskRunner; import io.bisq.messages.btc.data.RawTransactionInput; import io.bisq.trade.Trade; diff --git a/core/src/main/java/io/bisq/trade/protocol/trade/tasks/taker/CreateTakeOfferFeeTx.java b/core/src/main/java/io/bisq/trade/protocol/trade/tasks/taker/CreateTakeOfferFeeTx.java index 77000fd0b2..632021b03b 100644 --- a/core/src/main/java/io/bisq/trade/protocol/trade/tasks/taker/CreateTakeOfferFeeTx.java +++ b/core/src/main/java/io/bisq/trade/protocol/trade/tasks/taker/CreateTakeOfferFeeTx.java @@ -21,7 +21,7 @@ import io.bisq.btc.AddressEntry; import io.bisq.btc.wallet.BtcWalletService; import io.bisq.common.taskrunner.TaskRunner; import io.bisq.messages.arbitration.Arbitrator; -import io.bisq.p2p.NodeAddress; +import io.bisq.messages.NodeAddress; import io.bisq.trade.Trade; import io.bisq.trade.protocol.trade.ArbitrationSelectionRule; import io.bisq.trade.protocol.trade.tasks.TradeTask; @@ -47,7 +47,7 @@ public class CreateTakeOfferFeeTx extends TradeTask { runInterceptHook(); User user = processModel.getUser(); - NodeAddress selectedArbitratorNodeAddress = ArbitrationSelectionRule.select(user.getAcceptedArbitratorAddresses(), processModel.getOffer()); + NodeAddress selectedArbitratorNodeAddress = ArbitrationSelectionRule.select(user.getAcceptedArbitratorAddresses(), processModel.getOffer().getOfferPayload()); log.debug("selectedArbitratorAddress " + selectedArbitratorNodeAddress); Arbitrator selectedArbitrator = user.getAcceptedArbitratorByAddress(selectedArbitratorNodeAddress); checkNotNull(selectedArbitrator, "selectedArbitrator must not be null at CreateTakeOfferFeeTx"); diff --git a/core/src/main/java/io/bisq/trade/protocol/trade/tasks/taker/LoadCreateOfferFeeTx.java b/core/src/main/java/io/bisq/trade/protocol/trade/tasks/taker/LoadCreateOfferFeeTx.java index 815ee9bd09..5eda772193 100644 --- a/core/src/main/java/io/bisq/trade/protocol/trade/tasks/taker/LoadCreateOfferFeeTx.java +++ b/core/src/main/java/io/bisq/trade/protocol/trade/tasks/taker/LoadCreateOfferFeeTx.java @@ -38,7 +38,7 @@ public class LoadCreateOfferFeeTx extends TradeTask { runInterceptHook(); // TODO impl. missing - ///processModel.getWalletService().findTxInBlockChain(trade.getOffer().getOfferFeePaymentTxID()); + ///processModel.getWalletService().findTxInBlockChain(trade.getOfferPayload().getOfferFeePaymentTxID()); complete(); } catch (Throwable t) { diff --git a/core/src/main/java/io/bisq/trade/protocol/trade/tasks/taker/PublishTradeStatistics.java b/core/src/main/java/io/bisq/trade/protocol/trade/tasks/taker/PublishTradeStatistics.java index 1df74075bd..b19fd85872 100644 --- a/core/src/main/java/io/bisq/trade/protocol/trade/tasks/taker/PublishTradeStatistics.java +++ b/core/src/main/java/io/bisq/trade/protocol/trade/tasks/taker/PublishTradeStatistics.java @@ -44,7 +44,7 @@ public class PublishTradeStatistics extends TradeTask { .filter(c -> c.getPeersNodeAddressOptional().isPresent() && c.getPeersNodeAddressOptional().get().equals(trade.getTradingPeerNodeAddress())) .findAny() .ifPresent(c -> { - TradeStatistics tradeStatistics = new TradeStatistics(trade.getOffer(), + TradeStatistics tradeStatistics = new TradeStatistics(trade.getOffer().getOfferPayload(), trade.getTradePrice(), trade.getTradeAmount(), trade.getDate(), diff --git a/core/src/main/java/io/bisq/trade/protocol/trade/tasks/taker/SelectArbitrator.java b/core/src/main/java/io/bisq/trade/protocol/trade/tasks/taker/SelectArbitrator.java index bf635806c3..952c17c766 100644 --- a/core/src/main/java/io/bisq/trade/protocol/trade/tasks/taker/SelectArbitrator.java +++ b/core/src/main/java/io/bisq/trade/protocol/trade/tasks/taker/SelectArbitrator.java @@ -38,7 +38,7 @@ public class SelectArbitrator extends TradeTask { try { runInterceptHook(); - trade.applyArbitratorNodeAddress(ArbitrationSelectionRule.select(processModel.getUser().getAcceptedArbitratorAddresses(), processModel.getOffer())); + trade.applyArbitratorNodeAddress(ArbitrationSelectionRule.select(processModel.getUser().getAcceptedArbitratorAddresses(), processModel.getOffer().getOfferPayload())); complete(); } catch (Throwable t) { diff --git a/core/src/main/java/io/bisq/trade/protocol/trade/tasks/taker/SendDepositTxPublishedMessage.java b/core/src/main/java/io/bisq/trade/protocol/trade/tasks/taker/SendDepositTxPublishedMessage.java index 25b45c8015..7847806a12 100644 --- a/core/src/main/java/io/bisq/trade/protocol/trade/tasks/taker/SendDepositTxPublishedMessage.java +++ b/core/src/main/java/io/bisq/trade/protocol/trade/tasks/taker/SendDepositTxPublishedMessage.java @@ -19,7 +19,7 @@ package io.bisq.trade.protocol.trade.tasks.taker; import io.bisq.common.taskrunner.TaskRunner; import io.bisq.messages.trade.protocol.trade.messages.DepositTxPublishedMessage; -import io.bisq.p2p.messaging.SendMailboxMessageListener; +import io.bisq.messages.p2p.messaging.SendMailboxMessageListener; import io.bisq.trade.Trade; import io.bisq.trade.protocol.trade.tasks.TradeTask; import org.slf4j.Logger; diff --git a/core/src/main/java/io/bisq/trade/protocol/trade/tasks/taker/SendPayDepositRequest.java b/core/src/main/java/io/bisq/trade/protocol/trade/tasks/taker/SendPayDepositRequest.java index 4021f594d6..447cf9578a 100644 --- a/core/src/main/java/io/bisq/trade/protocol/trade/tasks/taker/SendPayDepositRequest.java +++ b/core/src/main/java/io/bisq/trade/protocol/trade/tasks/taker/SendPayDepositRequest.java @@ -21,7 +21,7 @@ import io.bisq.btc.AddressEntry; import io.bisq.btc.wallet.BtcWalletService; import io.bisq.common.taskrunner.TaskRunner; import io.bisq.messages.trade.protocol.trade.messages.PayDepositRequest; -import io.bisq.p2p.messaging.SendMailboxMessageListener; +import io.bisq.messages.p2p.messaging.SendMailboxMessageListener; import io.bisq.trade.Trade; import io.bisq.trade.protocol.trade.tasks.TradeTask; import org.slf4j.Logger; diff --git a/core/src/main/java/io/bisq/trade/protocol/trade/tasks/taker/VerifyAndSignContract.java b/core/src/main/java/io/bisq/trade/protocol/trade/tasks/taker/VerifyAndSignContract.java index 609fca68b8..211b2dab82 100644 --- a/core/src/main/java/io/bisq/trade/protocol/trade/tasks/taker/VerifyAndSignContract.java +++ b/core/src/main/java/io/bisq/trade/protocol/trade/tasks/taker/VerifyAndSignContract.java @@ -24,7 +24,7 @@ import io.bisq.common.taskrunner.TaskRunner; import io.bisq.common.util.Utilities; import io.bisq.messages.payment.payload.PaymentAccountContractData; import io.bisq.messages.trade.payload.Contract; -import io.bisq.p2p.NodeAddress; +import io.bisq.messages.NodeAddress; import io.bisq.trade.SellerAsTakerTrade; import io.bisq.trade.Trade; import io.bisq.trade.protocol.trade.TradingPeer; @@ -77,7 +77,7 @@ public class VerifyAndSignContract extends TradeTask { "takerMultiSigPubKey from AddressEntry must match the one from the trade data. trade id =" + id); Contract contract = new Contract( - processModel.getOffer(), + processModel.getOffer().getOfferPayload(), trade.getTradeAmount(), trade.getTradePrice(), trade.getTakeOfferFeeTxId(), diff --git a/core/src/main/java/io/bisq/trade/statistics/TradeStatisticsForJson.java b/core/src/main/java/io/bisq/trade/statistics/TradeStatisticsForJson.java index 3209d66be4..8567a21bf9 100644 --- a/core/src/main/java/io/bisq/trade/statistics/TradeStatisticsForJson.java +++ b/core/src/main/java/io/bisq/trade/statistics/TradeStatisticsForJson.java @@ -1,8 +1,8 @@ package io.bisq.trade.statistics; import io.bisq.common.util.MathUtils; -import io.bisq.messages.locale.CurrencyUtil; -import io.bisq.messages.trade.offer.payload.Offer; +import io.bisq.locale.CurrencyUtil; +import io.bisq.messages.trade.offer.payload.OfferPayload; import io.bisq.messages.trade.statistics.payload.TradeStatistics; import org.bitcoinj.core.Coin; import org.bitcoinj.utils.ExchangeRate; @@ -19,7 +19,7 @@ public final class TradeStatisticsForJson { private static final Logger log = LoggerFactory.getLogger(TradeStatisticsForJson.class); public final String currency; - public final Offer.Direction direction; + public final OfferPayload.Direction direction; public final long tradePrice; public final long tradeAmount; public final long tradeDate; @@ -34,7 +34,7 @@ public final class TradeStatisticsForJson { // primaryMarket fields are based on industry standard where primaryMarket is always in the focus (in the app BTC is always in the focus - will be changed in a larger refactoring once) public String currencyPair; - public Offer.Direction primaryMarketDirection; + public OfferPayload.Direction primaryMarketDirection; public String tradePriceDisplayString; @@ -67,7 +67,7 @@ public final class TradeStatisticsForJson { MonetaryFormat coinFormat = MonetaryFormat.BTC.minDecimals(2).repeatOptionalDecimals(1, 6); final Fiat tradePriceAsFiat = getTradePrice(); if (CurrencyUtil.isCryptoCurrency(currency)) { - primaryMarketDirection = direction == Offer.Direction.BUY ? Offer.Direction.SELL : Offer.Direction.BUY; + primaryMarketDirection = direction == OfferPayload.Direction.BUY ? OfferPayload.Direction.SELL : OfferPayload.Direction.BUY; final double value = tradePriceAsFiat.value != 0 ? 10000D / tradePriceAsFiat.value : 0; DecimalFormat decimalFormat = new DecimalFormat("#.#"); decimalFormat.setMaximumFractionDigits(8); diff --git a/core/src/main/java/io/bisq/trade/statistics/TradeStatisticsManager.java b/core/src/main/java/io/bisq/trade/statistics/TradeStatisticsManager.java index 78854a1677..de7eb159c6 100644 --- a/core/src/main/java/io/bisq/trade/statistics/TradeStatisticsManager.java +++ b/core/src/main/java/io/bisq/trade/statistics/TradeStatisticsManager.java @@ -5,14 +5,15 @@ import com.google.inject.name.Named; import io.bisq.app.AppOptionKeys; import io.bisq.common.util.Utilities; import io.bisq.locale.CurrencyTuple; -import io.bisq.messages.locale.CurrencyUtil; +import io.bisq.locale.CurrencyUtil; import io.bisq.messages.trade.statistics.payload.TradeStatistics; -import io.bisq.p2p.P2PService; +import io.bisq.p2p.storage.P2PService; import io.bisq.p2p.storage.HashMapChangedListener; -import io.bisq.p2p.storage.payload.StoragePayload; +import io.bisq.payload.StoragePayload; import io.bisq.p2p.storage.storageentry.ProtectedStorageEntry; import io.bisq.storage.PlainTextWrapper; import io.bisq.storage.Storage; +import io.bisq.user.Preferences; import javafx.collections.FXCollections; import javafx.collections.ObservableSet; import org.slf4j.Logger; @@ -55,7 +56,7 @@ public class TradeStatisticsManager { this.statisticsJsonStorage.initWithFileName("trade_statistics.json"); this.fiatCurrencyListJsonStorage.initWithFileName("fiat_currency_list.json"); - ArrayList fiatCurrencyList = new ArrayList<>(CurrencyUtil.getAllSortedFiatCurrencies().stream() + ArrayList fiatCurrencyList = new ArrayList<>(CurrencyUtil.getAllSortedFiatCurrencies(Preferences.getDefaultLocale()).stream() .map(e -> new CurrencyTuple(e.getCode(), e.getName(), 8)) .collect(Collectors.toList())); fiatCurrencyListJsonStorage.queueUpForSave(new PlainTextWrapper(Utilities.objectToJson(fiatCurrencyList)), 2000); diff --git a/core/src/main/java/io/bisq/user/User.java b/core/src/main/java/io/bisq/user/User.java index b8b154975b..8cb763cf3d 100644 --- a/core/src/main/java/io/bisq/user/User.java +++ b/core/src/main/java/io/bisq/user/User.java @@ -18,14 +18,14 @@ package io.bisq.user; import io.bisq.app.Version; -import io.bisq.common.crypto.KeyRing; import io.bisq.common.persistance.Persistable; +import io.bisq.locale.LanguageUtil; +import io.bisq.locale.TradeCurrency; +import io.bisq.messages.NodeAddress; import io.bisq.messages.alert.Alert; import io.bisq.messages.arbitration.Arbitrator; +import io.bisq.messages.crypto.KeyRing; import io.bisq.messages.filter.payload.Filter; -import io.bisq.messages.locale.LanguageUtil; -import io.bisq.messages.locale.TradeCurrency; -import io.bisq.p2p.NodeAddress; import io.bisq.payment.PaymentAccount; import io.bisq.storage.Storage; import javafx.beans.property.ObjectProperty; @@ -106,7 +106,7 @@ public final class User implements Persistable { } else { accountID = String.valueOf(Math.abs(keyRing.getPubKeyRing().hashCode())); - acceptedLanguageLocaleCodes.add(LanguageUtil.getDefaultLanguageLocaleAsCode()); + acceptedLanguageLocaleCodes.add(LanguageUtil.getDefaultLanguageLocaleAsCode(Preferences.getDefaultLocale())); String english = LanguageUtil.getEnglishLanguageLocaleCode(); if (!acceptedLanguageLocaleCodes.contains(english)) acceptedLanguageLocaleCodes.add(english); diff --git a/core/src/test/java/io/bisq/btc/pricefeed/MarketPriceFeedServiceTest.java b/core/src/test/java/io/bisq/btc/pricefeed/MarketPriceFeedServiceTest.java index e249523c07..ac1e5bd908 100644 --- a/core/src/test/java/io/bisq/btc/pricefeed/MarketPriceFeedServiceTest.java +++ b/core/src/test/java/io/bisq/btc/pricefeed/MarketPriceFeedServiceTest.java @@ -1,6 +1,6 @@ package io.bisq.btc.pricefeed; -import io.bisq.messages.provider.price.PriceFeedService; +import io.bisq.provider.price.PriceFeedService; import org.junit.Ignore; import org.junit.Test; import org.slf4j.Logger; diff --git a/doc/protobuffer.md b/doc/protobuffer.md index d036001810..67793ebac8 100644 --- a/doc/protobuffer.md +++ b/doc/protobuffer.md @@ -145,7 +145,7 @@ I LazyProcessedStoragePayload (io.bisq.p2p.storage.payload) + CompensationRequestPayload (io.bisq.dao.compensation) D TradeStatistics (io.bisq.trade.statistics) + MailboxStoragePayload (io.bisq.p2p.storage.payload) -+ Offer (io.bisq.trade.offer) ++ Offer (io.bisq.trade.offerPayload) I PersistedStoragePayload (io.bisq.p2p.storage.payload) D CompensationRequestPayload (io.bisq.dao.compensation) D TradeStatistics (io.bisq.trade.statistics) @@ -175,6 +175,6 @@ C+ BankAccountContractData (io.bisq.payment) + PubKeyRing (io.bisq.common.crypto) + RawTransactionInput (io.bisq.btc.data) I RequiresOwnerIsOnlinePayload (io.bisq.p2p.storage.payload) -D Offer (io.bisq.trade.offer) +D Offer (io.bisq.trade.offerPayload) + SealedAndSigned (io.bisq.common.crypto) ``` \ No newline at end of file diff --git a/gui/src/main/java/io/bisq/app/BisqApp.java b/gui/src/main/java/io/bisq/app/BisqApp.java index 461a05087d..4b1149240d 100644 --- a/gui/src/main/java/io/bisq/app/BisqApp.java +++ b/gui/src/main/java/io/bisq/app/BisqApp.java @@ -43,7 +43,7 @@ import io.bisq.gui.main.overlays.popups.Popup; import io.bisq.gui.main.overlays.windows.*; import io.bisq.gui.util.ImageUtil; import io.bisq.locale.Res; -import io.bisq.p2p.P2PService; +import io.bisq.p2p.storage.P2PService; import io.bisq.storage.Storage; import io.bisq.trade.TradeManager; import io.bisq.trade.offer.OpenOfferManager; diff --git a/gui/src/main/java/io/bisq/app/BisqAppModule.java b/gui/src/main/java/io/bisq/app/BisqAppModule.java index 5b00a3e903..ba6eec10e2 100644 --- a/gui/src/main/java/io/bisq/app/BisqAppModule.java +++ b/gui/src/main/java/io/bisq/app/BisqAppModule.java @@ -22,15 +22,15 @@ import io.bisq.alert.AlertModule; import io.bisq.arbitration.ArbitratorModule; import io.bisq.btc.BitcoinModule; import io.bisq.common.Clock; -import io.bisq.common.crypto.KeyRing; -import io.bisq.common.crypto.KeyStorage; +import io.bisq.messages.crypto.KeyRing; +import io.bisq.messages.crypto.KeyStorage; import io.bisq.crypto.EncryptionServiceModule; import io.bisq.dao.DaoModule; import io.bisq.filter.FilterModule; import io.bisq.gui.GuiModule; import io.bisq.gui.common.view.CachingViewLoader; import io.bisq.gui.main.overlays.notifications.NotificationCenter; -import io.bisq.messages.user.Preferences; +import io.bisq.user.Preferences; import io.bisq.p2p.P2PModule; import io.bisq.storage.Storage; import io.bisq.trade.TradeModule; diff --git a/gui/src/main/java/io/bisq/gui/bisq.css b/gui/src/main/java/io/bisq/gui/bisq.css index a1178a6496..f8d549b7ba 100644 --- a/gui/src/main/java/io/bisq/gui/bisq.css +++ b/gui/src/main/java/io/bisq/gui/bisq.css @@ -469,7 +469,7 @@ textfield */ -fx-text-fill: #333000; } -/* Offer book */ +/* OfferPayload book */ #num-offers { -fx-font-size: 12; } diff --git a/gui/src/main/java/io/bisq/gui/components/PeerInfoIcon.java b/gui/src/main/java/io/bisq/gui/components/PeerInfoIcon.java index 4c511e95ec..9751ec9c9b 100644 --- a/gui/src/main/java/io/bisq/gui/components/PeerInfoIcon.java +++ b/gui/src/main/java/io/bisq/gui/components/PeerInfoIcon.java @@ -3,8 +3,9 @@ package io.bisq.gui.components; import io.bisq.alert.PrivateNotificationManager; import io.bisq.gui.main.overlays.editor.PeerInfoWithTagEditor; import io.bisq.locale.Res; -import io.bisq.messages.trade.offer.payload.Offer; -import io.bisq.messages.user.Preferences; +import io.bisq.messages.trade.offer.payload.OfferPayload; +import io.bisq.p2p.protocol.availability.Offer; +import io.bisq.user.Preferences; import javafx.geometry.Point2D; import javafx.scene.Group; import javafx.scene.canvas.Canvas; diff --git a/gui/src/main/java/io/bisq/gui/components/TxIdTextField.java b/gui/src/main/java/io/bisq/gui/components/TxIdTextField.java index 7ae04d8e33..af8e30ea3d 100644 --- a/gui/src/main/java/io/bisq/gui/components/TxIdTextField.java +++ b/gui/src/main/java/io/bisq/gui/components/TxIdTextField.java @@ -25,7 +25,7 @@ import io.bisq.common.util.Utilities; import io.bisq.gui.components.indicator.TxConfidenceIndicator; import io.bisq.gui.util.GUIUtil; import io.bisq.locale.Res; -import io.bisq.messages.user.Preferences; +import io.bisq.user.Preferences; import javafx.scene.control.Label; import javafx.scene.control.TextField; import javafx.scene.control.Tooltip; diff --git a/gui/src/main/java/io/bisq/gui/components/paymentmethods/BankForm.java b/gui/src/main/java/io/bisq/gui/components/paymentmethods/BankForm.java index 6710a6d03c..7e7732e50c 100644 --- a/gui/src/main/java/io/bisq/gui/components/paymentmethods/BankForm.java +++ b/gui/src/main/java/io/bisq/gui/components/paymentmethods/BankForm.java @@ -28,8 +28,7 @@ import io.bisq.gui.util.validation.AccountNrValidator; import io.bisq.gui.util.validation.BankIdValidator; import io.bisq.gui.util.validation.BranchIdValidator; import io.bisq.gui.util.validation.InputValidator; -import io.bisq.locale.Res; -import io.bisq.messages.locale.*; +import io.bisq.locale.*; import io.bisq.messages.payment.payload.BankAccountContractData; import io.bisq.messages.payment.payload.PaymentAccountContractData; import io.bisq.payment.CountryBasedPaymentAccount; diff --git a/gui/src/main/java/io/bisq/gui/components/paymentmethods/CashDepositForm.java b/gui/src/main/java/io/bisq/gui/components/paymentmethods/CashDepositForm.java index b400ffa20d..e1317157fa 100644 --- a/gui/src/main/java/io/bisq/gui/components/paymentmethods/CashDepositForm.java +++ b/gui/src/main/java/io/bisq/gui/components/paymentmethods/CashDepositForm.java @@ -29,12 +29,12 @@ import io.bisq.gui.util.validation.AccountNrValidator; import io.bisq.gui.util.validation.BankIdValidator; import io.bisq.gui.util.validation.BranchIdValidator; import io.bisq.gui.util.validation.InputValidator; -import io.bisq.locale.Res; -import io.bisq.messages.locale.*; +import io.bisq.locale.*; import io.bisq.messages.payment.payload.CashDepositAccountContractData; import io.bisq.messages.payment.payload.PaymentAccountContractData; import io.bisq.payment.CountryBasedPaymentAccount; import io.bisq.payment.PaymentAccount; +import io.bisq.user.Preferences; import javafx.collections.FXCollections; import javafx.scene.control.ComboBox; import javafx.scene.control.Label; @@ -83,9 +83,9 @@ public class CashDepositForm extends PaymentMethodForm { if (!showRequirements) FormBuilder.addLabelTextFieldWithCopyIcon(gridPane, ++gridRow, Res.getWithCol("payment.bank.country"), - CountryUtil.getNameAndCode(countryCode)); + CountryUtil.getNameAndCode(countryCode, Preferences.getDefaultLocale())); else - requirements += "\n" + Res.get("payment.bank.country") + " " + CountryUtil.getNameAndCode(countryCode); + requirements += "\n" + Res.get("payment.bank.country") + " " + CountryUtil.getNameAndCode(countryCode, Preferences.getDefaultLocale()); // We don't want to display more than 6 rows to avoid scrolling, so if we get too many fields we combine them horizontally int nrRows = 0; @@ -313,7 +313,7 @@ public class CashDepositForm extends PaymentMethodForm { if (selectedItem != null) { getCountryBasedPaymentAccount().setCountry(selectedItem); String countryCode = selectedItem.code; - TradeCurrency currency = CurrencyUtil.getCurrencyByCountryCode(countryCode); + TradeCurrency currency = CurrencyUtil.getCurrencyByCountryCode(countryCode, Preferences.getDefaultLocale()); paymentAccount.setSingleTradeCurrency(currency); currencyComboBox.setDisable(false); currencyComboBox.getSelectionModel().select(currency); @@ -421,10 +421,10 @@ public class CashDepositForm extends PaymentMethodForm { currencyComboBox = FormBuilder.addLabelComboBox(gridPane, ++gridRow, Res.getWithCol("shared.currency")).second; currencyComboBox.setPromptText(Res.get("list.currency.select")); - currencyComboBox.setItems(FXCollections.observableArrayList(CurrencyUtil.getAllSortedFiatCurrencies())); + currencyComboBox.setItems(FXCollections.observableArrayList(CurrencyUtil.getAllSortedFiatCurrencies(Preferences.getDefaultLocale()))); currencyComboBox.setOnAction(e -> { TradeCurrency selectedItem = currencyComboBox.getSelectionModel().getSelectedItem(); - FiatCurrency defaultCurrency = CurrencyUtil.getCurrencyByCountryCode(countryComboBox.getSelectionModel().getSelectedItem().code); + FiatCurrency defaultCurrency = CurrencyUtil.getCurrencyByCountryCode(countryComboBox.getSelectionModel().getSelectedItem().code, Preferences.getDefaultLocale()); if (!defaultCurrency.equals(selectedItem)) { new Popup<>().warning(Res.get("payment.foreign.currency")) .actionButtonText(Res.get("shared.yes")) diff --git a/gui/src/main/java/io/bisq/gui/components/paymentmethods/ChaseQuickPayForm.java b/gui/src/main/java/io/bisq/gui/components/paymentmethods/ChaseQuickPayForm.java index b81f68fb11..10904f4cff 100644 --- a/gui/src/main/java/io/bisq/gui/components/paymentmethods/ChaseQuickPayForm.java +++ b/gui/src/main/java/io/bisq/gui/components/paymentmethods/ChaseQuickPayForm.java @@ -24,7 +24,7 @@ import io.bisq.gui.util.Layout; import io.bisq.gui.util.validation.ChaseQuickPayValidator; import io.bisq.gui.util.validation.InputValidator; import io.bisq.locale.Res; -import io.bisq.messages.locale.TradeCurrency; +import io.bisq.locale.TradeCurrency; import io.bisq.messages.payment.payload.ChaseQuickPayAccountContractData; import io.bisq.messages.payment.payload.PaymentAccountContractData; import io.bisq.payment.ChaseQuickPayAccount; diff --git a/gui/src/main/java/io/bisq/gui/components/paymentmethods/CryptoCurrencyForm.java b/gui/src/main/java/io/bisq/gui/components/paymentmethods/CryptoCurrencyForm.java index f386a81f5f..ab62b250c9 100644 --- a/gui/src/main/java/io/bisq/gui/components/paymentmethods/CryptoCurrencyForm.java +++ b/gui/src/main/java/io/bisq/gui/components/paymentmethods/CryptoCurrencyForm.java @@ -24,8 +24,8 @@ import io.bisq.gui.util.Layout; import io.bisq.gui.util.validation.AltCoinAddressValidator; import io.bisq.gui.util.validation.InputValidator; import io.bisq.locale.Res; -import io.bisq.messages.locale.CurrencyUtil; -import io.bisq.messages.locale.TradeCurrency; +import io.bisq.locale.CurrencyUtil; +import io.bisq.locale.TradeCurrency; import io.bisq.messages.payment.payload.CryptoCurrencyAccountContractData; import io.bisq.messages.payment.payload.PaymentAccountContractData; import io.bisq.payment.CryptoCurrencyAccount; diff --git a/gui/src/main/java/io/bisq/gui/components/paymentmethods/FasterPaymentsForm.java b/gui/src/main/java/io/bisq/gui/components/paymentmethods/FasterPaymentsForm.java index 904ff7aefe..9a34a7b49b 100644 --- a/gui/src/main/java/io/bisq/gui/components/paymentmethods/FasterPaymentsForm.java +++ b/gui/src/main/java/io/bisq/gui/components/paymentmethods/FasterPaymentsForm.java @@ -24,7 +24,7 @@ import io.bisq.gui.util.validation.AccountNrValidator; import io.bisq.gui.util.validation.BranchIdValidator; import io.bisq.gui.util.validation.InputValidator; import io.bisq.locale.Res; -import io.bisq.messages.locale.TradeCurrency; +import io.bisq.locale.TradeCurrency; import io.bisq.messages.payment.payload.FasterPaymentsAccountContractData; import io.bisq.messages.payment.payload.PaymentAccountContractData; import io.bisq.payment.FasterPaymentsAccount; diff --git a/gui/src/main/java/io/bisq/gui/components/paymentmethods/InteracETransferForm.java b/gui/src/main/java/io/bisq/gui/components/paymentmethods/InteracETransferForm.java index 39521500e9..c224c14f8f 100644 --- a/gui/src/main/java/io/bisq/gui/components/paymentmethods/InteracETransferForm.java +++ b/gui/src/main/java/io/bisq/gui/components/paymentmethods/InteracETransferForm.java @@ -24,7 +24,7 @@ import io.bisq.gui.util.Layout; import io.bisq.gui.util.validation.InputValidator; import io.bisq.gui.util.validation.InteracETransferValidator; import io.bisq.locale.Res; -import io.bisq.messages.locale.TradeCurrency; +import io.bisq.locale.TradeCurrency; import io.bisq.messages.payment.payload.InteracETransferAccountContractData; import io.bisq.messages.payment.payload.PaymentAccountContractData; import io.bisq.payment.InteracETransferAccount; diff --git a/gui/src/main/java/io/bisq/gui/components/paymentmethods/OKPayForm.java b/gui/src/main/java/io/bisq/gui/components/paymentmethods/OKPayForm.java index 8ea76ce28d..df4113287b 100644 --- a/gui/src/main/java/io/bisq/gui/components/paymentmethods/OKPayForm.java +++ b/gui/src/main/java/io/bisq/gui/components/paymentmethods/OKPayForm.java @@ -23,11 +23,12 @@ import io.bisq.gui.util.Layout; import io.bisq.gui.util.validation.InputValidator; import io.bisq.gui.util.validation.OKPayValidator; import io.bisq.locale.Res; -import io.bisq.messages.locale.CurrencyUtil; +import io.bisq.locale.CurrencyUtil; import io.bisq.messages.payment.payload.OKPayAccountContractData; import io.bisq.messages.payment.payload.PaymentAccountContractData; import io.bisq.payment.OKPayAccount; import io.bisq.payment.PaymentAccount; +import io.bisq.user.Preferences; import javafx.geometry.Insets; import javafx.geometry.VPos; import javafx.scene.control.CheckBox; @@ -92,7 +93,7 @@ public class OKPayForm extends PaymentMethodForm { else flowPane.setId("flow-pane-checkboxes-non-editable-bg"); - CurrencyUtil.getAllOKPayCurrencies().stream().forEach(e -> + CurrencyUtil.getAllOKPayCurrencies(Preferences.getDefaultLocale()).stream().forEach(e -> { CheckBox checkBox = new CheckBox(e.getCode()); checkBox.setMouseTransparent(!isEditable); diff --git a/gui/src/main/java/io/bisq/gui/components/paymentmethods/PaymentMethodForm.java b/gui/src/main/java/io/bisq/gui/components/paymentmethods/PaymentMethodForm.java index 19c098ca3f..10ab3d48f6 100644 --- a/gui/src/main/java/io/bisq/gui/components/paymentmethods/PaymentMethodForm.java +++ b/gui/src/main/java/io/bisq/gui/components/paymentmethods/PaymentMethodForm.java @@ -22,10 +22,11 @@ import io.bisq.gui.components.InputTextField; import io.bisq.gui.util.BSFormatter; import io.bisq.gui.util.validation.InputValidator; import io.bisq.locale.Res; -import io.bisq.messages.locale.CurrencyUtil; -import io.bisq.messages.locale.TradeCurrency; +import io.bisq.locale.CurrencyUtil; +import io.bisq.locale.TradeCurrency; import io.bisq.messages.payment.payload.PaymentAccountContractData; import io.bisq.payment.PaymentAccount; +import io.bisq.user.Preferences; import javafx.beans.property.BooleanProperty; import javafx.beans.property.SimpleBooleanProperty; import javafx.collections.FXCollections; @@ -67,7 +68,7 @@ public abstract class PaymentMethodForm { protected void addTradeCurrencyComboBox() { currencyComboBox = addLabelComboBox(gridPane, ++gridRow, Res.getWithCol("shared.currency")).second; currencyComboBox.setPromptText(Res.get("list.currency.select")); - currencyComboBox.setItems(FXCollections.observableArrayList(CurrencyUtil.getAllMainFiatCurrencies())); + currencyComboBox.setItems(FXCollections.observableArrayList(CurrencyUtil.getAllMainFiatCurrencies(Preferences.getDefaultLocale(), Preferences.getDefaultTradeCurrency()))); currencyComboBox.setConverter(new StringConverter() { @Override public String toString(TradeCurrency tradeCurrency) { diff --git a/gui/src/main/java/io/bisq/gui/components/paymentmethods/PerfectMoneyForm.java b/gui/src/main/java/io/bisq/gui/components/paymentmethods/PerfectMoneyForm.java index 3ddf7000c1..5ded0cc6fb 100644 --- a/gui/src/main/java/io/bisq/gui/components/paymentmethods/PerfectMoneyForm.java +++ b/gui/src/main/java/io/bisq/gui/components/paymentmethods/PerfectMoneyForm.java @@ -23,7 +23,7 @@ import io.bisq.gui.util.Layout; import io.bisq.gui.util.validation.InputValidator; import io.bisq.gui.util.validation.PerfectMoneyValidator; import io.bisq.locale.Res; -import io.bisq.messages.locale.FiatCurrency; +import io.bisq.locale.FiatCurrency; import io.bisq.messages.payment.payload.PaymentAccountContractData; import io.bisq.messages.payment.payload.PerfectMoneyAccountContractData; import io.bisq.payment.PaymentAccount; diff --git a/gui/src/main/java/io/bisq/gui/components/paymentmethods/SameBankForm.java b/gui/src/main/java/io/bisq/gui/components/paymentmethods/SameBankForm.java index 8c92a3e677..13babe571c 100644 --- a/gui/src/main/java/io/bisq/gui/components/paymentmethods/SameBankForm.java +++ b/gui/src/main/java/io/bisq/gui/components/paymentmethods/SameBankForm.java @@ -22,7 +22,7 @@ import io.bisq.gui.components.InputTextField; import io.bisq.gui.util.BSFormatter; import io.bisq.gui.util.validation.InputValidator; import io.bisq.locale.Res; -import io.bisq.messages.locale.BankUtil; +import io.bisq.locale.BankUtil; import io.bisq.messages.payment.payload.PaymentAccountContractData; import io.bisq.payment.CountryBasedPaymentAccount; import io.bisq.payment.PaymentAccount; diff --git a/gui/src/main/java/io/bisq/gui/components/paymentmethods/SepaForm.java b/gui/src/main/java/io/bisq/gui/components/paymentmethods/SepaForm.java index 648c17e2e8..f9cdd48e14 100644 --- a/gui/src/main/java/io/bisq/gui/components/paymentmethods/SepaForm.java +++ b/gui/src/main/java/io/bisq/gui/components/paymentmethods/SepaForm.java @@ -25,15 +25,16 @@ import io.bisq.gui.util.validation.BICValidator; import io.bisq.gui.util.validation.IBANValidator; import io.bisq.gui.util.validation.InputValidator; import io.bisq.locale.Res; -import io.bisq.messages.locale.Country; -import io.bisq.messages.locale.CountryUtil; -import io.bisq.messages.locale.CurrencyUtil; -import io.bisq.messages.locale.TradeCurrency; +import io.bisq.locale.Country; +import io.bisq.locale.CountryUtil; +import io.bisq.locale.CurrencyUtil; +import io.bisq.locale.TradeCurrency; import io.bisq.messages.payment.payload.PaymentAccountContractData; import io.bisq.messages.payment.payload.SepaAccountContractData; import io.bisq.payment.CountryBasedPaymentAccount; import io.bisq.payment.PaymentAccount; import io.bisq.payment.SepaAccount; +import io.bisq.user.Preferences; import javafx.collections.FXCollections; import javafx.geometry.HPos; import javafx.geometry.Insets; @@ -72,7 +73,7 @@ public class SepaForm extends PaymentMethodForm { sepaAccountContractData.getHolderName()); FormBuilder.addLabelTextFieldWithCopyIcon(gridPane, ++gridRow, Res.getWithCol("payment.bank.country"), - CountryUtil.getNameAndCode(sepaAccountContractData.getCountryCode())); + CountryUtil.getNameAndCode(sepaAccountContractData.getCountryCode(), Preferences.getDefaultLocale())); // IBAN, BIC will not be translated FormBuilder.addLabelTextFieldWithCopyIcon(gridPane, ++gridRow, "IBAN:", sepaAccountContractData.getIban()); FormBuilder.addLabelTextFieldWithCopyIcon(gridPane, ++gridRow, "BIC:", sepaAccountContractData.getBic()); @@ -153,7 +154,7 @@ public class SepaForm extends PaymentMethodForm { countryComboBox.setOnAction(e -> { Country selectedItem = countryComboBox.getSelectionModel().getSelectedItem(); sepaAccount.setCountry(selectedItem); - TradeCurrency currency = CurrencyUtil.getCurrencyByCountryCode(selectedItem.code); + TradeCurrency currency = CurrencyUtil.getCurrencyByCountryCode(selectedItem.code, Preferences.getDefaultLocale()); setupCurrency(selectedItem, currency); updateCountriesSelection(true, euroCountryCheckBoxes); @@ -166,12 +167,12 @@ public class SepaForm extends PaymentMethodForm { addAllowedPeriod(); addAccountNameTextFieldWithAutoFillCheckBox(); - countryComboBox.setItems(FXCollections.observableArrayList(CountryUtil.getAllSepaCountries())); - Country country = CountryUtil.getDefaultCountry(); - if (CountryUtil.getAllSepaCountries().contains(country)) { + countryComboBox.setItems(FXCollections.observableArrayList(CountryUtil.getAllSepaCountries(Preferences.getDefaultLocale()))); + Country country = CountryUtil.getDefaultCountry(Preferences.getDefaultLocale()); + if (CountryUtil.getAllSepaCountries(Preferences.getDefaultLocale()).contains(country)) { countryComboBox.getSelectionModel().select(country); sepaAccount.setCountry(country); - TradeCurrency currency = CurrencyUtil.getCurrencyByCountryCode(country.code); + TradeCurrency currency = CurrencyUtil.getCurrencyByCountryCode(country.code, Preferences.getDefaultLocale()); setupCurrency(country, currency); } @@ -179,7 +180,7 @@ public class SepaForm extends PaymentMethodForm { } private void setupCurrency(Country country, TradeCurrency currency) { - if (CountryUtil.getAllSepaEuroCountries().contains(country)) { + if (CountryUtil.getAllSepaEuroCountries(Preferences.getDefaultLocale()).contains(country)) { currencyTextField.setVisible(true); currencyTextField.setManaged(true); currencyComboBox.setVisible(false); @@ -215,12 +216,12 @@ public class SepaForm extends PaymentMethodForm { private void addEuroCountriesGrid(boolean isEditable) { addCountriesGrid(isEditable, Res.get("payment.accept.euro"), euroCountryCheckBoxes, - CountryUtil.getAllSepaEuroCountries()); + CountryUtil.getAllSepaEuroCountries(Preferences.getDefaultLocale())); } private void addNonEuroCountriesGrid(boolean isEditable) { addCountriesGrid(isEditable, Res.get("payment.accept.nonEuro"), nonEuroCountryCheckBoxes, - CountryUtil.getAllSepaNonEuroCountries()); + CountryUtil.getAllSepaNonEuroCountries(Preferences.getDefaultLocale())); } private void addCountriesGrid(boolean isEditable, String title, List checkBoxList, List dataProvider) { @@ -273,15 +274,15 @@ public class SepaForm extends PaymentMethodForm { String countryCode = (String) checkBox.getUserData(); TradeCurrency selectedCurrency = sepaAccount.getSelectedTradeCurrency(); if (selectedCurrency == null) { - Country country = CountryUtil.getDefaultCountry(); - if (CountryUtil.getAllSepaCountries().contains(country)) - selectedCurrency = CurrencyUtil.getCurrencyByCountryCode(country.code); + Country country = CountryUtil.getDefaultCountry(Preferences.getDefaultLocale()); + if (CountryUtil.getAllSepaCountries(Preferences.getDefaultLocale()).contains(country)) + selectedCurrency = CurrencyUtil.getCurrencyByCountryCode(country.code, Preferences.getDefaultLocale()); } boolean selected; if (isEditable && selectedCurrency != null) { - selected = CurrencyUtil.getCurrencyByCountryCode(countryCode).getCode().equals(selectedCurrency.getCode()); + selected = CurrencyUtil.getCurrencyByCountryCode(countryCode, Preferences.getDefaultLocale()).getCode().equals(selectedCurrency.getCode()); if (selected) sepaAccount.addAcceptedCountry(countryCode); @@ -341,11 +342,11 @@ public class SepaForm extends PaymentMethodForm { FormBuilder.addLabelTextField(gridPane, ++gridRow, Res.getWithCol("shared.currency"), nameAndCode); String countries; Tooltip tooltip = null; - if (CountryUtil.containsAllSepaEuroCountries(sepaAccount.getAcceptedCountryCodes())) { + if (CountryUtil.containsAllSepaEuroCountries(sepaAccount.getAcceptedCountryCodes(), Preferences.getDefaultLocale())) { countries = Res.getWithCol("shared.allEuroCountries"); } else { countries = CountryUtil.getCodesString(sepaAccount.getAcceptedCountryCodes()); - tooltip = new Tooltip(CountryUtil.getNamesByCodesString(sepaAccount.getAcceptedCountryCodes())); + tooltip = new Tooltip(CountryUtil.getNamesByCodesString(sepaAccount.getAcceptedCountryCodes(), Preferences.getDefaultLocale())); } TextField acceptedCountries = FormBuilder.addLabelTextField(gridPane, ++gridRow, Res.get("payment.accepted.countries"), countries).second; if (tooltip != null) { diff --git a/gui/src/main/java/io/bisq/gui/components/paymentmethods/SwishForm.java b/gui/src/main/java/io/bisq/gui/components/paymentmethods/SwishForm.java index 47e985052a..5fe360fa63 100644 --- a/gui/src/main/java/io/bisq/gui/components/paymentmethods/SwishForm.java +++ b/gui/src/main/java/io/bisq/gui/components/paymentmethods/SwishForm.java @@ -23,7 +23,7 @@ import io.bisq.gui.util.Layout; import io.bisq.gui.util.validation.InputValidator; import io.bisq.gui.util.validation.SwishValidator; import io.bisq.locale.Res; -import io.bisq.messages.locale.TradeCurrency; +import io.bisq.locale.TradeCurrency; import io.bisq.messages.payment.payload.PaymentAccountContractData; import io.bisq.messages.payment.payload.SwishAccountContractData; import io.bisq.payment.PaymentAccount; diff --git a/gui/src/main/java/io/bisq/gui/components/paymentmethods/USPostalMoneyOrderForm.java b/gui/src/main/java/io/bisq/gui/components/paymentmethods/USPostalMoneyOrderForm.java index d2cf0a6dc6..14d39e5bfc 100644 --- a/gui/src/main/java/io/bisq/gui/components/paymentmethods/USPostalMoneyOrderForm.java +++ b/gui/src/main/java/io/bisq/gui/components/paymentmethods/USPostalMoneyOrderForm.java @@ -23,7 +23,7 @@ import io.bisq.gui.util.Layout; import io.bisq.gui.util.validation.InputValidator; import io.bisq.gui.util.validation.USPostalMoneyOrderValidator; import io.bisq.locale.Res; -import io.bisq.messages.locale.TradeCurrency; +import io.bisq.locale.TradeCurrency; import io.bisq.messages.payment.payload.PaymentAccountContractData; import io.bisq.messages.payment.payload.USPostalMoneyOrderAccountContractData; import io.bisq.payment.PaymentAccount; diff --git a/gui/src/main/java/io/bisq/gui/main/MainView.java b/gui/src/main/java/io/bisq/gui/main/MainView.java index 8231c574f8..e5666025f6 100644 --- a/gui/src/main/java/io/bisq/gui/main/MainView.java +++ b/gui/src/main/java/io/bisq/gui/main/MainView.java @@ -42,7 +42,7 @@ import io.bisq.gui.util.BSFormatter; import io.bisq.gui.util.GUIUtil; import io.bisq.gui.util.Transitions; import io.bisq.locale.Res; -import io.bisq.messages.provider.price.PriceFeedService; +import io.bisq.provider.price.PriceFeedService; import javafx.beans.value.ChangeListener; import javafx.geometry.Insets; import javafx.geometry.Pos; diff --git a/gui/src/main/java/io/bisq/gui/main/MainViewModel.java b/gui/src/main/java/io/bisq/gui/main/MainViewModel.java index 582023c047..26c72772df 100644 --- a/gui/src/main/java/io/bisq/gui/main/MainViewModel.java +++ b/gui/src/main/java/io/bisq/gui/main/MainViewModel.java @@ -33,7 +33,7 @@ import io.bisq.btc.wallet.WalletsSetup; import io.bisq.common.Clock; import io.bisq.common.Timer; import io.bisq.common.UserThread; -import io.bisq.common.crypto.*; +import io.bisq.common.crypto.CryptoException; import io.bisq.crypto.EncryptionService; import io.bisq.dao.DaoManager; import io.bisq.dao.blockchain.BsqBlockchainException; @@ -47,29 +47,33 @@ import io.bisq.gui.main.overlays.windows.DisplayAlertMessageWindow; import io.bisq.gui.main.overlays.windows.TacWindow; import io.bisq.gui.main.overlays.windows.WalletPasswordWindow; import io.bisq.gui.util.BSFormatter; +import io.bisq.locale.CurrencyUtil; import io.bisq.locale.Res; +import io.bisq.locale.TradeCurrency; import io.bisq.messages.alert.Alert; import io.bisq.messages.alert.PrivateNotification; import io.bisq.messages.arbitration.Dispute; -import io.bisq.messages.btc.provider.fee.FeeService; -import io.bisq.messages.locale.CurrencyUtil; -import io.bisq.messages.locale.TradeCurrency; -import io.bisq.messages.provider.price.MarketPrice; -import io.bisq.messages.provider.price.PriceFeedService; -import io.bisq.messages.user.Preferences; -import io.bisq.p2p.P2PService; +import io.bisq.messages.crypto.DecryptedDataTuple; +import io.bisq.messages.crypto.Encryption; +import io.bisq.messages.crypto.KeyRing; +import io.bisq.messages.crypto.SealedAndSigned; +import io.bisq.provider.price.MarketPrice; import io.bisq.p2p.P2PServiceListener; import io.bisq.p2p.network.CloseConnectionReason; import io.bisq.p2p.network.Connection; import io.bisq.p2p.network.ConnectionListener; import io.bisq.p2p.peers.keepalive.messages.Ping; +import io.bisq.p2p.storage.P2PService; import io.bisq.payment.CryptoCurrencyAccount; import io.bisq.payment.OKPayAccount; import io.bisq.payment.PaymentAccount; +import io.bisq.provider.fee.FeeService; +import io.bisq.provider.price.PriceFeedService; import io.bisq.trade.Trade; import io.bisq.trade.TradeManager; import io.bisq.trade.offer.OpenOffer; import io.bisq.trade.offer.OpenOfferManager; +import io.bisq.user.Preferences; import io.bisq.user.User; import javafx.beans.property.*; import javafx.beans.value.ChangeListener; @@ -994,7 +998,7 @@ public class MainViewModel implements ViewModel { OKPayAccount okPayAccount = new OKPayAccount(); okPayAccount.setAccountNr("dummy_" + new Random().nextInt(100)); okPayAccount.setAccountName("OKPay dummy");// Don't translate only for dev - okPayAccount.setSelectedTradeCurrency(CurrencyUtil.getDefaultTradeCurrency()); + okPayAccount.setSelectedTradeCurrency(Preferences.getDefaultTradeCurrency()); user.addPaymentAccount(okPayAccount); CryptoCurrencyAccount cryptoCurrencyAccount = new CryptoCurrencyAccount(); diff --git a/gui/src/main/java/io/bisq/gui/main/account/AccountView.java b/gui/src/main/java/io/bisq/gui/main/account/AccountView.java index c903bf1f9e..dbfd8b625a 100644 --- a/gui/src/main/java/io/bisq/gui/main/account/AccountView.java +++ b/gui/src/main/java/io/bisq/gui/main/account/AccountView.java @@ -26,7 +26,7 @@ import io.bisq.gui.main.account.content.fiataccounts.FiatAccountsView; import io.bisq.gui.main.account.settings.AccountSettingsView; import io.bisq.gui.main.overlays.popups.Popup; import io.bisq.locale.Res; -import io.bisq.messages.user.Preferences; +import io.bisq.user.Preferences; import javafx.beans.value.ChangeListener; import javafx.event.EventHandler; import javafx.fxml.FXML; diff --git a/gui/src/main/java/io/bisq/gui/main/account/arbitratorregistration/ArbitratorRegistrationView.java b/gui/src/main/java/io/bisq/gui/main/account/arbitratorregistration/ArbitratorRegistrationView.java index 6eb0925c14..c5fa14ac8b 100644 --- a/gui/src/main/java/io/bisq/gui/main/account/arbitratorregistration/ArbitratorRegistrationView.java +++ b/gui/src/main/java/io/bisq/gui/main/account/arbitratorregistration/ArbitratorRegistrationView.java @@ -29,7 +29,8 @@ import io.bisq.gui.util.ImageUtil; import io.bisq.gui.util.Layout; import io.bisq.locale.Res; import io.bisq.messages.arbitration.Arbitrator; -import io.bisq.messages.locale.LanguageUtil; +import io.bisq.locale.LanguageUtil; +import io.bisq.user.Preferences; import javafx.beans.value.ChangeListener; import javafx.collections.ListChangeListener; import javafx.geometry.HPos; @@ -214,7 +215,7 @@ public class ArbitratorRegistrationView extends ActivatableViewAndModel myArbitratorProperty = new SimpleObjectProperty<>(); - final ObservableList languageCodes = FXCollections.observableArrayList(LanguageUtil.getDefaultLanguageLocaleAsCode()); + final ObservableList languageCodes = FXCollections.observableArrayList(LanguageUtil.getDefaultLanguageLocaleAsCode(Preferences.getDefaultLocale())); final ObservableList allLanguageCodes = FXCollections.observableArrayList(LanguageUtil.getAllLanguageCodes()); private boolean allDataValid; private final MapChangeListener arbitratorMapChangeListener; diff --git a/gui/src/main/java/io/bisq/gui/main/account/content/altcoinaccounts/AltCoinAccountsDataModel.java b/gui/src/main/java/io/bisq/gui/main/account/content/altcoinaccounts/AltCoinAccountsDataModel.java index b8993cf4c4..18b5a01f08 100644 --- a/gui/src/main/java/io/bisq/gui/main/account/content/altcoinaccounts/AltCoinAccountsDataModel.java +++ b/gui/src/main/java/io/bisq/gui/main/account/content/altcoinaccounts/AltCoinAccountsDataModel.java @@ -20,11 +20,11 @@ package io.bisq.gui.main.account.content.altcoinaccounts; import com.google.inject.Inject; import io.bisq.gui.common.model.ActivatableDataModel; import io.bisq.gui.util.GUIUtil; -import io.bisq.messages.locale.CryptoCurrency; -import io.bisq.messages.locale.FiatCurrency; -import io.bisq.messages.locale.TradeCurrency; +import io.bisq.locale.CryptoCurrency; +import io.bisq.locale.FiatCurrency; +import io.bisq.locale.TradeCurrency; import io.bisq.messages.payment.PaymentMethod; -import io.bisq.messages.user.Preferences; +import io.bisq.user.Preferences; import io.bisq.payment.CryptoCurrencyAccount; import io.bisq.payment.PaymentAccount; import io.bisq.trade.TradeManager; diff --git a/gui/src/main/java/io/bisq/gui/main/account/content/altcoinaccounts/AltCoinAccountsView.java b/gui/src/main/java/io/bisq/gui/main/account/content/altcoinaccounts/AltCoinAccountsView.java index 2e2eaf54aa..f57d590a3f 100644 --- a/gui/src/main/java/io/bisq/gui/main/account/content/altcoinaccounts/AltCoinAccountsView.java +++ b/gui/src/main/java/io/bisq/gui/main/account/content/altcoinaccounts/AltCoinAccountsView.java @@ -33,8 +33,8 @@ import io.bisq.gui.util.Layout; import io.bisq.gui.util.validation.AltCoinAddressValidator; import io.bisq.gui.util.validation.InputValidator; import io.bisq.locale.Res; -import io.bisq.messages.locale.CryptoCurrency; -import io.bisq.messages.locale.TradeCurrency; +import io.bisq.locale.CryptoCurrency; +import io.bisq.locale.TradeCurrency; import io.bisq.messages.payment.PaymentMethod; import io.bisq.payment.PaymentAccount; import io.bisq.payment.PaymentAccountFactory; diff --git a/gui/src/main/java/io/bisq/gui/main/account/content/arbitratorselection/ArbitratorSelectionView.java b/gui/src/main/java/io/bisq/gui/main/account/content/arbitratorselection/ArbitratorSelectionView.java index b70545eff3..9f12b2d5c8 100644 --- a/gui/src/main/java/io/bisq/gui/main/account/content/arbitratorselection/ArbitratorSelectionView.java +++ b/gui/src/main/java/io/bisq/gui/main/account/content/arbitratorselection/ArbitratorSelectionView.java @@ -26,7 +26,7 @@ import io.bisq.gui.main.overlays.popups.Popup; import io.bisq.gui.util.ImageUtil; import io.bisq.gui.util.Layout; import io.bisq.locale.Res; -import io.bisq.messages.locale.LanguageUtil; +import io.bisq.locale.LanguageUtil; import javafx.beans.property.BooleanProperty; import javafx.beans.property.ReadOnlyObjectWrapper; import javafx.beans.value.ChangeListener; diff --git a/gui/src/main/java/io/bisq/gui/main/account/content/arbitratorselection/ArbitratorSelectionViewModel.java b/gui/src/main/java/io/bisq/gui/main/account/content/arbitratorselection/ArbitratorSelectionViewModel.java index 829be3c77f..ee78c5c79e 100644 --- a/gui/src/main/java/io/bisq/gui/main/account/content/arbitratorselection/ArbitratorSelectionViewModel.java +++ b/gui/src/main/java/io/bisq/gui/main/account/content/arbitratorselection/ArbitratorSelectionViewModel.java @@ -19,13 +19,13 @@ package io.bisq.gui.main.account.content.arbitratorselection; import com.google.inject.Inject; import io.bisq.arbitration.ArbitratorManager; -import io.bisq.common.crypto.KeyRing; +import io.bisq.messages.crypto.KeyRing; import io.bisq.gui.common.model.ActivatableDataModel; import io.bisq.gui.util.BSFormatter; import io.bisq.messages.arbitration.Arbitrator; -import io.bisq.messages.locale.LanguageUtil; -import io.bisq.messages.user.Preferences; -import io.bisq.p2p.NodeAddress; +import io.bisq.locale.LanguageUtil; +import io.bisq.user.Preferences; +import io.bisq.messages.NodeAddress; import io.bisq.user.User; import javafx.collections.FXCollections; import javafx.collections.MapChangeListener; diff --git a/gui/src/main/java/io/bisq/gui/main/account/content/backup/BackupView.java b/gui/src/main/java/io/bisq/gui/main/account/content/backup/BackupView.java index ee0787e5ef..90776ac937 100644 --- a/gui/src/main/java/io/bisq/gui/main/account/content/backup/BackupView.java +++ b/gui/src/main/java/io/bisq/gui/main/account/content/backup/BackupView.java @@ -28,7 +28,7 @@ import io.bisq.gui.main.overlays.popups.Popup; import io.bisq.gui.util.FormBuilder; import io.bisq.gui.util.Layout; import io.bisq.locale.Res; -import io.bisq.messages.user.Preferences; +import io.bisq.user.Preferences; import javafx.beans.value.ChangeListener; import javafx.scene.control.Button; import javafx.scene.control.Label; diff --git a/gui/src/main/java/io/bisq/gui/main/account/content/fiataccounts/FiatAccountsDataModel.java b/gui/src/main/java/io/bisq/gui/main/account/content/fiataccounts/FiatAccountsDataModel.java index 6312dfc333..d4e418379e 100644 --- a/gui/src/main/java/io/bisq/gui/main/account/content/fiataccounts/FiatAccountsDataModel.java +++ b/gui/src/main/java/io/bisq/gui/main/account/content/fiataccounts/FiatAccountsDataModel.java @@ -20,11 +20,11 @@ package io.bisq.gui.main.account.content.fiataccounts; import com.google.inject.Inject; import io.bisq.gui.common.model.ActivatableDataModel; import io.bisq.gui.util.GUIUtil; -import io.bisq.messages.locale.CryptoCurrency; -import io.bisq.messages.locale.FiatCurrency; -import io.bisq.messages.locale.TradeCurrency; +import io.bisq.locale.CryptoCurrency; +import io.bisq.locale.FiatCurrency; +import io.bisq.locale.TradeCurrency; import io.bisq.messages.payment.PaymentMethod; -import io.bisq.messages.user.Preferences; +import io.bisq.user.Preferences; import io.bisq.payment.CryptoCurrencyAccount; import io.bisq.payment.PaymentAccount; import io.bisq.trade.TradeManager; diff --git a/gui/src/main/java/io/bisq/gui/main/account/content/seedwords/SeedWordsView.java b/gui/src/main/java/io/bisq/gui/main/account/content/seedwords/SeedWordsView.java index 1f9abfdf30..152082e597 100644 --- a/gui/src/main/java/io/bisq/gui/main/account/content/seedwords/SeedWordsView.java +++ b/gui/src/main/java/io/bisq/gui/main/account/content/seedwords/SeedWordsView.java @@ -28,7 +28,7 @@ import io.bisq.gui.main.overlays.popups.Popup; import io.bisq.gui.main.overlays.windows.WalletPasswordWindow; import io.bisq.gui.util.Layout; import io.bisq.locale.Res; -import io.bisq.messages.user.Preferences; +import io.bisq.user.Preferences; import javafx.beans.property.BooleanProperty; import javafx.beans.property.SimpleBooleanProperty; import javafx.beans.value.ChangeListener; diff --git a/gui/src/main/java/io/bisq/gui/main/dao/DaoView.java b/gui/src/main/java/io/bisq/gui/main/dao/DaoView.java index dea216641d..f342f78eb5 100644 --- a/gui/src/main/java/io/bisq/gui/main/dao/DaoView.java +++ b/gui/src/main/java/io/bisq/gui/main/dao/DaoView.java @@ -27,7 +27,7 @@ import io.bisq.gui.main.dao.voting.VotingView; import io.bisq.gui.main.dao.wallet.BsqWalletView; import io.bisq.gui.main.dao.wallet.dashboard.BsqDashboardView; import io.bisq.locale.Res; -import io.bisq.messages.user.Preferences; +import io.bisq.user.Preferences; import javafx.beans.value.ChangeListener; import javafx.fxml.FXML; import javafx.scene.control.Tab; diff --git a/gui/src/main/java/io/bisq/gui/main/dao/compensation/create/CreateCompensationRequestView.java b/gui/src/main/java/io/bisq/gui/main/dao/compensation/create/CreateCompensationRequestView.java index 8330580364..1c8102091b 100644 --- a/gui/src/main/java/io/bisq/gui/main/dao/compensation/create/CreateCompensationRequestView.java +++ b/gui/src/main/java/io/bisq/gui/main/dao/compensation/create/CreateCompensationRequestView.java @@ -25,7 +25,7 @@ import io.bisq.btc.exceptions.WalletException; import io.bisq.btc.wallet.BsqWalletService; import io.bisq.btc.wallet.BtcWalletService; import io.bisq.btc.wallet.ChangeBelowDustException; -import io.bisq.common.crypto.KeyRing; +import io.bisq.messages.crypto.KeyRing; import io.bisq.common.util.Utilities; import io.bisq.dao.compensation.CompensationRequestManager; import io.bisq.gui.common.view.ActivatableView; @@ -34,10 +34,10 @@ import io.bisq.gui.main.dao.compensation.CompensationRequestDisplay; import io.bisq.gui.main.overlays.popups.Popup; import io.bisq.gui.util.BSFormatter; import io.bisq.locale.Res; -import io.bisq.messages.btc.provider.fee.FeeService; +import io.bisq.provider.fee.FeeService; import io.bisq.messages.dao.compensation.payload.CompensationRequestPayload; -import io.bisq.p2p.NodeAddress; -import io.bisq.p2p.P2PService; +import io.bisq.messages.NodeAddress; +import io.bisq.p2p.storage.P2PService; import javafx.scene.control.Button; import javafx.scene.layout.GridPane; import org.apache.commons.lang3.StringUtils; diff --git a/gui/src/main/java/io/bisq/gui/main/dao/voting/vote/VoteView.java b/gui/src/main/java/io/bisq/gui/main/dao/voting/vote/VoteView.java index 9c723cd115..77856eb588 100644 --- a/gui/src/main/java/io/bisq/gui/main/dao/voting/vote/VoteView.java +++ b/gui/src/main/java/io/bisq/gui/main/dao/voting/vote/VoteView.java @@ -37,7 +37,7 @@ import io.bisq.gui.util.BSFormatter; import io.bisq.gui.util.BsqFormatter; import io.bisq.gui.util.Layout; import io.bisq.locale.Res; -import io.bisq.messages.btc.provider.fee.FeeService; +import io.bisq.provider.fee.FeeService; import javafx.beans.property.DoubleProperty; import javafx.beans.property.SimpleDoubleProperty; import javafx.beans.value.ChangeListener; diff --git a/gui/src/main/java/io/bisq/gui/main/dao/wallet/send/BsqSendView.java b/gui/src/main/java/io/bisq/gui/main/dao/wallet/send/BsqSendView.java index 922a235b1a..16a86f3b4d 100644 --- a/gui/src/main/java/io/bisq/gui/main/dao/wallet/send/BsqSendView.java +++ b/gui/src/main/java/io/bisq/gui/main/dao/wallet/send/BsqSendView.java @@ -34,7 +34,7 @@ import io.bisq.gui.util.BSFormatter; import io.bisq.gui.util.BsqFormatter; import io.bisq.gui.util.Layout; import io.bisq.locale.Res; -import io.bisq.messages.btc.provider.fee.FeeService; +import io.bisq.provider.fee.FeeService; import javafx.scene.control.Button; import javafx.scene.control.TextField; import javafx.scene.layout.GridPane; diff --git a/gui/src/main/java/io/bisq/gui/main/debug/DebugView.java b/gui/src/main/java/io/bisq/gui/main/debug/DebugView.java index a111922975..2f7796b2e0 100644 --- a/gui/src/main/java/io/bisq/gui/main/debug/DebugView.java +++ b/gui/src/main/java/io/bisq/gui/main/debug/DebugView.java @@ -21,9 +21,9 @@ import io.bisq.common.taskrunner.Task; import io.bisq.gui.common.view.FxmlView; import io.bisq.gui.common.view.InitializableView; import io.bisq.gui.components.TitledGroupBg; -import io.bisq.messages.protocol.availability.OfferAvailabilityProtocol; -import io.bisq.messages.protocol.availability.tasks.ProcessOfferAvailabilityResponse; -import io.bisq.messages.protocol.availability.tasks.SendOfferAvailabilityRequest; +import io.bisq.p2p.protocol.availability.OfferAvailabilityProtocol; +import io.bisq.protocol.availability.tasks.ProcessOfferAvailabilityResponse; +import io.bisq.protocol.availability.tasks.SendOfferAvailabilityRequest; import io.bisq.trade.protocol.placeoffer.PlaceOfferProtocol; import io.bisq.trade.protocol.placeoffer.tasks.AddOfferToRemoteOfferBook; import io.bisq.trade.protocol.placeoffer.tasks.BroadcastCreateOfferFeeTx; diff --git a/gui/src/main/java/io/bisq/gui/main/disputes/DisputesView.java b/gui/src/main/java/io/bisq/gui/main/disputes/DisputesView.java index 4550ab0269..39a9b98e63 100644 --- a/gui/src/main/java/io/bisq/gui/main/disputes/DisputesView.java +++ b/gui/src/main/java/io/bisq/gui/main/disputes/DisputesView.java @@ -20,7 +20,7 @@ package io.bisq.gui.main.disputes; import io.bisq.app.DevEnv; import io.bisq.arbitration.ArbitratorManager; import io.bisq.arbitration.DisputeManager; -import io.bisq.common.crypto.KeyRing; +import io.bisq.messages.crypto.KeyRing; import io.bisq.gui.Navigation; import io.bisq.gui.common.model.Activatable; import io.bisq.gui.common.view.*; @@ -32,8 +32,8 @@ import io.bisq.gui.main.portfolio.PortfolioView; import io.bisq.gui.main.portfolio.pendingtrades.PendingTradesView; import io.bisq.locale.Res; import io.bisq.messages.arbitration.Arbitrator; -import io.bisq.messages.user.Preferences; -import io.bisq.p2p.NodeAddress; +import io.bisq.user.Preferences; +import io.bisq.messages.NodeAddress; import javafx.beans.value.ChangeListener; import javafx.collections.MapChangeListener; import javafx.fxml.FXML; diff --git a/gui/src/main/java/io/bisq/gui/main/disputes/arbitrator/ArbitratorDisputeView.java b/gui/src/main/java/io/bisq/gui/main/disputes/arbitrator/ArbitratorDisputeView.java index 903522d60d..1842b31df5 100644 --- a/gui/src/main/java/io/bisq/gui/main/disputes/arbitrator/ArbitratorDisputeView.java +++ b/gui/src/main/java/io/bisq/gui/main/disputes/arbitrator/ArbitratorDisputeView.java @@ -19,14 +19,14 @@ package io.bisq.gui.main.disputes.arbitrator; import io.bisq.alert.PrivateNotificationManager; import io.bisq.arbitration.DisputeManager; -import io.bisq.common.crypto.KeyRing; +import io.bisq.messages.crypto.KeyRing; import io.bisq.gui.common.view.FxmlView; import io.bisq.gui.main.disputes.trader.TraderDisputeView; import io.bisq.gui.main.overlays.windows.ContractWindow; import io.bisq.gui.main.overlays.windows.DisputeSummaryWindow; import io.bisq.gui.main.overlays.windows.TradeDetailsWindow; import io.bisq.gui.util.BSFormatter; -import io.bisq.p2p.P2PService; +import io.bisq.p2p.storage.P2PService; import io.bisq.trade.TradeManager; import javafx.stage.Stage; diff --git a/gui/src/main/java/io/bisq/gui/main/disputes/trader/TraderDisputeView.java b/gui/src/main/java/io/bisq/gui/main/disputes/trader/TraderDisputeView.java index 6d50874566..97d8bdc8ec 100644 --- a/gui/src/main/java/io/bisq/gui/main/disputes/trader/TraderDisputeView.java +++ b/gui/src/main/java/io/bisq/gui/main/disputes/trader/TraderDisputeView.java @@ -26,8 +26,8 @@ import io.bisq.app.Version; import io.bisq.arbitration.DisputeManager; import io.bisq.common.Timer; import io.bisq.common.UserThread; -import io.bisq.common.crypto.KeyRing; -import io.bisq.common.crypto.PubKeyRing; +import io.bisq.messages.crypto.KeyRing; +import io.bisq.messages.crypto.PubKeyRing; import io.bisq.common.util.Utilities; import io.bisq.gui.common.view.ActivatableView; import io.bisq.gui.common.view.FxmlView; @@ -48,8 +48,8 @@ import io.bisq.messages.arbitration.Dispute; import io.bisq.messages.arbitration.DisputeCommunicationMessage; import io.bisq.messages.arbitration.payload.Attachment; import io.bisq.messages.trade.payload.Contract; -import io.bisq.p2p.NodeAddress; -import io.bisq.p2p.P2PService; +import io.bisq.messages.NodeAddress; +import io.bisq.p2p.storage.P2PService; import io.bisq.p2p.network.Connection; import io.bisq.trade.Trade; import io.bisq.trade.TradeManager; diff --git a/gui/src/main/java/io/bisq/gui/main/funds/deposit/DepositView.java b/gui/src/main/java/io/bisq/gui/main/funds/deposit/DepositView.java index b68eeafc99..0e180e153e 100644 --- a/gui/src/main/java/io/bisq/gui/main/funds/deposit/DepositView.java +++ b/gui/src/main/java/io/bisq/gui/main/funds/deposit/DepositView.java @@ -36,8 +36,8 @@ import io.bisq.gui.util.BSFormatter; import io.bisq.gui.util.GUIUtil; import io.bisq.gui.util.Layout; import io.bisq.locale.Res; -import io.bisq.messages.btc.provider.fee.FeeService; -import io.bisq.messages.user.Preferences; +import io.bisq.provider.fee.FeeService; +import io.bisq.user.Preferences; import javafx.beans.property.ReadOnlyObjectWrapper; import javafx.beans.value.ChangeListener; import javafx.collections.FXCollections; diff --git a/gui/src/main/java/io/bisq/gui/main/funds/locked/LockedView.java b/gui/src/main/java/io/bisq/gui/main/funds/locked/LockedView.java index 6405462b73..b67127d0a8 100644 --- a/gui/src/main/java/io/bisq/gui/main/funds/locked/LockedView.java +++ b/gui/src/main/java/io/bisq/gui/main/funds/locked/LockedView.java @@ -29,7 +29,7 @@ import io.bisq.gui.main.overlays.windows.TradeDetailsWindow; import io.bisq.gui.util.BSFormatter; import io.bisq.gui.util.GUIUtil; import io.bisq.locale.Res; -import io.bisq.messages.user.Preferences; +import io.bisq.user.Preferences; import io.bisq.trade.Tradable; import io.bisq.trade.Trade; import io.bisq.trade.TradeManager; diff --git a/gui/src/main/java/io/bisq/gui/main/funds/reserved/ReservedView.java b/gui/src/main/java/io/bisq/gui/main/funds/reserved/ReservedView.java index 1feaa78f1f..b6864932cf 100644 --- a/gui/src/main/java/io/bisq/gui/main/funds/reserved/ReservedView.java +++ b/gui/src/main/java/io/bisq/gui/main/funds/reserved/ReservedView.java @@ -29,7 +29,7 @@ import io.bisq.gui.main.overlays.windows.TradeDetailsWindow; import io.bisq.gui.util.BSFormatter; import io.bisq.gui.util.GUIUtil; import io.bisq.locale.Res; -import io.bisq.messages.user.Preferences; +import io.bisq.user.Preferences; import io.bisq.trade.Tradable; import io.bisq.trade.Trade; import io.bisq.trade.TradeManager; diff --git a/gui/src/main/java/io/bisq/gui/main/funds/transactions/TransactionsListItem.java b/gui/src/main/java/io/bisq/gui/main/funds/transactions/TransactionsListItem.java index 3987b80bb8..c7790e8e01 100644 --- a/gui/src/main/java/io/bisq/gui/main/funds/transactions/TransactionsListItem.java +++ b/gui/src/main/java/io/bisq/gui/main/funds/transactions/TransactionsListItem.java @@ -23,7 +23,7 @@ import io.bisq.gui.components.indicator.TxConfidenceIndicator; import io.bisq.gui.util.BSFormatter; import io.bisq.gui.util.GUIUtil; import io.bisq.locale.Res; -import io.bisq.messages.trade.offer.payload.Offer; +import io.bisq.p2p.protocol.availability.Offer; import io.bisq.trade.Tradable; import io.bisq.trade.Trade; import io.bisq.trade.offer.OpenOffer; diff --git a/gui/src/main/java/io/bisq/gui/main/funds/transactions/TransactionsView.java b/gui/src/main/java/io/bisq/gui/main/funds/transactions/TransactionsView.java index a9b7a8f55a..98416e1b33 100644 --- a/gui/src/main/java/io/bisq/gui/main/funds/transactions/TransactionsView.java +++ b/gui/src/main/java/io/bisq/gui/main/funds/transactions/TransactionsView.java @@ -34,7 +34,7 @@ import io.bisq.gui.main.overlays.windows.TradeDetailsWindow; import io.bisq.gui.util.BSFormatter; import io.bisq.gui.util.GUIUtil; import io.bisq.locale.Res; -import io.bisq.messages.user.Preferences; +import io.bisq.user.Preferences; import io.bisq.trade.Tradable; import io.bisq.trade.Trade; import io.bisq.trade.TradeManager; diff --git a/gui/src/main/java/io/bisq/gui/main/funds/withdrawal/WithdrawalView.java b/gui/src/main/java/io/bisq/gui/main/funds/withdrawal/WithdrawalView.java index a195108c0d..d8aa6a7475 100644 --- a/gui/src/main/java/io/bisq/gui/main/funds/withdrawal/WithdrawalView.java +++ b/gui/src/main/java/io/bisq/gui/main/funds/withdrawal/WithdrawalView.java @@ -36,8 +36,8 @@ import io.bisq.gui.util.BSFormatter; import io.bisq.gui.util.GUIUtil; import io.bisq.gui.util.validation.BtcAddressValidator; import io.bisq.locale.Res; -import io.bisq.messages.btc.provider.fee.FeeService; -import io.bisq.messages.user.Preferences; +import io.bisq.provider.fee.FeeService; +import io.bisq.user.Preferences; import io.bisq.trade.Tradable; import io.bisq.trade.Trade; import io.bisq.trade.TradeManager; diff --git a/gui/src/main/java/io/bisq/gui/main/market/offerbook/OfferBookChartView.java b/gui/src/main/java/io/bisq/gui/main/market/offerbook/OfferBookChartView.java index 3cd9d95371..7a2f07c6ea 100644 --- a/gui/src/main/java/io/bisq/gui/main/market/offerbook/OfferBookChartView.java +++ b/gui/src/main/java/io/bisq/gui/main/market/offerbook/OfferBookChartView.java @@ -30,8 +30,9 @@ import io.bisq.gui.util.BSFormatter; import io.bisq.gui.util.CurrencyListItem; import io.bisq.gui.util.GUIUtil; import io.bisq.locale.Res; -import io.bisq.messages.locale.CurrencyUtil; -import io.bisq.messages.trade.offer.payload.Offer; +import io.bisq.locale.CurrencyUtil; +import io.bisq.messages.trade.offer.payload.OfferPayload; +import io.bisq.p2p.protocol.availability.Offer; import javafx.beans.property.ReadOnlyObjectWrapper; import javafx.beans.property.SimpleStringProperty; import javafx.beans.property.StringProperty; @@ -120,8 +121,8 @@ public class OfferBookChartView extends ActivatableViewAndModel, VBox, Button, Label> tupleBuy = getOfferTable(Offer.Direction.BUY); - Tuple4, VBox, Button, Label> tupleSell = getOfferTable(Offer.Direction.SELL); + Tuple4, VBox, Button, Label> tupleBuy = getOfferTable(OfferPayload.Direction.BUY); + Tuple4, VBox, Button, Label> tupleSell = getOfferTable(OfferPayload.Direction.SELL); buyOfferTableView = tupleBuy.first; sellOfferTableView = tupleSell.first; @@ -136,8 +137,8 @@ public class OfferBookChartView extends ActivatableViewAndModel, VBox, Button, Label> getOfferTable(Offer.Direction direction) { + private Tuple4, VBox, Button, Label> getOfferTable(OfferPayload.Direction direction) { TableView tableView = new TableView<>(); tableView.setMinHeight(109); tableView.setPrefHeight(121); @@ -427,7 +428,7 @@ public class OfferBookChartView extends ActivatableViewAndModel titleLabel.prefWidthProperty().bind(tableView.widthProperty())); - boolean isSellOffer = direction == Offer.Direction.SELL; + boolean isSellOffer = direction == OfferPayload.Direction.SELL; Button button = new Button(); ImageView iconView = new ImageView(); iconView.setId(isSellOffer ? "image-buy-white" : "image-sell-white"); diff --git a/gui/src/main/java/io/bisq/gui/main/market/offerbook/OfferBookChartViewModel.java b/gui/src/main/java/io/bisq/gui/main/market/offerbook/OfferBookChartViewModel.java index 4f6c6f5345..004171699a 100644 --- a/gui/src/main/java/io/bisq/gui/main/market/offerbook/OfferBookChartViewModel.java +++ b/gui/src/main/java/io/bisq/gui/main/market/offerbook/OfferBookChartViewModel.java @@ -28,11 +28,12 @@ import io.bisq.gui.main.settings.SettingsView; import io.bisq.gui.main.settings.preferences.PreferencesView; import io.bisq.gui.util.CurrencyListItem; import io.bisq.gui.util.GUIUtil; -import io.bisq.messages.locale.CurrencyUtil; -import io.bisq.messages.locale.TradeCurrency; -import io.bisq.messages.provider.price.PriceFeedService; -import io.bisq.messages.trade.offer.payload.Offer; -import io.bisq.messages.user.Preferences; +import io.bisq.locale.CurrencyUtil; +import io.bisq.locale.TradeCurrency; +import io.bisq.messages.trade.offer.payload.OfferPayload; +import io.bisq.p2p.protocol.availability.Offer; +import io.bisq.provider.price.PriceFeedService; +import io.bisq.user.Preferences; import javafx.beans.property.ObjectProperty; import javafx.beans.property.SimpleObjectProperty; import javafx.beans.value.ChangeListener; @@ -88,7 +89,7 @@ class OfferBookChartViewModel extends ActivatableViewModel { if (tradeCurrencyOptional.isPresent()) selectedTradeCurrencyProperty.set(tradeCurrencyOptional.get()); else { - selectedTradeCurrencyProperty.set(CurrencyUtil.getDefaultTradeCurrency()); + selectedTradeCurrencyProperty.set(Preferences.getDefaultTradeCurrency()); } offerBookListItems = offerBook.getOfferBookListItems(); @@ -99,7 +100,7 @@ class OfferBookChartViewModel extends ActivatableViewModel { list.addAll(c.getAddedSubList()); if (list.stream() .map(OfferBookListItem::getOffer) - .filter(e -> e.getCurrencyCode().equals(selectedTradeCurrencyProperty.get().getCode())) + .filter(e -> e.getOfferPayload().getCurrencyCode().equals(selectedTradeCurrencyProperty.get().getCode())) .findAny() .isPresent()) updateChartData(); @@ -124,7 +125,8 @@ class OfferBookChartViewModel extends ActivatableViewModel { // Don't use a set as we need all entries List tradeCurrencyList = offerBookListItems.stream() .map(e -> { - Optional tradeCurrencyOptional = CurrencyUtil.getTradeCurrency(e.getOffer().getCurrencyCode()); + Optional tradeCurrencyOptional = + CurrencyUtil.getTradeCurrency(e.getOffer().getCurrencyCode()); if (tradeCurrencyOptional.isPresent()) return tradeCurrencyOptional.get(); else @@ -239,8 +241,8 @@ class OfferBookChartViewModel extends ActivatableViewModel { private void updateChartData() { List allBuyOffers = offerBookListItems.stream() .map(OfferBookListItem::getOffer) - .filter(e -> e.getCurrencyCode().equals(selectedTradeCurrencyProperty.get().getCode()) - && e.getDirection().equals(Offer.Direction.BUY)) + .filter(e -> e.getOfferPayload().getCurrencyCode().equals(selectedTradeCurrencyProperty.get().getCode()) + && e.getOfferPayload().getDirection().equals(OfferPayload.Direction.BUY)) .sorted((o1, o2) -> { long a = o1.getPrice() != null ? o1.getPrice().value : 0; long b = o2.getPrice() != null ? o2.getPrice().value : 0; @@ -251,12 +253,12 @@ class OfferBookChartViewModel extends ActivatableViewModel { .collect(Collectors.toList()); allBuyOffers = filterOffersWithRelevantPrices(allBuyOffers); - buildChartAndTableEntries(allBuyOffers, Offer.Direction.BUY, buyData, topBuyOfferList); + buildChartAndTableEntries(allBuyOffers, OfferPayload.Direction.BUY, buyData, topBuyOfferList); List allSellOffers = offerBookListItems.stream() .map(OfferBookListItem::getOffer) - .filter(e -> e.getCurrencyCode().equals(selectedTradeCurrencyProperty.get().getCode()) - && e.getDirection().equals(Offer.Direction.SELL)) + .filter(e -> e.getOfferPayload().getCurrencyCode().equals(selectedTradeCurrencyProperty.get().getCode()) + && e.getOfferPayload().getDirection().equals(OfferPayload.Direction.SELL)) .sorted((o1, o2) -> { long a = o1.getPrice() != null ? o1.getPrice().value : 0; long b = o2.getPrice() != null ? o2.getPrice().value : 0; @@ -267,7 +269,7 @@ class OfferBookChartViewModel extends ActivatableViewModel { .collect(Collectors.toList()); allSellOffers = filterOffersWithRelevantPrices(allSellOffers); - buildChartAndTableEntries(allSellOffers, Offer.Direction.SELL, sellData, topSellOfferList); + buildChartAndTableEntries(allSellOffers, OfferPayload.Direction.SELL, sellData, topSellOfferList); } // If there are more then 3 offers we ignore the offers which are further than 30% from the best price @@ -290,7 +292,7 @@ class OfferBookChartViewModel extends ActivatableViewModel { return offers; } - private void buildChartAndTableEntries(List sortedList, Offer.Direction direction, List data, ObservableList offerTableList) { + private void buildChartAndTableEntries(List sortedList, OfferPayload.Direction direction, List data, ObservableList offerTableList) { data.clear(); double accumulatedAmount = 0; List offerTableListTemp = new ArrayList<>(); @@ -304,12 +306,12 @@ class OfferBookChartViewModel extends ActivatableViewModel { double price = (double) priceAsFiat.value / LongMath.pow(10, priceAsFiat.smallestUnitExponent()); if (CurrencyUtil.isCryptoCurrency(getCurrencyCode())) { price = price != 0 ? 1d / price : 0; - if (direction.equals(Offer.Direction.SELL)) + if (direction.equals(OfferPayload.Direction.SELL)) data.add(0, new XYChart.Data<>(price, accumulatedAmount)); else data.add(new XYChart.Data<>(price, accumulatedAmount)); } else { - if (direction.equals(Offer.Direction.BUY)) + if (direction.equals(OfferPayload.Direction.BUY)) data.add(0, new XYChart.Data<>(price, accumulatedAmount)); else data.add(new XYChart.Data<>(price, accumulatedAmount)); diff --git a/gui/src/main/java/io/bisq/gui/main/market/offerbook/OfferListItem.java b/gui/src/main/java/io/bisq/gui/main/market/offerbook/OfferListItem.java index 60f5f7681b..bce34bcd56 100644 --- a/gui/src/main/java/io/bisq/gui/main/market/offerbook/OfferListItem.java +++ b/gui/src/main/java/io/bisq/gui/main/market/offerbook/OfferListItem.java @@ -17,7 +17,7 @@ package io.bisq.gui.main.market.offerbook; -import io.bisq.messages.trade.offer.payload.Offer; +import io.bisq.p2p.protocol.availability.Offer; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/gui/src/main/java/io/bisq/gui/main/market/spread/SpreadView.java b/gui/src/main/java/io/bisq/gui/main/market/spread/SpreadView.java index 4414c53d0d..8a41367a0f 100644 --- a/gui/src/main/java/io/bisq/gui/main/market/spread/SpreadView.java +++ b/gui/src/main/java/io/bisq/gui/main/market/spread/SpreadView.java @@ -21,7 +21,7 @@ import io.bisq.gui.common.view.ActivatableViewAndModel; import io.bisq.gui.common.view.FxmlView; import io.bisq.gui.util.BSFormatter; import io.bisq.locale.Res; -import io.bisq.messages.locale.CurrencyUtil; +import io.bisq.locale.CurrencyUtil; import javafx.beans.property.ReadOnlyObjectWrapper; import javafx.collections.ListChangeListener; import javafx.collections.transformation.SortedList; diff --git a/gui/src/main/java/io/bisq/gui/main/market/spread/SpreadViewModel.java b/gui/src/main/java/io/bisq/gui/main/market/spread/SpreadViewModel.java index e4c819747b..8110306bcb 100644 --- a/gui/src/main/java/io/bisq/gui/main/market/spread/SpreadViewModel.java +++ b/gui/src/main/java/io/bisq/gui/main/market/spread/SpreadViewModel.java @@ -22,10 +22,11 @@ import io.bisq.gui.common.model.ActivatableViewModel; import io.bisq.gui.main.offer.offerbook.OfferBook; import io.bisq.gui.main.offer.offerbook.OfferBookListItem; import io.bisq.gui.util.BSFormatter; -import io.bisq.messages.locale.CurrencyUtil; -import io.bisq.messages.provider.price.MarketPrice; -import io.bisq.messages.provider.price.PriceFeedService; -import io.bisq.messages.trade.offer.payload.Offer; +import io.bisq.locale.CurrencyUtil; +import io.bisq.messages.trade.offer.payload.OfferPayload; +import io.bisq.p2p.protocol.availability.Offer; +import io.bisq.provider.price.MarketPrice; +import io.bisq.provider.price.PriceFeedService; import javafx.collections.FXCollections; import javafx.collections.ListChangeListener; import javafx.collections.ObservableList; @@ -88,7 +89,7 @@ class SpreadViewModel extends ActivatableViewModel { List offers = offersByCurrencyMap.get(currencyCode); List buyOffers = offers .stream() - .filter(e -> e.getDirection().equals(Offer.Direction.BUY)) + .filter(e -> e.getDirection().equals(OfferPayload.Direction.BUY)) .sorted((o1, o2) -> { long a = o1.getPrice() != null ? o1.getPrice().value : 0; long b = o2.getPrice() != null ? o2.getPrice().value : 0; @@ -100,7 +101,7 @@ class SpreadViewModel extends ActivatableViewModel { List sellOffers = offers .stream() - .filter(e -> e.getDirection().equals(Offer.Direction.SELL)) + .filter(e -> e.getDirection().equals(OfferPayload.Direction.SELL)) .sorted((o1, o2) -> { long a = o1.getPrice() != null ? o1.getPrice().value : 0; long b = o2.getPrice() != null ? o2.getPrice().value : 0; diff --git a/gui/src/main/java/io/bisq/gui/main/market/trades/TradesChartsView.java b/gui/src/main/java/io/bisq/gui/main/market/trades/TradesChartsView.java index 83d890f4c0..a414be7047 100644 --- a/gui/src/main/java/io/bisq/gui/main/market/trades/TradesChartsView.java +++ b/gui/src/main/java/io/bisq/gui/main/market/trades/TradesChartsView.java @@ -27,7 +27,7 @@ import io.bisq.gui.util.BSFormatter; import io.bisq.gui.util.CurrencyListItem; import io.bisq.gui.util.GUIUtil; import io.bisq.locale.Res; -import io.bisq.messages.locale.CurrencyUtil; +import io.bisq.locale.CurrencyUtil; import io.bisq.messages.trade.statistics.payload.TradeStatistics; import javafx.beans.property.ReadOnlyObjectWrapper; import javafx.beans.property.SimpleStringProperty; diff --git a/gui/src/main/java/io/bisq/gui/main/market/trades/TradesChartsViewModel.java b/gui/src/main/java/io/bisq/gui/main/market/trades/TradesChartsViewModel.java index 6755d5ebb8..b2eb19ee29 100644 --- a/gui/src/main/java/io/bisq/gui/main/market/trades/TradesChartsViewModel.java +++ b/gui/src/main/java/io/bisq/gui/main/market/trades/TradesChartsViewModel.java @@ -29,12 +29,12 @@ import io.bisq.gui.main.settings.preferences.PreferencesView; import io.bisq.gui.util.BSFormatter; import io.bisq.gui.util.CurrencyListItem; import io.bisq.gui.util.GUIUtil; -import io.bisq.messages.locale.CryptoCurrency; -import io.bisq.messages.locale.CurrencyUtil; -import io.bisq.messages.locale.TradeCurrency; -import io.bisq.messages.provider.price.PriceFeedService; +import io.bisq.locale.CryptoCurrency; +import io.bisq.locale.CurrencyUtil; +import io.bisq.locale.TradeCurrency; +import io.bisq.provider.price.PriceFeedService; import io.bisq.messages.trade.statistics.payload.TradeStatistics; -import io.bisq.messages.user.Preferences; +import io.bisq.user.Preferences; import io.bisq.trade.statistics.TradeStatisticsManager; import javafx.beans.property.BooleanProperty; import javafx.beans.property.ObjectProperty; @@ -113,7 +113,7 @@ class TradesChartsViewModel extends ActivatableViewModel { if (tradeCurrencyOptional.isPresent()) selectedTradeCurrencyProperty.set(tradeCurrencyOptional.get()); else - selectedTradeCurrencyProperty.set(CurrencyUtil.getDefaultTradeCurrency()); + selectedTradeCurrencyProperty.set(Preferences.getDefaultTradeCurrency()); tickUnit = TickUnit.values()[preferences.getTradeStatisticsTickUnitIndex()]; } @@ -180,7 +180,7 @@ class TradesChartsViewModel extends ActivatableViewModel { if (!preferences.getUseStickyMarketPrice()) { if (showAllEntry) - priceFeedService.setCurrencyCode(CurrencyUtil.getDefaultTradeCurrency().getCode()); + priceFeedService.setCurrencyCode(Preferences.getDefaultTradeCurrency().getCode()); else priceFeedService.setCurrencyCode(code); } @@ -225,7 +225,7 @@ class TradesChartsViewModel extends ActivatableViewModel { private void setMarketPriceFeedCurrency() { if (!preferences.getUseStickyMarketPrice() && selectedTabIndex == TAB_INDEX) { if (showAllTradeCurrenciesProperty.get()) - priceFeedService.setCurrencyCode(CurrencyUtil.getDefaultTradeCurrency().getCode()); + priceFeedService.setCurrencyCode(Preferences.getDefaultTradeCurrency().getCode()); else priceFeedService.setCurrencyCode(getCurrencyCode()); } diff --git a/gui/src/main/java/io/bisq/gui/main/offer/BuyOfferView.fxml b/gui/src/main/java/io/bisq/gui/main/offer/BuyOfferView.fxml index 6e86087311..1f628dd8d3 100644 --- a/gui/src/main/java/io/bisq/gui/main/offer/BuyOfferView.fxml +++ b/gui/src/main/java/io/bisq/gui/main/offer/BuyOfferView.fxml @@ -19,7 +19,7 @@ - diff --git a/gui/src/main/java/io/bisq/gui/main/offer/BuyOfferView.java b/gui/src/main/java/io/bisq/gui/main/offer/BuyOfferView.java index 0d01ddff0e..193d9d92ed 100644 --- a/gui/src/main/java/io/bisq/gui/main/offer/BuyOfferView.java +++ b/gui/src/main/java/io/bisq/gui/main/offer/BuyOfferView.java @@ -20,7 +20,7 @@ package io.bisq.gui.main.offer; import io.bisq.gui.Navigation; import io.bisq.gui.common.view.FxmlView; import io.bisq.gui.common.view.ViewLoader; -import io.bisq.messages.user.Preferences; +import io.bisq.user.Preferences; import javax.inject.Inject; diff --git a/gui/src/main/java/io/bisq/gui/main/offer/OfferView.java b/gui/src/main/java/io/bisq/gui/main/offer/OfferView.java index d9bc72eea8..480b74bd2e 100644 --- a/gui/src/main/java/io/bisq/gui/main/offer/OfferView.java +++ b/gui/src/main/java/io/bisq/gui/main/offer/OfferView.java @@ -27,11 +27,12 @@ import io.bisq.gui.main.MainView; import io.bisq.gui.main.offer.createoffer.CreateOfferView; import io.bisq.gui.main.offer.offerbook.OfferBookView; import io.bisq.gui.main.offer.takeoffer.TakeOfferView; +import io.bisq.locale.CurrencyUtil; import io.bisq.locale.Res; -import io.bisq.messages.locale.CurrencyUtil; -import io.bisq.messages.locale.TradeCurrency; -import io.bisq.messages.trade.offer.payload.Offer; -import io.bisq.messages.user.Preferences; +import io.bisq.locale.TradeCurrency; +import io.bisq.messages.trade.offer.payload.OfferPayload; +import io.bisq.p2p.protocol.availability.Offer; +import io.bisq.user.Preferences; import javafx.beans.value.ChangeListener; import javafx.collections.ListChangeListener; import javafx.scene.control.Tab; @@ -53,7 +54,7 @@ public abstract class OfferView extends ActivatableView { private final ViewLoader viewLoader; private final Navigation navigation; private final Preferences preferences; - private final Offer.Direction direction; + private final OfferPayload.Direction direction; private Offer offer; private TradeCurrency tradeCurrency; @@ -66,7 +67,7 @@ public abstract class OfferView extends ActivatableView { this.viewLoader = viewLoader; this.navigation = navigation; this.preferences = preferences; - this.direction = (this instanceof BuyOfferView) ? Offer.Direction.BUY : Offer.Direction.SELL; + this.direction = (this instanceof BuyOfferView) ? OfferPayload.Direction.BUY : OfferPayload.Direction.SELL; } @Override @@ -116,7 +117,7 @@ public abstract class OfferView extends ActivatableView { if (tradeCurrencyOptional.isPresent()) tradeCurrency = tradeCurrencyOptional.get(); else { - tradeCurrency = CurrencyUtil.getDefaultTradeCurrency(); + tradeCurrency = Preferences.getDefaultTradeCurrency(); } root.getSelectionModel().selectedItemProperty().addListener(tabChangeListener); @@ -143,7 +144,7 @@ public abstract class OfferView extends ActivatableView { private void loadView(Class viewClass) { TabPane tabPane = root; View view; - boolean isBuy = direction == Offer.Direction.BUY; + boolean isBuy = direction == OfferPayload.Direction.BUY; if (viewClass == OfferBookView.class && offerBookView == null) { view = viewLoader.load(viewClass); diff --git a/gui/src/main/java/io/bisq/gui/main/offer/SellOfferView.fxml b/gui/src/main/java/io/bisq/gui/main/offer/SellOfferView.fxml index 088f40cac5..965afaab87 100644 --- a/gui/src/main/java/io/bisq/gui/main/offer/SellOfferView.fxml +++ b/gui/src/main/java/io/bisq/gui/main/offer/SellOfferView.fxml @@ -19,7 +19,7 @@ - diff --git a/gui/src/main/java/io/bisq/gui/main/offer/SellOfferView.java b/gui/src/main/java/io/bisq/gui/main/offer/SellOfferView.java index a42822a1c1..621fbe7990 100644 --- a/gui/src/main/java/io/bisq/gui/main/offer/SellOfferView.java +++ b/gui/src/main/java/io/bisq/gui/main/offer/SellOfferView.java @@ -20,7 +20,7 @@ package io.bisq.gui.main.offer; import io.bisq.gui.Navigation; import io.bisq.gui.common.view.FxmlView; import io.bisq.gui.common.view.ViewLoader; -import io.bisq.messages.user.Preferences; +import io.bisq.user.Preferences; import javax.inject.Inject; diff --git a/gui/src/main/java/io/bisq/gui/main/offer/createoffer/CreateOfferDataModel.java b/gui/src/main/java/io/bisq/gui/main/offer/createoffer/CreateOfferDataModel.java index 498d72a1e4..b3980e3350 100644 --- a/gui/src/main/java/io/bisq/gui/main/offer/createoffer/CreateOfferDataModel.java +++ b/gui/src/main/java/io/bisq/gui/main/offer/createoffer/CreateOfferDataModel.java @@ -17,33 +17,35 @@ package io.bisq.gui.main.offer.createoffer; +import com.google.common.collect.Lists; import com.google.inject.Inject; import io.bisq.app.DevEnv; import io.bisq.app.Version; import io.bisq.btc.AddressEntry; import io.bisq.btc.listeners.BalanceListener; import io.bisq.btc.wallet.BtcWalletService; -import io.bisq.common.crypto.KeyRing; import io.bisq.common.util.Utilities; import io.bisq.gui.common.model.ActivatableDataModel; import io.bisq.gui.main.offer.createoffer.monetary.Price; import io.bisq.gui.main.offer.createoffer.monetary.Volume; import io.bisq.gui.main.overlays.notifications.Notification; import io.bisq.gui.util.BSFormatter; +import io.bisq.locale.CurrencyUtil; import io.bisq.locale.Res; +import io.bisq.locale.TradeCurrency; import io.bisq.messages.arbitration.Arbitrator; import io.bisq.messages.btc.Restrictions; -import io.bisq.messages.btc.provider.fee.FeeService; -import io.bisq.messages.locale.CurrencyUtil; -import io.bisq.messages.locale.TradeCurrency; +import io.bisq.messages.crypto.KeyRing; import io.bisq.messages.payment.payload.BankAccountContractData; -import io.bisq.messages.provider.price.PriceFeedService; -import io.bisq.messages.trade.offer.payload.Offer; -import io.bisq.messages.user.Preferences; -import io.bisq.p2p.P2PService; +import io.bisq.messages.trade.offer.payload.OfferPayload; +import io.bisq.p2p.protocol.availability.Offer; +import io.bisq.p2p.storage.P2PService; import io.bisq.payment.*; +import io.bisq.provider.fee.FeeService; +import io.bisq.provider.price.PriceFeedService; import io.bisq.trade.handlers.TransactionResultHandler; import io.bisq.trade.offer.OpenOfferManager; +import io.bisq.user.Preferences; import io.bisq.user.User; import javafx.beans.property.*; import javafx.collections.FXCollections; @@ -81,7 +83,7 @@ class CreateOfferDataModel extends ActivatableDataModel { private final BalanceListener balanceListener; private final SetChangeListener paymentAccountsChangeListener; - private Offer.Direction direction; + private OfferPayload.Direction direction; private TradeCurrency tradeCurrency; @@ -216,7 +218,7 @@ class CreateOfferDataModel extends ActivatableDataModel { /////////////////////////////////////////////////////////////////////////////////////////// // called before activate() - boolean initWithData(Offer.Direction direction, TradeCurrency tradeCurrency) { + boolean initWithData(OfferPayload.Direction direction, TradeCurrency tradeCurrency) { this.direction = direction; fillPaymentAccounts(); @@ -277,7 +279,7 @@ class CreateOfferDataModel extends ActivatableDataModel { Offer createAndGetOffer() { long priceAsLong = price.get() != null && !useMarketBasedPrice.get() ? price.get().getValue() : 0L; - // We use precision 8 in AltcoinPrice but in Offer we use Fiat with precision 4. Will be refactored once in a bigger update.... + // We use precision 8 in AltcoinPrice but in OfferPayload we use Fiat with precision 4. Will be refactored once in a bigger update.... // TODO use same precision for both in next release if (CurrencyUtil.isCryptoCurrency(tradeCurrencyCode.get())) priceAsLong = priceAsLong / 10000; @@ -328,7 +330,7 @@ class CreateOfferDataModel extends ActivatableDataModel { Restrictions.MAX_SECURITY_DEPOSIT.toFriendlyString()); checkArgument(securityDepositAsCoin.compareTo(Restrictions.MIN_SECURITY_DEPOSIT) >= 0, "securityDeposit must be not be less than " + Restrictions.MIN_SECURITY_DEPOSIT.toFriendlyString()); - return new Offer(offerId, + OfferPayload offerPayload = new OfferPayload(offerId, null, p2PService.getAddress(), keyRing.getPubKeyRing(), @@ -339,7 +341,7 @@ class CreateOfferDataModel extends ActivatableDataModel { amount, minAmount, tradeCurrencyCode.get(), - new ArrayList<>(user.getAcceptedArbitratorAddresses()), + Lists.newArrayList(user.getAcceptedArbitratorAddresses()), paymentAccount.getPaymentMethod().getId(), paymentAccount.getId(), null, @@ -347,8 +349,6 @@ class CreateOfferDataModel extends ActivatableDataModel { acceptedCountryCodes, bankId, acceptedBanks, - priceFeedService, - Version.VERSION, walletService.getLastBlockSeenHeight(), txFeeAsCoin.value, @@ -363,6 +363,7 @@ class CreateOfferDataModel extends ActivatableDataModel { isPrivateOffer, hashOfChallenge, extraDataMap); + return new Offer(offerPayload); } void onPlaceOffer(Offer offer, TransactionResultHandler resultHandler) { @@ -443,7 +444,7 @@ class CreateOfferDataModel extends ActivatableDataModel { return true; } - Offer.Direction getDirection() { + OfferPayload.Direction getDirection() { return direction; } @@ -524,7 +525,7 @@ class CreateOfferDataModel extends ActivatableDataModel { // The mining fee for the createOfferFee tx is deducted from the createOfferFee and not visible to the trader if (direction != null && amount.get() != null && createOfferFeeAsCoin != null) { Coin feeAndSecDeposit = createOfferFeeAsCoin.add(txFeeAsCoin).add(securityDeposit.get()); - Coin required = direction == Offer.Direction.BUY ? feeAndSecDeposit : feeAndSecDeposit.add(amount.get()); + Coin required = direction == OfferPayload.Direction.BUY ? feeAndSecDeposit : feeAndSecDeposit.add(amount.get()); totalToPayAsCoin.set(required); log.debug("totalToPayAsCoin " + totalToPayAsCoin.get().toFriendlyString()); updateBalance(); diff --git a/gui/src/main/java/io/bisq/gui/main/offer/createoffer/CreateOfferView.fxml b/gui/src/main/java/io/bisq/gui/main/offer/createoffer/CreateOfferView.fxml index b0eb56e044..ccfe31fcd5 100644 --- a/gui/src/main/java/io/bisq/gui/main/offer/createoffer/CreateOfferView.fxml +++ b/gui/src/main/java/io/bisq/gui/main/offer/createoffer/CreateOfferView.fxml @@ -18,6 +18,6 @@ --> - diff --git a/gui/src/main/java/io/bisq/gui/main/offer/createoffer/CreateOfferView.java b/gui/src/main/java/io/bisq/gui/main/offer/createoffer/CreateOfferView.java index 719d54df5f..7f705f0354 100644 --- a/gui/src/main/java/io/bisq/gui/main/offer/createoffer/CreateOfferView.java +++ b/gui/src/main/java/io/bisq/gui/main/offer/createoffer/CreateOfferView.java @@ -46,10 +46,11 @@ import io.bisq.gui.util.FormBuilder; import io.bisq.gui.util.GUIUtil; import io.bisq.gui.util.Layout; import io.bisq.locale.Res; -import io.bisq.messages.locale.TradeCurrency; -import io.bisq.messages.trade.offer.payload.Offer; -import io.bisq.messages.user.Preferences; +import io.bisq.locale.TradeCurrency; +import io.bisq.messages.trade.offer.payload.OfferPayload; +import io.bisq.p2p.protocol.availability.Offer; import io.bisq.payment.PaymentAccount; +import io.bisq.user.Preferences; import javafx.beans.value.ChangeListener; import javafx.collections.FXCollections; import javafx.event.ActionEvent; @@ -252,7 +253,7 @@ public class CreateOfferView extends ActivatableViewAndModel Res.get("createOffer.amountPriceBox.buy.volumeDescription", dataModel.tradeCurrencyCode.get()), dataModel.tradeCurrencyCode)); @@ -285,9 +286,9 @@ class CreateOfferViewModel extends ActivatableWithDataModel - diff --git a/gui/src/main/java/io/bisq/gui/main/offer/offerbook/OfferBookView.java b/gui/src/main/java/io/bisq/gui/main/offer/offerbook/OfferBookView.java index 96bb5806a3..2408842ff6 100644 --- a/gui/src/main/java/io/bisq/gui/main/offer/offerbook/OfferBookView.java +++ b/gui/src/main/java/io/bisq/gui/main/offer/offerbook/OfferBookView.java @@ -36,11 +36,12 @@ import io.bisq.gui.main.overlays.windows.OfferDetailsWindow; import io.bisq.gui.util.BSFormatter; import io.bisq.gui.util.GUIUtil; import io.bisq.gui.util.Layout; +import io.bisq.locale.FiatCurrency; import io.bisq.locale.Res; -import io.bisq.messages.locale.FiatCurrency; -import io.bisq.messages.locale.TradeCurrency; +import io.bisq.locale.TradeCurrency; import io.bisq.messages.payment.PaymentMethod; -import io.bisq.messages.trade.offer.payload.Offer; +import io.bisq.messages.trade.offer.payload.OfferPayload; +import io.bisq.p2p.protocol.availability.Offer; import javafx.beans.property.ReadOnlyObjectWrapper; import javafx.beans.value.ChangeListener; import javafx.beans.value.ObservableValue; @@ -246,7 +247,7 @@ public class OfferBookView extends ActivatableViewAndModel onRemoveOpenOffer(offer)); } else { - boolean isSellOffer = offer.getDirection() == Offer.Direction.SELL; + boolean isSellOffer = offerPayload.getDirection() == OfferPayload.Direction.SELL; iconView.setId(isSellOffer ? "image-buy-white" : "image-sell-white"); button.setId(isSellOffer ? "buy-button" : "sell-button"); button.setStyle("-fx-text-fill: white;"); // does not take the font colors sometimes from the style @@ -752,7 +754,7 @@ public class OfferBookView extends ActivatableViewAndModel 0; String tooltipText = hasTraded ? Res.get("peerInfoIcon.tooltip.offer.traded", hostName, numPastTrades) : diff --git a/gui/src/main/java/io/bisq/gui/main/offer/offerbook/OfferBookViewModel.java b/gui/src/main/java/io/bisq/gui/main/offer/offerbook/OfferBookViewModel.java index d8beaa6eb7..c7660fd112 100644 --- a/gui/src/main/java/io/bisq/gui/main/offer/offerbook/OfferBookViewModel.java +++ b/gui/src/main/java/io/bisq/gui/main/offer/offerbook/OfferBookViewModel.java @@ -30,18 +30,18 @@ import io.bisq.gui.main.settings.SettingsView; import io.bisq.gui.main.settings.preferences.PreferencesView; import io.bisq.gui.util.BSFormatter; import io.bisq.gui.util.GUIUtil; -import io.bisq.locale.Res; -import io.bisq.messages.locale.*; +import io.bisq.locale.*; +import io.bisq.messages.NodeAddress; import io.bisq.messages.payment.PaymentMethod; -import io.bisq.messages.provider.price.PriceFeedService; -import io.bisq.messages.trade.offer.payload.Offer; -import io.bisq.messages.user.Preferences; -import io.bisq.p2p.NodeAddress; -import io.bisq.p2p.P2PService; +import io.bisq.messages.trade.offer.payload.OfferPayload; +import io.bisq.p2p.protocol.availability.Offer; +import io.bisq.p2p.storage.P2PService; import io.bisq.payment.PaymentAccountUtil; +import io.bisq.provider.price.PriceFeedService; import io.bisq.trade.Trade; import io.bisq.trade.closed.ClosedTradableManager; import io.bisq.trade.offer.OpenOfferManager; +import io.bisq.user.Preferences; import io.bisq.user.User; import javafx.beans.property.BooleanProperty; import javafx.beans.property.SimpleBooleanProperty; @@ -83,7 +83,7 @@ class OfferBookViewModel extends ActivatableViewModel { private TradeCurrency selectedTradeCurrency; private final ObservableList allTradeCurrencies = FXCollections.observableArrayList(); - private Offer.Direction direction; + private OfferPayload.Direction direction; private final StringProperty btcCode = new SimpleStringProperty(); final StringProperty tradeCurrencyCode = new SimpleStringProperty(); @@ -135,13 +135,13 @@ class OfferBookViewModel extends ActivatableViewModel { protected void activate() { tradeCurrencyCodes = preferences.getTradeCurrenciesAsObservable().stream().map(e -> e.getCode()).collect(Collectors.toSet()); - String code = direction == Offer.Direction.BUY ? preferences.getBuyScreenCurrencyCode() : preferences.getSellScreenCurrencyCode(); + String code = direction == OfferPayload.Direction.BUY ? preferences.getBuyScreenCurrencyCode() : preferences.getSellScreenCurrencyCode(); if (code != null && !code.equals(GUIUtil.SHOW_ALL_FLAG) && !code.isEmpty() && CurrencyUtil.getTradeCurrency(code).isPresent()) { showAllTradeCurrenciesProperty.set(false); selectedTradeCurrency = CurrencyUtil.getTradeCurrency(code).get(); } else { showAllTradeCurrenciesProperty.set(true); - selectedTradeCurrency = CurrencyUtil.getDefaultTradeCurrency(); + selectedTradeCurrency = Preferences.getDefaultTradeCurrency(); } tradeCurrencyCode.set(selectedTradeCurrency.getCode()); @@ -166,7 +166,7 @@ class OfferBookViewModel extends ActivatableViewModel { // API /////////////////////////////////////////////////////////////////////////////////////////// - void initWithDirection(Offer.Direction direction) { + void initWithDirection(OfferPayload.Direction direction) { this.direction = direction; } @@ -196,7 +196,7 @@ class OfferBookViewModel extends ActivatableViewModel { setMarketPriceFeedCurrency(); applyFilterPredicate(); - if (direction == Offer.Direction.BUY) + if (direction == OfferPayload.Direction.BUY) preferences.setBuyScreenCurrencyCode(code); else preferences.setSellScreenCurrencyCode(code); @@ -228,7 +228,7 @@ class OfferBookViewModel extends ActivatableViewModel { return openOfferManager.isMyOffer(offer); } - Offer.Direction getDirection() { + OfferPayload.Direction getDirection() { return direction; } @@ -268,7 +268,7 @@ class OfferBookViewModel extends ActivatableViewModel { Fiat price = offer.getPrice(); if (price != null) { String postFix = ""; - if (offer.getUseMarketBasedPrice()) { + if (offer.isUseMarketBasedPrice()) { postFix = " (" + formatter.formatPercentagePrice(offer.getMarketPriceMargin()) + ")"; } if (showAllTradeCurrenciesProperty.get()) @@ -315,7 +315,7 @@ class OfferBookViewModel extends ActivatableViewModel { if (item != null) { Offer offer = item.getOffer(); result = Res.getWithCol("shared.paymentMethod") + " " + Res.get(offer.getPaymentMethod().getId()); - result += "\n" + Res.getWithCol("shared.currency") + " " + CurrencyUtil.getNameAndCode(offer.getCurrencyCode()); + result += "\n" + Res.getWithCol("shared.currency") + " " + CurrencyUtil.getNameAndCode(offer.getCurrencyCode(), Preferences.getDefaultLocale()); String methodCountryCode = offer.getCountryCode(); if (methodCountryCode != null) { @@ -329,15 +329,15 @@ class OfferBookViewModel extends ActivatableViewModel { } if (methodCountryCode != null) - result += "\n" + Res.get("offerbook.offerersBankSeat", CountryUtil.getNameByCode(methodCountryCode)); + result += "\n" + Res.get("offerbook.offerersBankSeat", CountryUtil.getNameByCode(methodCountryCode, Preferences.getDefaultLocale())); List acceptedCountryCodes = offer.getAcceptedCountryCodes(); List acceptedBanks = offer.getAcceptedBankIds(); if (acceptedCountryCodes != null && !acceptedCountryCodes.isEmpty()) { - if (CountryUtil.containsAllSepaEuroCountries(acceptedCountryCodes)) + if (CountryUtil.containsAllSepaEuroCountries(acceptedCountryCodes, Preferences.getDefaultLocale())) result += Res.get("offerbook.offerersAcceptedBankSeatsEuro"); else - result += Res.get("offerbook.offerersAcceptedBankSeats", CountryUtil.getNamesByCodesString(acceptedCountryCodes)); + result += Res.get("offerbook.offerersAcceptedBankSeats", CountryUtil.getNamesByCodesString(acceptedCountryCodes, Preferences.getDefaultLocale())); } else if (acceptedBanks != null && !acceptedBanks.isEmpty()) { if (offer.getPaymentMethod().equals(PaymentMethod.SAME_BANK)) result += "\n" + Res.getWithCol("shared.bankName") + " " + acceptedBanks.get(0); @@ -364,7 +364,7 @@ class OfferBookViewModel extends ActivatableViewModel { private void setMarketPriceFeedCurrency() { if (!preferences.getUseStickyMarketPrice() && isTabSelected) { if (showAllTradeCurrenciesProperty.get()) - priceFeedService.setCurrencyCode(CurrencyUtil.getDefaultTradeCurrency().getCode()); + priceFeedService.setCurrencyCode(Preferences.getDefaultTradeCurrency().getCode()); else priceFeedService.setCurrencyCode(tradeCurrencyCode.get()); } @@ -372,9 +372,9 @@ class OfferBookViewModel extends ActivatableViewModel { private void setPriceFeedType() { if (CurrencyUtil.isCryptoCurrency(tradeCurrencyCode.get())) - priceFeedService.setType(direction == Offer.Direction.SELL ? PriceFeedService.Type.ASK : PriceFeedService.Type.BID); + priceFeedService.setType(direction == OfferPayload.Direction.SELL ? PriceFeedService.Type.ASK : PriceFeedService.Type.BID); else - priceFeedService.setType(direction == Offer.Direction.BUY ? PriceFeedService.Type.ASK : PriceFeedService.Type.BID); + priceFeedService.setType(direction == OfferPayload.Direction.BUY ? PriceFeedService.Type.ASK : PriceFeedService.Type.BID); } private void fillAllTradeCurrencies() { @@ -428,7 +428,7 @@ class OfferBookViewModel extends ActivatableViewModel { }); } - boolean hasMatchingArbitrator(Offer offer) { + boolean hasMatchingArbitrator(OfferPayload offer) { for (NodeAddress offerArbitratorNodeAddress : offer.getArbitratorNodeAddresses()) { for (NodeAddress acceptedArbitratorNodeAddress : user.getAcceptedArbitratorAddresses()) { if (offerArbitratorNodeAddress.equals(acceptedArbitratorNodeAddress)) @@ -438,11 +438,11 @@ class OfferBookViewModel extends ActivatableViewModel { return false; } - boolean isIgnored(Offer offer) { + boolean isIgnored(OfferPayload offer) { return preferences.getIgnoreTradersList().stream().filter(i -> i.equals(offer.getOffererNodeAddress().getHostNameWithoutPostFix())).findAny().isPresent(); } - boolean isOfferBanned(Offer offer) { + boolean isOfferBanned(OfferPayload offer) { return filterManager.getFilter() != null && filterManager.getFilter().bannedOfferIds.stream() .filter(e -> e.equals(offer.getId())) @@ -450,7 +450,7 @@ class OfferBookViewModel extends ActivatableViewModel { .isPresent(); } - boolean isNodeBanned(Offer offer) { + boolean isNodeBanned(OfferPayload offer) { return filterManager.getFilter() != null && filterManager.getFilter().bannedNodeAddress.stream() .filter(e -> e.equals(offer.getOffererNodeAddress().getHostNameWithoutPostFix())) @@ -458,7 +458,7 @@ class OfferBookViewModel extends ActivatableViewModel { .isPresent(); } - boolean hasSameProtocolVersion(Offer offer) { + boolean hasSameProtocolVersion(OfferPayload offer) { return offer.getProtocolVersion() == Version.TRADE_PROTOCOL_VERSION; } @@ -470,7 +470,7 @@ class OfferBookViewModel extends ActivatableViewModel { return id.equals(GUIUtil.EDIT_FLAG); } - int getNumPastTrades(Offer offer) { + int getNumPastTrades(OfferPayload offer) { return closedTradableManager.getClosedTrades().stream() .filter(e -> { final NodeAddress tradingPeerNodeAddress = e instanceof Trade ? ((Trade) e).getTradingPeerNodeAddress() : null; diff --git a/gui/src/main/java/io/bisq/gui/main/offer/takeoffer/TakeOfferDataModel.java b/gui/src/main/java/io/bisq/gui/main/offer/takeoffer/TakeOfferDataModel.java index c9ae2aede3..dfca1c1b50 100644 --- a/gui/src/main/java/io/bisq/gui/main/offer/takeoffer/TakeOfferDataModel.java +++ b/gui/src/main/java/io/bisq/gui/main/offer/takeoffer/TakeOfferDataModel.java @@ -27,18 +27,19 @@ import io.bisq.gui.common.model.ActivatableDataModel; import io.bisq.gui.main.overlays.notifications.Notification; import io.bisq.gui.main.overlays.popups.Popup; import io.bisq.gui.util.BSFormatter; +import io.bisq.locale.CurrencyUtil; import io.bisq.locale.Res; import io.bisq.messages.arbitration.Arbitrator; -import io.bisq.messages.btc.provider.fee.FeeService; -import io.bisq.messages.locale.CurrencyUtil; import io.bisq.messages.payment.PaymentMethod; -import io.bisq.messages.provider.price.PriceFeedService; -import io.bisq.messages.trade.offer.payload.Offer; -import io.bisq.messages.user.Preferences; +import io.bisq.messages.trade.offer.payload.OfferPayload; +import io.bisq.p2p.protocol.availability.Offer; import io.bisq.payment.PaymentAccount; import io.bisq.payment.PaymentAccountUtil; +import io.bisq.provider.fee.FeeService; +import io.bisq.provider.price.PriceFeedService; import io.bisq.trade.TradeManager; import io.bisq.trade.handlers.TradeResultHandler; +import io.bisq.user.Preferences; import io.bisq.user.User; import javafx.beans.property.*; import javafx.collections.ObservableList; @@ -118,14 +119,14 @@ class TakeOfferDataModel extends ActivatableDataModel { @Override protected void activate() { // when leaving screen we reset state - offer.setState(Offer.State.UNDEFINED); + offer.setState(OfferPayload.State.UNDEFINED); addBindings(); addListeners(); updateBalance(); - // TODO In case that we have funded but restarted, or canceled but took again the offer we would need to + // TODO In case that we have funded but restarted, or canceled but took again the offer we would need to // store locally the result when we received the funding tx(s). // For now we just ignore that rare case and bypass the check by setting a sufficient value // if (isWalletFunded.get()) @@ -171,7 +172,7 @@ class TakeOfferDataModel extends ActivatableDataModel { securityDepositAsCoin = offer.getSecurityDeposit(); - // Taker pays 2 times the tx fee because the mining fee might be different when offerer created the offer + // Taker pays 2 times the tx fee because the mining fee might be different when offerer created the offer // and reserved his funds, so that would not work well with dynamic fees. // The mining fee for the takeOfferFee tx is deducted from the takeOfferFee and not visible to the trader @@ -297,7 +298,7 @@ class TakeOfferDataModel extends ActivatableDataModel { // Getters /////////////////////////////////////////////////////////////////////////////////////////// - Offer.Direction getDirection() { + OfferPayload.Direction getDirection() { return offer.getDirection(); } @@ -359,12 +360,12 @@ class TakeOfferDataModel extends ActivatableDataModel { } void calculateTotalToPay() { - // Taker pays 2 times the tx fee because the mining fee might be different when offerer created the offer + // Taker pays 2 times the tx fee because the mining fee might be different when offerer created the offer // and reserved his funds, so that would not work well with dynamic fees. // The mining fee for the takeOfferFee tx is deducted from the createOfferFee and not visible to the trader if (offer != null && amountAsCoin.get() != null && takerFeeAsCoin != null) { Coin value = takerFeeAsCoin.add(totalTxFeeAsCoin).add(securityDepositAsCoin); - if (getDirection() == Offer.Direction.SELL) + if (getDirection() == OfferPayload.Direction.SELL) totalToPayAsCoin.set(value); else totalToPayAsCoin.set(value.add(amountAsCoin.get())); diff --git a/gui/src/main/java/io/bisq/gui/main/offer/takeoffer/TakeOfferView.fxml b/gui/src/main/java/io/bisq/gui/main/offer/takeoffer/TakeOfferView.fxml index 894e31dc05..6e94c5e0c2 100644 --- a/gui/src/main/java/io/bisq/gui/main/offer/takeoffer/TakeOfferView.fxml +++ b/gui/src/main/java/io/bisq/gui/main/offer/takeoffer/TakeOfferView.fxml @@ -18,7 +18,7 @@ --> - diff --git a/gui/src/main/java/io/bisq/gui/main/offer/takeoffer/TakeOfferView.java b/gui/src/main/java/io/bisq/gui/main/offer/takeoffer/TakeOfferView.java index afc990bfae..6d6dc87148 100644 --- a/gui/src/main/java/io/bisq/gui/main/offer/takeoffer/TakeOfferView.java +++ b/gui/src/main/java/io/bisq/gui/main/offer/takeoffer/TakeOfferView.java @@ -46,10 +46,11 @@ import io.bisq.gui.util.FormBuilder; import io.bisq.gui.util.GUIUtil; import io.bisq.gui.util.Layout; import io.bisq.locale.Res; -import io.bisq.messages.locale.TradeCurrency; -import io.bisq.messages.trade.offer.payload.Offer; -import io.bisq.messages.user.Preferences; +import io.bisq.locale.TradeCurrency; +import io.bisq.messages.trade.offer.payload.OfferPayload; +import io.bisq.p2p.protocol.availability.Offer; import io.bisq.payment.PaymentAccount; +import io.bisq.user.Preferences; import javafx.beans.property.SimpleBooleanProperty; import javafx.beans.value.ChangeListener; import javafx.geometry.*; @@ -220,9 +221,9 @@ public class TakeOfferView extends ActivatableViewAndModel im private ChangeListener isWalletFundedListener; private ChangeListener tradeStateListener; private ChangeListener tradeErrorListener; - private ChangeListener offerStateListener; + private ChangeListener offerStateListener; private ChangeListener offerErrorListener; private ConnectionListener connectionListener; // private Subscription isFeeSufficientSubscription; @@ -152,7 +153,7 @@ class TakeOfferViewModel extends ActivatableWithDataModel im dataModel.initWithData(offer); this.offer = offer; - if (offer.getDirection() == Offer.Direction.BUY) { + if (offer.getDirection() == OfferPayload.Direction.BUY) { directionLabel = Res.get("shared.sellBitcoin"); amountDescription = Res.get("takeOffer.amountPriceBox.buy.amountDescription"); } else { @@ -267,7 +268,7 @@ class TakeOfferViewModel extends ActivatableWithDataModel im // States /////////////////////////////////////////////////////////////////////////////////////////// - private void applyOfferState(Offer.State state) { + private void applyOfferState(OfferPayload.State state) { log.debug("applyOfferState state = " + state); offerWarning.set(null); @@ -388,7 +389,7 @@ class TakeOfferViewModel extends ActivatableWithDataModel im private void addBindings() { volume.bind(createStringBinding(() -> formatter.formatVolume(dataModel.volumeAsFiat.get()), dataModel.volumeAsFiat)); - if (dataModel.getDirection() == Offer.Direction.SELL) { + if (dataModel.getDirection() == OfferPayload.Direction.SELL) { volumeDescriptionLabel.set(Res.get("createOffer.amountPriceBox.buy.volumeDescription", dataModel.getCurrencyCode())); } else { volumeDescriptionLabel.set(Res.get("createOffer.amountPriceBox.sell.volumeDescription", dataModel.getCurrencyCode())); @@ -520,7 +521,7 @@ class TakeOfferViewModel extends ActivatableWithDataModel im } boolean isSeller() { - return dataModel.getDirection() == Offer.Direction.BUY; + return dataModel.getDirection() == OfferPayload.Direction.BUY; } private InputValidator.ValidationResult isBtcInputValid(String input) { diff --git a/gui/src/main/java/io/bisq/gui/main/overlays/Overlay.java b/gui/src/main/java/io/bisq/gui/main/overlays/Overlay.java index 5598f643fb..717580e86f 100644 --- a/gui/src/main/java/io/bisq/gui/main/overlays/Overlay.java +++ b/gui/src/main/java/io/bisq/gui/main/overlays/Overlay.java @@ -26,7 +26,7 @@ import io.bisq.gui.main.MainView; import io.bisq.gui.util.GUIUtil; import io.bisq.gui.util.Transitions; import io.bisq.locale.Res; -import io.bisq.messages.user.Preferences; +import io.bisq.user.Preferences; import javafx.animation.Interpolator; import javafx.animation.KeyFrame; import javafx.animation.KeyValue; diff --git a/gui/src/main/java/io/bisq/gui/main/overlays/editor/PeerInfoWithTagEditor.java b/gui/src/main/java/io/bisq/gui/main/overlays/editor/PeerInfoWithTagEditor.java index 6803ee1858..f3569c1355 100644 --- a/gui/src/main/java/io/bisq/gui/main/overlays/editor/PeerInfoWithTagEditor.java +++ b/gui/src/main/java/io/bisq/gui/main/overlays/editor/PeerInfoWithTagEditor.java @@ -6,8 +6,8 @@ import io.bisq.gui.main.overlays.Overlay; import io.bisq.gui.main.overlays.windows.SendPrivateNotificationWindow; import io.bisq.gui.util.FormBuilder; import io.bisq.locale.Res; -import io.bisq.messages.trade.offer.payload.Offer; -import io.bisq.messages.user.Preferences; +import io.bisq.p2p.protocol.availability.Offer; +import io.bisq.user.Preferences; import javafx.animation.Interpolator; import javafx.animation.KeyFrame; import javafx.animation.KeyValue; diff --git a/gui/src/main/java/io/bisq/gui/main/overlays/notifications/NotificationCenter.java b/gui/src/main/java/io/bisq/gui/main/overlays/notifications/NotificationCenter.java index 6a12c0f93f..87341a0f14 100644 --- a/gui/src/main/java/io/bisq/gui/main/overlays/notifications/NotificationCenter.java +++ b/gui/src/main/java/io/bisq/gui/main/overlays/notifications/NotificationCenter.java @@ -11,7 +11,7 @@ import io.bisq.gui.main.disputes.trader.TraderDisputeView; import io.bisq.gui.main.portfolio.PortfolioView; import io.bisq.gui.main.portfolio.pendingtrades.PendingTradesView; import io.bisq.locale.Res; -import io.bisq.messages.user.Preferences; +import io.bisq.user.Preferences; import io.bisq.trade.Trade; import io.bisq.trade.TradeManager; import javafx.collections.ListChangeListener; diff --git a/gui/src/main/java/io/bisq/gui/main/overlays/windows/AddBitcoinNodesWindow.java b/gui/src/main/java/io/bisq/gui/main/overlays/windows/AddBitcoinNodesWindow.java index 47b189e49b..c7c5e8d1f7 100644 --- a/gui/src/main/java/io/bisq/gui/main/overlays/windows/AddBitcoinNodesWindow.java +++ b/gui/src/main/java/io/bisq/gui/main/overlays/windows/AddBitcoinNodesWindow.java @@ -23,7 +23,7 @@ import io.bisq.gui.components.HyperlinkWithIcon; import io.bisq.gui.components.InputTextField; import io.bisq.gui.main.overlays.Overlay; import io.bisq.gui.util.GUIUtil; -import io.bisq.messages.user.Preferences; +import io.bisq.user.Preferences; import javafx.geometry.HPos; import javafx.geometry.Insets; import javafx.scene.Scene; diff --git a/gui/src/main/java/io/bisq/gui/main/overlays/windows/ContractWindow.java b/gui/src/main/java/io/bisq/gui/main/overlays/windows/ContractWindow.java index a8cb89a5be..3f93a1b54e 100644 --- a/gui/src/main/java/io/bisq/gui/main/overlays/windows/ContractWindow.java +++ b/gui/src/main/java/io/bisq/gui/main/overlays/windows/ContractWindow.java @@ -26,11 +26,12 @@ import io.bisq.gui.util.FormBuilder; import io.bisq.gui.util.Layout; import io.bisq.locale.Res; import io.bisq.messages.arbitration.Dispute; -import io.bisq.messages.locale.CountryUtil; +import io.bisq.locale.CountryUtil; import io.bisq.messages.payment.PaymentMethod; import io.bisq.messages.payment.payload.PaymentAccountContractData; -import io.bisq.messages.trade.offer.payload.Offer; +import io.bisq.messages.trade.offer.payload.OfferPayload; import io.bisq.messages.trade.payload.Contract; +import io.bisq.user.Preferences; import javafx.geometry.Insets; import javafx.scene.Scene; import javafx.scene.control.Button; @@ -95,7 +96,7 @@ public class ContractWindow extends Overlay { private void addContent() { Contract contract = dispute.getContract(); - Offer offer = contract.offer; + OfferPayload offer = contract.offer; List acceptedBanks = offer.getAcceptedBankIds(); boolean showAcceptedBanks = acceptedBanks != null && !acceptedBanks.isEmpty(); @@ -139,11 +140,11 @@ public class ContractWindow extends Overlay { if (showAcceptedCountryCodes) { String countries; Tooltip tooltip = null; - if (CountryUtil.containsAllSepaEuroCountries(acceptedCountryCodes)) { + if (CountryUtil.containsAllSepaEuroCountries(acceptedCountryCodes, Preferences.getDefaultLocale())) { countries = Res.getWithCol("shared.allEuroCountries"); } else { countries = CountryUtil.getCodesString(acceptedCountryCodes); - tooltip = new Tooltip(CountryUtil.getNamesByCodesString(acceptedCountryCodes)); + tooltip = new Tooltip(CountryUtil.getNamesByCodesString(acceptedCountryCodes, Preferences.getDefaultLocale())); } TextField acceptedCountries = FormBuilder.addLabelTextField(gridPane, ++rowIndex, Res.getWithCol("shared.acceptedTakerCountries"), countries).second; if (tooltip != null) acceptedCountries.setTooltip(new Tooltip()); diff --git a/gui/src/main/java/io/bisq/gui/main/overlays/windows/OfferDetailsWindow.java b/gui/src/main/java/io/bisq/gui/main/overlays/windows/OfferDetailsWindow.java index 08bd1e393b..13b3fc6894 100644 --- a/gui/src/main/java/io/bisq/gui/main/overlays/windows/OfferDetailsWindow.java +++ b/gui/src/main/java/io/bisq/gui/main/overlays/windows/OfferDetailsWindow.java @@ -18,7 +18,7 @@ package io.bisq.gui.main.overlays.windows; import com.google.common.base.Joiner; -import io.bisq.common.crypto.KeyRing; +import io.bisq.messages.crypto.KeyRing; import io.bisq.common.util.Tuple3; import io.bisq.gui.Navigation; import io.bisq.gui.components.BusyAnimation; @@ -31,11 +31,12 @@ import io.bisq.gui.main.overlays.popups.Popup; import io.bisq.gui.util.BSFormatter; import io.bisq.gui.util.Layout; import io.bisq.locale.Res; -import io.bisq.messages.locale.BankUtil; -import io.bisq.messages.locale.CountryUtil; +import io.bisq.locale.BankUtil; +import io.bisq.locale.CountryUtil; import io.bisq.messages.payment.PaymentMethod; -import io.bisq.messages.trade.offer.payload.Offer; -import io.bisq.messages.user.Preferences; +import io.bisq.messages.trade.offer.payload.OfferPayload; +import io.bisq.p2p.protocol.availability.Offer; +import io.bisq.user.Preferences; import io.bisq.payment.PaymentAccount; import io.bisq.user.User; import javafx.geometry.Insets; @@ -157,7 +158,7 @@ public class OfferDetailsWindow extends Overlay { String fiatDirectionInfo = ":"; String btcDirectionInfo = ":"; - Offer.Direction direction = offer.getDirection(); + OfferPayload.Direction direction = offer.getDirection(); String currencyCode = offer.getCurrencyCode(); String offerTypeLabel = Res.getWithCol("shared.offerType"); String toReceive = " " + Res.get("shared.toReceive"); @@ -166,13 +167,13 @@ public class OfferDetailsWindow extends Overlay { if (takeOfferHandlerOptional.isPresent()) { addLabelTextField(gridPane, rowIndex, offerTypeLabel, formatter.getDirectionForTakeOffer(direction, currencyCode), firstRowDistance); - fiatDirectionInfo = direction == Offer.Direction.BUY ? toReceive : toSpend; - btcDirectionInfo = direction == Offer.Direction.SELL ? toReceive : toSpend; + fiatDirectionInfo = direction == OfferPayload.Direction.BUY ? toReceive : toSpend; + btcDirectionInfo = direction == OfferPayload.Direction.SELL ? toReceive : toSpend; } else if (placeOfferHandlerOptional.isPresent()) { addLabelTextField(gridPane, rowIndex, offerTypeLabel, formatter.getOfferDirectionForCreateOffer(direction, currencyCode), firstRowDistance); - fiatDirectionInfo = direction == Offer.Direction.SELL ? toReceive : toSpend; - btcDirectionInfo = direction == Offer.Direction.BUY ? toReceive : toSpend; + fiatDirectionInfo = direction == OfferPayload.Direction.SELL ? toReceive : toSpend; + btcDirectionInfo = direction == OfferPayload.Direction.BUY ? toReceive : toSpend; } else { addLabelTextField(gridPane, rowIndex, offerTypeLabel, formatter.getDirectionBothSides(direction, currencyCode), firstRowDistance); @@ -201,7 +202,7 @@ public class OfferDetailsWindow extends Overlay { addLabelTextField(gridPane, ++rowIndex, priceLabel, formatter.formatPrice(tradePrice)); } else { Fiat price = offer.getPrice(); - if (offer.getUseMarketBasedPrice()) { + if (offer.isUseMarketBasedPrice()) { addLabelTextField(gridPane, ++rowIndex, priceLabel, formatter.formatPrice(price) + " " + Res.get("offerDetailsWindow.distance", formatter.formatPercentagePrice(offer.getMarketPriceMargin()))); @@ -254,15 +255,15 @@ public class OfferDetailsWindow extends Overlay { if (showAcceptedCountryCodes) { String countries; Tooltip tooltip = null; - if (CountryUtil.containsAllSepaEuroCountries(acceptedCountryCodes)) { + if (CountryUtil.containsAllSepaEuroCountries(acceptedCountryCodes, Preferences.getDefaultLocale())) { countries = Res.getWithCol("shared.allEuroCountries"); } else { if (acceptedCountryCodes.size() == 1) { - countries = CountryUtil.getNameAndCode(acceptedCountryCodes.get(0)); + countries = CountryUtil.getNameAndCode(acceptedCountryCodes.get(0), Preferences.getDefaultLocale()); tooltip = new Tooltip(countries); } else { countries = CountryUtil.getCodesString(acceptedCountryCodes); - tooltip = new Tooltip(CountryUtil.getNamesByCodesString(acceptedCountryCodes)); + tooltip = new Tooltip(CountryUtil.getNamesByCodesString(acceptedCountryCodes, Preferences.getDefaultLocale())); } } TextField acceptedCountries = addLabelTextField(gridPane, ++rowIndex, @@ -292,7 +293,7 @@ public class OfferDetailsWindow extends Overlay { if (paymentMethodCountryCode != null) addLabelTextField(gridPane, ++rowIndex, Res.get("offerDetailsWindow.countryBank"), - CountryUtil.getNameAndCode(paymentMethodCountryCode)); + CountryUtil.getNameAndCode(paymentMethodCountryCode, Preferences.getDefaultLocale())); addLabelTextFieldWithCopyIcon(gridPane, ++rowIndex, Res.get("offerDetailsWindow.acceptedArbitrators"), formatter.arbitratorAddressesToString(offer.getArbitratorNodeAddresses())); @@ -301,13 +302,13 @@ public class OfferDetailsWindow extends Overlay { if (placeOfferHandlerOptional.isPresent()) { addTitledGroupBg(gridPane, ++rowIndex, 1, Res.get("offerDetailsWindow.commitment"), Layout.GROUP_DISTANCE); - addLabelTextField(gridPane, rowIndex, Res.get("offerDetailsWindow.agree"), Offer.TAC_OFFERER, + addLabelTextField(gridPane, rowIndex, Res.get("offerDetailsWindow.agree"), Res.get("createOffer.tac"), Layout.FIRST_ROW_AND_GROUP_DISTANCE); addConfirmAndCancelButtons(true); } else if (takeOfferHandlerOptional.isPresent()) { addTitledGroupBg(gridPane, ++rowIndex, 1, Res.get("shared.contract"), Layout.GROUP_DISTANCE); - addLabelTextField(gridPane, rowIndex, Res.get("offerDetailsWindow.tac"), Offer.TAC_TAKER, + addLabelTextField(gridPane, rowIndex, Res.get("offerDetailsWindow.tac"), Res.get("takeOffer.tac"), Layout.FIRST_ROW_AND_GROUP_DISTANCE); addConfirmAndCancelButtons(false); @@ -321,7 +322,7 @@ public class OfferDetailsWindow extends Overlay { } private void addConfirmAndCancelButtons(boolean isPlaceOffer) { - boolean isBuyOffer = offer.getDirection() == Offer.Direction.BUY; + boolean isBuyOffer = offer.getDirection() == OfferPayload.Direction.BUY; boolean isBuyerRole = isPlaceOffer ? isBuyOffer : !isBuyOffer; String placeOfferButtonText = isBuyerRole ? Res.get("offerDetailsWindow.confirm.maker", Res.get("shared.buy")) : diff --git a/gui/src/main/java/io/bisq/gui/main/overlays/windows/SendPrivateNotificationWindow.java b/gui/src/main/java/io/bisq/gui/main/overlays/windows/SendPrivateNotificationWindow.java index 96e5537b77..2f85718ae1 100644 --- a/gui/src/main/java/io/bisq/gui/main/overlays/windows/SendPrivateNotificationWindow.java +++ b/gui/src/main/java/io/bisq/gui/main/overlays/windows/SendPrivateNotificationWindow.java @@ -18,15 +18,15 @@ package io.bisq.gui.main.overlays.windows; import io.bisq.app.DevEnv; -import io.bisq.common.crypto.PubKeyRing; +import io.bisq.messages.crypto.PubKeyRing; import io.bisq.common.util.Tuple2; import io.bisq.gui.components.InputTextField; import io.bisq.gui.main.overlays.Overlay; import io.bisq.gui.main.overlays.popups.Popup; import io.bisq.locale.Res; import io.bisq.messages.alert.PrivateNotification; -import io.bisq.p2p.NodeAddress; -import io.bisq.p2p.messaging.SendMailboxMessageListener; +import io.bisq.messages.NodeAddress; +import io.bisq.messages.p2p.messaging.SendMailboxMessageListener; import javafx.geometry.Insets; import javafx.scene.Scene; import javafx.scene.control.Button; diff --git a/gui/src/main/java/io/bisq/gui/main/overlays/windows/TacWindow.java b/gui/src/main/java/io/bisq/gui/main/overlays/windows/TacWindow.java index 828bcd17e5..8c19cbe8af 100644 --- a/gui/src/main/java/io/bisq/gui/main/overlays/windows/TacWindow.java +++ b/gui/src/main/java/io/bisq/gui/main/overlays/windows/TacWindow.java @@ -5,7 +5,7 @@ import io.bisq.app.BisqApp; import io.bisq.app.DevEnv; import io.bisq.gui.main.overlays.Overlay; import io.bisq.locale.Res; -import io.bisq.messages.user.Preferences; +import io.bisq.user.Preferences; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/gui/src/main/java/io/bisq/gui/main/overlays/windows/TradeDetailsWindow.java b/gui/src/main/java/io/bisq/gui/main/overlays/windows/TradeDetailsWindow.java index 57c3a4c521..7e97b77f47 100644 --- a/gui/src/main/java/io/bisq/gui/main/overlays/windows/TradeDetailsWindow.java +++ b/gui/src/main/java/io/bisq/gui/main/overlays/windows/TradeDetailsWindow.java @@ -25,8 +25,8 @@ import io.bisq.gui.util.BSFormatter; import io.bisq.gui.util.Layout; import io.bisq.locale.Res; import io.bisq.messages.payment.payload.PaymentAccountContractData; -import io.bisq.messages.trade.offer.payload.Offer; import io.bisq.messages.trade.payload.Contract; +import io.bisq.p2p.protocol.availability.Offer; import io.bisq.trade.Trade; import io.bisq.trade.TradeManager; import javafx.beans.property.IntegerProperty; diff --git a/gui/src/main/java/io/bisq/gui/main/portfolio/closedtrades/ClosedTradesDataModel.java b/gui/src/main/java/io/bisq/gui/main/portfolio/closedtrades/ClosedTradesDataModel.java index 373e8e9b58..bb7cbfb415 100644 --- a/gui/src/main/java/io/bisq/gui/main/portfolio/closedtrades/ClosedTradesDataModel.java +++ b/gui/src/main/java/io/bisq/gui/main/portfolio/closedtrades/ClosedTradesDataModel.java @@ -19,7 +19,8 @@ package io.bisq.gui.main.portfolio.closedtrades; import com.google.inject.Inject; import io.bisq.gui.common.model.ActivatableDataModel; -import io.bisq.messages.trade.offer.payload.Offer; +import io.bisq.messages.trade.offer.payload.OfferPayload; +import io.bisq.p2p.protocol.availability.Offer; import io.bisq.trade.Tradable; import io.bisq.trade.closed.ClosedTradableManager; import javafx.collections.FXCollections; @@ -56,7 +57,7 @@ class ClosedTradesDataModel extends ActivatableDataModel { return list; } - public Offer.Direction getDirection(Offer offer) { + public OfferPayload.Direction getDirection(Offer offer) { return closedTradableManager.wasMyOffer(offer) ? offer.getDirection() : offer.getMirroredDirection(); } diff --git a/gui/src/main/java/io/bisq/gui/main/portfolio/closedtrades/ClosedTradesView.java b/gui/src/main/java/io/bisq/gui/main/portfolio/closedtrades/ClosedTradesView.java index ae85670b8d..09ae69daf9 100644 --- a/gui/src/main/java/io/bisq/gui/main/portfolio/closedtrades/ClosedTradesView.java +++ b/gui/src/main/java/io/bisq/gui/main/portfolio/closedtrades/ClosedTradesView.java @@ -27,7 +27,7 @@ import io.bisq.gui.main.overlays.windows.OfferDetailsWindow; import io.bisq.gui.main.overlays.windows.TradeDetailsWindow; import io.bisq.gui.util.GUIUtil; import io.bisq.locale.Res; -import io.bisq.p2p.NodeAddress; +import io.bisq.messages.NodeAddress; import io.bisq.trade.Tradable; import io.bisq.trade.Trade; import io.bisq.trade.offer.OpenOffer; @@ -99,7 +99,8 @@ public class ClosedTradesView extends ActivatableViewAndModel o1.getTradable().getId().compareTo(o2.getTradable().getId())); dateColumn.setComparator((o1, o2) -> o1.getTradable().getDate().compareTo(o2.getTradable().getDate())); - directionColumn.setComparator((o1, o2) -> o1.getTradable().getOffer().getDirection().compareTo(o2.getTradable().getOffer().getDirection())); + directionColumn.setComparator((o1, o2) -> o1.getTradable().getOffer().getDirection() + .compareTo(o2.getTradable().getOffer().getDirection())); marketColumn.setComparator((o1, o2) -> model.getMarketLabel(o1).compareTo(model.getMarketLabel(o2))); priceColumn.setComparator((o1, o2) -> { diff --git a/gui/src/main/java/io/bisq/gui/main/portfolio/failedtrades/FailedTradesDataModel.java b/gui/src/main/java/io/bisq/gui/main/portfolio/failedtrades/FailedTradesDataModel.java index bb32d24248..c34a77aacb 100644 --- a/gui/src/main/java/io/bisq/gui/main/portfolio/failedtrades/FailedTradesDataModel.java +++ b/gui/src/main/java/io/bisq/gui/main/portfolio/failedtrades/FailedTradesDataModel.java @@ -19,7 +19,8 @@ package io.bisq.gui.main.portfolio.failedtrades; import com.google.inject.Inject; import io.bisq.gui.common.model.ActivatableDataModel; -import io.bisq.messages.trade.offer.payload.Offer; +import io.bisq.messages.trade.offer.payload.OfferPayload; +import io.bisq.p2p.protocol.availability.Offer; import io.bisq.trade.Trade; import io.bisq.trade.failed.FailedTradesManager; import javafx.collections.FXCollections; @@ -57,7 +58,7 @@ class FailedTradesDataModel extends ActivatableDataModel { return list; } - public Offer.Direction getDirection(Offer offer) { + public OfferPayload.Direction getDirection(Offer offer) { return failedTradesManager.wasMyOffer(offer) ? offer.getDirection() : offer.getMirroredDirection(); } diff --git a/gui/src/main/java/io/bisq/gui/main/portfolio/openoffer/OpenOfferListItem.java b/gui/src/main/java/io/bisq/gui/main/portfolio/openoffer/OpenOfferListItem.java index 934ed4b5ba..0857abb742 100644 --- a/gui/src/main/java/io/bisq/gui/main/portfolio/openoffer/OpenOfferListItem.java +++ b/gui/src/main/java/io/bisq/gui/main/portfolio/openoffer/OpenOfferListItem.java @@ -17,7 +17,7 @@ package io.bisq.gui.main.portfolio.openoffer; -import io.bisq.messages.trade.offer.payload.Offer; +import io.bisq.p2p.protocol.availability.Offer; import io.bisq.trade.offer.OpenOffer; /** diff --git a/gui/src/main/java/io/bisq/gui/main/portfolio/openoffer/OpenOffersDataModel.java b/gui/src/main/java/io/bisq/gui/main/portfolio/openoffer/OpenOffersDataModel.java index f4cf0365be..e9aafcdc96 100644 --- a/gui/src/main/java/io/bisq/gui/main/portfolio/openoffer/OpenOffersDataModel.java +++ b/gui/src/main/java/io/bisq/gui/main/portfolio/openoffer/OpenOffersDataModel.java @@ -21,8 +21,9 @@ import com.google.inject.Inject; import io.bisq.common.handlers.ErrorMessageHandler; import io.bisq.common.handlers.ResultHandler; import io.bisq.gui.common.model.ActivatableDataModel; -import io.bisq.messages.provider.price.PriceFeedService; -import io.bisq.messages.trade.offer.payload.Offer; +import io.bisq.messages.trade.offer.payload.OfferPayload; +import io.bisq.p2p.protocol.availability.Offer; +import io.bisq.provider.price.PriceFeedService; import io.bisq.trade.offer.OpenOffer; import io.bisq.trade.offer.OpenOfferManager; import javafx.beans.value.ChangeListener; @@ -71,7 +72,7 @@ class OpenOffersDataModel extends ActivatableDataModel { return list; } - public Offer.Direction getDirection(Offer offer) { + public OfferPayload.Direction getDirection(Offer offer) { return openOfferManager.isMyOffer(offer) ? offer.getDirection() : offer.getMirroredDirection(); } diff --git a/gui/src/main/java/io/bisq/gui/main/portfolio/openoffer/OpenOffersView.java b/gui/src/main/java/io/bisq/gui/main/portfolio/openoffer/OpenOffersView.java index 800498bb7e..b7d976bfa4 100644 --- a/gui/src/main/java/io/bisq/gui/main/portfolio/openoffer/OpenOffersView.java +++ b/gui/src/main/java/io/bisq/gui/main/portfolio/openoffer/OpenOffersView.java @@ -27,7 +27,7 @@ import io.bisq.gui.main.funds.withdrawal.WithdrawalView; import io.bisq.gui.main.overlays.popups.Popup; import io.bisq.gui.main.overlays.windows.OfferDetailsWindow; import io.bisq.locale.Res; -import io.bisq.messages.user.Preferences; +import io.bisq.user.Preferences; import io.bisq.trade.offer.OpenOffer; import javafx.beans.property.ReadOnlyObjectWrapper; import javafx.collections.transformation.SortedList; diff --git a/gui/src/main/java/io/bisq/gui/main/portfolio/openoffer/OpenOffersViewModel.java b/gui/src/main/java/io/bisq/gui/main/portfolio/openoffer/OpenOffersViewModel.java index b93a342dd1..4b0f79db1e 100644 --- a/gui/src/main/java/io/bisq/gui/main/portfolio/openoffer/OpenOffersViewModel.java +++ b/gui/src/main/java/io/bisq/gui/main/portfolio/openoffer/OpenOffersViewModel.java @@ -24,8 +24,8 @@ import io.bisq.gui.common.model.ActivatableWithDataModel; import io.bisq.gui.common.model.ViewModel; import io.bisq.gui.util.BSFormatter; import io.bisq.locale.Res; -import io.bisq.messages.trade.offer.payload.Offer; -import io.bisq.p2p.P2PService; +import io.bisq.p2p.protocol.availability.Offer; +import io.bisq.p2p.storage.P2PService; import io.bisq.trade.offer.OpenOffer; import javafx.collections.ObservableList; import org.bitcoinj.utils.Fiat; @@ -67,7 +67,7 @@ class OpenOffersViewModel extends ActivatableWithDataModel Fiat price = offer.getPrice(); if (price != null) { String postFix = ""; - if (offer.getUseMarketBasedPrice()) + if (offer.isUseMarketBasedPrice()) postFix = " (" + formatter.formatPercentagePrice(offer.getMarketPriceMargin()) + ")"; return formatter.formatPrice(price) + postFix; } else { diff --git a/gui/src/main/java/io/bisq/gui/main/portfolio/pendingtrades/PendingTradesDataModel.java b/gui/src/main/java/io/bisq/gui/main/portfolio/pendingtrades/PendingTradesDataModel.java index 1c89baf151..fccd370598 100644 --- a/gui/src/main/java/io/bisq/gui/main/portfolio/pendingtrades/PendingTradesDataModel.java +++ b/gui/src/main/java/io/bisq/gui/main/portfolio/pendingtrades/PendingTradesDataModel.java @@ -23,7 +23,6 @@ import io.bisq.arbitration.DisputeAlreadyOpenException; import io.bisq.arbitration.DisputeManager; import io.bisq.btc.wallet.BtcWalletService; import io.bisq.btc.wallet.TradeWalletService; -import io.bisq.common.crypto.KeyRing; import io.bisq.common.handlers.ErrorMessageHandler; import io.bisq.common.handlers.FaultHandler; import io.bisq.common.handlers.ResultHandler; @@ -38,15 +37,17 @@ import io.bisq.gui.main.overlays.windows.WalletPasswordWindow; import io.bisq.locale.Res; import io.bisq.messages.arbitration.Arbitrator; import io.bisq.messages.arbitration.Dispute; -import io.bisq.messages.btc.provider.fee.FeeService; +import io.bisq.messages.crypto.KeyRing; import io.bisq.messages.payment.payload.PaymentAccountContractData; -import io.bisq.messages.trade.offer.payload.Offer; -import io.bisq.messages.user.Preferences; -import io.bisq.p2p.P2PService; +import io.bisq.messages.trade.offer.payload.OfferPayload; +import io.bisq.p2p.protocol.availability.Offer; +import io.bisq.p2p.storage.P2PService; +import io.bisq.provider.fee.FeeService; import io.bisq.trade.BuyerTrade; import io.bisq.trade.SellerTrade; import io.bisq.trade.Trade; import io.bisq.trade.TradeManager; +import io.bisq.user.Preferences; import io.bisq.user.User; import javafx.beans.property.ObjectProperty; import javafx.beans.property.SimpleObjectProperty; @@ -208,7 +209,7 @@ public class PendingTradesDataModel extends ActivatableDataModel { } boolean isBuyOffer() { - return getOffer() != null && getOffer().getDirection() == Offer.Direction.BUY; + return getOffer() != null && getOffer().getDirection() == OfferPayload.Direction.BUY; } boolean isOfferer(Offer offer) { @@ -238,7 +239,7 @@ public class PendingTradesDataModel extends ActivatableDataModel { return getOffer() != null ? getOffer().getCurrencyCode() : ""; } - public Offer.Direction getDirection(Offer offer) { + public OfferPayload.Direction getDirection(Offer offer) { isOfferer = tradeManager.isMyOffer(offer); return isOfferer ? offer.getDirection() : offer.getMirroredDirection(); } @@ -380,7 +381,7 @@ public class PendingTradesDataModel extends ActivatableDataModel { Dispute dispute = new Dispute(disputeManager.getDisputeStorage(), trade.getId(), keyRing.getPubKeyRing().hashCode(), // traderId - trade.getOffer().getDirection() == Offer.Direction.BUY ? isOfferer : !isOfferer, + trade.getOffer().getDirection() == OfferPayload.Direction.BUY ? isOfferer : !isOfferer, isOfferer, keyRing.getPubKeyRing(), trade.getDate(), diff --git a/gui/src/main/java/io/bisq/gui/main/portfolio/pendingtrades/PendingTradesViewModel.java b/gui/src/main/java/io/bisq/gui/main/portfolio/pendingtrades/PendingTradesViewModel.java index f3470f60cc..316f321c9d 100644 --- a/gui/src/main/java/io/bisq/gui/main/portfolio/pendingtrades/PendingTradesViewModel.java +++ b/gui/src/main/java/io/bisq/gui/main/portfolio/pendingtrades/PendingTradesViewModel.java @@ -26,9 +26,9 @@ import io.bisq.gui.util.BSFormatter; import io.bisq.gui.util.validation.BtcAddressValidator; import io.bisq.locale.Res; import io.bisq.messages.payment.PaymentMethod; -import io.bisq.messages.trade.offer.payload.Offer; import io.bisq.messages.trade.payload.Contract; -import io.bisq.p2p.P2PService; +import io.bisq.p2p.protocol.availability.Offer; +import io.bisq.p2p.storage.P2PService; import io.bisq.trade.Trade; import io.bisq.trade.closed.ClosedTradableManager; import io.bisq.user.User; diff --git a/gui/src/main/java/io/bisq/gui/main/portfolio/pendingtrades/steps/TradeStepView.java b/gui/src/main/java/io/bisq/gui/main/portfolio/pendingtrades/steps/TradeStepView.java index 5896c5e902..dd92e82ff0 100644 --- a/gui/src/main/java/io/bisq/gui/main/portfolio/pendingtrades/steps/TradeStepView.java +++ b/gui/src/main/java/io/bisq/gui/main/portfolio/pendingtrades/steps/TradeStepView.java @@ -28,7 +28,7 @@ import io.bisq.gui.main.portfolio.pendingtrades.TradeSubView; import io.bisq.gui.util.Layout; import io.bisq.locale.Res; import io.bisq.messages.arbitration.Dispute; -import io.bisq.messages.user.Preferences; +import io.bisq.user.Preferences; import io.bisq.trade.Trade; import javafx.beans.value.ChangeListener; import javafx.scene.control.ProgressBar; diff --git a/gui/src/main/java/io/bisq/gui/main/portfolio/pendingtrades/steps/buyer/BuyerStep2View.java b/gui/src/main/java/io/bisq/gui/main/portfolio/pendingtrades/steps/buyer/BuyerStep2View.java index 3f9c888a63..66714affe9 100644 --- a/gui/src/main/java/io/bisq/gui/main/portfolio/pendingtrades/steps/buyer/BuyerStep2View.java +++ b/gui/src/main/java/io/bisq/gui/main/portfolio/pendingtrades/steps/buyer/BuyerStep2View.java @@ -27,14 +27,15 @@ import io.bisq.gui.main.overlays.popups.Popup; import io.bisq.gui.main.portfolio.pendingtrades.PendingTradesViewModel; import io.bisq.gui.main.portfolio.pendingtrades.steps.TradeStepView; import io.bisq.gui.util.Layout; +import io.bisq.locale.CurrencyUtil; import io.bisq.locale.Res; -import io.bisq.messages.locale.CurrencyUtil; import io.bisq.messages.payment.PaymentMethod; import io.bisq.messages.payment.payload.CashDepositAccountContractData; import io.bisq.messages.payment.payload.CryptoCurrencyAccountContractData; import io.bisq.messages.payment.payload.PaymentAccountContractData; import io.bisq.messages.payment.payload.USPostalMoneyOrderAccountContractData; import io.bisq.trade.Trade; +import io.bisq.user.Preferences; import javafx.scene.control.Button; import javafx.scene.control.Label; import javafx.scene.layout.GridPane; @@ -82,7 +83,7 @@ public class BuyerStep2View extends TradeStepView { String amount = model.formatter.formatVolumeWithCode(trade.getTradeVolume()); if (paymentAccountContractData instanceof CryptoCurrencyAccountContractData) message += Res.get("portfolio.pending.step2_buyer.altcoin", - CurrencyUtil.getNameByCode(trade.getOffer().getCurrencyCode()), + CurrencyUtil.getNameByCode(trade.getOffer().getCurrencyCode(), Preferences.getDefaultLocale()), amount) + accountDetails + paymentDetailsForTradePopup + ".\n\n" + @@ -206,7 +207,8 @@ public class BuyerStep2View extends TradeStepView { gridRow = CashDepositForm.addFormForBuyer(gridPane, gridRow, paymentAccountContractData); break; case PaymentMethod.BLOCK_CHAINS_ID: - String labelTitle = Res.get("portfolio.pending.step2_buyer.sellersAddress", CurrencyUtil.getNameByCode(trade.getOffer().getCurrencyCode())); + String labelTitle = Res.get("portfolio.pending.step2_buyer.sellersAddress", CurrencyUtil.getNameByCode(trade.getOffer().getCurrencyCode(), + Preferences.getDefaultLocale())); gridRow = CryptoCurrencyForm.addFormForBuyer(gridPane, gridRow, paymentAccountContractData, labelTitle); break; default: @@ -287,7 +289,8 @@ public class BuyerStep2View extends TradeStepView { if (!DevEnv.DEV_MODE && preferences.showAgain(key)) { Popup popup = new Popup(); popup.headLine(Res.get("portfolio.pending.step2_buyer.confirmStart.headline")) - .confirmation(Res.get("portfolio.pending.step2_buyer.confirmStart.msg", CurrencyUtil.getNameByCode(trade.getOffer().getCurrencyCode()))) + .confirmation(Res.get("portfolio.pending.step2_buyer.confirmStart.msg", CurrencyUtil.getNameByCode(trade.getOffer().getCurrencyCode(), + Preferences.getDefaultLocale()))) .width(700) .actionButtonText(Res.get("portfolio.pending.step2_buyer.confirmStart.yes")) .onAction(this::confirmPaymentStarted) diff --git a/gui/src/main/java/io/bisq/gui/main/portfolio/pendingtrades/steps/seller/SellerStep3View.java b/gui/src/main/java/io/bisq/gui/main/portfolio/pendingtrades/steps/seller/SellerStep3View.java index 4c0706d888..4b61b8bdeb 100644 --- a/gui/src/main/java/io/bisq/gui/main/portfolio/pendingtrades/steps/seller/SellerStep3View.java +++ b/gui/src/main/java/io/bisq/gui/main/portfolio/pendingtrades/steps/seller/SellerStep3View.java @@ -27,10 +27,10 @@ import io.bisq.gui.main.portfolio.pendingtrades.PendingTradesViewModel; import io.bisq.gui.main.portfolio.pendingtrades.steps.TradeStepView; import io.bisq.gui.util.Layout; import io.bisq.locale.Res; -import io.bisq.messages.locale.CurrencyUtil; +import io.bisq.locale.CurrencyUtil; import io.bisq.messages.payment.payload.*; import io.bisq.messages.trade.payload.Contract; -import io.bisq.messages.user.Preferences; +import io.bisq.user.Preferences; import io.bisq.trade.Trade; import javafx.scene.control.Button; import javafx.scene.control.Label; @@ -69,7 +69,7 @@ public class SellerStep3View extends TradeStepView { String key = "confirmPayment" + trade.getId(); String message; String tradeVolumeWithCode = model.formatter.formatVolumeWithCode(trade.getTradeVolume()); - String currencyName = CurrencyUtil.getNameByCode(trade.getOffer().getCurrencyCode()); + String currencyName = CurrencyUtil.getNameByCode(trade.getOffer().getCurrencyCode(), Preferences.getDefaultLocale()); String part1 = Res.get("portfolio.pending.step3_seller.part", currencyName); String id = trade.getShortId(); if (paymentAccountContractData instanceof CryptoCurrencyAccountContractData) { @@ -137,7 +137,7 @@ public class SellerStep3View extends TradeStepView { String myTitle = ""; String peersTitle = ""; boolean isBlockChain = false; - String nameByCode = CurrencyUtil.getNameByCode(trade.getOffer().getCurrencyCode()); + String nameByCode = CurrencyUtil.getNameByCode(trade.getOffer().getCurrencyCode(), Preferences.getDefaultLocale()); Contract contract = trade.getContract(); if (contract != null) { PaymentAccountContractData myPaymentAccountContractData = contract.getSellerPaymentAccountContractData(); @@ -237,7 +237,7 @@ public class SellerStep3View extends TradeStepView { String key = "confirmPaymentReceived"; if (!DevEnv.DEV_MODE && preferences.showAgain(key)) { PaymentAccountContractData paymentAccountContractData = model.dataModel.getSellersPaymentAccountContractData(); - String message = Res.get("portfolio.pending.step3_seller.onPaymentReceived.part1", CurrencyUtil.getNameByCode(model.dataModel.getCurrencyCode())); + String message = Res.get("portfolio.pending.step3_seller.onPaymentReceived.part1", CurrencyUtil.getNameByCode(model.dataModel.getCurrencyCode(), Preferences.getDefaultLocale())); if (!(paymentAccountContractData instanceof CryptoCurrencyAccountContractData)) { message += Res.get("portfolio.pending.step3_seller.onPaymentReceived.fiat", trade.getShortId()); diff --git a/gui/src/main/java/io/bisq/gui/main/settings/network/NetworkSettingsView.java b/gui/src/main/java/io/bisq/gui/main/settings/network/NetworkSettingsView.java index 18bc732b19..7d1cc5b135 100644 --- a/gui/src/main/java/io/bisq/gui/main/settings/network/NetworkSettingsView.java +++ b/gui/src/main/java/io/bisq/gui/main/settings/network/NetworkSettingsView.java @@ -29,8 +29,8 @@ import io.bisq.gui.components.TitledGroupBg; import io.bisq.gui.main.overlays.popups.Popup; import io.bisq.gui.util.BSFormatter; import io.bisq.locale.Res; -import io.bisq.messages.user.Preferences; -import io.bisq.p2p.P2PService; +import io.bisq.user.Preferences; +import io.bisq.p2p.storage.P2PService; import io.bisq.p2p.network.Statistic; import javafx.beans.value.ChangeListener; import javafx.collections.FXCollections; diff --git a/gui/src/main/java/io/bisq/gui/main/settings/preferences/PreferencesView.java b/gui/src/main/java/io/bisq/gui/main/settings/preferences/PreferencesView.java index 86a2ebeccc..d161e0a1c4 100644 --- a/gui/src/main/java/io/bisq/gui/main/settings/preferences/PreferencesView.java +++ b/gui/src/main/java/io/bisq/gui/main/settings/preferences/PreferencesView.java @@ -29,11 +29,10 @@ import io.bisq.gui.main.overlays.popups.Popup; import io.bisq.gui.util.BSFormatter; import io.bisq.gui.util.ImageUtil; import io.bisq.gui.util.Layout; -import io.bisq.locale.Res; -import io.bisq.messages.btc.provider.fee.FeeService; -import io.bisq.messages.locale.*; -import io.bisq.messages.user.BlockChainExplorer; -import io.bisq.messages.user.Preferences; +import io.bisq.locale.*; +import io.bisq.user.BlockChainExplorer; +import io.bisq.provider.fee.FeeService; +import io.bisq.user.Preferences; import javafx.beans.value.ChangeListener; import javafx.collections.FXCollections; import javafx.collections.ObservableList; diff --git a/gui/src/main/java/io/bisq/gui/util/BSFormatter.java b/gui/src/main/java/io/bisq/gui/util/BSFormatter.java index ed3782c0ca..986e8416d2 100644 --- a/gui/src/main/java/io/bisq/gui/util/BSFormatter.java +++ b/gui/src/main/java/io/bisq/gui/util/BSFormatter.java @@ -19,11 +19,12 @@ package io.bisq.gui.util; import io.bisq.common.util.MathUtils; import io.bisq.locale.Res; -import io.bisq.messages.locale.CurrencyUtil; -import io.bisq.messages.locale.LanguageUtil; -import io.bisq.messages.trade.offer.payload.Offer; -import io.bisq.messages.user.Preferences; -import io.bisq.p2p.NodeAddress; +import io.bisq.locale.CurrencyUtil; +import io.bisq.locale.LanguageUtil; +import io.bisq.messages.trade.offer.payload.OfferPayload; +import io.bisq.p2p.protocol.availability.Offer; +import io.bisq.user.Preferences; +import io.bisq.messages.NodeAddress; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.time.DurationFormatUtils; import org.bitcoinj.core.Coin; @@ -277,7 +278,7 @@ public class BSFormatter { public String formatVolumeLabel(String currencyCode, String postFix) { return Res.get("formatter.formatVolumeLabel", - CurrencyUtil.getNameByCode(currencyCode), + CurrencyUtil.getNameByCode(currencyCode, Preferences.getDefaultLocale()), postFix); } @@ -349,18 +350,18 @@ public class BSFormatter { return decimalFormat.format(MathUtils.roundDouble(value, precision)).replace(",", "."); } - public String getDirectionWithCode(Offer.Direction direction, String currencyCode) { + public String getDirectionWithCode(OfferPayload.Direction direction, String currencyCode) { if (CurrencyUtil.isFiatCurrency(currencyCode)) - return (direction == Offer.Direction.BUY) ? Res.get("shared.buyCurrency", "BTC") : Res.get("shared.sellCurrency", "BTC"); + return (direction == OfferPayload.Direction.BUY) ? Res.get("shared.buyCurrency", "BTC") : Res.get("shared.sellCurrency", "BTC"); else - return (direction == Offer.Direction.SELL) ? Res.get("shared.buyCurrency", currencyCode) : Res.get("shared.sellCurrency", currencyCode); + return (direction == OfferPayload.Direction.SELL) ? Res.get("shared.buyCurrency", currencyCode) : Res.get("shared.sellCurrency", currencyCode); } - public String getDirectionWithCodeDetailed(Offer.Direction direction, String currencyCode) { + public String getDirectionWithCodeDetailed(OfferPayload.Direction direction, String currencyCode) { if (CurrencyUtil.isFiatCurrency(currencyCode)) - return (direction == Offer.Direction.BUY) ? Res.get("shared.buyingBTCWith", currencyCode) : Res.get("shared.sellingBTCFor", currencyCode); + return (direction == OfferPayload.Direction.BUY) ? Res.get("shared.buyingBTCWith", currencyCode) : Res.get("shared.sellingBTCFor", currencyCode); else - return (direction == Offer.Direction.SELL) ? Res.get("shared.buyingCurrency", currencyCode) : Res.get("shared.sellingCurrency", currencyCode); + return (direction == OfferPayload.Direction.SELL) ? Res.get("shared.buyingCurrency", currencyCode) : Res.get("shared.sellingCurrency", currencyCode); } public String arbitratorAddressesToString(List nodeAddresses) { @@ -526,15 +527,15 @@ public class BSFormatter { return value ? Res.get("shared.yes") : Res.get("shared.no"); } - public String getDirectionBothSides(Offer.Direction direction, String currencyCode) { + public String getDirectionBothSides(OfferPayload.Direction direction, String currencyCode) { if (CurrencyUtil.isFiatCurrency(currencyCode)) { currencyCode = "BTC"; - return direction == Offer.Direction.BUY ? + return direction == OfferPayload.Direction.BUY ? Res.get("formatter.makerTaker", currencyCode, Res.get("shared.buyer"), currencyCode, Res.get("shared.seller")) : Res.get("formatter.makerTaker", currencyCode, Res.get("shared.seller"), currencyCode, Res.get("shared.buyer")); } else { String code = currencyCode; - return direction == Offer.Direction.SELL ? + return direction == OfferPayload.Direction.SELL ? Res.get("formatter.makerTaker", code, Res.get("shared.buyer"), code, Res.get("shared.seller")) : Res.get("formatter.makerTaker", code, Res.get("shared.seller"), code, Res.get("shared.buyer")); } @@ -568,29 +569,29 @@ public class BSFormatter { } } - public String getDirectionForTakeOffer(Offer.Direction direction, String currencyCode) { + public String getDirectionForTakeOffer(OfferPayload.Direction direction, String currencyCode) { if (CurrencyUtil.isFiatCurrency(currencyCode)) { String btc = "BTC"; - return direction == Offer.Direction.BUY ? + return direction == OfferPayload.Direction.BUY ? Res.get("formatter.youAre", Res.get("shared.selling"), btc, Res.get("shared.buying"), currencyCode) : Res.get("formatter.youAre", Res.get("shared.buying"), btc, Res.get("shared.selling"), currencyCode); } else { String btc = "BTC"; - return direction == Offer.Direction.SELL ? + return direction == OfferPayload.Direction.SELL ? Res.get("formatter.youAre", Res.get("shared.selling"), currencyCode, Res.get("shared.buying"), btc) : Res.get("formatter.youAre", Res.get("shared.buying"), currencyCode, Res.get("shared.selling"), btc); } } - public String getOfferDirectionForCreateOffer(Offer.Direction direction, String currencyCode) { + public String getOfferDirectionForCreateOffer(OfferPayload.Direction direction, String currencyCode) { if (CurrencyUtil.isFiatCurrency(currencyCode)) { String btc = "BTC"; - return direction == Offer.Direction.BUY ? + return direction == OfferPayload.Direction.BUY ? Res.get("formatter.youAreCreatingAnOffer.fiat", Res.get("shared.buy"), btc) : Res.get("formatter.youAreCreatingAnOffer.fiat", Res.get("shared.sell"), btc); } else { String btc = "BTC"; - return direction == Offer.Direction.SELL ? + return direction == OfferPayload.Direction.SELL ? Res.get("formatter.youAreCreatingAnOffer.altcoin", Res.get("shared.buy"), currencyCode, Res.get("shared.selling"), btc) : Res.get("formatter.youAreCreatingAnOffer.altcoin", Res.get("shared.sell"), currencyCode, Res.get("shared.buying"), btc); } @@ -659,7 +660,7 @@ public class BSFormatter { } public String getCurrencyNameAndCurrencyPair(String currencyCode) { - return CurrencyUtil.getNameByCode(currencyCode) + " (" + getCurrencyPair(currencyCode) + ")"; + return CurrencyUtil.getNameByCode(currencyCode, Preferences.getDefaultLocale()) + " (" + getCurrencyPair(currencyCode) + ")"; } public String getPriceWithCurrencyCode(String currencyCode) { diff --git a/gui/src/main/java/io/bisq/gui/util/CurrencyListItem.java b/gui/src/main/java/io/bisq/gui/util/CurrencyListItem.java index f1f1d9f7cb..5989119606 100644 --- a/gui/src/main/java/io/bisq/gui/util/CurrencyListItem.java +++ b/gui/src/main/java/io/bisq/gui/util/CurrencyListItem.java @@ -17,7 +17,7 @@ package io.bisq.gui.util; -import io.bisq.messages.locale.TradeCurrency; +import io.bisq.locale.TradeCurrency; public class CurrencyListItem { public final TradeCurrency tradeCurrency; diff --git a/gui/src/main/java/io/bisq/gui/util/GUIUtil.java b/gui/src/main/java/io/bisq/gui/util/GUIUtil.java index 30212bb7a6..550b6284f3 100644 --- a/gui/src/main/java/io/bisq/gui/util/GUIUtil.java +++ b/gui/src/main/java/io/bisq/gui/util/GUIUtil.java @@ -27,9 +27,9 @@ import io.bisq.common.util.Utilities; import io.bisq.gui.components.indicator.TxConfidenceIndicator; import io.bisq.gui.main.overlays.popups.Popup; import io.bisq.locale.Res; -import io.bisq.messages.locale.CurrencyUtil; -import io.bisq.messages.locale.TradeCurrency; -import io.bisq.messages.user.Preferences; +import io.bisq.locale.CurrencyUtil; +import io.bisq.locale.TradeCurrency; +import io.bisq.user.Preferences; import io.bisq.payment.PaymentAccount; import io.bisq.storage.Storage; import io.bisq.user.User; diff --git a/gui/src/main/java/io/bisq/gui/util/ImageUtil.java b/gui/src/main/java/io/bisq/gui/util/ImageUtil.java index c30d0aefb7..298bda4d7a 100644 --- a/gui/src/main/java/io/bisq/gui/util/ImageUtil.java +++ b/gui/src/main/java/io/bisq/gui/util/ImageUtil.java @@ -18,7 +18,7 @@ package io.bisq.gui.util; import com.sun.javafx.tk.quantum.QuantumToolkit; -import io.bisq.messages.locale.Country; +import io.bisq.locale.Country; import javafx.scene.image.Image; import javafx.scene.image.ImageView; import org.slf4j.Logger; diff --git a/gui/src/main/java/io/bisq/gui/util/Transitions.java b/gui/src/main/java/io/bisq/gui/util/Transitions.java index f6875cb727..393cd6e363 100644 --- a/gui/src/main/java/io/bisq/gui/util/Transitions.java +++ b/gui/src/main/java/io/bisq/gui/util/Transitions.java @@ -18,7 +18,7 @@ package io.bisq.gui.util; import io.bisq.common.UserThread; -import io.bisq.messages.user.Preferences; +import io.bisq.user.Preferences; import javafx.animation.*; import javafx.event.ActionEvent; import javafx.event.EventHandler; diff --git a/gui/src/main/java/io/bisq/gui/util/validation/AccountNrValidator.java b/gui/src/main/java/io/bisq/gui/util/validation/AccountNrValidator.java index 473e3c2b6d..0262ea16a5 100644 --- a/gui/src/main/java/io/bisq/gui/util/validation/AccountNrValidator.java +++ b/gui/src/main/java/io/bisq/gui/util/validation/AccountNrValidator.java @@ -19,7 +19,7 @@ package io.bisq.gui.util.validation; import io.bisq.locale.Res; -import io.bisq.messages.locale.BankUtil; +import io.bisq.locale.BankUtil; import org.apache.commons.lang3.StringUtils; public final class AccountNrValidator extends BankValidator { diff --git a/gui/src/main/java/io/bisq/gui/util/validation/BankIdValidator.java b/gui/src/main/java/io/bisq/gui/util/validation/BankIdValidator.java index f87cbd03b5..ea73de5ac7 100644 --- a/gui/src/main/java/io/bisq/gui/util/validation/BankIdValidator.java +++ b/gui/src/main/java/io/bisq/gui/util/validation/BankIdValidator.java @@ -19,7 +19,7 @@ package io.bisq.gui.util.validation; import io.bisq.locale.Res; -import io.bisq.messages.locale.BankUtil; +import io.bisq.locale.BankUtil; public final class BankIdValidator extends BankValidator { public BankIdValidator(String countryCode) { diff --git a/gui/src/main/java/io/bisq/gui/util/validation/BranchIdValidator.java b/gui/src/main/java/io/bisq/gui/util/validation/BranchIdValidator.java index c4023e4852..ae4fe85c60 100644 --- a/gui/src/main/java/io/bisq/gui/util/validation/BranchIdValidator.java +++ b/gui/src/main/java/io/bisq/gui/util/validation/BranchIdValidator.java @@ -19,7 +19,7 @@ package io.bisq.gui.util.validation; import io.bisq.locale.Res; -import io.bisq.messages.locale.BankUtil; +import io.bisq.locale.BankUtil; public final class BranchIdValidator extends BankValidator { diff --git a/gui/src/main/java/io/bisq/gui/util/validation/BtcAddressValidator.java b/gui/src/main/java/io/bisq/gui/util/validation/BtcAddressValidator.java index 39da9e12ce..786ff10011 100644 --- a/gui/src/main/java/io/bisq/gui/util/validation/BtcAddressValidator.java +++ b/gui/src/main/java/io/bisq/gui/util/validation/BtcAddressValidator.java @@ -18,7 +18,7 @@ package io.bisq.gui.util.validation; import io.bisq.locale.Res; -import io.bisq.messages.user.Preferences; +import io.bisq.user.Preferences; import org.bitcoinj.core.Address; import org.bitcoinj.core.AddressFormatException; diff --git a/gui/src/test/java/io/bisq/gui/main/market/trades/TradesChartsViewModelTest.java b/gui/src/test/java/io/bisq/gui/main/market/trades/TradesChartsViewModelTest.java index 78f09b0234..7f7d8f89ab 100644 --- a/gui/src/test/java/io/bisq/gui/main/market/trades/TradesChartsViewModelTest.java +++ b/gui/src/test/java/io/bisq/gui/main/market/trades/TradesChartsViewModelTest.java @@ -1,7 +1,7 @@ package io.bisq.gui.main.market.trades; import io.bisq.gui.main.market.trades.charts.CandleData; -import io.bisq.messages.trade.offer.payload.Offer; +import io.bisq.messages.trade.offer.payload.OfferPayload; import io.bisq.messages.trade.statistics.payload.TradeStatistics; import org.bitcoinj.core.Coin; import org.bitcoinj.utils.Fiat; @@ -37,7 +37,7 @@ public class TradesChartsViewModelTest { Set set = new HashSet<>(); final Date now = new Date(); - Offer offer = new Offer(null, + OfferPayload offer = new OfferPayload(null, null, null, null, @@ -56,8 +56,6 @@ public class TradesChartsViewModelTest { null, null, null, - null, - null, 0, 0, diff --git a/gui/src/test/java/io/bisq/gui/main/offer/offerbook/OfferBookViewModelTest.java b/gui/src/test/java/io/bisq/gui/main/offer/offerbook/OfferBookViewModelTest.java index e1b600b099..68f3744403 100644 --- a/gui/src/test/java/io/bisq/gui/main/offer/offerbook/OfferBookViewModelTest.java +++ b/gui/src/test/java/io/bisq/gui/main/offer/offerbook/OfferBookViewModelTest.java @@ -1,14 +1,15 @@ package io.bisq.gui.main.offer.offerbook; -import io.bisq.messages.locale.Country; -import io.bisq.messages.locale.CryptoCurrency; -import io.bisq.messages.locale.FiatCurrency; +import io.bisq.locale.Country; +import io.bisq.locale.CryptoCurrency; +import io.bisq.locale.FiatCurrency; import io.bisq.messages.payment.PaymentMethod; import io.bisq.messages.payment.payload.NationalBankAccountContractData; import io.bisq.messages.payment.payload.SameBankAccountContractData; import io.bisq.messages.payment.payload.SepaAccountContractData; import io.bisq.messages.payment.payload.SpecificBanksAccountContractData; -import io.bisq.messages.trade.offer.payload.Offer; +import io.bisq.messages.trade.offer.payload.OfferPayload; +import io.bisq.p2p.protocol.availability.Offer; import io.bisq.payment.*; import org.junit.Test; import org.slf4j.Logger; @@ -266,7 +267,7 @@ public class OfferBookViewModelTest { private Offer getOffer(String tradeCurrencyCode, String paymentMethodId, String countryCode, ArrayList acceptedCountryCodes, String bankId, ArrayList acceptedBanks) { - return new Offer(null, + return new Offer( new OfferPayload(null, null, null, null, @@ -285,8 +286,6 @@ public class OfferBookViewModelTest { acceptedCountryCodes, bankId, acceptedBanks, - null, - null, 0, 0, @@ -300,6 +299,6 @@ public class OfferBookViewModelTest { 0, false, null, - null); + null)); } } diff --git a/headless/src/main/java/io/bisq/headless/Headless.java b/headless/src/main/java/io/bisq/headless/Headless.java index 5253930efa..0acce67589 100644 --- a/headless/src/main/java/io/bisq/headless/Headless.java +++ b/headless/src/main/java/io/bisq/headless/Headless.java @@ -16,7 +16,7 @@ import io.bisq.common.UserThread; import io.bisq.common.handlers.ResultHandler; import io.bisq.common.util.LimitedKeyStrengthException; import io.bisq.common.util.Utilities; -import io.bisq.p2p.P2PService; +import io.bisq.p2p.storage.P2PService; import io.bisq.p2p.P2PServiceListener; import io.bisq.trade.offer.OfferBookService; import io.bisq.trade.offer.OpenOfferManager; diff --git a/headless/src/main/java/io/bisq/headless/HeadlessModule.java b/headless/src/main/java/io/bisq/headless/HeadlessModule.java index 0d503c6ec6..621fb35966 100644 --- a/headless/src/main/java/io/bisq/headless/HeadlessModule.java +++ b/headless/src/main/java/io/bisq/headless/HeadlessModule.java @@ -24,12 +24,12 @@ import io.bisq.app.BisqEnvironment; import io.bisq.arbitration.ArbitratorModule; import io.bisq.btc.BitcoinModule; import io.bisq.common.Clock; -import io.bisq.common.crypto.KeyRing; -import io.bisq.common.crypto.KeyStorage; +import io.bisq.messages.crypto.KeyRing; +import io.bisq.messages.crypto.KeyStorage; import io.bisq.crypto.EncryptionServiceModule; import io.bisq.dao.DaoModule; import io.bisq.filter.FilterModule; -import io.bisq.messages.user.Preferences; +import io.bisq.user.Preferences; import io.bisq.p2p.P2PModule; import io.bisq.storage.Storage; import io.bisq.trade.TradeModule; diff --git a/monitor/src/main/java/io/bisq/monitor/Gateway.java b/monitor/src/main/java/io/bisq/monitor/Gateway.java index f38cd7c0c9..4ac818f4b1 100644 --- a/monitor/src/main/java/io/bisq/monitor/Gateway.java +++ b/monitor/src/main/java/io/bisq/monitor/Gateway.java @@ -1,6 +1,6 @@ package io.bisq.monitor; -import io.bisq.messages.trade.offer.payload.Offer; +import io.bisq.p2p.protocol.availability.Offer; import io.bisq.trade.offer.OfferBookService; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/monitor/src/main/java/io/bisq/monitor/Monitor.java b/monitor/src/main/java/io/bisq/monitor/Monitor.java index d143c0ef68..2c2d38a88a 100644 --- a/monitor/src/main/java/io/bisq/monitor/Monitor.java +++ b/monitor/src/main/java/io/bisq/monitor/Monitor.java @@ -16,7 +16,7 @@ import io.bisq.common.UserThread; import io.bisq.common.handlers.ResultHandler; import io.bisq.common.util.LimitedKeyStrengthException; import io.bisq.common.util.Utilities; -import io.bisq.p2p.P2PService; +import io.bisq.p2p.storage.P2PService; import io.bisq.p2p.P2PServiceListener; import io.bisq.trade.offer.OfferBookService; import io.bisq.trade.offer.OpenOfferManager; diff --git a/monitor/src/main/java/io/bisq/monitor/MonitorModule.java b/monitor/src/main/java/io/bisq/monitor/MonitorModule.java index 4127bc9770..8f8ec233a0 100644 --- a/monitor/src/main/java/io/bisq/monitor/MonitorModule.java +++ b/monitor/src/main/java/io/bisq/monitor/MonitorModule.java @@ -24,12 +24,12 @@ import io.bisq.app.BisqEnvironment; import io.bisq.arbitration.ArbitratorModule; import io.bisq.btc.BitcoinModule; import io.bisq.common.Clock; -import io.bisq.common.crypto.KeyRing; -import io.bisq.common.crypto.KeyStorage; +import io.bisq.messages.crypto.KeyRing; +import io.bisq.messages.crypto.KeyStorage; import io.bisq.crypto.EncryptionServiceModule; import io.bisq.dao.DaoModule; import io.bisq.filter.FilterModule; -import io.bisq.messages.user.Preferences; +import io.bisq.user.Preferences; import io.bisq.p2p.P2PModule; import io.bisq.storage.Storage; import io.bisq.trade.TradeModule; diff --git a/network-messages/pom.xml b/network-messages/pom.xml new file mode 100644 index 0000000000..e49f8960c8 --- /dev/null +++ b/network-messages/pom.xml @@ -0,0 +1,61 @@ + + + + parent + io.bisq + 0.5.0.0 + + 4.0.0 + + network-messages + + + + io.bisq + common + ${project.parent.version} + + + com.google.protobuf + protobuf-java + 3.2.0 + + + org.apache.httpcomponents + httpclient + 4.5 + + + commons-logging + commons-logging + + + + + + + + + + + org.xolstice.maven.plugins + protobuf-maven-plugin + 0.5.0 + + /usr/local/bin/protoc + + + + + compile + test-compile + + + + + + + + \ No newline at end of file diff --git a/network/src/main/java/io/bisq/p2p/network/messages/AnonymousMessage.java b/network-messages/src/main/java/io/bisq/messages/AnonymousMessage.java similarity index 70% rename from network/src/main/java/io/bisq/p2p/network/messages/AnonymousMessage.java rename to network-messages/src/main/java/io/bisq/messages/AnonymousMessage.java index f7618823f5..d00f18c204 100644 --- a/network/src/main/java/io/bisq/p2p/network/messages/AnonymousMessage.java +++ b/network-messages/src/main/java/io/bisq/messages/AnonymousMessage.java @@ -1,4 +1,4 @@ -package io.bisq.p2p.network.messages; +package io.bisq.messages; import io.bisq.messages.Message; diff --git a/network/src/main/java/io/bisq/p2p/network/messages/CloseConnectionMessage.java b/network-messages/src/main/java/io/bisq/messages/CloseConnectionMessage.java similarity index 95% rename from network/src/main/java/io/bisq/p2p/network/messages/CloseConnectionMessage.java rename to network-messages/src/main/java/io/bisq/messages/CloseConnectionMessage.java index 7aeb0690bd..3970718730 100644 --- a/network/src/main/java/io/bisq/p2p/network/messages/CloseConnectionMessage.java +++ b/network-messages/src/main/java/io/bisq/messages/CloseConnectionMessage.java @@ -1,8 +1,7 @@ -package io.bisq.p2p.network.messages; +package io.bisq.messages; import io.bisq.app.Version; import io.bisq.common.wire.proto.Messages; -import io.bisq.messages.Message; public final class CloseConnectionMessage implements Message { // That object is sent over the wire, so we need to take care of version compatibility. diff --git a/network/src/main/java/io/bisq/p2p/messaging/DecryptedDirectMessageListener.java b/network-messages/src/main/java/io/bisq/messages/DecryptedDirectMessageListener.java similarity index 58% rename from network/src/main/java/io/bisq/p2p/messaging/DecryptedDirectMessageListener.java rename to network-messages/src/main/java/io/bisq/messages/DecryptedDirectMessageListener.java index dc77a42cc0..20734f01e7 100644 --- a/network/src/main/java/io/bisq/p2p/messaging/DecryptedDirectMessageListener.java +++ b/network-messages/src/main/java/io/bisq/messages/DecryptedDirectMessageListener.java @@ -1,7 +1,4 @@ -package io.bisq.p2p.messaging; - -import io.bisq.crypto.DecryptedMsgWithPubKey; -import io.bisq.p2p.NodeAddress; +package io.bisq.messages; public interface DecryptedDirectMessageListener { diff --git a/network/src/main/java/io/bisq/crypto/DecryptedMsgWithPubKey.java b/network-messages/src/main/java/io/bisq/messages/DecryptedMsgWithPubKey.java similarity index 97% rename from network/src/main/java/io/bisq/crypto/DecryptedMsgWithPubKey.java rename to network-messages/src/main/java/io/bisq/messages/DecryptedMsgWithPubKey.java index d90d53d19d..d3ac80b6e8 100644 --- a/network/src/main/java/io/bisq/crypto/DecryptedMsgWithPubKey.java +++ b/network-messages/src/main/java/io/bisq/messages/DecryptedMsgWithPubKey.java @@ -15,11 +15,10 @@ * along with bisq. If not, see . */ -package io.bisq.crypto; +package io.bisq.messages; import io.bisq.app.Version; import io.bisq.common.persistance.Persistable; -import io.bisq.messages.Message; import java.security.PublicKey; diff --git a/common/src/main/java/io/bisq/messages/Message.java b/network-messages/src/main/java/io/bisq/messages/Message.java similarity index 100% rename from common/src/main/java/io/bisq/messages/Message.java rename to network-messages/src/main/java/io/bisq/messages/Message.java diff --git a/network/src/main/java/io/bisq/p2p/NodeAddress.java b/network-messages/src/main/java/io/bisq/messages/NodeAddress.java similarity index 95% rename from network/src/main/java/io/bisq/p2p/NodeAddress.java rename to network-messages/src/main/java/io/bisq/messages/NodeAddress.java index c3c9a1a1e7..c05c5fe5af 100644 --- a/network/src/main/java/io/bisq/p2p/NodeAddress.java +++ b/network-messages/src/main/java/io/bisq/messages/NodeAddress.java @@ -1,9 +1,9 @@ -package io.bisq.p2p; +package io.bisq.messages; import io.bisq.app.Version; -import io.bisq.common.crypto.Hash; +import io.bisq.messages.crypto.Hash; import io.bisq.common.persistance.Persistable; -import io.bisq.common.wire.Payload; +import io.bisq.messages.wire.Payload; import io.bisq.common.wire.proto.Messages; import lombok.Getter; diff --git a/network/src/main/java/io/bisq/p2p/network/messages/SendersNodeAddressMessage.java b/network-messages/src/main/java/io/bisq/messages/SendersNodeAddressMessage.java similarity index 50% rename from network/src/main/java/io/bisq/p2p/network/messages/SendersNodeAddressMessage.java rename to network-messages/src/main/java/io/bisq/messages/SendersNodeAddressMessage.java index dc69d0f69e..cf4d75c8a6 100644 --- a/network/src/main/java/io/bisq/p2p/network/messages/SendersNodeAddressMessage.java +++ b/network-messages/src/main/java/io/bisq/messages/SendersNodeAddressMessage.java @@ -1,7 +1,5 @@ -package io.bisq.p2p.network.messages; +package io.bisq.messages; -import io.bisq.messages.Message; -import io.bisq.p2p.NodeAddress; public interface SendersNodeAddressMessage extends Message { NodeAddress getSenderNodeAddress(); diff --git a/common/src/main/java/io/bisq/messages/ToProtoBuffer.java b/network-messages/src/main/java/io/bisq/messages/ToProtoBuffer.java similarity index 100% rename from common/src/main/java/io/bisq/messages/ToProtoBuffer.java rename to network-messages/src/main/java/io/bisq/messages/ToProtoBuffer.java diff --git a/network/src/main/java/io/bisq/messages/arbitration/DisputeResult.java b/network-messages/src/main/java/io/bisq/messages/arbitration/DisputeResult.java similarity index 99% rename from network/src/main/java/io/bisq/messages/arbitration/DisputeResult.java rename to network-messages/src/main/java/io/bisq/messages/arbitration/DisputeResult.java index 041ba79010..2a6950a28e 100644 --- a/network/src/main/java/io/bisq/messages/arbitration/DisputeResult.java +++ b/network-messages/src/main/java/io/bisq/messages/arbitration/DisputeResult.java @@ -19,7 +19,7 @@ package io.bisq.messages.arbitration; import com.google.protobuf.ByteString; import io.bisq.app.Version; -import io.bisq.common.wire.Payload; +import io.bisq.messages.wire.Payload; import io.bisq.common.wire.proto.Messages; import javafx.beans.property.*; import lombok.EqualsAndHashCode; diff --git a/common/src/main/java/io/bisq/common/crypto/DecryptedDataTuple.java b/network-messages/src/main/java/io/bisq/messages/crypto/DecryptedDataTuple.java similarity index 98% rename from common/src/main/java/io/bisq/common/crypto/DecryptedDataTuple.java rename to network-messages/src/main/java/io/bisq/messages/crypto/DecryptedDataTuple.java index fa587ecca0..20f276da81 100644 --- a/common/src/main/java/io/bisq/common/crypto/DecryptedDataTuple.java +++ b/network-messages/src/main/java/io/bisq/messages/crypto/DecryptedDataTuple.java @@ -15,7 +15,7 @@ * along with bisq. If not, see . */ -package io.bisq.common.crypto; +package io.bisq.messages.crypto; import io.bisq.messages.Message; diff --git a/common/src/main/java/io/bisq/common/crypto/Encryption.java b/network-messages/src/main/java/io/bisq/messages/crypto/Encryption.java similarity index 98% rename from common/src/main/java/io/bisq/common/crypto/Encryption.java rename to network-messages/src/main/java/io/bisq/messages/crypto/Encryption.java index 157cc06b67..6d48897dc8 100644 --- a/common/src/main/java/io/bisq/common/crypto/Encryption.java +++ b/network-messages/src/main/java/io/bisq/messages/crypto/Encryption.java @@ -15,12 +15,14 @@ * along with bisq. If not, see . */ -package io.bisq.common.crypto; +package io.bisq.messages.crypto; +import io.bisq.common.crypto.Sig; import io.bisq.messages.Message; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.spongycastle.util.encoders.Hex; +import io.bisq.common.crypto.CryptoException; import javax.crypto.Cipher; import javax.crypto.KeyGenerator; diff --git a/common/src/main/java/io/bisq/common/crypto/Hash.java b/network-messages/src/main/java/io/bisq/messages/crypto/Hash.java similarity index 98% rename from common/src/main/java/io/bisq/common/crypto/Hash.java rename to network-messages/src/main/java/io/bisq/messages/crypto/Hash.java index 64ef6b42ba..93f5cd0e0c 100644 --- a/common/src/main/java/io/bisq/common/crypto/Hash.java +++ b/network-messages/src/main/java/io/bisq/messages/crypto/Hash.java @@ -15,7 +15,7 @@ * along with bisq. If not, see . */ -package io.bisq.common.crypto; +package io.bisq.messages.crypto; import com.google.common.base.Charsets; import io.bisq.messages.ToProtoBuffer; diff --git a/common/src/main/java/io/bisq/common/crypto/KeyRing.java b/network-messages/src/main/java/io/bisq/messages/crypto/KeyRing.java similarity index 97% rename from common/src/main/java/io/bisq/common/crypto/KeyRing.java rename to network-messages/src/main/java/io/bisq/messages/crypto/KeyRing.java index 614a66f50e..2e0801aa64 100644 --- a/common/src/main/java/io/bisq/common/crypto/KeyRing.java +++ b/network-messages/src/main/java/io/bisq/messages/crypto/KeyRing.java @@ -15,7 +15,9 @@ * along with bisq. If not, see . */ -package io.bisq.common.crypto; +package io.bisq.messages.crypto; + +import io.bisq.common.crypto.Sig; import javax.inject.Inject; import java.security.KeyPair; diff --git a/common/src/main/java/io/bisq/common/crypto/KeyStorage.java b/network-messages/src/main/java/io/bisq/messages/crypto/KeyStorage.java similarity index 98% rename from common/src/main/java/io/bisq/common/crypto/KeyStorage.java rename to network-messages/src/main/java/io/bisq/messages/crypto/KeyStorage.java index 311f522f92..7aed9a562d 100644 --- a/common/src/main/java/io/bisq/common/crypto/KeyStorage.java +++ b/network-messages/src/main/java/io/bisq/messages/crypto/KeyStorage.java @@ -15,9 +15,10 @@ * along with bisq. If not, see . */ -package io.bisq.common.crypto; +package io.bisq.messages.crypto; import com.google.inject.Inject; +import io.bisq.common.crypto.Sig; import io.bisq.storage.FileUtil; import org.jetbrains.annotations.NotNull; import org.slf4j.Logger; diff --git a/common/src/main/java/io/bisq/common/crypto/PubKeyRing.java b/network-messages/src/main/java/io/bisq/messages/crypto/PubKeyRing.java similarity index 97% rename from common/src/main/java/io/bisq/common/crypto/PubKeyRing.java rename to network-messages/src/main/java/io/bisq/messages/crypto/PubKeyRing.java index 9e3c38316e..48e22333ea 100644 --- a/common/src/main/java/io/bisq/common/crypto/PubKeyRing.java +++ b/network-messages/src/main/java/io/bisq/messages/crypto/PubKeyRing.java @@ -15,12 +15,13 @@ * along with bisq. If not, see . */ -package io.bisq.common.crypto; +package io.bisq.messages.crypto; import com.google.protobuf.ByteString; import io.bisq.app.Version; -import io.bisq.common.wire.Payload; +import io.bisq.common.crypto.Sig; import io.bisq.common.wire.proto.Messages; +import io.bisq.messages.wire.Payload; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/common/src/main/java/io/bisq/common/crypto/SealedAndSigned.java b/network-messages/src/main/java/io/bisq/messages/crypto/SealedAndSigned.java similarity index 97% rename from common/src/main/java/io/bisq/common/crypto/SealedAndSigned.java rename to network-messages/src/main/java/io/bisq/messages/crypto/SealedAndSigned.java index 4777a727e3..818817f25b 100644 --- a/common/src/main/java/io/bisq/common/crypto/SealedAndSigned.java +++ b/network-messages/src/main/java/io/bisq/messages/crypto/SealedAndSigned.java @@ -15,11 +15,12 @@ * along with bisq. If not, see . */ -package io.bisq.common.crypto; +package io.bisq.messages.crypto; import com.google.protobuf.ByteString; import io.bisq.app.Version; -import io.bisq.common.wire.Payload; +import io.bisq.common.crypto.Sig; +import io.bisq.messages.wire.Payload; import io.bisq.common.wire.proto.Messages; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/network/src/main/java/io/bisq/p2p/messaging/DecryptedMailboxListener.java b/network-messages/src/main/java/io/bisq/messages/p2p/messaging/DecryptedMailboxListener.java similarity index 55% rename from network/src/main/java/io/bisq/p2p/messaging/DecryptedMailboxListener.java rename to network-messages/src/main/java/io/bisq/messages/p2p/messaging/DecryptedMailboxListener.java index cc31754cf8..0651c9522c 100644 --- a/network/src/main/java/io/bisq/p2p/messaging/DecryptedMailboxListener.java +++ b/network-messages/src/main/java/io/bisq/messages/p2p/messaging/DecryptedMailboxListener.java @@ -1,7 +1,8 @@ -package io.bisq.p2p.messaging; +package io.bisq.messages.p2p.messaging; -import io.bisq.crypto.DecryptedMsgWithPubKey; -import io.bisq.p2p.NodeAddress; + +import io.bisq.messages.DecryptedMsgWithPubKey; +import io.bisq.messages.NodeAddress; public interface DecryptedMailboxListener { diff --git a/network/src/main/java/io/bisq/p2p/messaging/DirectMessage.java b/network-messages/src/main/java/io/bisq/messages/p2p/messaging/DirectMessage.java similarity index 95% rename from network/src/main/java/io/bisq/p2p/messaging/DirectMessage.java rename to network-messages/src/main/java/io/bisq/messages/p2p/messaging/DirectMessage.java index 7644b6e8ca..6df661f915 100644 --- a/network/src/main/java/io/bisq/p2p/messaging/DirectMessage.java +++ b/network-messages/src/main/java/io/bisq/messages/p2p/messaging/DirectMessage.java @@ -15,7 +15,7 @@ * along with bisq. If not, see . */ -package io.bisq.p2p.messaging; +package io.bisq.messages.p2p.messaging; import io.bisq.messages.Message; diff --git a/network/src/main/java/io/bisq/p2p/messaging/MailboxMessage.java b/network-messages/src/main/java/io/bisq/messages/p2p/messaging/MailboxMessage.java similarity index 91% rename from network/src/main/java/io/bisq/p2p/messaging/MailboxMessage.java rename to network-messages/src/main/java/io/bisq/messages/p2p/messaging/MailboxMessage.java index 0542b2259e..7093acb571 100644 --- a/network/src/main/java/io/bisq/p2p/messaging/MailboxMessage.java +++ b/network-messages/src/main/java/io/bisq/messages/p2p/messaging/MailboxMessage.java @@ -15,10 +15,10 @@ * along with bisq. If not, see . */ -package io.bisq.p2p.messaging; +package io.bisq.messages.p2p.messaging; -import io.bisq.p2p.NodeAddress; +import io.bisq.messages.NodeAddress; public interface MailboxMessage extends DirectMessage { NodeAddress getSenderNodeAddress(); diff --git a/network/src/main/java/io/bisq/p2p/messaging/PrefixedSealedAndSignedMessage.java b/network-messages/src/main/java/io/bisq/messages/p2p/messaging/PrefixedSealedAndSignedMessage.java similarity index 93% rename from network/src/main/java/io/bisq/p2p/messaging/PrefixedSealedAndSignedMessage.java rename to network-messages/src/main/java/io/bisq/messages/p2p/messaging/PrefixedSealedAndSignedMessage.java index 6a8372448f..b5533d7709 100644 --- a/network/src/main/java/io/bisq/p2p/messaging/PrefixedSealedAndSignedMessage.java +++ b/network-messages/src/main/java/io/bisq/messages/p2p/messaging/PrefixedSealedAndSignedMessage.java @@ -1,11 +1,11 @@ -package io.bisq.p2p.messaging; +package io.bisq.messages.p2p.messaging; import com.google.protobuf.ByteString; import io.bisq.app.Version; -import io.bisq.common.crypto.SealedAndSigned; +import io.bisq.messages.crypto.SealedAndSigned; import io.bisq.common.wire.proto.Messages; -import io.bisq.p2p.NodeAddress; -import io.bisq.p2p.network.messages.SendersNodeAddressMessage; +import io.bisq.messages.NodeAddress; +import io.bisq.messages.SendersNodeAddressMessage; import java.util.Arrays; import java.util.UUID; diff --git a/network/src/main/java/io/bisq/p2p/messaging/SendDirectMessageListener.java b/network-messages/src/main/java/io/bisq/messages/p2p/messaging/SendDirectMessageListener.java similarity index 69% rename from network/src/main/java/io/bisq/p2p/messaging/SendDirectMessageListener.java rename to network-messages/src/main/java/io/bisq/messages/p2p/messaging/SendDirectMessageListener.java index 5835b7848b..afc89cf44b 100644 --- a/network/src/main/java/io/bisq/p2p/messaging/SendDirectMessageListener.java +++ b/network-messages/src/main/java/io/bisq/messages/p2p/messaging/SendDirectMessageListener.java @@ -1,4 +1,4 @@ -package io.bisq.p2p.messaging; +package io.bisq.messages.p2p.messaging; public interface SendDirectMessageListener { void onArrived(); diff --git a/network/src/main/java/io/bisq/messages/trade/offer/payload/Offer.java b/network-messages/src/main/java/io/bisq/messages/trade/offer/payload/OfferPayload.java similarity index 51% rename from network/src/main/java/io/bisq/messages/trade/offer/payload/Offer.java rename to network-messages/src/main/java/io/bisq/messages/trade/offer/payload/OfferPayload.java index 554e07ed3a..546d73efdb 100644 --- a/network/src/main/java/io/bisq/messages/trade/offer/payload/Offer.java +++ b/network-messages/src/main/java/io/bisq/messages/trade/offer/payload/OfferPayload.java @@ -17,45 +17,30 @@ package io.bisq.messages.trade.offer.payload; -import com.google.common.base.Preconditions; import com.google.common.collect.Lists; import com.google.common.collect.Maps; import io.bisq.app.DevEnv; import io.bisq.app.Version; -import io.bisq.common.crypto.KeyRing; -import io.bisq.common.crypto.PubKeyRing; -import io.bisq.common.handlers.ErrorMessageHandler; -import io.bisq.common.handlers.ResultHandler; import io.bisq.common.util.JsonExclude; -import io.bisq.common.util.MathUtils; import io.bisq.common.util.Utilities; import io.bisq.common.wire.proto.Messages; -import io.bisq.locale.Res; +import io.bisq.messages.NodeAddress; import io.bisq.messages.btc.Restrictions; -import io.bisq.messages.locale.CurrencyUtil; +import io.bisq.messages.crypto.PubKeyRing; import io.bisq.messages.payment.PaymentMethod; -import io.bisq.messages.protocol.availability.OfferAvailabilityModel; -import io.bisq.messages.protocol.availability.OfferAvailabilityProtocol; -import io.bisq.messages.provider.price.MarketPrice; -import io.bisq.messages.provider.price.PriceFeedService; -import io.bisq.messages.trade.exceptions.MarketPriceNotAvailableException; -import io.bisq.messages.trade.exceptions.TradePriceOutOfToleranceException; -import io.bisq.p2p.NodeAddress; -import io.bisq.p2p.storage.payload.RequiresOwnerIsOnlinePayload; -import io.bisq.p2p.storage.payload.StoragePayload; -import javafx.beans.property.*; +import io.bisq.payload.RequiresOwnerIsOnlinePayload; +import io.bisq.payload.StoragePayload; import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.Setter; import lombok.ToString; import org.bitcoinj.core.Coin; -import org.bitcoinj.utils.ExchangeRate; -import org.bitcoinj.utils.Fiat; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import javax.annotation.Nullable; import java.io.IOException; import java.security.PublicKey; -import java.text.DecimalFormat; import java.util.*; import java.util.concurrent.TimeUnit; import java.util.stream.Collectors; @@ -65,8 +50,7 @@ import static com.google.common.base.Preconditions.checkNotNull; @ToString @EqualsAndHashCode -// TODO refactor to remove logic, should be value a object only -public final class Offer implements StoragePayload, RequiresOwnerIsOnlinePayload { +public final class OfferPayload implements StoragePayload, RequiresOwnerIsOnlinePayload { /////////////////////////////////////////////////////////////////////////////////////////// // Static @@ -76,11 +60,8 @@ public final class Offer implements StoragePayload, RequiresOwnerIsOnlinePayload @JsonExclude private static final long serialVersionUID = Version.P2P_NETWORK_VERSION; @JsonExclude - private static final Logger log = LoggerFactory.getLogger(Offer.class); + private static final Logger log = LoggerFactory.getLogger(OfferPayload.class); public static final long TTL = TimeUnit.MINUTES.toMillis(DevEnv.STRESS_TEST_MODE ? 6 : 6); - public final static String TAC_OFFERER = Res.get("createOffer.tac"); - public static final String TAC_TAKER = Res.get("takeOffer.tac"); - /////////////////////////////////////////////////////////////////////////////////////////// // Enums @@ -103,31 +84,43 @@ public final class Offer implements StoragePayload, RequiresOwnerIsOnlinePayload /////////////////////////////////////////////////////////////////////////////////////////// // Fields for filtering offers + @Getter private final Direction direction; + @Getter private final String currencyCode; // payment method private final String paymentMethodName; @Nullable + @Getter private final String countryCode; @Nullable + @Getter private final List acceptedCountryCodes; @Nullable + @Getter private final String bankId; @Nullable + @Getter private final List acceptedBankIds; + @Getter private final List arbitratorNodeAddresses; + @Getter private final String id; + @Getter private final long date; + @Getter private final long protocolVersion; // We use 2 type of prices: fixed price or price based on distance from market price + @Getter private final boolean useMarketBasedPrice; // fiatPrice if fixed price is used (usePercentageBasedPrice = false), otherwise 0 //TODO add support for altcoin price or fix precision issue + @Getter private final long fiatPrice; // Distance form market price if percentage based price is used (usePercentageBasedPrice = true), otherwise 0. @@ -135,25 +128,32 @@ public final class Offer implements StoragePayload, RequiresOwnerIsOnlinePayload // Positive values is always the usual case where you want a better price as the market. // E.g. Buy offer with market price 400.- leads to a 360.- price. // Sell offer with market price 400.- leads to a 440.- price. + @Getter private final double marketPriceMargin; - private final long amount; private final long minAmount; + @Getter private final NodeAddress offererNodeAddress; @JsonExclude + @Getter private final PubKeyRing pubKeyRing; + @Getter private final String offererPaymentAccountId; // Mutable property. Has to be set before offer is save in P2P network as it changes the objects hash! + @Getter + @Setter private String offerFeePaymentTxID; // New properties from v. 0.5.0.0 + @Getter private final String versionNr; private final long blockHeightAtOfferCreation; private final long txFee; private final long createOfferFee; private final long securityDeposit; private final long maxTradeLimit; + @Getter private final long maxTradePeriod; // reserved for future use cases @@ -175,23 +175,6 @@ public final class Offer implements StoragePayload, RequiresOwnerIsOnlinePayload @Nullable private Map extraDataMap; - // TODO refactor those out of Offer, offer should be pure value object - @JsonExclude - transient private State state = State.UNDEFINED; - // Those state properties are transient and only used at runtime! - // don't access directly as it might be null; use getStateProperty() which creates an object if not instantiated - @JsonExclude - transient private ObjectProperty stateProperty = new SimpleObjectProperty<>(state); - @JsonExclude - @Nullable - transient private OfferAvailabilityProtocol availabilityProtocol; - @JsonExclude - transient private StringProperty errorMessageProperty = new SimpleStringProperty(); - @JsonExclude - transient private PriceFeedService priceFeedService; - @JsonExclude - transient private DecimalFormat decimalFormat; - /////////////////////////////////////////////////////////////////////////////////////////// // Constructor @@ -202,7 +185,7 @@ public final class Offer implements StoragePayload, RequiresOwnerIsOnlinePayload * meaning it's null here and "" there => not good * * @param id - * @param creationDate date of Offer creation, can be null in which case the current date/time will be used. + * @param creationDate date of OfferPayload creation, can be null in which case the current date/time will be used. * @param offererNodeAddress * @param pubKeyRing * @param direction @@ -220,7 +203,6 @@ public final class Offer implements StoragePayload, RequiresOwnerIsOnlinePayload * @param acceptedCountryCodes * @param bankId * @param acceptedBankIds - * @param priceFeedService * @param versionNr * @param blockHeightAtOfferCreation * @param txFee @@ -236,40 +218,39 @@ public final class Offer implements StoragePayload, RequiresOwnerIsOnlinePayload * @param hashOfChallenge * @param extraDataMap */ - public Offer(String id, - Long creationDate, - NodeAddress offererNodeAddress, - PubKeyRing pubKeyRing, - Direction direction, - long fiatPrice, - double marketPriceMargin, - boolean useMarketBasedPrice, - long amount, - long minAmount, - String currencyCode, - List arbitratorNodeAddresses, - String paymentMethodName, - String offererPaymentAccountId, - @Nullable String offerFeePaymentTxID, - @Nullable String countryCode, - @Nullable List acceptedCountryCodes, - @Nullable String bankId, - @Nullable List acceptedBankIds, - PriceFeedService priceFeedService, - String versionNr, - long blockHeightAtOfferCreation, - long txFee, - long createOfferFee, - long securityDeposit, - long maxTradeLimit, - long maxTradePeriod, - boolean useAutoClose, - boolean useReOpenAfterAutoClose, - long lowerClosePrice, - long upperClosePrice, - boolean isPrivateOffer, - @Nullable String hashOfChallenge, - @Nullable Map extraDataMap) { + public OfferPayload(String id, + Long creationDate, + NodeAddress offererNodeAddress, + PubKeyRing pubKeyRing, + Direction direction, + long fiatPrice, + double marketPriceMargin, + boolean useMarketBasedPrice, + long amount, + long minAmount, + String currencyCode, + List arbitratorNodeAddresses, + String paymentMethodName, + String offererPaymentAccountId, + @Nullable String offerFeePaymentTxID, + @Nullable String countryCode, + @Nullable List acceptedCountryCodes, + @Nullable String bankId, + @Nullable List acceptedBankIds, + String versionNr, + long blockHeightAtOfferCreation, + long txFee, + long createOfferFee, + long securityDeposit, + long maxTradeLimit, + long maxTradePeriod, + boolean useAutoClose, + boolean useReOpenAfterAutoClose, + long lowerClosePrice, + long upperClosePrice, + boolean isPrivateOffer, + @Nullable String hashOfChallenge, + @Nullable Map extraDataMap) { this.id = id; this.offererNodeAddress = offererNodeAddress; @@ -289,7 +270,6 @@ public final class Offer implements StoragePayload, RequiresOwnerIsOnlinePayload this.acceptedCountryCodes = Optional.ofNullable(acceptedCountryCodes).orElse(Lists.newArrayList()); this.bankId = Optional.ofNullable(bankId).orElse(""); this.acceptedBankIds = Optional.ofNullable(acceptedBankIds).orElse(Lists.newArrayList()); - this.priceFeedService = priceFeedService; this.versionNr = versionNr; this.blockHeightAtOfferCreation = blockHeightAtOfferCreation; this.txFee = txFee; @@ -306,28 +286,16 @@ public final class Offer implements StoragePayload, RequiresOwnerIsOnlinePayload this.extraDataMap = Optional.ofNullable(extraDataMap).orElse(Maps.newHashMap()); this.date = Optional.ofNullable(creationDate).orElse(new Date().getTime()); this.protocolVersion = Version.TRADE_PROTOCOL_VERSION; - - setState(State.UNDEFINED); - init(); } private void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException { try { in.defaultReadObject(); - init(); } catch (Throwable t) { log.warn("Cannot be deserialized." + t.getMessage()); } } - private void init() { - stateProperty = new SimpleObjectProperty<>(State.UNDEFINED); - - // we don't need to fill it as the error message is only relevant locally, so we don't store it in the transmitted object - errorMessageProperty = new SimpleStringProperty(); - decimalFormat = new DecimalFormat("#.#"); - decimalFormat.setMaximumFractionDigits(Fiat.SMALLEST_UNIT_EXPONENT); - } @Override public NodeAddress getOwnerNodeAddress() { @@ -344,7 +312,6 @@ public final class Offer implements StoragePayload, RequiresOwnerIsOnlinePayload checkNotNull(getId(), "Id is null"); checkNotNull(getPubKeyRing(), "pubKeyRing is null"); checkNotNull(getMinAmount(), "MinAmount is null"); - checkNotNull(getPrice(), "Price is null"); checkNotNull(getTxFee(), "txFee is null"); checkNotNull(getCreateOfferFee(), "CreateOfferFee is null"); checkNotNull(getVersionNr(), "VersionNr is null"); @@ -352,107 +319,22 @@ public final class Offer implements StoragePayload, RequiresOwnerIsOnlinePayload checkNotNull(getMaxTradeLimit(), "MaxTradeLimit is null"); checkArgument(getMaxTradePeriod() > 0, "maxTradePeriod is 0 or negative. maxTradePeriod=" + getMaxTradePeriod()); - Preconditions.checkArgument(getMinAmount().compareTo(Restrictions.MIN_TRADE_AMOUNT) >= 0, "MinAmount is less then " + checkArgument(getMinAmount().compareTo(Restrictions.MIN_TRADE_AMOUNT) >= 0, "MinAmount is less then " + Restrictions.MIN_TRADE_AMOUNT.toFriendlyString()); - Preconditions.checkArgument(getAmount().compareTo(getPaymentMethod().getMaxTradeLimit()) <= 0, "Amount is larger then " + checkArgument(getAmount().compareTo(getPaymentMethod().getMaxTradeLimit()) <= 0, "Amount is larger then " + getPaymentMethod().getMaxTradeLimit().toFriendlyString()); checkArgument(getAmount().compareTo(getMinAmount()) >= 0, "MinAmount is larger then Amount"); - - checkArgument(getPrice().isPositive(), "Price is not a positive value"); // TODO check upper and lower bounds for fiat } - public void resetState() { - setState(State.UNDEFINED); - } - - public boolean isMyOffer(KeyRing keyRing) { - return getPubKeyRing().equals(keyRing.getPubKeyRing()); - } - - @Nullable - public Fiat getVolumeByAmount(Coin amount) { - Fiat price = getPrice(); - if (price != null && amount != null) { - try { - return new ExchangeRate(price).coinToFiat(amount); - } catch (Throwable t) { - log.error("getVolumeByAmount failed. Error=" + t.getMessage()); - return null; - } - } else { - return null; - } - } - - @Nullable - public Fiat getOfferVolume() { - return getVolumeByAmount(getAmount()); - } - - @Nullable - public Fiat getMinOfferVolume() { - return getVolumeByAmount(getMinAmount()); - } - - - /////////////////////////////////////////////////////////////////////////////////////////// - // Availability - /////////////////////////////////////////////////////////////////////////////////////////// - - // TODO refactor those out of Offer, offer should be pure value object - public void checkOfferAvailability(OfferAvailabilityModel model, ResultHandler resultHandler, - ErrorMessageHandler errorMessageHandler) { - availabilityProtocol = new OfferAvailabilityProtocol(model, - () -> { - cancelAvailabilityRequest(); - resultHandler.handleResult(); - }, - (errorMessage) -> { - if (availabilityProtocol != null) - availabilityProtocol.cancel(); - log.error(errorMessage); - errorMessageHandler.handleErrorMessage(errorMessage); - }); - availabilityProtocol.sendOfferAvailabilityRequest(); - } - - // TODO refactor those out of Offer, offer should be pure value object - public void cancelAvailabilityRequest() { - if (availabilityProtocol != null) - availabilityProtocol.cancel(); - } - - /////////////////////////////////////////////////////////////////////////////////////////// - // Setters - /////////////////////////////////////////////////////////////////////////////////////////// - - - public void setPriceFeedService(PriceFeedService priceFeedService) { - this.priceFeedService = priceFeedService; - } - - public void setState(State state) { - this.state = state; - stateProperty().set(state); - } - - public void setOfferFeePaymentTxID(String offerFeePaymentTxID) { - this.offerFeePaymentTxID = offerFeePaymentTxID; - } - - public void setErrorMessage(String errorMessage) { - this.errorMessageProperty.set(errorMessage); - } - /////////////////////////////////////////////////////////////////////////////////////////// // Getters /////////////////////////////////////////////////////////////////////////////////////////// - @Override - public long getTTL() { - return TTL; + + public Direction getMirroredDirection() { + return direction == Direction.BUY ? Direction.SELL : Direction.BUY; } @Override @@ -460,171 +342,14 @@ public final class Offer implements StoragePayload, RequiresOwnerIsOnlinePayload return pubKeyRing != null ? pubKeyRing.getSignaturePubKey() : null; } - public long getProtocolVersion() { - return protocolVersion; - } - - public String getId() { - return id; - } - public String getShortId() { return Utilities.getShortId(id); } - public NodeAddress getOffererNodeAddress() { - return offererNodeAddress; - } - - public PubKeyRing getPubKeyRing() { - return pubKeyRing; - } - - // TODO refactor those out of Offer, offer should be pure value object - @Nullable - public Fiat getPrice() { - if (useMarketBasedPrice) { - checkNotNull(priceFeedService, "priceFeed must not be null"); - MarketPrice marketPrice = priceFeedService.getMarketPrice(currencyCode); - if (marketPrice != null) { - PriceFeedService.Type priceFeedType; - double factor; - if (CurrencyUtil.isCryptoCurrency(currencyCode)) { - priceFeedType = direction == Direction.BUY ? PriceFeedService.Type.ASK : PriceFeedService.Type.BID; - factor = direction == Offer.Direction.SELL ? 1 - marketPriceMargin : 1 + marketPriceMargin; - } else { - priceFeedType = direction == Direction.SELL ? PriceFeedService.Type.ASK : PriceFeedService.Type.BID; - factor = direction == Offer.Direction.BUY ? 1 - marketPriceMargin : 1 + marketPriceMargin; - } - double marketPriceAsDouble = marketPrice.getPrice(priceFeedType); - double targetPrice = marketPriceAsDouble * factor; - if (CurrencyUtil.isCryptoCurrency(currencyCode)) - targetPrice = targetPrice != 0 ? 1d / targetPrice : 0; - try { - final double rounded = MathUtils.roundDouble(targetPrice, Fiat.SMALLEST_UNIT_EXPONENT); - return Fiat.parseFiat(currencyCode, decimalFormat.format(rounded).replace(",", ".")); - } catch (Exception e) { - log.error("Exception at getPrice / parseToFiat: " + e.toString() + "\n" + - "That case should never happen."); - return null; - } - } else { - log.debug("We don't have a market price.\n" + - "That case could only happen if you don't have a price feed."); - return null; - } - } else { - return Fiat.valueOf(currencyCode, fiatPrice); - } - } - - // TODO refactor those out of Offer, offer should be pure value object - public void checkTradePriceTolerance(long takersTradePrice) throws TradePriceOutOfToleranceException, MarketPriceNotAvailableException, IllegalArgumentException { - checkArgument(takersTradePrice > 0, "takersTradePrice must be positive"); - Fiat tradePriceAsFiat = Fiat.valueOf(getCurrencyCode(), takersTradePrice); - Fiat offerPriceAsFiat = getPrice(); - - if (offerPriceAsFiat == null) - throw new MarketPriceNotAvailableException("Market price required for calculating trade price is not available."); - - double factor = (double) takersTradePrice / (double) offerPriceAsFiat.value; - // We allow max. 2 % difference between own offer price calculation and takers calculation. - // Market price might be different at offerer's and takers side so we need a bit of tolerance. - // The tolerance will get smaller once we have multiple price feeds avoiding fast price fluctuations - // from one provider. - if (Math.abs(1 - factor) > 0.02) { - String msg = "Taker's trade price is too far away from our calculated price based on the market price.\n" + - "tradePriceAsFiat=" + tradePriceAsFiat.toFriendlyString() + "\n" + - "offerPriceAsFiat=" + offerPriceAsFiat.toFriendlyString(); - log.warn(msg); - throw new TradePriceOutOfToleranceException(msg); - } - } - - public double getMarketPriceMargin() { - return marketPriceMargin; - } - - public boolean getUseMarketBasedPrice() { - return useMarketBasedPrice; - } - - public Coin getAmount() { - return Coin.valueOf(amount); - } - - public Coin getMinAmount() { - return Coin.valueOf(minAmount); - } - - public Direction getDirection() { - return direction; - } - - public Direction getMirroredDirection() { - return direction == Direction.BUY ? Direction.SELL : Direction.BUY; - } - public PaymentMethod getPaymentMethod() { return PaymentMethod.getPaymentMethodById(paymentMethodName); } - public String getCurrencyCode() { - return currencyCode; - } - - @Nullable - public String getCountryCode() { - return countryCode; - } - - @Nullable - public List getAcceptedCountryCodes() { - return acceptedCountryCodes; - } - - @Nullable - public List getAcceptedBankIds() { - return acceptedBankIds; - } - - @Nullable - public String getBankId() { - return bankId; - } - - public String getOfferFeePaymentTxID() { - return offerFeePaymentTxID; - } - - public List getArbitratorNodeAddresses() { - return arbitratorNodeAddresses; - } - - public Date getDate() { - return new Date(date); - } - - public State getState() { - return state; - } - - public ObjectProperty stateProperty() { - return stateProperty; - } - - public String getOffererPaymentAccountId() { - return offererPaymentAccountId; - } - - public ReadOnlyStringProperty errorMessageProperty() { - return errorMessageProperty; - } - - public String getVersionNr() { - return versionNr; - } - public Coin getTxFee() { return Coin.valueOf(txFee); } @@ -641,43 +366,23 @@ public final class Offer implements StoragePayload, RequiresOwnerIsOnlinePayload return Coin.valueOf(maxTradeLimit); } - public long getMaxTradePeriod() { - return maxTradePeriod; + public Coin getAmount() { + return Coin.valueOf(amount); } - public long getBlockHeightAtOfferCreation() { - return blockHeightAtOfferCreation; + public Coin getMinAmount() { + return Coin.valueOf(minAmount); } - public boolean isUseAutoClose() { - return useAutoClose; + public Date getDate() { + return new Date(date); } - public boolean isUseReOpenAfterAutoClose() { - return useReOpenAfterAutoClose; + @Override + public long getTTL() { + return TTL; } - public long getLowerClosePrice() { - return lowerClosePrice; - } - - public long getUpperClosePrice() { - return upperClosePrice; - } - - public boolean isPrivateOffer() { - return isPrivateOffer; - } - - @Nullable - public String getHashOfChallenge() { - return hashOfChallenge; - } - - @Nullable - public Map getExtraDataMap() { - return extraDataMap; - } @Override public Messages.StoragePayload toProtoBuf() { @@ -716,7 +421,7 @@ public final class Offer implements StoragePayload, RequiresOwnerIsOnlinePayload if (Objects.nonNull(offerFeePaymentTxID)) { offerBuilder.setOfferFeePaymentTxID(offerFeePaymentTxID); } else { - throw new RuntimeException("Offer is in invalid state: offerFeePaymentTxID is not set when adding to P2P network."); + throw new RuntimeException("OfferPayload is in invalid state: offerFeePaymentTxID is not set when adding to P2P network."); } Optional.ofNullable(countryCode).ifPresent(offerBuilder::setCountryCode); Optional.ofNullable(bankId).ifPresent(offerBuilder::setBankId); diff --git a/common/src/main/java/io/bisq/common/util/ProtoBufferUtils.java b/network-messages/src/main/java/io/bisq/messages/util/ProtoBufferUtils.java similarity index 81% rename from common/src/main/java/io/bisq/common/util/ProtoBufferUtils.java rename to network-messages/src/main/java/io/bisq/messages/util/ProtoBufferUtils.java index 81f4703d7d..4dff6e6579 100644 --- a/common/src/main/java/io/bisq/common/util/ProtoBufferUtils.java +++ b/network-messages/src/main/java/io/bisq/messages/util/ProtoBufferUtils.java @@ -1,10 +1,10 @@ -package io.bisq.common.util; +package io.bisq.messages.util; import io.bisq.app.Version; import io.bisq.common.wire.proto.Messages; /** - * Created by mike on 07/02/2017. + * Created by mike on 14/03/2017. */ public class ProtoBufferUtils { public static Messages.Envelope.Builder getBaseEnvelope() { diff --git a/common/src/main/java/io/bisq/common/wire/Payload.java b/network-messages/src/main/java/io/bisq/messages/wire/Payload.java similarity index 89% rename from common/src/main/java/io/bisq/common/wire/Payload.java rename to network-messages/src/main/java/io/bisq/messages/wire/Payload.java index 7b18966b67..d9f47484ea 100644 --- a/common/src/main/java/io/bisq/common/wire/Payload.java +++ b/network-messages/src/main/java/io/bisq/messages/wire/Payload.java @@ -1,4 +1,4 @@ -package io.bisq.common.wire; +package io.bisq.messages.wire; import com.google.protobuf.Message; import io.bisq.messages.ToProtoBuffer; diff --git a/network/src/main/java/io/bisq/p2p/storage/payload/CapabilityRequiringPayload.java b/network-messages/src/main/java/io/bisq/payload/CapabilityRequiringPayload.java similarity index 88% rename from network/src/main/java/io/bisq/p2p/storage/payload/CapabilityRequiringPayload.java rename to network-messages/src/main/java/io/bisq/payload/CapabilityRequiringPayload.java index ca0fe17891..368ccad4a3 100644 --- a/network/src/main/java/io/bisq/p2p/storage/payload/CapabilityRequiringPayload.java +++ b/network-messages/src/main/java/io/bisq/payload/CapabilityRequiringPayload.java @@ -1,6 +1,7 @@ -package io.bisq.p2p.storage.payload; +package io.bisq.payload; -import io.bisq.common.wire.Payload; + +import io.bisq.messages.wire.Payload; import java.util.List; diff --git a/network/src/main/java/io/bisq/p2p/storage/payload/ExpirablePayload.java b/network-messages/src/main/java/io/bisq/payload/ExpirablePayload.java similarity index 78% rename from network/src/main/java/io/bisq/p2p/storage/payload/ExpirablePayload.java rename to network-messages/src/main/java/io/bisq/payload/ExpirablePayload.java index 76971f75b0..c9b2480d0d 100644 --- a/network/src/main/java/io/bisq/p2p/storage/payload/ExpirablePayload.java +++ b/network-messages/src/main/java/io/bisq/payload/ExpirablePayload.java @@ -1,6 +1,7 @@ -package io.bisq.p2p.storage.payload; +package io.bisq.payload; -import io.bisq.common.wire.Payload; + +import io.bisq.messages.wire.Payload; /** * Messages which support a time to live diff --git a/network/src/main/java/io/bisq/p2p/storage/payload/PersistedStoragePayload.java b/network-messages/src/main/java/io/bisq/payload/PersistedStoragePayload.java similarity index 81% rename from network/src/main/java/io/bisq/p2p/storage/payload/PersistedStoragePayload.java rename to network-messages/src/main/java/io/bisq/payload/PersistedStoragePayload.java index f761e08dc3..eed11b3eb8 100644 --- a/network/src/main/java/io/bisq/p2p/storage/payload/PersistedStoragePayload.java +++ b/network-messages/src/main/java/io/bisq/payload/PersistedStoragePayload.java @@ -1,4 +1,4 @@ -package io.bisq.p2p.storage.payload; +package io.bisq.payload; /** * Marker interface for payload which gets persisted. diff --git a/network/src/main/java/io/bisq/p2p/storage/payload/RequiresOwnerIsOnlinePayload.java b/network-messages/src/main/java/io/bisq/payload/RequiresOwnerIsOnlinePayload.java similarity index 81% rename from network/src/main/java/io/bisq/p2p/storage/payload/RequiresOwnerIsOnlinePayload.java rename to network-messages/src/main/java/io/bisq/payload/RequiresOwnerIsOnlinePayload.java index c4809403cb..dddad5d439 100644 --- a/network/src/main/java/io/bisq/p2p/storage/payload/RequiresOwnerIsOnlinePayload.java +++ b/network-messages/src/main/java/io/bisq/payload/RequiresOwnerIsOnlinePayload.java @@ -1,7 +1,7 @@ -package io.bisq.p2p.storage.payload; +package io.bisq.payload; -import io.bisq.common.wire.Payload; -import io.bisq.p2p.NodeAddress; +import io.bisq.messages.NodeAddress; +import io.bisq.messages.wire.Payload; /** * Used for messages which require that the data owner is online. diff --git a/network/src/main/java/io/bisq/p2p/storage/payload/StoragePayload.java b/network-messages/src/main/java/io/bisq/payload/StoragePayload.java similarity index 78% rename from network/src/main/java/io/bisq/p2p/storage/payload/StoragePayload.java rename to network-messages/src/main/java/io/bisq/payload/StoragePayload.java index 59a5d822b2..cd696b305f 100644 --- a/network/src/main/java/io/bisq/p2p/storage/payload/StoragePayload.java +++ b/network-messages/src/main/java/io/bisq/payload/StoragePayload.java @@ -1,8 +1,4 @@ -package io.bisq.p2p.storage.payload; - -import io.bisq.p2p.NodeAddress; -import io.bisq.p2p.storage.P2PDataStorage; -import io.bisq.p2p.storage.storageentry.ProtectedStorageEntry; +package io.bisq.payload; import java.security.PublicKey; @@ -12,7 +8,7 @@ import java.security.PublicKey; * Implementations: * io.bisq.alert.Alert * io.bisq.arbitration.Arbitrator - * io.bisq.trade.offer.Offer + * io.bisq.trade.offer.OfferPayload */ public interface StoragePayload extends ExpirablePayload { /** diff --git a/common/src/main/proto/bsmessage.proto b/network-messages/src/main/proto/bsmessage.proto similarity index 100% rename from common/src/main/proto/bsmessage.proto rename to network-messages/src/main/proto/bsmessage.proto diff --git a/common/src/test/java/io/bisq/common/crypto/EncryptionTest.java b/network-messages/src/test/java/io/bisq/crypto/EncryptionTest.java similarity index 87% rename from common/src/test/java/io/bisq/common/crypto/EncryptionTest.java rename to network-messages/src/test/java/io/bisq/crypto/EncryptionTest.java index 2b8b3dc5d0..d9cbfa7a8b 100644 --- a/common/src/test/java/io/bisq/common/crypto/EncryptionTest.java +++ b/network-messages/src/test/java/io/bisq/crypto/EncryptionTest.java @@ -1,5 +1,8 @@ -package io.bisq.common.crypto; +package io.bisq.crypto; +import io.bisq.common.crypto.CryptoException; +import io.bisq.messages.crypto.KeyRing; +import io.bisq.messages.crypto.KeyStorage; import io.bisq.storage.FileUtil; import org.bouncycastle.jce.provider.BouncyCastleProvider; import org.junit.After; diff --git a/common/src/test/java/io/bisq/common/crypto/SigTest.java b/network-messages/src/test/java/io/bisq/crypto/SigTest.java similarity index 91% rename from common/src/test/java/io/bisq/common/crypto/SigTest.java rename to network-messages/src/test/java/io/bisq/crypto/SigTest.java index 629a8ff7dc..beb3f6a1ad 100644 --- a/common/src/test/java/io/bisq/common/crypto/SigTest.java +++ b/network-messages/src/test/java/io/bisq/crypto/SigTest.java @@ -1,5 +1,9 @@ -package io.bisq.common.crypto; +package io.bisq.crypto; +import io.bisq.common.crypto.CryptoException; +import io.bisq.common.crypto.Sig; +import io.bisq.messages.crypto.KeyRing; +import io.bisq.messages.crypto.KeyStorage; import io.bisq.storage.FileUtil; import org.bouncycastle.jce.provider.BouncyCastleProvider; import org.junit.After; diff --git a/common/src/test/java/io/bisq/common/wire/proto/ProtoBufferTest.java b/network-messages/src/test/java/io/bisq/proto/ProtoBufferTest.java similarity index 96% rename from common/src/test/java/io/bisq/common/wire/proto/ProtoBufferTest.java rename to network-messages/src/test/java/io/bisq/proto/ProtoBufferTest.java index 7c85ebdbdc..376737d3e1 100644 --- a/common/src/test/java/io/bisq/common/wire/proto/ProtoBufferTest.java +++ b/network-messages/src/test/java/io/bisq/proto/ProtoBufferTest.java @@ -1,5 +1,6 @@ -package io.bisq.common.wire.proto; +package io.bisq.proto; +import io.bisq.common.wire.proto.Messages; import lombok.extern.slf4j.Slf4j; import org.junit.Test; diff --git a/network/pom.xml b/network/pom.xml index ab14b27491..bb1c2285fd 100644 --- a/network/pom.xml +++ b/network/pom.xml @@ -17,6 +17,11 @@ common ${project.parent.version} + + io.bisq + network-messages + ${project.parent.version} + io.bisq diff --git a/network/src/main/java/io/bisq/app/BisqEnvironment.java b/network/src/main/java/io/bisq/app/BisqEnvironment.java index fabd5ca73b..e9f6087666 100644 --- a/network/src/main/java/io/bisq/app/BisqEnvironment.java +++ b/network/src/main/java/io/bisq/app/BisqEnvironment.java @@ -20,11 +20,11 @@ package io.bisq.app; import ch.qos.logback.classic.Level; import io.bisq.BisqException; import io.bisq.common.CommonOptionKeys; -import io.bisq.common.crypto.KeyStorage; import io.bisq.common.util.Utilities; import io.bisq.messages.btc.BitcoinNetwork; import io.bisq.messages.btc.BtcOptionKeys; import io.bisq.messages.btc.UserAgent; +import io.bisq.messages.crypto.KeyStorage; import io.bisq.messages.dao.blockchain.RpcOptionKeys; import io.bisq.network.NetworkOptionKeys; import io.bisq.storage.Storage; diff --git a/network/src/main/java/io/bisq/crypto/EncryptionService.java b/network/src/main/java/io/bisq/crypto/EncryptionService.java index ba1a93fd64..4f93c082de 100644 --- a/network/src/main/java/io/bisq/crypto/EncryptionService.java +++ b/network/src/main/java/io/bisq/crypto/EncryptionService.java @@ -18,17 +18,19 @@ package io.bisq.crypto; import com.google.protobuf.InvalidProtocolBufferException; -import io.bisq.common.crypto.*; +import io.bisq.common.crypto.CryptoException; +import io.bisq.common.crypto.Sig; import io.bisq.common.wire.proto.Messages; +import io.bisq.messages.DecryptedMsgWithPubKey; import io.bisq.messages.Message; +import io.bisq.messages.crypto.*; import io.bisq.p2p.network.ProtoBufferUtilities; import javax.crypto.SecretKey; import javax.inject.Inject; import java.security.PrivateKey; -import static io.bisq.common.crypto.Encryption.decryptPayloadWithHmac; -import static io.bisq.common.crypto.Encryption.decryptSecretKey; +import static io.bisq.messages.crypto.Encryption.decryptSecretKey; public class EncryptionService { private final KeyRing keyRing; @@ -59,7 +61,7 @@ public class EncryptionService { Message decryptedPayload = null; try { decryptedPayload = ProtoBufferUtilities - .fromProtoBuf(Messages.Envelope.parseFrom(decryptPayloadWithHmac(sealedAndSigned.encryptedPayloadWithHmac, secretKey))).get(); + .fromProtoBuf(Messages.Envelope.parseFrom(Encryption.decryptPayloadWithHmac(sealedAndSigned.encryptedPayloadWithHmac, secretKey))).get(); } catch (InvalidProtocolBufferException e) { throw new CryptoException("Unable to parse protobuffer message.", e); } diff --git a/network/src/main/java/io/bisq/messages/alert/Alert.java b/network/src/main/java/io/bisq/messages/alert/Alert.java deleted file mode 100644 index b4084be7db..0000000000 --- a/network/src/main/java/io/bisq/messages/alert/Alert.java +++ /dev/null @@ -1,170 +0,0 @@ -/* - * This file is part of bisq. - * - * bisq is free software: you can redistribute it and/or modify it - * under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or (at - * your option) any later version. - * - * bisq is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public - * License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with bisq. If not, see . - */ - -package io.bisq.messages.alert; - -import com.google.common.annotations.VisibleForTesting; -import com.google.protobuf.ByteString; -import io.bisq.app.Version; -import io.bisq.common.crypto.Sig; -import io.bisq.common.wire.proto.Messages; -import io.bisq.p2p.storage.payload.StoragePayload; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.io.IOException; -import java.security.KeyFactory; -import java.security.NoSuchAlgorithmException; -import java.security.NoSuchProviderException; -import java.security.PublicKey; -import java.security.spec.InvalidKeySpecException; -import java.security.spec.X509EncodedKeySpec; -import java.util.Arrays; -import java.util.concurrent.TimeUnit; - -public final class Alert implements StoragePayload { - // That object is sent over the wire, so we need to take care of version compatibility. - private static final long serialVersionUID = Version.P2P_NETWORK_VERSION; - private static final Logger log = LoggerFactory.getLogger(Alert.class); - private static final long TTL = TimeUnit.DAYS.toMillis(21); - - public final String message; - public final String version; - public final boolean isUpdateInfo; - private String signatureAsBase64; - private transient PublicKey storagePublicKey; - private byte[] storagePublicKeyBytes; - - public Alert(String message, boolean isUpdateInfo, String version) { - this.message = message; - this.isUpdateInfo = isUpdateInfo; - this.version = version; - } - - public Alert(String message, boolean isUpdateInfo, String version, byte[] storagePublicKeyBytes, - String signatureAsBase64) { - this(message, isUpdateInfo, version); - this.storagePublicKeyBytes = storagePublicKeyBytes; - this.signatureAsBase64 = signatureAsBase64; - init(); - } - - private void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException { - try { - in.defaultReadObject(); - init(); - } catch (Throwable t) { - log.warn("Exception at readObject: " + t.getMessage()); - } - } - - private void init() { - try { - storagePublicKey = KeyFactory.getInstance(Sig.KEY_ALGO, "BC").generatePublic(new X509EncodedKeySpec(storagePublicKeyBytes)); - } catch (InvalidKeySpecException | NoSuchAlgorithmException | NoSuchProviderException e) { - log.error("Couldn't create the storage public key", e); - } - } - - public void setSigAndPubKey(String signatureAsBase64, PublicKey storagePublicKey) { - this.signatureAsBase64 = signatureAsBase64; - this.storagePublicKey = storagePublicKey; - this.storagePublicKeyBytes = new X509EncodedKeySpec(this.storagePublicKey.getEncoded()).getEncoded(); - } - - public String getSignatureAsBase64() { - return signatureAsBase64; - } - - public boolean isNewVersion() { - return isNewVersion(Version.VERSION); - } - - @VisibleForTesting - protected boolean isNewVersion(String appVersion) { - // Usually we use 3 digits (0.4.8) but to support also 4 digits in case of hotfixes (0.4.8.1) we - // add a 0 at all 3 digit versions to allow correct comparison: 0.4.8 -> 480; 0.4.8.1 -> 481; 481 > 480 - String myVersionString = appVersion.replace(".", ""); - if (myVersionString.length() == 3) - myVersionString += "0"; - int versionNum = Integer.valueOf(myVersionString); - - String alertVersionString = version.replace(".", ""); - if (alertVersionString.length() == 3) - alertVersionString += "0"; - int alertVersionNum = Integer.valueOf(alertVersionString); - return versionNum < alertVersionNum; - } - - @Override - public long getTTL() { - return TTL; - } - - @Override - public PublicKey getOwnerPubKey() { - return storagePublicKey; - } - - @Override - public Messages.StoragePayload toProtoBuf() { - return Messages.StoragePayload.newBuilder().setAlert(Messages.Alert.newBuilder().setTTL(TTL) - .setMessage(message) - .setVersion(version) - .setIsUpdateInfo(isUpdateInfo) - .setSignatureAsBase64(signatureAsBase64) - .setStoragePublicKeyBytes(ByteString.copyFrom(storagePublicKeyBytes))).build(); - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (!(o instanceof Alert)) return false; - - Alert alert = (Alert) o; - - if (isUpdateInfo != alert.isUpdateInfo) return false; - if (message != null ? !message.equals(alert.message) : alert.message != null) return false; - if (version != null ? !version.equals(alert.version) : alert.version != null) return false; - if (signatureAsBase64 != null ? !signatureAsBase64.equals(alert.signatureAsBase64) : alert.signatureAsBase64 != null) - return false; - return Arrays.equals(storagePublicKeyBytes, alert.storagePublicKeyBytes); - - } - - @Override - public int hashCode() { - int result = message != null ? message.hashCode() : 0; - result = 31 * result + (version != null ? version.hashCode() : 0); - result = 31 * result + (isUpdateInfo ? 1 : 0); - result = 31 * result + (signatureAsBase64 != null ? signatureAsBase64.hashCode() : 0); - result = 31 * result + (storagePublicKeyBytes != null ? Arrays.hashCode(storagePublicKeyBytes) : 0); - return result; - } - - - @Override - public String toString() { - return "Alert{" + - "message='" + message + '\'' + - ", version='" + version + '\'' + - ", isUpdateInfo=" + isUpdateInfo + - ", signatureAsBase64='" + signatureAsBase64 + '\'' + - ", storagePublicKeyBytes=" + Arrays.toString(storagePublicKeyBytes) + - '}'; - } -} diff --git a/network/src/main/java/io/bisq/messages/alert/PrivateNotification.java b/network/src/main/java/io/bisq/messages/alert/PrivateNotification.java deleted file mode 100644 index 964d9da090..0000000000 --- a/network/src/main/java/io/bisq/messages/alert/PrivateNotification.java +++ /dev/null @@ -1,124 +0,0 @@ -/* - * This file is part of bisq. - * - * bisq is free software: you can redistribute it and/or modify it - * under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or (at - * your option) any later version. - * - * bisq is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public - * License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with bisq. If not, see . - */ - -package io.bisq.messages.alert; - -import com.google.protobuf.ByteString; -import io.bisq.app.Version; -import io.bisq.common.crypto.Sig; -import io.bisq.common.wire.Payload; -import io.bisq.common.wire.proto.Messages; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.io.IOException; -import java.security.KeyFactory; -import java.security.NoSuchAlgorithmException; -import java.security.NoSuchProviderException; -import java.security.PublicKey; -import java.security.spec.InvalidKeySpecException; -import java.security.spec.X509EncodedKeySpec; -import java.util.Arrays; - -public final class PrivateNotification implements Payload { - // That object is sent over the wire, so we need to take care of version compatibility. - private static final long serialVersionUID = Version.P2P_NETWORK_VERSION; - private static final Logger log = LoggerFactory.getLogger(PrivateNotification.class); - - public final String message; - private String signatureAsBase64; - private transient PublicKey publicKey; - private byte[] publicKeyBytes; - - public PrivateNotification(String message) { - this.message = message; - } - - public PrivateNotification(String message, String signatureAsBase64, byte[] publicKeyBytes) { - this(message); - this.signatureAsBase64 = signatureAsBase64; - this.publicKeyBytes = publicKeyBytes; - init(); - } - - private void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException { - try { - in.defaultReadObject(); - init(); - } catch (Throwable t) { - log.warn("Exception at readObject: " + t.getMessage()); - } - } - - private void init() { - try { - publicKey = KeyFactory.getInstance(Sig.KEY_ALGO, "BC").generatePublic(new X509EncodedKeySpec(publicKeyBytes)); - } catch (InvalidKeySpecException | NoSuchAlgorithmException | NoSuchProviderException e) { - log.error("Could not create public key from bytes", e); - } - } - - public void setSigAndPubKey(String signatureAsBase64, PublicKey storagePublicKey) { - this.signatureAsBase64 = signatureAsBase64; - this.publicKey = storagePublicKey; - this.publicKeyBytes = new X509EncodedKeySpec(this.publicKey.getEncoded()).getEncoded(); - } - - public String getSignatureAsBase64() { - return signatureAsBase64; - } - - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (!(o instanceof PrivateNotification)) return false; - - PrivateNotification that = (PrivateNotification) o; - - if (message != null ? !message.equals(that.message) : that.message != null) return false; - if (signatureAsBase64 != null ? !signatureAsBase64.equals(that.signatureAsBase64) : that.signatureAsBase64 != null) - return false; - return Arrays.equals(publicKeyBytes, that.publicKeyBytes); - - } - - @Override - public int hashCode() { - int result = message != null ? message.hashCode() : 0; - result = 31 * result + (signatureAsBase64 != null ? signatureAsBase64.hashCode() : 0); - result = 31 * result + (publicKeyBytes != null ? Arrays.hashCode(publicKeyBytes) : 0); - return result; - } - - @Override - public String toString() { - return "PrivateNotification{" + - "message='" + message + '\'' + - ", signatureAsBase64='" + signatureAsBase64 + '\'' + - ", publicKeyBytes=" + Arrays.toString(publicKeyBytes) + - '}'; - } - - @Override - public Messages.PrivateNotification toProtoBuf() { - return Messages.PrivateNotification.newBuilder() - .setMessage(message) - .setSignatureAsBase64(signatureAsBase64) - .setPublicKeyBytes(ByteString.copyFrom(publicKeyBytes)).build(); - } -} diff --git a/network/src/main/java/io/bisq/messages/alert/PrivateNotificationMessage.java b/network/src/main/java/io/bisq/messages/alert/PrivateNotificationMessage.java deleted file mode 100644 index 1b86b17133..0000000000 --- a/network/src/main/java/io/bisq/messages/alert/PrivateNotificationMessage.java +++ /dev/null @@ -1,86 +0,0 @@ -package io.bisq.messages.alert; - -import io.bisq.app.Version; -import io.bisq.common.util.ProtoBufferUtils; -import io.bisq.common.wire.proto.Messages; -import io.bisq.p2p.NodeAddress; -import io.bisq.p2p.messaging.MailboxMessage; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.UUID; - -public class PrivateNotificationMessage implements MailboxMessage { - // That object is sent over the wire, so we need to take care of version compatibility. - private static final long serialVersionUID = Version.P2P_NETWORK_VERSION; - private static final Logger log = LoggerFactory.getLogger(PrivateNotificationMessage.class); - private NodeAddress myNodeAddress; - public PrivateNotification privateNotification; - private final String uid = UUID.randomUUID().toString(); - private final int messageVersion = Version.getP2PMessageVersion(); - - public PrivateNotificationMessage(PrivateNotification privateNotification, NodeAddress myNodeAddress) { - this.myNodeAddress = myNodeAddress; - this.privateNotification = privateNotification; - } - - @Override - public NodeAddress getSenderNodeAddress() { - return myNodeAddress; - } - - @Override - public String getUID() { - return uid; - } - - @Override - public int getMessageVersion() { - return messageVersion; - } - - @Override - public Messages.Envelope toProtoBuf() { - Messages.Envelope.Builder baseEnvelope = ProtoBufferUtils.getBaseEnvelope(); - return baseEnvelope.setPrivateNotificationMessage(baseEnvelope.getPrivateNotificationMessageBuilder() - .setMessageVersion(messageVersion) - .setUid(uid) - .setMyNodeAddress(myNodeAddress.toProtoBuf()) - .setPrivateNotification(privateNotification.toProtoBuf())).build(); - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (!(o instanceof PrivateNotificationMessage)) return false; - - PrivateNotificationMessage that = (PrivateNotificationMessage) o; - - if (messageVersion != that.messageVersion) return false; - if (myNodeAddress != null ? !myNodeAddress.equals(that.myNodeAddress) : that.myNodeAddress != null) - return false; - if (privateNotification != null ? !privateNotification.equals(that.privateNotification) : that.privateNotification != null) - return false; - return !(uid != null ? !uid.equals(that.uid) : that.uid != null); - - } - - @Override - public int hashCode() { - int result = myNodeAddress != null ? myNodeAddress.hashCode() : 0; - result = 31 * result + (privateNotification != null ? privateNotification.hashCode() : 0); - result = 31 * result + (uid != null ? uid.hashCode() : 0); - result = 31 * result + messageVersion; - return result; - } - - @Override - public String toString() { - return "PrivateNotificationMessage{" + - "myNodeAddress=" + myNodeAddress + - ", privateNotification=" + privateNotification + - ", uid='" + uid + '\'' + - ", messageVersion=" + messageVersion + - '}'; - } -} diff --git a/network/src/main/java/io/bisq/messages/arbitration/Arbitrator.java b/network/src/main/java/io/bisq/messages/arbitration/Arbitrator.java deleted file mode 100644 index fc4c8ee3af..0000000000 --- a/network/src/main/java/io/bisq/messages/arbitration/Arbitrator.java +++ /dev/null @@ -1,177 +0,0 @@ -/* - * This file is part of bisq. - * - * bisq is free software: you can redistribute it and/or modify it - * under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or (at - * your option) any later version. - * - * bisq is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public - * License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with bisq. If not, see . - */ - -package io.bisq.messages.arbitration; - -import com.google.protobuf.ByteString; -import io.bisq.app.Version; -import io.bisq.common.crypto.PubKeyRing; -import io.bisq.common.wire.proto.Messages; -import io.bisq.p2p.NodeAddress; -import io.bisq.p2p.storage.payload.StoragePayload; - -import java.security.PublicKey; -import java.util.Arrays; -import java.util.Date; -import java.util.List; -import java.util.concurrent.TimeUnit; - -public final class Arbitrator implements StoragePayload { - // That object is sent over the wire, so we need to take care of version compatibility. - private static final long serialVersionUID = Version.P2P_NETWORK_VERSION; - - public static final long TTL = TimeUnit.DAYS.toMillis(10); - - // Persisted fields - private final byte[] btcPubKey; - private final PubKeyRing pubKeyRing; - private final NodeAddress arbitratorNodeAddress; - private final List languageCodes; - private final String btcAddress; - private final long registrationDate; - private final String registrationSignature; - private final byte[] registrationPubKey; - - public Arbitrator(NodeAddress arbitratorNodeAddress, - byte[] btcPubKey, - String btcAddress, - PubKeyRing pubKeyRing, - List languageCodes, - Date registrationDate, - byte[] registrationPubKey, - String registrationSignature) { - this.arbitratorNodeAddress = arbitratorNodeAddress; - this.btcPubKey = btcPubKey; - this.btcAddress = btcAddress; - this.pubKeyRing = pubKeyRing; - this.languageCodes = languageCodes; - this.registrationDate = registrationDate.getTime(); - this.registrationPubKey = registrationPubKey; - this.registrationSignature = registrationSignature; - } - - - /////////////////////////////////////////////////////////////////////////////////////////// - // Getters - /////////////////////////////////////////////////////////////////////////////////////////// - - @Override - public long getTTL() { - return TTL; - } - - @Override - public PublicKey getOwnerPubKey() { - return pubKeyRing.getSignaturePubKey(); - } - - public byte[] getBtcPubKey() { - return btcPubKey; - } - - public PubKeyRing getPubKeyRing() { - return pubKeyRing; - } - - public NodeAddress getArbitratorNodeAddress() { - return arbitratorNodeAddress; - } - - public Date getRegistrationDate() { - return new Date(registrationDate); - } - - public String getBtcAddress() { - return btcAddress; - } - - public List getLanguageCodes() { - return languageCodes; - } - - public String getRegistrationSignature() { - return registrationSignature; - } - - public byte[] getRegistrationPubKey() { - return registrationPubKey; - } - - - @Override - public Messages.StoragePayload toProtoBuf() { - return Messages.StoragePayload.newBuilder().setArbitrator(Messages.Arbitrator.newBuilder() - .setTTL(TTL) - .setBtcPubKey(ByteString.copyFrom(btcPubKey)) - .setPubKeyRing((Messages.PubKeyRing) pubKeyRing.toProtoBuf()) - .setArbitratorNodeAddress(arbitratorNodeAddress.toProtoBuf()) - .addAllLanguageCodes(languageCodes) - .setBtcAddress(btcAddress) - .setRegistrationDate(registrationDate) - .setRegistrationSignature(registrationSignature) - .setRegistrationPubKey(ByteString.copyFrom(registrationPubKey))).build(); - } - - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (!(o instanceof Arbitrator)) return false; - - Arbitrator that = (Arbitrator) o; - - if (registrationDate != that.registrationDate) return false; - if (!Arrays.equals(btcPubKey, that.btcPubKey)) return false; - if (pubKeyRing != null ? !pubKeyRing.equals(that.pubKeyRing) : that.pubKeyRing != null) return false; - if (arbitratorNodeAddress != null ? !arbitratorNodeAddress.equals(that.arbitratorNodeAddress) : that.arbitratorNodeAddress != null) - return false; - if (languageCodes != null ? !languageCodes.equals(that.languageCodes) : that.languageCodes != null) - return false; - if (btcAddress != null ? !btcAddress.equals(that.btcAddress) : that.btcAddress != null) return false; - if (registrationSignature != null ? !registrationSignature.equals(that.registrationSignature) : that.registrationSignature != null) - return false; - return Arrays.equals(registrationPubKey, that.registrationPubKey); - - } - - @Override - public int hashCode() { - int result = btcPubKey != null ? Arrays.hashCode(btcPubKey) : 0; - result = 31 * result + (pubKeyRing != null ? pubKeyRing.hashCode() : 0); - result = 31 * result + (arbitratorNodeAddress != null ? arbitratorNodeAddress.hashCode() : 0); - result = 31 * result + (languageCodes != null ? languageCodes.hashCode() : 0); - result = 31 * result + (btcAddress != null ? btcAddress.hashCode() : 0); - result = 31 * result + (int) (registrationDate ^ (registrationDate >>> 32)); - result = 31 * result + (registrationSignature != null ? registrationSignature.hashCode() : 0); - result = 31 * result + (registrationPubKey != null ? Arrays.hashCode(registrationPubKey) : 0); - return result; - } - - @Override - public String toString() { - return "Arbitrator{" + - "\n\tarbitratorAddress=" + arbitratorNodeAddress + - "\n\tlanguageCodes=" + languageCodes + - "\n\tbtcAddress='" + btcAddress + '\'' + - "\n\tregistrationDate=" + registrationDate + - "\n\tbtcPubKey.hashCode()=" + Arrays.toString(btcPubKey).hashCode() + - "\n\tpubKeyRing.hashCode()=" + pubKeyRing.hashCode() + - "\n\tregistrationSignature.hashCode()='" + registrationSignature.hashCode() + '\'' + - "\n\tregistrationPubKey.hashCode()=" + Arrays.toString(registrationPubKey).hashCode() + - '}'; - } -} diff --git a/network/src/main/java/io/bisq/messages/arbitration/Dispute.java b/network/src/main/java/io/bisq/messages/arbitration/Dispute.java deleted file mode 100644 index 1a4b53ec88..0000000000 --- a/network/src/main/java/io/bisq/messages/arbitration/Dispute.java +++ /dev/null @@ -1,394 +0,0 @@ -/* - * This file is part of bisq. - * - * bisq is free software: you can redistribute it and/or modify it - * under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or (at - * your option) any later version. - * - * bisq is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public - * License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with bisq. If not, see . - */ - -package io.bisq.messages.arbitration; - -import com.google.protobuf.ByteString; -import io.bisq.app.Version; -import io.bisq.common.crypto.PubKeyRing; -import io.bisq.common.util.Utilities; -import io.bisq.common.wire.Payload; -import io.bisq.common.wire.proto.Messages; -import io.bisq.messages.trade.payload.Contract; -import io.bisq.storage.Storage; -import javafx.beans.property.*; -import javafx.collections.FXCollections; -import javafx.collections.ObservableList; -import lombok.EqualsAndHashCode; -import lombok.extern.slf4j.Slf4j; - -import javax.annotation.Nullable; -import java.io.IOException; -import java.io.ObjectInputStream; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Date; -import java.util.Optional; -import java.util.stream.Collectors; - -@Slf4j -@EqualsAndHashCode -public final class Dispute implements Payload { - // That object is sent over the wire, so we need to take care of version compatibility. - private static final long serialVersionUID = Version.P2P_NETWORK_VERSION; - - /////////////////////////////////////////////////////////////////////////////////////////// - // Fields - /////////////////////////////////////////////////////////////////////////////////////////// - - private final String tradeId; - private final String id; - private final int traderId; - private final boolean disputeOpenerIsBuyer; - private final boolean disputeOpenerIsOfferer; - private final long openingDate; - private final PubKeyRing traderPubKeyRing; - private final long tradeDate; - private final Contract contract; - private final byte[] contractHash; - @Nullable - private final byte[] depositTxSerialized; - @Nullable - private final byte[] payoutTxSerialized; - @Nullable - private final String depositTxId; - @Nullable - private final String payoutTxId; - private final String contractAsJson; - @Nullable // not always filled in - private final String offererContractSignature; - @Nullable // not always filled in - private final String takerContractSignature; - private final PubKeyRing arbitratorPubKeyRing; - private final boolean isSupportTicket; - - private final ArrayList disputeCommunicationMessages = new ArrayList<>(); - - private boolean isClosed; - @Nullable // not always filled in - private DisputeResult disputeResult; - @Nullable - private String disputePayoutTxId; - - transient private Storage> storage; - transient private ObservableList disputeCommunicationMessagesAsObservableList = FXCollections.observableArrayList(disputeCommunicationMessages); - transient private BooleanProperty isClosedProperty = new SimpleBooleanProperty(isClosed); - transient private ObjectProperty disputeResultProperty = new SimpleObjectProperty<>(disputeResult); - - - /////////////////////////////////////////////////////////////////////////////////////////// - // Constructor - /////////////////////////////////////////////////////////////////////////////////////////// - - public Dispute(Storage> storage, - String tradeId, - int traderId, - boolean disputeOpenerIsBuyer, - boolean disputeOpenerIsOfferer, - PubKeyRing traderPubKeyRing, - Date tradeDate, - Contract contract, - byte[] contractHash, - @Nullable byte[] depositTxSerialized, - @Nullable byte[] payoutTxSerialized, - @Nullable String depositTxId, - @Nullable String payoutTxId, - String contractAsJson, - @Nullable String offererContractSignature, - @Nullable String takerContractSignature, - PubKeyRing arbitratorPubKeyRing, - boolean isSupportTicket) { - this(tradeId, traderId, disputeOpenerIsBuyer, disputeOpenerIsOfferer, traderPubKeyRing, tradeDate, - contract, contractHash, depositTxSerialized, payoutTxSerialized, depositTxId, - payoutTxId, contractAsJson, offererContractSignature, takerContractSignature, - arbitratorPubKeyRing, isSupportTicket); - this.storage = storage; - } - - public Dispute(String tradeId, - int traderId, - boolean disputeOpenerIsBuyer, - boolean disputeOpenerIsOfferer, - PubKeyRing traderPubKeyRing, - Date tradeDate, - Contract contract, - byte[] contractHash, - @Nullable byte[] depositTxSerialized, - @Nullable byte[] payoutTxSerialized, - @Nullable String depositTxId, - @Nullable String payoutTxId, - String contractAsJson, - @Nullable String offererContractSignature, - @Nullable String takerContractSignature, - PubKeyRing arbitratorPubKeyRing, - boolean isSupportTicket) { - this.tradeId = tradeId; - this.traderId = traderId; - this.disputeOpenerIsBuyer = disputeOpenerIsBuyer; - this.disputeOpenerIsOfferer = disputeOpenerIsOfferer; - this.traderPubKeyRing = traderPubKeyRing; - this.tradeDate = tradeDate.getTime(); - this.contract = contract; - this.contractHash = contractHash; - this.depositTxSerialized = depositTxSerialized; - this.payoutTxSerialized = payoutTxSerialized; - this.depositTxId = depositTxId; - this.payoutTxId = payoutTxId; - this.contractAsJson = contractAsJson; - this.offererContractSignature = offererContractSignature; - this.takerContractSignature = takerContractSignature; - this.arbitratorPubKeyRing = arbitratorPubKeyRing; - this.isSupportTicket = isSupportTicket; - this.openingDate = new Date().getTime(); - - id = tradeId + "_" + traderId; - fillInTransients(); - } - - private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { - try { - in.defaultReadObject(); - fillInTransients(); - } catch (Throwable t) { - log.warn("Cannot be deserialized." + t.getMessage()); - } - } - - private void fillInTransients() { - disputeCommunicationMessagesAsObservableList = FXCollections.observableArrayList(disputeCommunicationMessages); - isClosedProperty = new SimpleBooleanProperty(isClosed); - disputeResultProperty = new SimpleObjectProperty<>(disputeResult); - } - - public void addDisputeMessage(DisputeCommunicationMessage disputeCommunicationMessage) { - if (!disputeCommunicationMessages.contains(disputeCommunicationMessage)) { - disputeCommunicationMessages.add(disputeCommunicationMessage); - disputeCommunicationMessagesAsObservableList.add(disputeCommunicationMessage); - storage.queueUpForSave(); - } else { - log.error("disputeDirectMessage already exists"); - } - } - - - /////////////////////////////////////////////////////////////////////////////////////////// - // Setters - /////////////////////////////////////////////////////////////////////////////////////////// - - // In case we get the object via the network storage is not set as its transient, so we need to set it. - public void setStorage(Storage> storage) { - this.storage = storage; - } - - public void setIsClosed(boolean isClosed) { - boolean changed = this.isClosed != isClosed; - this.isClosed = isClosed; - isClosedProperty.set(isClosed); - if (changed) - storage.queueUpForSave(); - } - - public void setDisputeResult(DisputeResult disputeResult) { - boolean changed = this.disputeResult == null || !this.disputeResult.equals(disputeResult); - this.disputeResult = disputeResult; - disputeResultProperty.set(disputeResult); - if (changed) - storage.queueUpForSave(); - } - - public void setDisputePayoutTxId(String disputePayoutTxId) { - boolean changed = this.disputePayoutTxId == null || !this.disputePayoutTxId.equals(disputePayoutTxId); - this.disputePayoutTxId = disputePayoutTxId; - if (changed) - storage.queueUpForSave(); - } - - - /////////////////////////////////////////////////////////////////////////////////////////// - // Getters - /////////////////////////////////////////////////////////////////////////////////////////// - - public String getId() { - return id; - } - - public String getTradeId() { - return tradeId; - } - - public String getShortTradeId() { - return Utilities.getShortId(tradeId); - } - - public int getTraderId() { - return traderId; - } - - public boolean isDisputeOpenerIsBuyer() { - return disputeOpenerIsBuyer; - } - - public boolean isDisputeOpenerIsOfferer() { - return disputeOpenerIsOfferer; - } - - public Date getOpeningDate() { - return new Date(openingDate); - } - - public PubKeyRing getTraderPubKeyRing() { - return traderPubKeyRing; - } - - public Contract getContract() { - return contract; - } - - @Nullable - public byte[] getDepositTxSerialized() { - return depositTxSerialized; - } - - @Nullable - public byte[] getPayoutTxSerialized() { - return payoutTxSerialized; - } - - @Nullable - public String getDepositTxId() { - return depositTxId; - } - - @Nullable - public String getPayoutTxId() { - return payoutTxId; - } - - public String getContractAsJson() { - return contractAsJson; - } - - @Nullable - public String getOffererContractSignature() { - return offererContractSignature; - } - - @Nullable - public String getTakerContractSignature() { - return takerContractSignature; - } - - public ObservableList getDisputeCommunicationMessagesAsObservableList() { - return disputeCommunicationMessagesAsObservableList; - } - - public boolean isClosed() { - return isClosedProperty.get(); - } - - public ReadOnlyBooleanProperty isClosedProperty() { - return isClosedProperty; - } - - public PubKeyRing getArbitratorPubKeyRing() { - return arbitratorPubKeyRing; - } - - public ObjectProperty disputeResultProperty() { - return disputeResultProperty; - } - - public boolean isSupportTicket() { - return isSupportTicket; - } - - public byte[] getContractHash() { - return contractHash; - } - - public Date getTradeDate() { - return new Date(tradeDate); - } - - @org.jetbrains.annotations.Nullable - public String getDisputePayoutTxId() { - return disputePayoutTxId; - } - - @Override - public String toString() { - return "Dispute{" + - "tradeId='" + tradeId + '\'' + - ", id='" + id + '\'' + - ", traderId=" + traderId + - ", disputeOpenerIsBuyer=" + disputeOpenerIsBuyer + - ", disputeOpenerIsOfferer=" + disputeOpenerIsOfferer + - ", openingDate=" + openingDate + - ", traderPubKeyRing=" + traderPubKeyRing + - ", tradeDate=" + tradeDate + - ", contract=" + contract + - ", contractHash=" + Arrays.toString(contractHash) + - ", depositTxSerialized=" + Arrays.toString(depositTxSerialized) + - ", payoutTxSerialized=" + Arrays.toString(payoutTxSerialized) + - ", depositTxId='" + depositTxId + '\'' + - ", payoutTxId='" + payoutTxId + '\'' + - ", contractAsJson='" + contractAsJson + '\'' + - ", offererContractSignature='" + offererContractSignature + '\'' + - ", takerContractSignature='" + takerContractSignature + '\'' + - ", arbitratorPubKeyRing=" + arbitratorPubKeyRing + - ", isSupportTicket=" + isSupportTicket + - ", disputeCommunicationMessages=" + disputeCommunicationMessages + - ", isClosed=" + isClosed + - ", disputeResult=" + disputeResult + - ", disputePayoutTxId='" + disputePayoutTxId + '\'' + - ", disputeCommunicationMessagesAsObservableList=" + disputeCommunicationMessagesAsObservableList + - ", isClosedProperty=" + isClosedProperty + - ", disputeResultProperty=" + disputeResultProperty + - '}'; - } - - @Override - public Messages.Dispute toProtoBuf() { - Messages.Dispute.Builder builder = Messages.Dispute.newBuilder() - .setTradeId(tradeId) - .setId(id) - .setTraderId(traderId) - .setDisputeOpenerIsBuyer(disputeOpenerIsBuyer) - .setDisputeOpenerIsOfferer(disputeOpenerIsOfferer) - .setOpeningDate(openingDate) - .setTraderPubKeyRing(traderPubKeyRing.toProtoBuf()) - .setTradeDate(tradeDate) - .setContract(contract.toProtoBuf()) - .setContractHash(ByteString.copyFrom(contractHash)) - .setContractAsJson(contractAsJson) - .setArbitratorPubKeyRing(arbitratorPubKeyRing.toProtoBuf()) - .setIsSupportTicket(isSupportTicket) - .addAllDisputeCommunicationMessages(disputeCommunicationMessages.stream().map( - disputeCommunicationMessage -> disputeCommunicationMessage.toProtoBuf().getDisputeCommunicationMessage()).collect(Collectors.toList())) - .setIsClosed(isClosed); - - Optional.ofNullable(depositTxSerialized).ifPresent(tx -> builder.setDepositTxSerialized(ByteString.copyFrom(tx))); - Optional.ofNullable(payoutTxSerialized).ifPresent(tx -> builder.setPayoutTxSerialized(ByteString.copyFrom(tx))); - Optional.ofNullable(depositTxId).ifPresent(builder::setDepositTxId); - Optional.ofNullable(payoutTxId).ifPresent(builder::setPayoutTxId); - Optional.ofNullable(disputePayoutTxId).ifPresent(builder::setDisputePayoutTxId); - Optional.ofNullable(takerContractSignature).ifPresent(builder::setTakerContractSignature); - Optional.ofNullable(offererContractSignature).ifPresent(builder::setOffererContractSignature); - Optional.ofNullable(disputeResult).ifPresent(result -> builder.setDisputeResult(disputeResult.toProtoBuf())); - return builder.build(); - } -} diff --git a/network/src/main/java/io/bisq/messages/arbitration/DisputeCommunicationMessage.java b/network/src/main/java/io/bisq/messages/arbitration/DisputeCommunicationMessage.java deleted file mode 100644 index ca886e9198..0000000000 --- a/network/src/main/java/io/bisq/messages/arbitration/DisputeCommunicationMessage.java +++ /dev/null @@ -1,219 +0,0 @@ -/* - * This file is part of bisq. - * - * bisq is free software: you can redistribute it and/or modify it - * under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or (at - * your option) any later version. - * - * bisq is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public - * License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with bisq. If not, see . - */ - -package io.bisq.messages.arbitration; - -import io.bisq.app.Version; -import io.bisq.common.util.ProtoBufferUtils; -import io.bisq.common.wire.proto.Messages; -import io.bisq.messages.arbitration.payload.Attachment; -import io.bisq.p2p.NodeAddress; -import javafx.beans.property.BooleanProperty; -import javafx.beans.property.SimpleBooleanProperty; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.io.IOException; -import java.io.ObjectInputStream; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; -import java.util.Optional; -import java.util.stream.Collectors; - -public final class DisputeCommunicationMessage extends DisputeMessage { - // That object is sent over the wire, so we need to take care of version compatibility. - private static final long serialVersionUID = Version.P2P_NETWORK_VERSION; - private static final Logger log = LoggerFactory.getLogger(DisputeCommunicationMessage.class); - - private final long date; - private final String tradeId; - - private final int traderId; - private final boolean senderIsTrader; - private final String message; - private final ArrayList attachments = new ArrayList<>(); - private boolean arrived; - private boolean storedInMailbox; - private boolean isSystemMessage; - private final NodeAddress myNodeAddress; - - transient private BooleanProperty arrivedProperty = new SimpleBooleanProperty(); - transient private BooleanProperty storedInMailboxProperty = new SimpleBooleanProperty(); - - public DisputeCommunicationMessage(String tradeId, int traderId, boolean senderIsTrader, String message, - List attachments, NodeAddress myNodeAddress, long date, - boolean arrived, boolean storedInMailbox) { - this.tradeId = tradeId; - this.traderId = traderId; - this.senderIsTrader = senderIsTrader; - this.message = message; - this.myNodeAddress = myNodeAddress; - this.date = date; - this.arrived = arrived; - this.storedInMailbox = storedInMailbox; - Optional.ofNullable(attachments).ifPresent(attachments1 -> addAllAttachments(attachments)); - updateBooleanProperties(); - } - - public DisputeCommunicationMessage(String tradeId, int traderId, boolean senderIsTrader, String message, - NodeAddress myNodeAddress) { - this(tradeId, traderId, senderIsTrader, message, null, myNodeAddress, new Date().getTime(), - false, false); - } - - private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { - try { - in.defaultReadObject(); - updateBooleanProperties(); - } catch (Throwable t) { - log.warn("Cannot be deserialized." + t.getMessage()); - } - } - - private void updateBooleanProperties() { - arrivedProperty = new SimpleBooleanProperty(arrived); - storedInMailboxProperty = new SimpleBooleanProperty(storedInMailbox); - } - - - @Override - public NodeAddress getSenderNodeAddress() { - return myNodeAddress; - } - - public void addAttachment(Attachment attachment) { - attachments.add(attachment); - } - - public void addAllAttachments(List attachments) { - this.attachments.addAll(attachments); - } - - public void setArrived(boolean arrived) { - this.arrived = arrived; - this.arrivedProperty.set(arrived); - } - - public void setStoredInMailbox(boolean storedInMailbox) { - this.storedInMailbox = storedInMailbox; - this.storedInMailboxProperty.set(storedInMailbox); - } - - public Date getDate() { - return new Date(date); - } - - public boolean isSenderIsTrader() { - return senderIsTrader; - } - - public String getMessage() { - return message; - } - - public int getTraderId() { - return traderId; - } - - public BooleanProperty arrivedProperty() { - return arrivedProperty; - } - - public BooleanProperty storedInMailboxProperty() { - return storedInMailboxProperty; - } - - public List getAttachments() { - return attachments; - } - - public String getTradeId() { - return tradeId; - } - - public boolean isSystemMessage() { - return isSystemMessage; - } - - public void setIsSystemMessage(boolean isSystemMessage) { - this.isSystemMessage = isSystemMessage; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (!(o instanceof DisputeCommunicationMessage)) return false; - - DisputeCommunicationMessage that = (DisputeCommunicationMessage) o; - - if (date != that.date) return false; - if (traderId != that.traderId) return false; - if (senderIsTrader != that.senderIsTrader) return false; - if (arrived != that.arrived) return false; - if (storedInMailbox != that.storedInMailbox) return false; - if (isSystemMessage != that.isSystemMessage) return false; - if (tradeId != null ? !tradeId.equals(that.tradeId) : that.tradeId != null) return false; - if (message != null ? !message.equals(that.message) : that.message != null) return false; - if (attachments != null ? !attachments.equals(that.attachments) : that.attachments != null) return false; - return !(myNodeAddress != null ? !myNodeAddress.equals(that.myNodeAddress) : that.myNodeAddress != null); - - } - - @Override - public int hashCode() { - int result = (int) (date ^ (date >>> 32)); - result = 31 * result + (tradeId != null ? tradeId.hashCode() : 0); - result = 31 * result + traderId; - result = 31 * result + (senderIsTrader ? 1 : 0); - result = 31 * result + (message != null ? message.hashCode() : 0); - result = 31 * result + (attachments != null ? attachments.hashCode() : 0); - result = 31 * result + (arrived ? 1 : 0); - result = 31 * result + (storedInMailbox ? 1 : 0); - result = 31 * result + (isSystemMessage ? 1 : 0); - result = 31 * result + (myNodeAddress != null ? myNodeAddress.hashCode() : 0); - return result; - } - - @Override - public String toString() { - return "DisputeDirectMessage{" + - "date=" + date + - ", tradeId='" + tradeId + '\'' + - ", traderId='" + traderId + '\'' + - ", senderIsTrader=" + senderIsTrader + - ", message='" + message + '\'' + - ", attachments=" + attachments + - '}'; - } - - @Override - public Messages.Envelope toProtoBuf() { - Messages.Envelope.Builder baseEnvelope = ProtoBufferUtils.getBaseEnvelope(); - return baseEnvelope.setDisputeCommunicationMessage(Messages.DisputeCommunicationMessage.newBuilder() - .setDate(date) - .setTradeId(tradeId) - .setTraderId(traderId) - .setSenderIsTrader(senderIsTrader) - .setMessage(message) - .addAllAttachments(attachments.stream().map(attachment -> attachment.toProtoBuf()).collect(Collectors.toList())) - .setArrived(arrived) - .setStoredInMailbox(storedInMailbox) - .setIsSystemMessage(isSystemMessage) - .setMyNodeAddress(myNodeAddress.toProtoBuf())).build(); - } -} diff --git a/network/src/main/java/io/bisq/messages/arbitration/DisputeList.java b/network/src/main/java/io/bisq/messages/arbitration/DisputeList.java deleted file mode 100644 index 6f6abae90f..0000000000 --- a/network/src/main/java/io/bisq/messages/arbitration/DisputeList.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * This file is part of bisq. - * - * bisq is free software: you can redistribute it and/or modify it - * under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or (at - * your option) any later version. - * - * bisq is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public - * License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with bisq. If not, see . - */ - -package io.bisq.messages.arbitration; - -import io.bisq.app.Version; -import io.bisq.common.persistance.Persistable; -import io.bisq.storage.Storage; -import javafx.collections.FXCollections; -import javafx.collections.ObservableList; -import org.jetbrains.annotations.NotNull; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.io.IOException; -import java.io.ObjectInputStream; -import java.util.ArrayList; - -public final class DisputeList extends ArrayList implements Persistable { - // That object is saved to disc. We need to take care of changes to not break deserialization. - private static final long serialVersionUID = Version.LOCAL_DB_VERSION; - - private static final Logger log = LoggerFactory.getLogger(DisputeList.class); - - final transient private Storage> storage; - transient private ObservableList observableList; - - public DisputeList(Storage> storage) { - this.storage = storage; - - DisputeList persisted = storage.initAndGetPersisted(this); - if (persisted != null) { - this.addAll(persisted); - } - observableList = FXCollections.observableArrayList(this); - } - - private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { - try { - in.defaultReadObject(); - } catch (Throwable t) { - log.warn("Cannot be deserialized." + t.getMessage()); - } - } - - @Override - public boolean add(DisputeCase disputeCase) { - if (!super.contains(disputeCase)) { - boolean changed = super.add(disputeCase); - getObservableList().add(disputeCase); - if (changed) - storage.queueUpForSave(); - return changed; - } else { - return false; - } - } - - @Override - public boolean remove(Object disputeCase) { - boolean changed = super.remove(disputeCase); - getObservableList().remove(disputeCase); - if (changed) - storage.queueUpForSave(); - return changed; - } - - private ObservableList getObservableList() { - if (observableList == null) - observableList = FXCollections.observableArrayList(this); - return observableList; - } - - @NotNull - @Override - public String toString() { - return "DisputeList{" + - ", observableList=" + observableList + - '}'; - } -} diff --git a/network/src/main/java/io/bisq/messages/arbitration/DisputeMessage.java b/network/src/main/java/io/bisq/messages/arbitration/DisputeMessage.java deleted file mode 100644 index 977fdef706..0000000000 --- a/network/src/main/java/io/bisq/messages/arbitration/DisputeMessage.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * This file is part of bisq. - * - * bisq is free software: you can redistribute it and/or modify it - * under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or (at - * your option) any later version. - * - * bisq is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public - * License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with bisq. If not, see . - */ - -package io.bisq.messages.arbitration; - -import io.bisq.app.Version; -import io.bisq.p2p.messaging.MailboxMessage; - -import java.util.UUID; - -public abstract class DisputeMessage implements MailboxMessage { - //TODO add serialVersionUID also in superclasses as changes would break compatibility - private final int messageVersion = Version.getP2PMessageVersion(); - private final String uid; - - public DisputeMessage(String uid) { - this.uid = uid; - } - - public DisputeMessage() { - uid = UUID.randomUUID().toString(); - } - - @Override - public int getMessageVersion() { - return messageVersion; - } - - @Override - public String getUID() { - return uid; - } -} diff --git a/network/src/main/java/io/bisq/messages/arbitration/DisputeResultMessage.java b/network/src/main/java/io/bisq/messages/arbitration/DisputeResultMessage.java deleted file mode 100644 index a73b786d2d..0000000000 --- a/network/src/main/java/io/bisq/messages/arbitration/DisputeResultMessage.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * This file is part of bisq. - * - * bisq is free software: you can redistribute it and/or modify it - * under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or (at - * your option) any later version. - * - * bisq is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public - * License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with bisq. If not, see . - */ - -package io.bisq.messages.arbitration; - -import io.bisq.app.Version; -import io.bisq.common.util.ProtoBufferUtils; -import io.bisq.common.wire.proto.Messages; -import io.bisq.p2p.NodeAddress; - -public final class DisputeResultMessage extends DisputeMessage { - // That object is sent over the wire, so we need to take care of version compatibility. - private static final long serialVersionUID = Version.P2P_NETWORK_VERSION; - - public final DisputeResult disputeResult; - private final NodeAddress myNodeAddress; - - public DisputeResultMessage(DisputeResult disputeResult, NodeAddress myNodeAddress) { - this.disputeResult = disputeResult; - this.myNodeAddress = myNodeAddress; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (!(o instanceof DisputeResultMessage)) return false; - - DisputeResultMessage that = (DisputeResultMessage) o; - - if (disputeResult != null ? !disputeResult.equals(that.disputeResult) : that.disputeResult != null) - return false; - return !(myNodeAddress != null ? !myNodeAddress.equals(that.myNodeAddress) : that.myNodeAddress != null); - - } - - @Override - public int hashCode() { - int result = disputeResult != null ? disputeResult.hashCode() : 0; - result = 31 * result + (myNodeAddress != null ? myNodeAddress.hashCode() : 0); - return result; - } - - @Override - public NodeAddress getSenderNodeAddress() { - return myNodeAddress; - } - - @Override - public Messages.Envelope toProtoBuf() { - Messages.Envelope.Builder baseEnvelope = ProtoBufferUtils.getBaseEnvelope(); - return baseEnvelope.setDisputeResultMessage(Messages.DisputeResultMessage.newBuilder() - .setDisputeResult(disputeResult.toProtoBuf()) - .setMyNodeAddress(myNodeAddress.toProtoBuf()) - .setUid(getUID())) - .build(); - } -} diff --git a/network/src/main/java/io/bisq/messages/arbitration/OpenNewDisputeMessage.java b/network/src/main/java/io/bisq/messages/arbitration/OpenNewDisputeMessage.java deleted file mode 100644 index b4afdbfe05..0000000000 --- a/network/src/main/java/io/bisq/messages/arbitration/OpenNewDisputeMessage.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * This file is part of bisq. - * - * bisq is free software: you can redistribute it and/or modify it - * under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or (at - * your option) any later version. - * - * bisq is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public - * License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with bisq. If not, see . - */ - -package io.bisq.messages.arbitration; - -import io.bisq.app.Version; -import io.bisq.common.util.ProtoBufferUtils; -import io.bisq.common.wire.proto.Messages; -import io.bisq.p2p.NodeAddress; - -public final class OpenNewDisputeMessage extends DisputeMessage { - // That object is sent over the wire, so we need to take care of version compatibility. - private static final long serialVersionUID = Version.P2P_NETWORK_VERSION; - - public final Dispute dispute; - private final NodeAddress myNodeAddress; - - public OpenNewDisputeMessage(Dispute dispute, NodeAddress myNodeAddress) { - super(); - this.dispute = dispute; - this.myNodeAddress = myNodeAddress; - } - - public OpenNewDisputeMessage(Dispute dispute, NodeAddress myNodeAddress, String uid) { - super(uid); - this.dispute = dispute; - this.myNodeAddress = myNodeAddress; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (!(o instanceof OpenNewDisputeMessage)) return false; - - OpenNewDisputeMessage that = (OpenNewDisputeMessage) o; - - if (dispute != null ? !dispute.equals(that.dispute) : that.dispute != null) return false; - return !(myNodeAddress != null ? !myNodeAddress.equals(that.myNodeAddress) : that.myNodeAddress != null); - - } - - @Override - public int hashCode() { - int result = dispute != null ? dispute.hashCode() : 0; - result = 31 * result + (myNodeAddress != null ? myNodeAddress.hashCode() : 0); - return result; - } - - @Override - public NodeAddress getSenderNodeAddress() { - return myNodeAddress; - } - - @Override - public Messages.Envelope toProtoBuf() { - Messages.Envelope.Builder baseEnvelope = ProtoBufferUtils.getBaseEnvelope(); - return baseEnvelope.setOpenNewDisputeMessage(Messages.OpenNewDisputeMessage.newBuilder() - .setDispute(dispute.toProtoBuf()).setMyNodeAddress(myNodeAddress.toProtoBuf()).setUid(getUID())).build(); - } -} diff --git a/network/src/main/java/io/bisq/messages/arbitration/PeerOpenedDisputeMessage.java b/network/src/main/java/io/bisq/messages/arbitration/PeerOpenedDisputeMessage.java deleted file mode 100644 index ebc2da73fd..0000000000 --- a/network/src/main/java/io/bisq/messages/arbitration/PeerOpenedDisputeMessage.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * This file is part of bisq. - * - * bisq is free software: you can redistribute it and/or modify it - * under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or (at - * your option) any later version. - * - * bisq is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public - * License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with bisq. If not, see . - */ - -package io.bisq.messages.arbitration; - -import io.bisq.app.Version; -import io.bisq.common.util.ProtoBufferUtils; -import io.bisq.common.wire.proto.Messages; -import io.bisq.p2p.NodeAddress; - -public final class PeerOpenedDisputeMessage extends DisputeMessage { - // That object is sent over the wire, so we need to take care of version compatibility. - private static final long serialVersionUID = Version.P2P_NETWORK_VERSION; - - public final Dispute dispute; - private final NodeAddress myNodeAddress; - - public PeerOpenedDisputeMessage(Dispute dispute, NodeAddress myNodeAddress) { - this.dispute = dispute; - this.myNodeAddress = myNodeAddress; - } - - public PeerOpenedDisputeMessage(Dispute dispute, NodeAddress myNodeAddress, String uid) { - super(uid); - this.dispute = dispute; - this.myNodeAddress = myNodeAddress; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (!(o instanceof PeerOpenedDisputeMessage)) return false; - - PeerOpenedDisputeMessage that = (PeerOpenedDisputeMessage) o; - - if (dispute != null ? !dispute.equals(that.dispute) : that.dispute != null) return false; - return !(myNodeAddress != null ? !myNodeAddress.equals(that.myNodeAddress) : that.myNodeAddress != null); - - } - - @Override - public int hashCode() { - int result = dispute != null ? dispute.hashCode() : 0; - result = 31 * result + (myNodeAddress != null ? myNodeAddress.hashCode() : 0); - return result; - } - - @Override - public NodeAddress getSenderNodeAddress() { - return myNodeAddress; - } - - @Override - public Messages.Envelope toProtoBuf() { - Messages.Envelope.Builder baseEnvelope = ProtoBufferUtils.getBaseEnvelope(); - return baseEnvelope.setPeerOpenedDisputeMessage(Messages.PeerOpenedDisputeMessage.newBuilder() - .setDispute(dispute.toProtoBuf()) - .setMyNodeAddress(myNodeAddress.toProtoBuf()) - .setUid(getUID())).build(); - } -} diff --git a/network/src/main/java/io/bisq/messages/arbitration/PeerPublishedPayoutTxMessage.java b/network/src/main/java/io/bisq/messages/arbitration/PeerPublishedPayoutTxMessage.java deleted file mode 100644 index fdd3cad059..0000000000 --- a/network/src/main/java/io/bisq/messages/arbitration/PeerPublishedPayoutTxMessage.java +++ /dev/null @@ -1,84 +0,0 @@ -/* - * This file is part of bisq. - * - * bisq is free software: you can redistribute it and/or modify it - * under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or (at - * your option) any later version. - * - * bisq is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public - * License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with bisq. If not, see . - */ - -package io.bisq.messages.arbitration; - -import com.google.protobuf.ByteString; -import io.bisq.app.Version; -import io.bisq.common.util.ProtoBufferUtils; -import io.bisq.common.wire.proto.Messages; -import io.bisq.p2p.NodeAddress; - -import java.util.Arrays; - -public final class PeerPublishedPayoutTxMessage extends DisputeMessage { - // That object is sent over the wire, so we need to take care of version compatibility. - private static final long serialVersionUID = Version.P2P_NETWORK_VERSION; - - public final byte[] transaction; - public final String tradeId; - private final NodeAddress myNodeAddress; - - public PeerPublishedPayoutTxMessage(byte[] transaction, String tradeId, NodeAddress myNodeAddress) { - super(); - this.transaction = transaction; - this.tradeId = tradeId; - this.myNodeAddress = myNodeAddress; - } - - public PeerPublishedPayoutTxMessage(byte[] transaction, String tradeId, NodeAddress myNodeAddress, String uid) { - super(uid); - this.transaction = transaction; - this.tradeId = tradeId; - this.myNodeAddress = myNodeAddress; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (!(o instanceof PeerPublishedPayoutTxMessage)) return false; - - PeerPublishedPayoutTxMessage that = (PeerPublishedPayoutTxMessage) o; - - if (!Arrays.equals(transaction, that.transaction)) return false; - if (tradeId != null ? !tradeId.equals(that.tradeId) : that.tradeId != null) return false; - return !(myNodeAddress != null ? !myNodeAddress.equals(that.myNodeAddress) : that.myNodeAddress != null); - - } - - @Override - public int hashCode() { - int result = transaction != null ? Arrays.hashCode(transaction) : 0; - result = 31 * result + (tradeId != null ? tradeId.hashCode() : 0); - result = 31 * result + (myNodeAddress != null ? myNodeAddress.hashCode() : 0); - return result; - } - - @Override - public NodeAddress getSenderNodeAddress() { - return myNodeAddress; - } - - @Override - public Messages.Envelope toProtoBuf() { - Messages.Envelope.Builder baseEnvelope = ProtoBufferUtils.getBaseEnvelope(); - return baseEnvelope.setPeerPublishedPayoutTxMessage(Messages.PeerPublishedPayoutTxMessage.newBuilder() - .setTransaction(ByteString.copyFrom(transaction)) - .setTradeId(tradeId) - .setMyNodeAddress(myNodeAddress.toProtoBuf())).build(); - } -} diff --git a/network/src/main/java/io/bisq/messages/arbitration/payload/Attachment.java b/network/src/main/java/io/bisq/messages/arbitration/payload/Attachment.java deleted file mode 100644 index 1afd55c203..0000000000 --- a/network/src/main/java/io/bisq/messages/arbitration/payload/Attachment.java +++ /dev/null @@ -1,65 +0,0 @@ -package io.bisq.messages.arbitration.payload; - -import com.google.protobuf.ByteString; -import io.bisq.app.Version; -import io.bisq.common.wire.Payload; -import io.bisq.common.wire.proto.Messages; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.Arrays; - -public final class Attachment implements Payload { - // That object is sent over the wire, so we need to take care of version compatibility. - private static final long serialVersionUID = Version.P2P_NETWORK_VERSION; - private static final Logger log = LoggerFactory.getLogger(Attachment.class); - - private final byte[] bytes; - private final String fileName; - - public Attachment(String fileName, byte[] bytes) { - this.fileName = fileName; - this.bytes = bytes; - } - - public byte[] getBytes() { - return bytes; - } - - public String getFileName() { - return fileName; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (!(o instanceof Attachment)) return false; - - Attachment that = (Attachment) o; - - if (!Arrays.equals(bytes, that.bytes)) return false; - return !(fileName != null ? !fileName.equals(that.fileName) : that.fileName != null); - - } - - @Override - public int hashCode() { - int result = bytes != null ? Arrays.hashCode(bytes) : 0; - result = 31 * result + (fileName != null ? fileName.hashCode() : 0); - return result; - } - - @Override - public String toString() { - return "Attachment{" + - "description=" + fileName + - ", data=" + Arrays.toString(bytes) + - '}'; - } - - @Override - public Messages.Attachment toProtoBuf() { - return Messages.Attachment.newBuilder().setBytes(ByteString.copyFrom(bytes)) - .setFileName(fileName).build(); - } -} \ No newline at end of file diff --git a/network/src/main/java/io/bisq/messages/availability/AvailabilityResult.java b/network/src/main/java/io/bisq/messages/availability/AvailabilityResult.java deleted file mode 100644 index aabde16a78..0000000000 --- a/network/src/main/java/io/bisq/messages/availability/AvailabilityResult.java +++ /dev/null @@ -1,11 +0,0 @@ -package io.bisq.messages.availability; - -public enum AvailabilityResult { - UNKNOWN_FAILURE, - AVAILABLE, - OFFER_TAKEN, - PRICE_OUT_OF_TOLERANCE, - MARKET_PRICE_NOT_AVAILABLE, - NO_ARBITRATORS, - USER_IGNORED -} diff --git a/network/src/main/java/io/bisq/messages/availability/OfferAvailabilityRequest.java b/network/src/main/java/io/bisq/messages/availability/OfferAvailabilityRequest.java deleted file mode 100644 index 2681d6da69..0000000000 --- a/network/src/main/java/io/bisq/messages/availability/OfferAvailabilityRequest.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * This file is part of bisq. - * - * bisq is free software: you can redistribute it and/or modify it - * under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or (at - * your option) any later version. - * - * bisq is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public - * License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with bisq. If not, see . - */ - -package io.bisq.messages.availability; - -import io.bisq.app.Capabilities; -import io.bisq.app.Version; -import io.bisq.common.crypto.PubKeyRing; -import io.bisq.common.wire.proto.Messages; -import io.bisq.p2p.messaging.SupportedCapabilitiesMessage; - -import javax.annotation.Nullable; -import java.util.ArrayList; - -// We add here the SupportedCapabilitiesMessage interface as that message always predates a direct connection -// to the trading peer -public final class OfferAvailabilityRequest extends OfferMessage implements SupportedCapabilitiesMessage { - // That object is sent over the wire, so we need to take care of version compatibility. - private static final long serialVersionUID = Version.P2P_NETWORK_VERSION; - - private final PubKeyRing pubKeyRing; - public final long takersTradePrice; - @Nullable - private ArrayList supportedCapabilities = Capabilities.getCapabilities(); - - public OfferAvailabilityRequest(String offerId, PubKeyRing pubKeyRing, long takersTradePrice) { - super(offerId); - this.pubKeyRing = pubKeyRing; - this.takersTradePrice = takersTradePrice; - } - - @Override - @Nullable - public ArrayList getSupportedCapabilities() { - return supportedCapabilities; - } - - public PubKeyRing getPubKeyRing() { - return pubKeyRing; - } - - @Override - public String toString() { - return "OfferAvailabilityRequest{" + - "pubKeyRing=" + pubKeyRing + - "} " + super.toString(); - } - - @Override - public Messages.Envelope toProtoBuf() { - return Messages.Envelope.newBuilder() - .setOfferAvailabilityRequest(Messages.OfferAvailabilityRequest.newBuilder() - .setOfferId(offerId) - .setPubKeyRing(pubKeyRing.toProtoBuf()) - .setTakersTradePrice(takersTradePrice) - .addAllSupportedCapabilities(supportedCapabilities)).build(); - } -} diff --git a/network/src/main/java/io/bisq/messages/availability/OfferAvailabilityResponse.java b/network/src/main/java/io/bisq/messages/availability/OfferAvailabilityResponse.java deleted file mode 100644 index 6e25a51a52..0000000000 --- a/network/src/main/java/io/bisq/messages/availability/OfferAvailabilityResponse.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * This file is part of bisq. - * - * bisq is free software: you can redistribute it and/or modify it - * under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or (at - * your option) any later version. - * - * bisq is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public - * License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with bisq. If not, see . - */ - -package io.bisq.messages.availability; - - -import io.bisq.app.Capabilities; -import io.bisq.app.Version; -import io.bisq.common.util.ProtoBufferUtils; -import io.bisq.common.wire.proto.Messages; -import io.bisq.p2p.messaging.SupportedCapabilitiesMessage; - -import javax.annotation.Nullable; -import java.util.ArrayList; - -// We add here the SupportedCapabilitiesMessage interface as that message always predates a direct connection -// to the trading peer -public final class OfferAvailabilityResponse extends OfferMessage implements SupportedCapabilitiesMessage { - // That object is sent over the wire, so we need to take care of version compatibility. - private static final long serialVersionUID = Version.P2P_NETWORK_VERSION; - - public final AvailabilityResult availabilityResult; - - // TODO keep for backward compatibility. Can be removed once everyone is on v0.4.9 - public boolean isAvailable; - @Nullable - private ArrayList supportedCapabilities = Capabilities.getCapabilities(); - - public OfferAvailabilityResponse(String offerId, AvailabilityResult availabilityResult) { - super(offerId); - this.availabilityResult = availabilityResult; - isAvailable = availabilityResult == AvailabilityResult.AVAILABLE; - } - - @Override - @Nullable - public ArrayList getSupportedCapabilities() { - return supportedCapabilities; - } - - @Override - public String toString() { - return "OfferAvailabilityResponse{" + - "availabilityResult=" + availabilityResult + - "} " + super.toString(); - } - - @Override - public Messages.Envelope toProtoBuf() { - Messages.Envelope.Builder baseEnvelope = ProtoBufferUtils.getBaseEnvelope(); - return baseEnvelope.setOfferAvailabilityResponse(Messages.OfferAvailabilityResponse.newBuilder().setMessageVersion(getMessageVersion()) - .setOfferId(offerId) - .setAvailabilityResult(Messages.AvailabilityResult.forNumber(availabilityResult.ordinal())) - .addAllSupportedCapabilities(supportedCapabilities)).build(); - } -} diff --git a/network/src/main/java/io/bisq/messages/availability/OfferMessage.java b/network/src/main/java/io/bisq/messages/availability/OfferMessage.java deleted file mode 100644 index ef2990fa98..0000000000 --- a/network/src/main/java/io/bisq/messages/availability/OfferMessage.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * This file is part of bisq. - * - * bisq is free software: you can redistribute it and/or modify it - * under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or (at - * your option) any later version. - * - * bisq is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public - * License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with bisq. If not, see . - */ - -package io.bisq.messages.availability; - -import io.bisq.app.Version; -import io.bisq.p2p.messaging.DirectMessage; - -import javax.annotation.concurrent.Immutable; - -@Immutable -public abstract class OfferMessage implements DirectMessage { - //TODO add serialVersionUID also in superclasses as changes would break compatibility - // That object is sent over the wire, so we need to take care of version compatibility. - private static final long serialVersionUID = Version.getP2PMessageVersion(); - - private final int messageVersion = Version.getP2PMessageVersion(); - public final String offerId; - - OfferMessage(String offerId) { - this.offerId = offerId; - } - - @Override - public int getMessageVersion() { - return messageVersion; - } - - @Override - public String toString() { - return "OfferMessage{" + - "messageVersion=" + messageVersion + - ", offerId='" + offerId + '\'' + - '}'; - } -} diff --git a/network/src/main/java/io/bisq/messages/btc/BitcoinNetwork.java b/network/src/main/java/io/bisq/messages/btc/BitcoinNetwork.java deleted file mode 100644 index af700217c8..0000000000 --- a/network/src/main/java/io/bisq/messages/btc/BitcoinNetwork.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * This file is part of bisq. - * - * bisq is free software: you can redistribute it and/or modify it - * under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or (at - * your option) any later version. - * - * bisq is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public - * License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with bisq. If not, see . - */ - -package io.bisq.messages.btc; - -import org.bitcoinj.core.NetworkParameters; -import org.bitcoinj.params.MainNetParams; -import org.bitcoinj.params.RegTestParams; -import org.bitcoinj.params.TestNet3Params; - -public enum BitcoinNetwork { - MAINNET(MainNetParams.get()), - TESTNET(TestNet3Params.get()), - REGTEST(RegTestParams.get()); - - public static final BitcoinNetwork DEFAULT = MAINNET; - - private final NetworkParameters parameters; - - BitcoinNetwork(NetworkParameters parameters) { - this.parameters = parameters; - } - - public NetworkParameters getParameters() { - return parameters; - } -} diff --git a/network/src/main/java/io/bisq/messages/btc/BtcOptionKeys.java b/network/src/main/java/io/bisq/messages/btc/BtcOptionKeys.java deleted file mode 100644 index 1a539917e2..0000000000 --- a/network/src/main/java/io/bisq/messages/btc/BtcOptionKeys.java +++ /dev/null @@ -1,9 +0,0 @@ -package io.bisq.messages.btc; - -public class BtcOptionKeys { - public static final String BTC_NETWORK = "bitcoinNetwork"; - public static final String REG_TEST_HOST = "bitcoinRegtestHost"; - public static final String WALLET_DIR = "walletDir"; - public static final String BTC_NODES = "btcNodes"; - public static final String USE_TOR_FOR_BTC = "useTorForBtc"; -} diff --git a/network/src/main/java/io/bisq/messages/btc/Restrictions.java b/network/src/main/java/io/bisq/messages/btc/Restrictions.java deleted file mode 100644 index 1096dbf1b0..0000000000 --- a/network/src/main/java/io/bisq/messages/btc/Restrictions.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * This file is part of bisq. - * - * bisq is free software: you can redistribute it and/or modify it - * under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or (at - * your option) any later version. - * - * bisq is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public - * License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with bisq. If not, see . - */ - -package io.bisq.messages.btc; - -import org.bitcoinj.core.Coin; -import org.bitcoinj.core.Transaction; - -public class Restrictions { - - public static final Coin MIN_TRADE_AMOUNT = Coin.parseCoin("0.0001"); // 4 cent @ 400 EUR/BTC - - public static final Coin MAX_SECURITY_DEPOSIT = Coin.parseCoin("0.2"); - public static final Coin MIN_SECURITY_DEPOSIT = Coin.parseCoin("0.001"); - public static final Coin DEFAULT_SECURITY_DEPOSIT = Coin.parseCoin("0.03"); - - public static boolean isAboveDust(Coin amount, Coin txFee) { - return amount != null && amount.compareTo(txFee.add(Transaction.MIN_NONDUST_OUTPUT)) >= 0; - } - - public static boolean isAboveDust(Coin amount) { - return amount != null && amount.compareTo(Transaction.MIN_NONDUST_OUTPUT) >= 0; - } -} diff --git a/network/src/main/java/io/bisq/messages/btc/UserAgent.java b/network/src/main/java/io/bisq/messages/btc/UserAgent.java deleted file mode 100644 index 3912c31f98..0000000000 --- a/network/src/main/java/io/bisq/messages/btc/UserAgent.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * This file is part of bisq. - * - * bisq is free software: you can redistribute it and/or modify it - * under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or (at - * your option) any later version. - * - * bisq is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public - * License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with bisq. If not, see . - */ - -package io.bisq.messages.btc; - -import javax.inject.Inject; -import javax.inject.Named; - -public class UserAgent { - public static final String NAME_KEY = "useragent.name"; - public static final String VERSION_KEY = "useragent.version"; - - private final String name; - private final String version; - - @Inject - public UserAgent(@Named(NAME_KEY) String name, @Named(VERSION_KEY) String version) { - this.name = name; - this.version = version; - } - - public String getName() { - return name; - } - - public String getVersion() { - return version; - } -} - diff --git a/network/src/main/java/io/bisq/messages/btc/data/RawTransactionInput.java b/network/src/main/java/io/bisq/messages/btc/data/RawTransactionInput.java deleted file mode 100644 index b557327a8b..0000000000 --- a/network/src/main/java/io/bisq/messages/btc/data/RawTransactionInput.java +++ /dev/null @@ -1,78 +0,0 @@ -/* - * This file is part of bisq. - * - * bisq is free software: you can redistribute it and/or modify it - * under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or (at - * your option) any later version. - * - * bisq is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public - * License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with bisq. If not, see . - */ - -package io.bisq.messages.btc.data; - -import com.google.protobuf.ByteString; -import io.bisq.app.Version; -import io.bisq.common.wire.Payload; -import io.bisq.common.wire.proto.Messages; - -import java.util.Arrays; - -public final class RawTransactionInput implements Payload { - // That object is sent over the wire, so we need to take care of version compatibility. - private static final long serialVersionUID = Version.P2P_NETWORK_VERSION; - - public final long index; - public final byte[] parentTransaction; - public final long value; - - public RawTransactionInput(long index, byte[] parentTransaction, long value) { - this.index = index; - this.parentTransaction = parentTransaction; - this.value = value; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (!(o instanceof RawTransactionInput)) return false; - - RawTransactionInput rawTransactionInput = (RawTransactionInput) o; - - if (index != rawTransactionInput.index) return false; - if (value != rawTransactionInput.value) return false; - return Arrays.equals(parentTransaction, rawTransactionInput.parentTransaction); - - } - - @Override - public int hashCode() { - int result = (int) (index ^ (index >>> 32)); - result = 31 * result + (parentTransaction != null ? Arrays.hashCode(parentTransaction) : 0); - result = 31 * result + (int) (value ^ (value >>> 32)); - return result; - } - - @Override - public String toString() { - return "RawTransactionInput{" + - "index=" + index + - ", parentTransaction=" + Arrays.toString(parentTransaction) + - ", value=" + value + - '}'; - } - - @Override - public Messages.RawTransactionInput toProtoBuf() { - return Messages.RawTransactionInput.newBuilder() - .setIndex(index) - .setParentTransaction(ByteString.copyFrom(parentTransaction)) - .setValue(value).build(); - } -} diff --git a/network/src/main/java/io/bisq/messages/btc/provider/HttpClientProvider.java b/network/src/main/java/io/bisq/messages/btc/provider/HttpClientProvider.java deleted file mode 100644 index cfe7767c30..0000000000 --- a/network/src/main/java/io/bisq/messages/btc/provider/HttpClientProvider.java +++ /dev/null @@ -1,21 +0,0 @@ -package io.bisq.messages.btc.provider; - -import io.bisq.http.HttpClient; - -import java.io.Serializable; - -public abstract class HttpClientProvider implements Serializable { - protected final HttpClient httpClient; - - public HttpClientProvider(HttpClient httpClient, String baseUrl) { - this(httpClient, baseUrl, false); - } - - public HttpClientProvider(HttpClient httpClient, String baseUrl, boolean ignoreSocks5Proxy) { - this.httpClient = httpClient; - - httpClient.setBaseUrl(baseUrl); - - httpClient.setIgnoreSocks5Proxy(ignoreSocks5Proxy); - } -} diff --git a/network/src/main/java/io/bisq/messages/btc/provider/ProvidersRepository.java b/network/src/main/java/io/bisq/messages/btc/provider/ProvidersRepository.java deleted file mode 100644 index 414efdb4f5..0000000000 --- a/network/src/main/java/io/bisq/messages/btc/provider/ProvidersRepository.java +++ /dev/null @@ -1,62 +0,0 @@ -package io.bisq.messages.btc.provider; - -import com.google.inject.Inject; -import io.bisq.app.AppOptionKeys; -import io.bisq.network.NetworkOptionKeys; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import javax.inject.Named; -import java.util.Random; - -public class ProvidersRepository { - private static final Logger log = LoggerFactory.getLogger(ProvidersRepository.class); - - private final String[] providerArray; - private String baseUrl; - - - /////////////////////////////////////////////////////////////////////////////////////////// - // Constructor - /////////////////////////////////////////////////////////////////////////////////////////// - - @Inject - public ProvidersRepository(@Named(AppOptionKeys.PROVIDERS) String providers, - @Named(NetworkOptionKeys.USE_LOCALHOST) boolean useLocalhost) { - if (providers.isEmpty()) { - if (useLocalhost) { - // If we run in localhost mode we don't have the tor node running, so we need a clearnet host - // providers = "http://95.85.11.205:8080/"; - - // Use localhost for using a locally running priceprovider - providers = "http://localhost:8080/, http://95.85.11.205:8080/"; - //providers = "http://localhost:8080/"; - } else { - providers = "http://t4wlzy7l6k4hnolg.onion/, http://g27szt7aw2vrtowe.onion/"; - } - } - providerArray = providers.replace(" ", "").split(","); - int index = new Random().nextInt(providerArray.length); - baseUrl = providerArray[index]; - log.info("baseUrl for PriceFeedService: " + baseUrl); - } - - public String getBaseUrl() { - return baseUrl; - } - - public boolean hasMoreProviders() { - return providerArray.length > 1; - } - - public void setNewRandomBaseUrl() { - String newBaseUrl; - do { - int index = new Random().nextInt(providerArray.length); - newBaseUrl = providerArray[index]; - } - while (baseUrl.equals(newBaseUrl)); - baseUrl = newBaseUrl; - log.info("Try new baseUrl after error: " + baseUrl); - } -} diff --git a/network/src/main/java/io/bisq/messages/btc/provider/fee/FeeData.java b/network/src/main/java/io/bisq/messages/btc/provider/fee/FeeData.java deleted file mode 100644 index e10461cd7d..0000000000 --- a/network/src/main/java/io/bisq/messages/btc/provider/fee/FeeData.java +++ /dev/null @@ -1,14 +0,0 @@ -package io.bisq.messages.btc.provider.fee; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class FeeData { - private static final Logger log = LoggerFactory.getLogger(FeeData.class); - - public final long txFeePerByte; - - public FeeData(long txFeePerByte) { - this.txFeePerByte = txFeePerByte; - } -} diff --git a/network/src/main/java/io/bisq/messages/btc/provider/fee/FeeProvider.java b/network/src/main/java/io/bisq/messages/btc/provider/fee/FeeProvider.java deleted file mode 100644 index 2b6ad25c8e..0000000000 --- a/network/src/main/java/io/bisq/messages/btc/provider/fee/FeeProvider.java +++ /dev/null @@ -1,40 +0,0 @@ -package io.bisq.messages.btc.provider.fee; - -import com.google.gson.Gson; -import com.google.gson.internal.LinkedTreeMap; -import io.bisq.app.Version; -import io.bisq.common.util.Tuple2; -import io.bisq.http.HttpClient; -import io.bisq.http.HttpException; -import io.bisq.messages.btc.provider.HttpClientProvider; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.io.IOException; -import java.util.HashMap; -import java.util.Map; - -//TODO use protobuffer instead of json -public class FeeProvider extends HttpClientProvider { - private static final Logger log = LoggerFactory.getLogger(FeeProvider.class); - - public FeeProvider(HttpClient httpClient, String baseUrl) { - super(httpClient, baseUrl, false); - } - - public Tuple2, FeeData> getFees() throws IOException, HttpException { - String json = httpClient.requestWithGET("getFees", "User-Agent", "bisq/" + Version.VERSION + ", uid:" + httpClient.getUid()); - LinkedTreeMap linkedTreeMap = new Gson().fromJson(json, LinkedTreeMap.class); - Map tsMap = new HashMap<>(); - tsMap.put("bitcoinFeesTs", ((Double) linkedTreeMap.get("bitcoinFeesTs")).longValue()); - - LinkedTreeMap dataMap = (LinkedTreeMap) linkedTreeMap.get("data"); - FeeData feeData = new FeeData(dataMap.get("txFee").longValue()); - return new Tuple2<>(tsMap, feeData); - } - - @Override - public String toString() { - return "FeeProvider"; - } -} diff --git a/network/src/main/java/io/bisq/messages/btc/provider/fee/FeeRequest.java b/network/src/main/java/io/bisq/messages/btc/provider/fee/FeeRequest.java deleted file mode 100644 index 4d482728ca..0000000000 --- a/network/src/main/java/io/bisq/messages/btc/provider/fee/FeeRequest.java +++ /dev/null @@ -1,40 +0,0 @@ -package io.bisq.messages.btc.provider.fee; - -import com.google.common.util.concurrent.*; -import io.bisq.common.util.Tuple2; -import io.bisq.common.util.Utilities; -import org.jetbrains.annotations.NotNull; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.Map; - -public class FeeRequest { - private static final Logger log = LoggerFactory.getLogger(FeeRequest.class); - - private static final ListeningExecutorService executorService = Utilities.getListeningExecutorService("FeeRequest", 3, 5, 10 * 60); - - public FeeRequest() { - } - - public SettableFuture, FeeData>> getFees(FeeProvider provider) { - final SettableFuture, FeeData>> resultFuture = SettableFuture.create(); - ListenableFuture, FeeData>> future = executorService.submit(() -> { - Thread.currentThread().setName("FeeRequest-" + provider.toString()); - return provider.getFees(); - }); - - Futures.addCallback(future, new FutureCallback, FeeData>>() { - public void onSuccess(Tuple2, FeeData> feeData) { - log.debug("Received feeData of {}\nfrom provider {}", feeData, provider); - resultFuture.set(feeData); - } - - public void onFailure(@NotNull Throwable throwable) { - resultFuture.setException(throwable); - } - }); - - return resultFuture; - } -} diff --git a/network/src/main/java/io/bisq/messages/btc/provider/fee/FeeService.java b/network/src/main/java/io/bisq/messages/btc/provider/fee/FeeService.java deleted file mode 100644 index 24e973955f..0000000000 --- a/network/src/main/java/io/bisq/messages/btc/provider/fee/FeeService.java +++ /dev/null @@ -1,155 +0,0 @@ -/* - * This file is part of bisq. - * - * bisq is free software: you can redistribute it and/or modify it - * under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or (at - * your option) any later version. - * - * bisq is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public - * License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with bisq. If not, see . - */ - -package io.bisq.messages.btc.provider.fee; - -import com.google.common.util.concurrent.FutureCallback; -import com.google.common.util.concurrent.Futures; -import com.google.common.util.concurrent.SettableFuture; -import com.google.inject.Inject; -import io.bisq.common.UserThread; -import io.bisq.common.handlers.FaultHandler; -import io.bisq.common.util.Tuple2; -import io.bisq.http.HttpClient; -import io.bisq.messages.btc.provider.ProvidersRepository; -import org.bitcoinj.core.Coin; -import org.jetbrains.annotations.NotNull; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import javax.annotation.Nullable; -import java.time.Instant; -import java.util.Map; - -import static com.google.common.base.Preconditions.checkNotNull; - -public class FeeService { - private static final Logger log = LoggerFactory.getLogger(FeeService.class); - - public static final long MIN_TX_FEE = 60; // satoshi/byte - public static final long MAX_TX_FEE = 300; - public static final long DEFAULT_TX_FEE = 150; - - public static final long MIN_CREATE_OFFER_FEE_IN_BTC = 10_000; - public static final long MAX_CREATE_OFFER_FEE_IN_BTC = 500_000; - public static final long DEFAULT_CREATE_OFFER_FEE_IN_BTC_PER_BTC = 30_000; // excluded mining fee - - public static final long MIN_TAKE_OFFER_FEE_IN_BTC = 10_000; - public static final long MAX_TAKE_OFFER_FEE_IN_BTC = 1000_000; - public static final long DEFAULT_TAKE_OFFER_FEE_IN_BTC_PER_BTC = 40_000; // excluded mining fee - - // 0.00216 btc is for 3 x tx fee for taker -> about 2 EUR! - - public static final long MIN_PAUSE_BETWEEN_REQUESTS_IN_MIN = 10; - - private final FeeProvider feeProvider; - @Nullable - private FeeData feeData; - private Map timeStampMap; - private long epochInSecondAtLastRequest; - private long lastRequest; - - /////////////////////////////////////////////////////////////////////////////////////////// - // Constructor - /////////////////////////////////////////////////////////////////////////////////////////// - - @Inject - public FeeService(HttpClient httpClient, - ProvidersRepository providersRepository) { - this.feeProvider = new FeeProvider(httpClient, providersRepository.getBaseUrl()); - } - - public void onAllServicesInitialized() { - requestFees(null, null); - } - - public void requestFees(@Nullable Runnable resultHandler, @Nullable FaultHandler faultHandler) { - long now = Instant.now().getEpochSecond(); - if (feeData == null || now - lastRequest > MIN_PAUSE_BETWEEN_REQUESTS_IN_MIN * 60) { - lastRequest = now; - FeeRequest feeRequest = new FeeRequest(); - SettableFuture, FeeData>> future = feeRequest.getFees(feeProvider); - Futures.addCallback(future, new FutureCallback, FeeData>>() { - @Override - public void onSuccess(@Nullable Tuple2, FeeData> result) { - UserThread.execute(() -> { - checkNotNull(result, "Result must not be null at getFees"); - timeStampMap = result.first; - epochInSecondAtLastRequest = timeStampMap.get("bitcoinFeesTs"); - feeData = result.second; - log.info("Tx fee: txFeePerByte=" + feeData.txFeePerByte); - if (resultHandler != null) - resultHandler.run(); - }); - } - - @Override - public void onFailure(@NotNull Throwable throwable) { - log.warn("Could not load fees. " + throwable.toString()); - if (faultHandler != null) - UserThread.execute(() -> faultHandler.handleFault("Could not load fees", throwable)); - } - }); - } else { - log.debug("We got a requestFees called again before min pause of {} minutes has passed.", MIN_PAUSE_BETWEEN_REQUESTS_IN_MIN); - UserThread.execute(() -> { - if (resultHandler != null) - resultHandler.run(); - }); - } - } - - public Coin getTxFee(int sizeInBytes) { - return getTxFeePerByte().multiply(sizeInBytes); - } - - public Coin getTxFeePerByte() { - if (feeData != null) - return Coin.valueOf(feeData.txFeePerByte); - else - return Coin.valueOf(DEFAULT_TX_FEE); - } - - // TODO we will get that from the DAO voting - public Coin getCreateOfferFeeInBtcPerBtc() { - return Coin.valueOf(DEFAULT_CREATE_OFFER_FEE_IN_BTC_PER_BTC); - } - - public Coin getMinCreateOfferFeeInBtc() { - return Coin.valueOf(MIN_CREATE_OFFER_FEE_IN_BTC); - } - - public Coin getMinTakeOfferFeeInBtc() { - return Coin.valueOf(MIN_TAKE_OFFER_FEE_IN_BTC); - } - - // TODO we will get that from the DAO voting - public Coin getTakeOfferFeeInBtcPerBtc() { - return Coin.valueOf(DEFAULT_TAKE_OFFER_FEE_IN_BTC_PER_BTC); - } - - public Coin getCreateCompensationRequestFee() { - //TODO - return Coin.valueOf(1000); - } - - public Coin getVotingTxFee() { - //TODO - return Coin.valueOf(999); - } - -} diff --git a/network/src/main/java/io/bisq/messages/btc/provider/price/PriceProvider.java b/network/src/main/java/io/bisq/messages/btc/provider/price/PriceProvider.java deleted file mode 100644 index 94a5600056..0000000000 --- a/network/src/main/java/io/bisq/messages/btc/provider/price/PriceProvider.java +++ /dev/null @@ -1,48 +0,0 @@ -package io.bisq.messages.btc.provider.price; - -import com.google.gson.Gson; -import com.google.gson.internal.LinkedTreeMap; -import io.bisq.app.Version; -import io.bisq.common.util.Tuple2; -import io.bisq.http.HttpClient; -import io.bisq.http.HttpException; -import io.bisq.messages.btc.provider.HttpClientProvider; -import io.bisq.messages.provider.price.MarketPrice; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class PriceProvider extends HttpClientProvider { - private static final Logger log = LoggerFactory.getLogger(PriceProvider.class); - - public PriceProvider(HttpClient httpClient, String baseUrl) { - super(httpClient, baseUrl, false); - } - - public Tuple2, Map> getAll() throws IOException, HttpException { - Map marketPriceMap = new HashMap<>(); - String json = httpClient.requestWithGET("getAllMarketPrices", "User-Agent", "bisq/" + Version.VERSION + ", uid:" + httpClient.getUid()); - LinkedTreeMap map = new Gson().fromJson(json, LinkedTreeMap.class); - Map tsMap = new HashMap<>(); - tsMap.put("btcAverageTs", ((Double) map.get("btcAverageTs")).longValue()); - tsMap.put("poloniexTs", ((Double) map.get("poloniexTs")).longValue()); - tsMap.put("coinmarketcapTs", ((Double) map.get("coinmarketcapTs")).longValue()); - - List> list = (ArrayList>) map.get("data"); - list.stream().forEach(treeMap -> { - marketPriceMap.put((String) treeMap.get("c"), - new MarketPrice((String) treeMap.get("c"), (double) treeMap.get("a"), (double) treeMap.get("b"), (double) treeMap.get("l"))); - }); - return new Tuple2<>(tsMap, marketPriceMap); - } - - @Override - public String toString() { - return "PriceProvider"; - } -} diff --git a/network/src/main/java/io/bisq/messages/btc/provider/price/PriceRequest.java b/network/src/main/java/io/bisq/messages/btc/provider/price/PriceRequest.java deleted file mode 100644 index 10a629d53c..0000000000 --- a/network/src/main/java/io/bisq/messages/btc/provider/price/PriceRequest.java +++ /dev/null @@ -1,41 +0,0 @@ -package io.bisq.messages.btc.provider.price; - -import com.google.common.util.concurrent.*; -import io.bisq.common.util.Tuple2; -import io.bisq.common.util.Utilities; -import io.bisq.messages.provider.price.MarketPrice; -import org.jetbrains.annotations.NotNull; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.Map; - -public class PriceRequest { - private static final Logger log = LoggerFactory.getLogger(PriceRequest.class); - - private static final ListeningExecutorService executorService = Utilities.getListeningExecutorService("PriceRequest", 3, 5, 10 * 60); - - public PriceRequest() { - } - - public SettableFuture, Map>> requestAllPrices(PriceProvider provider) { - final SettableFuture, Map>> resultFuture = SettableFuture.create(); - ListenableFuture, Map>> future = executorService.submit(() -> { - Thread.currentThread().setName("PriceRequest-" + provider.toString()); - return provider.getAll(); - }); - - Futures.addCallback(future, new FutureCallback, Map>>() { - public void onSuccess(Tuple2, Map> marketPriceTuple) { - log.debug("Received marketPriceTuple of {}\nfrom provider {}", marketPriceTuple, provider); - resultFuture.set(marketPriceTuple); - } - - public void onFailure(@NotNull Throwable throwable) { - resultFuture.setException(throwable); - } - }); - - return resultFuture; - } -} diff --git a/network/src/main/java/io/bisq/messages/btc/provider/price/PriceRequestException.java b/network/src/main/java/io/bisq/messages/btc/provider/price/PriceRequestException.java deleted file mode 100644 index 2234c000cf..0000000000 --- a/network/src/main/java/io/bisq/messages/btc/provider/price/PriceRequestException.java +++ /dev/null @@ -1,7 +0,0 @@ -package io.bisq.messages.btc.provider.price; - -public class PriceRequestException extends Exception { - public PriceRequestException(String message) { - super(message); - } -} diff --git a/network/src/main/java/io/bisq/messages/dao/blockchain/RpcOptionKeys.java b/network/src/main/java/io/bisq/messages/dao/blockchain/RpcOptionKeys.java deleted file mode 100644 index 8fd90a26e2..0000000000 --- a/network/src/main/java/io/bisq/messages/dao/blockchain/RpcOptionKeys.java +++ /dev/null @@ -1,9 +0,0 @@ -package io.bisq.messages.dao.blockchain; - -public class RpcOptionKeys { - public static final String RPC_USER = "rpcUser"; - public static final String RPC_PASSWORD = "rpcPassword"; - public static final String RPC_PORT = "rpcPort"; - public static final String RPC_BLOCK_PORT = "rpcBlockPort"; - public static final String RPC_WALLET_PORT = "rpcWalletPort"; -} diff --git a/network/src/main/java/io/bisq/messages/dao/compensation/payload/CompensationRequestPayload.java b/network/src/main/java/io/bisq/messages/dao/compensation/payload/CompensationRequestPayload.java deleted file mode 100644 index 5dec8af55d..0000000000 --- a/network/src/main/java/io/bisq/messages/dao/compensation/payload/CompensationRequestPayload.java +++ /dev/null @@ -1,306 +0,0 @@ -/* - * This file is part of bisq. - * - * bisq is free software: you can redistribute it and/or modify it - * under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or (at - * your option) any later version. - * - * bisq is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public - * License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with bisq. If not, see . - */ - -package io.bisq.messages.dao.compensation.payload; - -import io.bisq.app.Version; -import io.bisq.common.crypto.Sig; -import io.bisq.common.util.JsonExclude; -import io.bisq.common.wire.proto.Messages; -import io.bisq.p2p.NodeAddress; -import io.bisq.p2p.storage.payload.LazyProcessedStoragePayload; -import io.bisq.p2p.storage.payload.PersistedStoragePayload; -import org.bitcoinj.core.Coin; -import org.bitcoinj.core.Utils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.io.IOException; -import java.io.ObjectInputStream; -import java.security.KeyFactory; -import java.security.NoSuchAlgorithmException; -import java.security.NoSuchProviderException; -import java.security.PublicKey; -import java.security.spec.InvalidKeySpecException; -import java.security.spec.X509EncodedKeySpec; -import java.util.Date; -import java.util.concurrent.TimeUnit; - -// The data of the CompensationRequest -public final class CompensationRequestPayload implements LazyProcessedStoragePayload, PersistedStoragePayload { - // That object is sent over the wire, so we need to take care of version compatibility. - private static final long serialVersionUID = Version.P2P_NETWORK_VERSION; - - private static final Logger log = LoggerFactory.getLogger(CompensationRequestPayload.class); - - public static final long TTL = TimeUnit.DAYS.toMillis(30); - - public final byte version; - private final long creationDate; - - public final String uid; - public final String name; - public final String title; - public final String category; - public final String description; - public final String link; - public final long startDate; - public final long endDate; - private final long requestedBtc; - public final String btcAddress; - private final String nodeAddress; - - @JsonExclude - private transient PublicKey p2pStorageSignaturePubKey; - @JsonExclude - private final byte[] p2pStorageSignaturePubKeyBytes; - - // used for json - private final String p2pStorageSignaturePubKeyAsHex; - - // Signature of the JSON data of this object excluding the signature and feeTxId fields using the standard Bitcoin - // messaging signing format as a base64 encoded string. - @JsonExclude - public String signature; - - // Set after we signed and set the hash. The hash is used in the OP_RETURN of the fee tx - @JsonExclude - public String feeTxId; - - public CompensationRequestPayload(String uid, - String name, - String title, - String category, - String description, - String link, - Date startDate, - Date endDate, - Coin requestedBtc, - String btcAddress, - NodeAddress nodeAddress, - PublicKey p2pStorageSignaturePubKey) { - - version = Version.COMPENSATION_REQUEST_VERSION; - creationDate = new Date().getTime(); - - this.uid = uid; - this.name = name; - this.title = title; - this.category = category; - this.description = description; - this.link = link; - this.startDate = startDate.getTime(); - this.endDate = endDate.getTime(); - this.requestedBtc = requestedBtc.value; - this.btcAddress = btcAddress; - this.nodeAddress = nodeAddress.getFullAddress(); - this.p2pStorageSignaturePubKey = p2pStorageSignaturePubKey; - this.p2pStorageSignaturePubKeyBytes = new X509EncodedKeySpec(p2pStorageSignaturePubKey.getEncoded()).getEncoded(); - p2pStorageSignaturePubKeyAsHex = Utils.HEX.encode(p2pStorageSignaturePubKey.getEncoded()); - init(); - } - - public CompensationRequestPayload(String uid, - String name, - String title, - String category, - String description, - String link, - Date startDate, - Date endDate, - Coin requestedBtc, - String btcAddress, - NodeAddress nodeAddress, - byte[] p2pStorageSignaturePubKeyBytes) { - - version = Version.COMPENSATION_REQUEST_VERSION; - creationDate = new Date().getTime(); - - this.uid = uid; - this.name = name; - this.title = title; - this.category = category; - this.description = description; - this.link = link; - this.startDate = startDate.getTime(); - this.endDate = endDate.getTime(); - this.requestedBtc = requestedBtc.value; - this.btcAddress = btcAddress; - this.nodeAddress = nodeAddress.getFullAddress(); - this.p2pStorageSignaturePubKey = p2pStorageSignaturePubKey; - this.p2pStorageSignaturePubKeyBytes = p2pStorageSignaturePubKeyBytes; - init(); - this.p2pStorageSignaturePubKeyAsHex = Utils.HEX.encode(p2pStorageSignaturePubKey.getEncoded()); - } - - private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { - try { - in.defaultReadObject(); - init(); - } catch (Throwable t) { - log.warn("Cannot be deserialized." + t.getMessage()); - } - } - - private void init() { - try { - p2pStorageSignaturePubKey = KeyFactory.getInstance(Sig.KEY_ALGO, "BC").generatePublic(new X509EncodedKeySpec(p2pStorageSignaturePubKeyBytes)); - } catch (InvalidKeySpecException | NoSuchAlgorithmException | NoSuchProviderException e) { - log.error("Couldn't create the p2p storage public key", e); - } - } - - public void setSignature(String signature) { - this.signature = signature; - } - - // Called after tx is published - public void setFeeTxId(String feeTxId) { - this.feeTxId = feeTxId; - } - - @Override - public long getTTL() { - return TTL; - } - - @Override - public PublicKey getOwnerPubKey() { - return p2pStorageSignaturePubKey; - } - - public Date getStartDate() { - return new Date(startDate); - } - - public Date getEndDate() { - return new Date(endDate); - } - - public Date getCreationDate() { - return new Date(creationDate); - } - - public Coin getRequestedBtc() { - return Coin.valueOf(requestedBtc); - } - - public NodeAddress getNodeAddress() { - return new NodeAddress(nodeAddress); - } - - public String getShortId() { - return uid.substring(0, 8); - } - - @Override - public Messages.StoragePayload toProtoBuf() { - return Messages.StoragePayload.newBuilder().setCompensationRequestPayload( - Messages.CompensationRequestPayload.newBuilder() - .setTTL(TTL) - .setVersion(version) - .setCreationDate(creationDate) - .setUid(uid) - .setName(name) - .setTitle(title) - .setCategory(category) - .setDescription(description) - .setLink(link) - .setStartDate(startDate) - .setEndDate(endDate) - .setRequestedBtc(requestedBtc) - .setBtcAddress(btcAddress) - .setNodeAddress(nodeAddress) - .setP2PStorageSignaturePubKeyAsHex(p2pStorageSignaturePubKeyAsHex) - .setSignature(signature) - .setFeeTxId(feeTxId)).build(); - } - - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - - CompensationRequestPayload that = (CompensationRequestPayload) o; - - if (version != that.version) return false; - if (startDate != that.startDate) return false; - if (endDate != that.endDate) return false; - if (requestedBtc != that.requestedBtc) return false; - if (creationDate != that.creationDate) return false; - if (uid != null ? !uid.equals(that.uid) : that.uid != null) return false; - if (name != null ? !name.equals(that.name) : that.name != null) return false; - if (title != null ? !title.equals(that.title) : that.title != null) return false; - if (category != null ? !category.equals(that.category) : that.category != null) return false; - if (description != null ? !description.equals(that.description) : that.description != null) return false; - if (link != null ? !link.equals(that.link) : that.link != null) return false; - if (btcAddress != null ? !btcAddress.equals(that.btcAddress) : that.btcAddress != null) return false; - if (nodeAddress != null ? !nodeAddress.equals(that.nodeAddress) : that.nodeAddress != null) return false; - if (p2pStorageSignaturePubKey != null ? !p2pStorageSignaturePubKey.equals(that.p2pStorageSignaturePubKey) : that.p2pStorageSignaturePubKey != null) - return false; - if (p2pStorageSignaturePubKeyAsHex != null ? !p2pStorageSignaturePubKeyAsHex.equals(that.p2pStorageSignaturePubKeyAsHex) : that.p2pStorageSignaturePubKeyAsHex != null) - return false; - if (signature != null ? !signature.equals(that.signature) : that.signature != null) return false; - return !(feeTxId != null ? !feeTxId.equals(that.feeTxId) : that.feeTxId != null); - - } - - @Override - public int hashCode() { - int result = (int) version; - result = 31 * result + (uid != null ? uid.hashCode() : 0); - result = 31 * result + (name != null ? name.hashCode() : 0); - result = 31 * result + (title != null ? title.hashCode() : 0); - result = 31 * result + (category != null ? category.hashCode() : 0); - result = 31 * result + (description != null ? description.hashCode() : 0); - result = 31 * result + (link != null ? link.hashCode() : 0); - result = 31 * result + (int) (startDate ^ (startDate >>> 32)); - result = 31 * result + (int) (endDate ^ (endDate >>> 32)); - result = 31 * result + (int) (requestedBtc ^ (requestedBtc >>> 32)); - result = 31 * result + (btcAddress != null ? btcAddress.hashCode() : 0); - result = 31 * result + (nodeAddress != null ? nodeAddress.hashCode() : 0); - result = 31 * result + (int) (creationDate ^ (creationDate >>> 32)); - result = 31 * result + (p2pStorageSignaturePubKey != null ? p2pStorageSignaturePubKey.hashCode() : 0); - result = 31 * result + (p2pStorageSignaturePubKeyAsHex != null ? p2pStorageSignaturePubKeyAsHex.hashCode() : 0); - result = 31 * result + (signature != null ? signature.hashCode() : 0); - result = 31 * result + (feeTxId != null ? feeTxId.hashCode() : 0); - return result; - } - - @Override - public String toString() { - return "CompensationRequestPayload{" + - "version=" + version + - ", uid='" + uid + '\'' + - ", name='" + name + '\'' + - ", title='" + title + '\'' + - ", category='" + category + '\'' + - ", description='" + description + '\'' + - ", link='" + link + '\'' + - ", startDate=" + getStartDate() + - ", endDate=" + getEndDate() + - ", requestedBtc=" + requestedBtc + - ", btcAddress='" + btcAddress + '\'' + - ", nodeAddress='" + getNodeAddress() + '\'' + - ", creationDate=" + getCreationDate() + - ", p2pStorageSignaturePubKeyAsHex='" + p2pStorageSignaturePubKeyAsHex + '\'' + - ", signature='" + signature + '\'' + - ", feeTxId='" + feeTxId + '\'' + - '}'; - } -} diff --git a/network/src/main/java/io/bisq/messages/filter/payload/Filter.java b/network/src/main/java/io/bisq/messages/filter/payload/Filter.java deleted file mode 100644 index 1ec2147483..0000000000 --- a/network/src/main/java/io/bisq/messages/filter/payload/Filter.java +++ /dev/null @@ -1,156 +0,0 @@ -/* - * This file is part of bisq. - * - * bisq is free software: you can redistribute it and/or modify it - * under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or (at - * your option) any later version. - * - * bisq is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public - * License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with bisq. If not, see . - */ - -package io.bisq.messages.filter.payload; - -import com.google.protobuf.ByteString; -import io.bisq.app.Version; -import io.bisq.common.crypto.Sig; -import io.bisq.common.wire.proto.Messages; -import io.bisq.p2p.storage.payload.StoragePayload; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.io.IOException; -import java.security.KeyFactory; -import java.security.NoSuchAlgorithmException; -import java.security.NoSuchProviderException; -import java.security.PublicKey; -import java.security.spec.InvalidKeySpecException; -import java.security.spec.X509EncodedKeySpec; -import java.util.Arrays; -import java.util.List; -import java.util.concurrent.TimeUnit; -import java.util.stream.Collectors; - -public final class Filter implements StoragePayload { - // That object is sent over the wire, so we need to take care of version compatibility. - private static final long serialVersionUID = Version.P2P_NETWORK_VERSION; - private static final Logger log = LoggerFactory.getLogger(Filter.class); - private static final long TTL = TimeUnit.DAYS.toMillis(21); - - public final List bannedNodeAddress; - public final List bannedOfferIds; - public final List bannedPaymentAccounts; - private String signatureAsBase64; - private byte[] publicKeyBytes; - - private transient PublicKey publicKey; - - public Filter(List bannedOfferIds, List bannedNodeAddress, List bannedPaymentAccounts) { - this.bannedOfferIds = bannedOfferIds; - this.bannedNodeAddress = bannedNodeAddress; - this.bannedPaymentAccounts = bannedPaymentAccounts; - } - - public Filter(List bannedOfferIds, List bannedNodeAddress, List bannedPaymentAccounts, - String signatureAsBase64, byte[] publicKeyBytes) { - this(bannedOfferIds, bannedNodeAddress, bannedPaymentAccounts); - init(); - } - - private void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException { - try { - in.defaultReadObject(); - init(); - } catch (Throwable t) { - log.warn("Exception at readObject: " + t.getMessage()); - } - } - - private void init() { - try { - publicKey = KeyFactory.getInstance(Sig.KEY_ALGO, "BC").generatePublic(new X509EncodedKeySpec(publicKeyBytes)); - } catch (InvalidKeySpecException | NoSuchAlgorithmException | NoSuchProviderException e) { - log.error("Couldn't create the storage public key", e); - } - } - - public void setSigAndPubKey(String signatureAsBase64, PublicKey storagePublicKey) { - this.signatureAsBase64 = signatureAsBase64; - this.publicKey = storagePublicKey; - this.publicKeyBytes = new X509EncodedKeySpec(this.publicKey.getEncoded()).getEncoded(); - } - - public String getSignatureAsBase64() { - return signatureAsBase64; - } - - @Override - public long getTTL() { - return TTL; - } - - @Override - public PublicKey getOwnerPubKey() { - return publicKey; - } - - - @Override - public Messages.StoragePayload toProtoBuf() { - List paymentAccountFilterList; - paymentAccountFilterList = bannedPaymentAccounts.stream() - .map(paymentAccountFilter -> paymentAccountFilter.toProtoBuf()).collect(Collectors.toList()); - return Messages.StoragePayload.newBuilder().setFilter(Messages.Filter.newBuilder() - .setTTL(TTL) - .addAllBannedNodeAddress(bannedNodeAddress) - .addAllBannedOfferIds(bannedOfferIds) - .addAllBannedPaymentAccounts(paymentAccountFilterList) - .setSignatureAsBase64(signatureAsBase64) - .setPublicKeyBytes(ByteString.copyFrom(publicKeyBytes))).build(); - } - - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (!(o instanceof Filter)) return false; - - Filter filter = (Filter) o; - - if (bannedNodeAddress != null ? !bannedNodeAddress.equals(filter.bannedNodeAddress) : filter.bannedNodeAddress != null) - return false; - if (bannedOfferIds != null ? !bannedOfferIds.equals(filter.bannedOfferIds) : filter.bannedOfferIds != null) - return false; - if (bannedPaymentAccounts != null ? !bannedPaymentAccounts.equals(filter.bannedPaymentAccounts) : filter.bannedPaymentAccounts != null) - return false; - if (signatureAsBase64 != null ? !signatureAsBase64.equals(filter.signatureAsBase64) : filter.signatureAsBase64 != null) - return false; - return Arrays.equals(publicKeyBytes, filter.publicKeyBytes); - - } - - @Override - public int hashCode() { - int result = bannedNodeAddress != null ? bannedNodeAddress.hashCode() : 0; - result = 31 * result + (bannedOfferIds != null ? bannedOfferIds.hashCode() : 0); - result = 31 * result + (bannedPaymentAccounts != null ? bannedPaymentAccounts.hashCode() : 0); - result = 31 * result + (signatureAsBase64 != null ? signatureAsBase64.hashCode() : 0); - result = 31 * result + (publicKeyBytes != null ? Arrays.hashCode(publicKeyBytes) : 0); - return result; - } - - @Override - public String toString() { - return "Filter{" + - "bannedNodeAddress=" + bannedNodeAddress + - ", bannedOfferIds=" + bannedOfferIds + - ", bannedPaymentAccounts=" + bannedPaymentAccounts + - '}'; - } -} diff --git a/network/src/main/java/io/bisq/messages/filter/payload/PaymentAccountFilter.java b/network/src/main/java/io/bisq/messages/filter/payload/PaymentAccountFilter.java deleted file mode 100644 index 300b16187e..0000000000 --- a/network/src/main/java/io/bisq/messages/filter/payload/PaymentAccountFilter.java +++ /dev/null @@ -1,40 +0,0 @@ -package io.bisq.messages.filter.payload; - -import io.bisq.app.Version; -import io.bisq.common.wire.proto.Messages; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.io.Serializable; - -public class PaymentAccountFilter implements Serializable { - // That object is sent over the wire, so we need to take care of version compatibility. - private static final long serialVersionUID = Version.P2P_NETWORK_VERSION; - private static final Logger log = LoggerFactory.getLogger(PaymentAccountFilter.class); - - public final String paymentMethodId; - public final String getMethodName; - public final String value; - - public PaymentAccountFilter(String paymentMethodId, String getMethodName, String value) { - this.paymentMethodId = paymentMethodId; - this.getMethodName = getMethodName; - this.value = value; - } - - @Override - public String toString() { - return "PaymentAccountFilter{" + - "paymentMethodId='" + paymentMethodId + '\'' + - ", getMethodName='" + getMethodName + '\'' + - ", value='" + value + '\'' + - '}'; - } - - public Messages.PaymentAccountFilter toProtoBuf() { - return Messages.PaymentAccountFilter.newBuilder() - .setPaymentMethodId(paymentMethodId) - .setGetMethodName(getMethodName) - .setValue(value).build(); - } -} diff --git a/network/src/main/java/io/bisq/messages/locale/BankUtil.java b/network/src/main/java/io/bisq/messages/locale/BankUtil.java deleted file mode 100644 index 83a1073e09..0000000000 --- a/network/src/main/java/io/bisq/messages/locale/BankUtil.java +++ /dev/null @@ -1,241 +0,0 @@ -/* - * This file is part of bisq. - * - * bisq is free software: you can redistribute it and/or modify it - * under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or (at - * your option) any later version. - * - * bisq is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public - * License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with bisq. If not, see . - */ - -package io.bisq.messages.locale; - -import io.bisq.locale.Res; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -public class BankUtil { - - private static final Logger log = LoggerFactory.getLogger(BankUtil.class); - - // BankName - public static boolean isBankNameRequired(String countryCode) { - switch (countryCode) { - case "GB": - case "US": - case "NZ": - case "AU": - case "CA": - case "SE": - case "HK": - // We show always the bank name as it is needed in specific banks. - // Though that handling should be optimized in futures. - return true; - // return false; - case "MX": - case "BR": - return true; - default: - return true; - } - } - - public static String getBankNameLabel(String countryCode) { - switch (countryCode) { - case "BR": - return Res.get("payment.bank.name"); - default: - return isBankNameRequired(countryCode) ? Res.get("payment.bank.name") : Res.get("payment.bank.nameOptional"); - } - } - - // BankId - public static boolean isBankIdRequired(String countryCode) { - switch (countryCode) { - case "GB": - case "US": - case "BR": - case "NZ": - case "AU": - case "SE": - case "CL": - case "NO": - return false; - case "CA": - case "MX": - case "HK": - return true; - default: - return true; - } - } - - public static String getBankIdLabel(String countryCode) { - switch (countryCode) { - case "CA": - return "Institution Number:";// do not translate as it is used in english only - case "MX": - case "HK": - return Res.get("payment.bankCode"); - default: - return isBankIdRequired(countryCode) ? Res.get("payment.bankId") : Res.get("payment.bankIdOptional"); - } - - } - - // BranchId - public static boolean isBranchIdRequired(String countryCode) { - switch (countryCode) { - case "GB": - case "US": - case "BR": - case "AU": - case "CA": - return true; - case "NZ": - case "MX": - case "HK": - case "SE": - case "NO": - return false; - default: - return true; - } - } - - public static String getBranchIdLabel(String countryCode) { - switch (countryCode) { - case "GB": - return "UK sort code:"; // do not translate as it is used in english only - case "US": - return "Routing Number:"; // do not translate as it is used in english only - case "BR": - return "Código da Agência:"; // do not translate as it is used in portuguese only - case "AU": - return "BSB code:"; // do not translate as it is used in english only - case "CA": - return "Transit Number:"; // do not translate as it is used in english only - default: - return isBranchIdRequired(countryCode) ? Res.get("payment.branchNr") : Res.get("payment.branchNrOptional"); - } - } - - - // AccountNr - public static boolean isAccountNrRequired(String countryCode) { - switch (countryCode) { - default: - return true; - } - } - - public static String getAccountNrLabel(String countryCode) { - switch (countryCode) { - case "GB": - case "US": - case "BR": - case "NZ": - case "AU": - case "CA": - case "HK": - return Res.get("payment.accountNr"); - case "NO": - return "Kontonummer:"; // do not translate as it is used in norwegian only - case "SE": - return "Bankgiro number:"; // do not translate as it is used in swedish only - case "MX": - return "CLABE:"; // do not translate as it is used in spanish only - case "CL": - return "Cuenta:"; // do not translate as it is used in spanish only - default: - return Res.get("payment.accountNrLabel"); - } - } - - // AccountType - public static boolean isAccountTypeRequired(String countryCode) { - switch (countryCode) { - case "US": - case "BR": - case "CA": - return true; - default: - return false; - } - } - - public static String getAccountTypeLabel(String countryCode) { - switch (countryCode) { - case "US": - case "BR": - case "CA": - return Res.get("payment.accountType"); - default: - return ""; - } - } - - public static List getAccountTypeValues(String countryCode) { - switch (countryCode) { - case "US": - case "BR": - case "CA": - return Arrays.asList(Res.get("payment.checking"), Res.get("payment.savings")); - default: - return new ArrayList<>(); - } - } - - - // HolderId - public static boolean isHolderIdRequired(String countryCode) { - switch (countryCode) { - case "BR": - case "CL": - return true; - default: - return false; - } - } - - public static String getHolderIdLabel(String countryCode) { - switch (countryCode) { - case "BR": - return "Cadastro de Pessoas Físicas (CPF):"; // do not translate as it is used in portuguese only - case "CL": - return "Rol Único Tributario (RUT):"; // do not translate as it is used in spanish only - default: - return Res.get("payment.personalId"); - } - } - - // Validation - public static boolean useValidation(String countryCode) { - switch (countryCode) { - case "GB": - case "US": - case "BR": - case "AU": - case "CA": - case "NZ": - case "MX": - case "HK": - case "SE": - case "NO": - return true; - default: - return false; - } - } -} diff --git a/network/src/main/java/io/bisq/messages/locale/Country.java b/network/src/main/java/io/bisq/messages/locale/Country.java deleted file mode 100644 index 3b362ab7c8..0000000000 --- a/network/src/main/java/io/bisq/messages/locale/Country.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * This file is part of bisq. - * - * bisq is free software: you can redistribute it and/or modify it - * under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or (at - * your option) any later version. - * - * bisq is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public - * License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with bisq. If not, see . - */ - -package io.bisq.messages.locale; - -import io.bisq.app.Version; -import io.bisq.common.persistance.Persistable; - -import javax.annotation.concurrent.Immutable; - -@Immutable -public final class Country implements Persistable { - // That object is saved to disc. We need to take care of changes to not break deserialization. - private static final long serialVersionUID = Version.LOCAL_DB_VERSION; - - public final String code; - public final String name; - public final Region region; - - public Country(String code, String name, Region region) { - this.code = code; - this.name = name; - this.region = region; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - - Country country = (Country) o; - - if (code != null ? !code.equals(country.code) : country.code != null) return false; - //noinspection SimplifiableIfStatement - if (name != null ? !name.equals(country.name) : country.name != null) return false; - return !(region != null ? !region.equals(country.region) : country.region != null); - - } - - @Override - public int hashCode() { - int result = code != null ? code.hashCode() : 0; - result = 31 * result + (name != null ? name.hashCode() : 0); - result = 31 * result + (region != null ? region.hashCode() : 0); - return result; - } - - @Override - public String toString() { - return "Country{" + - "code='" + code + '\'' + - ", name='" + name + '\'' + - ", region=" + region + - '}'; - } -} diff --git a/network/src/main/java/io/bisq/messages/locale/CountryUtil.java b/network/src/main/java/io/bisq/messages/locale/CountryUtil.java deleted file mode 100644 index 1a911eeff0..0000000000 --- a/network/src/main/java/io/bisq/messages/locale/CountryUtil.java +++ /dev/null @@ -1,209 +0,0 @@ -/* - * This file is part of bisq. - * - * bisq is free software: you can redistribute it and/or modify it - * under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or (at - * your option) any later version. - * - * bisq is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public - * License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with bisq. If not, see . - */ - -package io.bisq.messages.locale; - -import com.google.common.collect.Collections2; -import com.google.common.collect.Lists; -import io.bisq.messages.user.Preferences; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.*; -import java.util.stream.Collectors; - -public class CountryUtil { - private static final Logger log = LoggerFactory.getLogger(CountryUtil.class); - - public static List getAllSepaEuroCountries() { - List list = new ArrayList<>(); - String[] codes = {"AT", "BE", "CY", "DE", "EE", "FI", "FR", "GR", "IE", - "IT", "LV", "LT", "LU", "MC", "MT", "NL", "PT", "SK", "SI", "ES"}; - populateCountryListByCodes(list, codes); - list.sort((a, b) -> a.name.compareTo(b.name)); - - return list; - } - - private static void populateCountryListByCodes(List list, String[] codes) { - for (String code : codes) { - Locale locale = new Locale(LanguageUtil.getDefaultLanguage(), code, ""); - String regionCode = getRegionCode(locale.getCountry()); - final Region region = new Region(regionCode, getRegionName(regionCode)); - final Country country = new Country(locale.getCountry(), locale.getDisplayCountry(), region); - list.add(country); - } - } - - public static boolean containsAllSepaEuroCountries(List countryCodesToCompare) { - countryCodesToCompare.sort(String::compareTo); - List countryCodesBase = getAllSepaEuroCountries().stream().map(c -> c.code).collect(Collectors.toList()); - return countryCodesToCompare.toString().equals(countryCodesBase.toString()); - } - - public static List getAllSepaNonEuroCountries() { - List list = new ArrayList<>(); - String[] codes = {"BG", "HR", "CZ", "DK", "GB", "HU", "PL", "RO", - "SE", "IS", "NO", "LI", "CH"}; - populateCountryListByCodes(list, codes); - list.sort((a, b) -> a.name.compareTo(b.name)); - return list; - } - - public static List getAllSepaCountries() { - List list = new ArrayList<>(); - list.addAll(getAllSepaEuroCountries()); - list.addAll(getAllSepaNonEuroCountries()); - return list; - } - - public static Country getDefaultCountry() { - final Locale locale = Preferences.getDefaultLocale(); - String regionCode = getRegionCode(locale.getCountry()); - final Region region = new Region(regionCode, getRegionName(regionCode)); - return new Country(locale.getCountry(), locale.getDisplayCountry(), region); - } - - public static String getNameByCode(String countryCode) { - return new Locale(LanguageUtil.getDefaultLanguage(), countryCode).getDisplayCountry(); - } - - public static String getNameAndCode(String countryCode) { - return getNameByCode(countryCode) + " (" + countryCode + ")"; - } - - public static String getCodesString(List countryCodes) { - return countryCodes.stream().collect(Collectors.joining(", ")); - } - - public static String getNamesByCodesString(List countryCodes) { - return getNamesByCodes(countryCodes).stream().collect(Collectors.joining(",\n")); - } - - public static List getAllRegions() { - final List allRegions = new ArrayList<>(); - - String regionCode = "NA"; - Region region = new Region(regionCode, getRegionName(regionCode)); - allRegions.add(region); - - regionCode = "SA"; - region = new Region(regionCode, getRegionName(regionCode)); - allRegions.add(region); - - regionCode = "AF"; - region = new Region(regionCode, getRegionName(regionCode)); - allRegions.add(region); - - regionCode = "EU"; - region = new Region(regionCode, getRegionName(regionCode)); - allRegions.add(region); - - regionCode = "AS"; - region = new Region(regionCode, getRegionName(regionCode)); - allRegions.add(region); - - regionCode = "OC"; - region = new Region(regionCode, getRegionName(regionCode)); - allRegions.add(region); - - return allRegions; - } - - public static List getAllCountriesForRegion(Region selectedRegion) { - return Lists.newArrayList(Collections2.filter(getAllCountries(), country -> - selectedRegion != null && country != null && selectedRegion.equals(country.region))); - } - - public static List getAllCountries() { - final Set allCountries = new HashSet<>(); - for (final Locale locale : getAllCountryLocales()) { - String regionCode = getRegionCode(locale.getCountry()); - final Region region = new Region(regionCode, getRegionName(regionCode)); - final Country country = new Country(locale.getCountry(), locale.getDisplayCountry(), region); - allCountries.add(country); - } - - allCountries.add(new Country("GE", "Georgia", new Region("AS", getRegionName("AS")))); - allCountries.add(new Country("BW", "Botswana", new Region("AF", getRegionName("AF")))); - - final List allCountriesList = new ArrayList<>(allCountries); - allCountriesList.sort((locale1, locale2) -> locale1.name.compareTo(locale2.name)); - return allCountriesList; - } - - private static List getAllCountryLocales() { - List allLocales = LocaleUtil.getAllLocales(); - - // Filter duplicate locale entries - Set allLocalesAsSet = allLocales.stream().filter(locale -> !locale.getCountry().isEmpty()) - .collect(Collectors.toSet()); - - List allCountryLocales = new ArrayList<>(); - allCountryLocales.addAll(allLocalesAsSet); - allCountryLocales.sort((locale1, locale2) -> locale1.getDisplayCountry().compareTo(locale2.getDisplayCountry())); - return allCountryLocales; - } - - private static List getNamesByCodes(List countryCodes) { - return countryCodes.stream().map(CountryUtil::getNameByCode).collect(Collectors.toList()); - } - - // other source of countries: https://developers.braintreepayments.com/reference/general/countries/java - private static final String[] countryCodes = new String[]{"AE", "AL", "AR", "AT", "AU", "BA", "BE", "BG", "BH", - "BO", "BR", "BW", "BY", "CA", "CH", "CL", "CN", "CO", "CR", "CS", "CU", "CY", "CZ", "DE", "DK", "DO", "DZ", - "EC", "EE", "EG", "ES", "FI", "FR", "GE", "GB", "GR", "GT", "HK", "HN", "HR", "HU", "ID", "IE", "IL", "IN", - "IQ", "IS", "IT", "JO", "JP", "KE", "KH", "KR", "KW", "KZ", "LB", "LT", "LU", "LV", "LY", "MA", "MD", "ME", "MK", "MT", "MX", - "MY", "NI", "NL", "NO", "NZ", "OM", "PA", "PE", "PH", "PL", "PR", "PT", "PY", "QA", "RO", "RS", "RU", - "SA", "SD", "SE", "SG", "SI", "SK", "SV", "SY", "TH", "TN", "TR", "TW", "UA", "US", "UY", "VE", "VN", - "YE", "ZA"}; - - private static final List countryCodeList = Arrays.asList(countryCodes); - private static final String[] regionCodes = new String[]{"AS", "EU", "SA", "EU", "OC", "EU", "EU", "EU", "AS", - "SA", "SA", "AF", "EU", "NA", "EU", "SA", "AS", "SA", "NA", "EU", "NA", "EU", "EU", "EU", "EU", "NA", "AF", - "SA", "EU", "AF", "EU", "EU", "EU", "AS", "EU", "EU", "NA", "AS", "NA", "EU", "EU", "AS", "EU", "AS", "AS", - "AS", "EU", "EU", "AS", "AS", "AF", "AS", "AS", "AS", "AS", "AS", "EU", "EU", "EU", "AF", "AF", "EU", "EU", "EU", "EU", "NA", - "AS", "NA", "EU", "EU", "OC", "AS", "NA", "SA", "AS", "EU", "NA", "EU", "SA", "AS", "EU", "EU", "EU", - "AS", "AF", "EU", "AS", "EU", "EU", "NA", "AS", "AS", "AF", "AS", "AS", "EU", "NA", "SA", "SA", "AS", - "AS", "AF"}; - private static final List regionCodeList = Arrays.asList(regionCodes); - private static final String[][] regionCodeToName = new String[][]{ - {"NA", "North America"}, {"SA", "South America"}, {"AF", "Africa"}, {"EU", "Europe"}, {"AS", "Asia"}, - {"OC", "Oceania"}}; - - private static String getRegionName(final String regionCode) { - for (final String[] regionName : regionCodeToName) { - if (regionName[0].equals(regionCode)) { - return regionName[1]; - } - } - return regionCode; - } - - private static String getRegionCode(String countryCode) { - if (!countryCode.isEmpty() && countryCodeList.contains(countryCode)) { - return regionCodeList.get(countryCodeList.indexOf(countryCode)); - } else { - return "Undefined"; - } - } - - public static String getDefaultCountryCode() { - // might be set later in pref or config, so not use Preferences.getDefaultLocale() anywhere in the code - return Preferences.getDefaultLocale().getCountry(); - } -} diff --git a/network/src/main/java/io/bisq/messages/locale/CryptoCurrency.java b/network/src/main/java/io/bisq/messages/locale/CryptoCurrency.java deleted file mode 100644 index 0105150648..0000000000 --- a/network/src/main/java/io/bisq/messages/locale/CryptoCurrency.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * This file is part of bisq. - * - * bisq is free software: you can redistribute it and/or modify it - * under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or (at - * your option) any later version. - * - * bisq is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public - * License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with bisq. If not, see . - */ - -package io.bisq.messages.locale; - -import io.bisq.app.Version; - -public final class CryptoCurrency extends TradeCurrency { - // That object is saved to disc. We need to take care of changes to not break deserialization. - private static final long serialVersionUID = Version.LOCAL_DB_VERSION; - - // http://boschista.deviantart.com/journal/Cool-ASCII-Symbols-214218618 - private final static String PREFIX = "✦ "; - - private boolean isAsset; - - public CryptoCurrency(String currencyCode, String name) { - this(currencyCode, name, false); - } - - public CryptoCurrency(String currencyCode, String name, boolean isAsset) { - super(currencyCode, name); - this.isAsset = isAsset; - } - - public CryptoCurrency(String currencyCode, String name, String symbol) { - super(currencyCode, name, symbol); - } - - public boolean isAsset() { - return isAsset; - } - - @Override - public String getDisplayPrefix() { - return PREFIX; - } -} diff --git a/network/src/main/java/io/bisq/messages/locale/CurrencyUtil.java b/network/src/main/java/io/bisq/messages/locale/CurrencyUtil.java deleted file mode 100644 index fa4bb1d8d6..0000000000 --- a/network/src/main/java/io/bisq/messages/locale/CurrencyUtil.java +++ /dev/null @@ -1,339 +0,0 @@ -/* - * This file is part of bisq. - * - * bisq is free software: you can redistribute it and/or modify it - * under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or (at - * your option) any later version. - * - * bisq is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public - * License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with bisq. If not, see . - */ - -package io.bisq.messages.locale; - -import io.bisq.messages.user.Preferences; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.*; -import java.util.stream.Collectors; - -public class CurrencyUtil { - private static final Logger log = LoggerFactory.getLogger(CurrencyUtil.class); - - private static final List allSortedFiatCurrencies = createAllSortedFiatCurrenciesList(); - - private static List createAllSortedFiatCurrenciesList() { - Set set = CountryUtil.getAllCountries().stream() - .map(country -> getCurrencyByCountryCode(country.code)) - .collect(Collectors.toSet()); - List list = new ArrayList<>(set); - list.sort(TradeCurrency::compareTo); - return list; - } - - public static List getAllSortedFiatCurrencies() { - return allSortedFiatCurrencies; - } - - public static List getAllMainFiatCurrencies() { - List list = new ArrayList<>(); - // Top traded currencies - list.add(new FiatCurrency("USD")); - list.add(new FiatCurrency("EUR")); - list.add(new FiatCurrency("GBP")); - list.add(new FiatCurrency("CAD")); - list.add(new FiatCurrency("AUD")); - list.add(new FiatCurrency("RUB")); - list.add(new FiatCurrency("INR")); - - list.sort(TradeCurrency::compareTo); - - TradeCurrency defaultTradeCurrency = getDefaultTradeCurrency(); - FiatCurrency defaultFiatCurrency = defaultTradeCurrency instanceof FiatCurrency ? (FiatCurrency) defaultTradeCurrency : null; - if (defaultFiatCurrency != null && list.contains(defaultFiatCurrency)) { - list.remove(defaultTradeCurrency); - list.add(0, defaultFiatCurrency); - } - return list; - } - - private static final List allSortedCryptoCurrencies = createAllSortedCryptoCurrenciesList(); - - public static List getAllSortedCryptoCurrencies() { - return allSortedCryptoCurrencies; - } - - // Don't make a PR for adding a coin but follow the steps described here: - // https://forum.bisq.io/t/how-to-add-your-favorite-altcoin/ - public static List createAllSortedCryptoCurrenciesList() { - final List result = new ArrayList<>(); - - result.add(new CryptoCurrency("AIB", "Advanced Internet Blocks")); - result.add(new CryptoCurrency("ANC", "Anoncoin")); - result.add(new CryptoCurrency("ANTI", "Anti")); - result.add(new CryptoCurrency("ARCO", "AquariusCoin")); - result.add(new CryptoCurrency("ARG", "Argentum")); - result.add(new CryptoCurrency("REP", "Augur", true)); - result.add(new CryptoCurrency("BATL", "Battlestars")); - result.add(new CryptoCurrency("BIGUP", "BigUp")); - result.add(new CryptoCurrency("BSQ", "bisq Token")); - result.add(new CryptoCurrency("BITAUD", "BitAUD", true)); - result.add(new CryptoCurrency("BITCHF", "BitCHF", true)); - result.add(new CryptoCurrency("BITCNY", "BitCNY", true)); - result.add(new CryptoCurrency("BITEUR", "BitEUR", true)); - result.add(new CryptoCurrency("BITGBP", "BitGBP", true)); - result.add(new CryptoCurrency("BITHKD", "BitHKD", true)); - result.add(new CryptoCurrency("BITNZD", "BitNZD", true)); - result.add(new CryptoCurrency("BITSEK", "BitSEK", true)); - result.add(new CryptoCurrency("BITSGD", "BitSGD", true)); - result.add(new CryptoCurrency("SYNQ", "BitSYNQ")); - result.add(new CryptoCurrency("BTS", "BitShares")); - result.add(new CryptoCurrency("BITUSD", "BitUSD", true)); - result.add(new CryptoCurrency("BLK", "Blackcoin")); - result.add(new CryptoCurrency("BURST", "Burstcoin")); - result.add(new CryptoCurrency("GBYTE", "Byte")); - result.add(new CryptoCurrency("CLAM", "Clams")); - result.add(new CryptoCurrency("CLOAK", "CloakCoin")); - result.add(new CryptoCurrency("CMT", "Comet")); - result.add(new CryptoCurrency("XCP", "Counterparty")); - result.add(new CryptoCurrency("CRBIT", "Creditbit")); - result.add(new CryptoCurrency("CRW", "Crown")); - result.add(new CryptoCurrency("CBX", "Crypto Bullion")); - result.add(new CryptoCurrency("DNET", "DarkNet")); - result.add(new CryptoCurrency("DIBC", "DIBCOIN")); - result.add(new CryptoCurrency("DASH", "Dash")); - result.add(new CryptoCurrency("DCR", "Decred")); - result.add(new CryptoCurrency("DGB", "Digibyte")); - result.add(new CryptoCurrency("DRS", "Digital Rupees")); - result.add(new CryptoCurrency("DGD", "DigixDAO Tokens", true)); - result.add(new CryptoCurrency("DOGE", "Dogecoin")); - result.add(new CryptoCurrency("DMC", "DynamicCoin")); - result.add(new CryptoCurrency("EMC", "Emercoin")); - result.add(new CryptoCurrency("EURT", "EUR Tether")); - result.add(new CryptoCurrency("ESP", "Espers")); - result.add(new CryptoCurrency("ENT", "Eternity")); - result.add(new CryptoCurrency("ETH", "Ether")); - result.add(new CryptoCurrency("ETC", "Ether Classic")); - result.add(new CryptoCurrency("ERC", "Europecoin")); - result.add(new CryptoCurrency("EGC", "EverGreenCoin")); - result.add(new CryptoCurrency("FCT", "Factom")); - result.add(new CryptoCurrency("FAIR", "FairCoin")); - result.add(new CryptoCurrency("FLO", "FlorinCoin")); - result.add(new CryptoCurrency("GAME", "GameCredits")); - result.add(new CryptoCurrency("GEMZ", "Gemz")); - result.add(new CryptoCurrency("GRC", "Gridcoin")); - result.add(new CryptoCurrency("GRS", "Groestlcoin")); - result.add(new CryptoCurrency("NLG", "Gulden")); - result.add(new CryptoCurrency("HODL", "HOdlcoin")); - result.add(new CryptoCurrency("HNC", "HunCoin")); - result.add(new CryptoCurrency("IOC", "I/O Coin")); - result.add(new CryptoCurrency("IOP", "Fermat")); - result.add(new CryptoCurrency("JPYT", "JPY Tether")); - result.add(new CryptoCurrency("JBS", "Jumbucks")); - result.add(new CryptoCurrency("LBC", "LBRY Credits")); - result.add(new CryptoCurrency("LTBC", "LTBcoin")); - result.add(new CryptoCurrency("LSK", "Lisk")); - result.add(new CryptoCurrency("LTC", "Litecoin")); - result.add(new CryptoCurrency("MAID", "MaidSafeCoin")); - result.add(new CryptoCurrency("MKR", "Maker", true)); - result.add(new CryptoCurrency("MXT", "MarteXcoin")); - result.add(new CryptoCurrency("MOIN", "Moin")); - result.add(new CryptoCurrency("XMR", "Monero")); - result.add(new CryptoCurrency("MT", "Mycelium Token", true)); - result.add(new CryptoCurrency("XMY", "Myriadcoin")); - result.add(new CryptoCurrency("NAV", "Nav Coin")); - result.add(new CryptoCurrency("XEM", "NEM")); - result.add(new CryptoCurrency("NEVA", "Nevacoin")); - result.add(new CryptoCurrency("NMC", "Namecoin")); - result.add(new CryptoCurrency("NBT", "NuBits")); - result.add(new CryptoCurrency("NSR", "NuShares")); - result.add(new CryptoCurrency("NXT", "Nxt")); - result.add(new CryptoCurrency("OK", "OKCash")); - result.add(new CryptoCurrency("OMNI", "Omni")); - result.add(new CryptoCurrency("OPAL", "Opal")); - result.add(new CryptoCurrency("PASC", "Pascal Coin")); - result.add(new CryptoCurrency("PPC", "Peercoin")); - result.add(new CryptoCurrency("PINK", "Pinkcoin")); - result.add(new CryptoCurrency("PIVX", "PIVX")); - result.add(new CryptoCurrency("XPTX", "PlatinumBar")); - result.add(new CryptoCurrency("PLU", "Plutons", true)); - result.add(new CryptoCurrency("POST", "PostCoin")); - result.add(new CryptoCurrency("POT", "PotCoin")); - result.add(new CryptoCurrency("XPM", "Primecoin")); - result.add(new CryptoCurrency("RADS", "Radium")); - result.add(new CryptoCurrency("REALEST", "RealEst. Coin")); - result.add(new CryptoCurrency("RDD", "ReddCoin")); - result.add(new CryptoCurrency("XRP", "Ripple")); - result.add(new CryptoCurrency("SFSC", "Safe FileSystem Coin")); - result.add(new CryptoCurrency("SDC", "ShadowCash")); - result.add(new CryptoCurrency("SHIFT", "Shift")); - result.add(new CryptoCurrency("SC", "Siacoin")); - result.add(new CryptoCurrency("SF", "Siafund")); - result.add(new CryptoCurrency("SIB", "Sibcoin")); - result.add(new CryptoCurrency("SMLY", "Smileycoin")); - result.add(new CryptoCurrency("SLR", "SolarCoin")); - result.add(new CryptoCurrency("STEEM", "STEEM")); - result.add(new CryptoCurrency("STEEMUSD", "Steem Dollars", true)); - result.add(new CryptoCurrency("XLM", "Stellar Lumens")); - result.add(new CryptoCurrency("SJCX", "StorjcoinX")); - result.add(new CryptoCurrency("STRAT", "Stratis")); - result.add(new CryptoCurrency("SWT", "Swarm City Token", true)); - result.add(new CryptoCurrency("SYNX", "Syndicate")); - result.add(new CryptoCurrency("AMP", "Synereo", true)); - result.add(new CryptoCurrency("TRI", "Triangles")); - result.add(new CryptoCurrency("USDT", "USD Tether")); - result.add(new CryptoCurrency("UNO", "Unobtanium")); - result.add(new CryptoCurrency("VCN", "VCoin")); - result.add(new CryptoCurrency("VPN", "VPNCoin")); - result.add(new CryptoCurrency("XVG", "Verge")); - result.add(new CryptoCurrency("VRC", "VeriCoin")); - result.add(new CryptoCurrency("WDC", "Worldcoin")); - result.add(new CryptoCurrency("WAVES", "Waves")); - result.add(new CryptoCurrency("XAUR", "Xaurum")); - result.add(new CryptoCurrency("YACC", "YACCoin")); - result.add(new CryptoCurrency("YBC", "YbCoin")); - result.add(new CryptoCurrency("ZEC", "Zcash")); - result.add(new CryptoCurrency("XZC", "Zcoin")); - - result.sort(TradeCurrency::compareTo); - - // Util for printing all altcoins for adding to FAQ page - StringBuilder sb = new StringBuilder(); - result.stream().forEach(e -> sb.append("
  • \"") - .append(e.getCode()) - .append("\", \"") - .append(e.getName()) - .append("\"
  • ") - .append("\n")); - //log.info(sb.toString()); - - return result; - } - - public static List getMainCryptoCurrencies() { - final List result = new ArrayList<>(); - result.add(new CryptoCurrency("BSQ", "bisq Token")); - result.add(new CryptoCurrency("XMR", "Monero")); - result.add(new CryptoCurrency("ZEC", "Zcash")); - result.add(new CryptoCurrency("NMC", "Namecoin")); - result.add(new CryptoCurrency("SC", "Siacoin")); - result.add(new CryptoCurrency("ETH", "Ether")); - result.add(new CryptoCurrency("ETC", "Ether Classic")); - result.add(new CryptoCurrency("STEEM", "STEEM")); - result.add(new CryptoCurrency("MT", "Mycelium Token", true)); - result.add(new CryptoCurrency("REP", "Augur", true)); - result.add(new CryptoCurrency("LTC", "Litecoin")); - result.add(new CryptoCurrency("DASH", "Dash")); - result.add(new CryptoCurrency("DOGE", "Dogecoin")); - - result.sort(TradeCurrency::compareTo); - return result; - } - - - /** - * @return Sorted list of SEPA currencies with EUR as first item - */ - private static Set getSortedSEPACurrencyCodes() { - return CountryUtil.getAllSepaCountries().stream() - .map(country -> getCurrencyByCountryCode(country.code)) - .collect(Collectors.toSet()); - } - - // At OKPay you can exchange internally those currencies - public static List getAllOKPayCurrencies() { - ArrayList currencies = new ArrayList<>(Arrays.asList( - new FiatCurrency("EUR"), - new FiatCurrency("USD"), - new FiatCurrency("GBP"), - new FiatCurrency("CHF"), - new FiatCurrency("RUB"), - new FiatCurrency("PLN"), - new FiatCurrency("JPY"), - new FiatCurrency("CAD"), - new FiatCurrency("AUD"), - new FiatCurrency("CZK"), - new FiatCurrency("NOK"), - new FiatCurrency("SEK"), - new FiatCurrency("DKK"), - new FiatCurrency("HRK"), - new FiatCurrency("HUF"), - new FiatCurrency("NZD"), - new FiatCurrency("RON"), - new FiatCurrency("TRY"), - new FiatCurrency("ZAR"), - new FiatCurrency("HKD"), - new FiatCurrency("CNY") - )); - currencies.sort(TradeCurrency::compareTo); - return currencies; - } - - public static boolean isFiatCurrency(String currencyCode) { - try { - return currencyCode != null && !currencyCode.isEmpty() && !isCryptoCurrency(currencyCode) && Currency.getInstance(currencyCode) != null; - } catch (Throwable t) { - return false; - } - } - - public static Optional getFiatCurrency(String currencyCode) { - return allSortedFiatCurrencies.stream().filter(e -> e.getCode().equals(currencyCode)).findAny(); - } - - @SuppressWarnings("WeakerAccess") - public static boolean isCryptoCurrency(String currencyCode) { - return getCryptoCurrency(currencyCode).isPresent(); - } - - public static Optional getCryptoCurrency(String currencyCode) { - return getAllSortedCryptoCurrencies().stream().filter(e -> e.getCode().equals(currencyCode)).findAny(); - } - - public static Optional getTradeCurrency(String currencyCode) { - Optional fiatCurrencyOptional = getFiatCurrency(currencyCode); - if (isFiatCurrency(currencyCode) && fiatCurrencyOptional.isPresent()) { - return Optional.of(fiatCurrencyOptional.get()); - } else { - Optional cryptoCurrencyOptional = getCryptoCurrency(currencyCode); - if (isCryptoCurrency(currencyCode) && cryptoCurrencyOptional.isPresent()) { - return Optional.of(cryptoCurrencyOptional.get()); - } else { - return Optional.empty(); - } - } - } - - public static FiatCurrency getCurrencyByCountryCode(String countryCode) { - return new FiatCurrency(Currency.getInstance(new Locale(LanguageUtil.getDefaultLanguage(), countryCode)).getCurrencyCode()); - } - - - public static String getNameByCode(String currencyCode) { - if (isCryptoCurrency(currencyCode)) - return getCryptoCurrency(currencyCode).get().getName(); - else - try { - return Currency.getInstance(currencyCode).getDisplayName(Preferences.getDefaultLocale()); - } catch (Throwable t) { - log.debug("No currency name available " + t.getMessage()); - return currencyCode; - } - } - - public static String getNameAndCode(String currencyCode) { - return getNameByCode(currencyCode) + " (" + currencyCode + ")"; - } - - public static TradeCurrency getDefaultTradeCurrency() { - return Preferences.getDefaultTradeCurrency(); - } - -} diff --git a/network/src/main/java/io/bisq/messages/locale/FiatCurrency.java b/network/src/main/java/io/bisq/messages/locale/FiatCurrency.java deleted file mode 100644 index 0fe9fdcef4..0000000000 --- a/network/src/main/java/io/bisq/messages/locale/FiatCurrency.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * This file is part of bisq. - * - * bisq is free software: you can redistribute it and/or modify it - * under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or (at - * your option) any later version. - * - * bisq is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public - * License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with bisq. If not, see . - */ - -package io.bisq.messages.locale; - -import io.bisq.app.Version; -import io.bisq.messages.user.Preferences; - -import java.util.Currency; - -public final class FiatCurrency extends TradeCurrency { - // That object is saved to disc. We need to take care of changes to not break deserialization. - private static final long serialVersionUID = Version.LOCAL_DB_VERSION; - - // http://boschista.deviantart.com/journal/Cool-ASCII-Symbols-214218618 - private final static String PREFIX = "★ "; - - private final Currency currency; - - public FiatCurrency(String currencyCode) { - this(Currency.getInstance(currencyCode)); - } - - @SuppressWarnings("WeakerAccess") - public FiatCurrency(Currency currency) { - super(currency.getCurrencyCode(), currency.getDisplayName(Preferences.getDefaultLocale()), currency.getSymbol()); - this.currency = currency; - } - - public Currency getCurrency() { - return currency; - } - - @Override - public String getDisplayPrefix() { - return PREFIX; - } - - @Override - public String toString() { - return "FiatCurrency{" + - "currency=" + currency + - ", code='" + code + '\'' + - ", name='" + name + '\'' + - ", symbol='" + symbol + '\'' + - '}'; - } -} diff --git a/network/src/main/java/io/bisq/messages/locale/LanguageUtil.java b/network/src/main/java/io/bisq/messages/locale/LanguageUtil.java deleted file mode 100644 index e8f59809d4..0000000000 --- a/network/src/main/java/io/bisq/messages/locale/LanguageUtil.java +++ /dev/null @@ -1,119 +0,0 @@ -/* - * This file is part of bisq. - * - * bisq is free software: you can redistribute it and/or modify it - * under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or (at - * your option) any later version. - * - * bisq is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public - * License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with bisq. If not, see . - */ - -package io.bisq.messages.locale; - -import io.bisq.messages.user.Preferences; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.*; -import java.util.stream.Collectors; - -public class LanguageUtil { - private static final Logger log = LoggerFactory.getLogger(LanguageUtil.class); - - private static List userLanguageCodes = Arrays.asList( - "en", // English - "de" // German - - /* - // not translated yet - "es", // Spanish - "zh", // Chinese - "pt", // Portuguese - "it", // Italian - "el", // Greek - "fr", // French - "sr", // Serbian - "ja", // Japanese - "iw", // Hebrew - "hi", // Hindi - "ru", // Russian - "ko", // Korean - "pl", // Polish - "sv", // Swedish - "no", // Norwegian - "nl", // Dutch - "be", // Belarusian - "fi", // Finnish - "bg", // Bulgarian - "lt", // Lithuanian - "lv", // Latvian - "hr", // Croatian - "hu", // Hungarian - "uk", // Ukrainian - "sk", // Slovak - "sl", // Slovenian - "ga", // Irish - "sq", // Albanian - "ca", // Catalan - "mk", // Macedonian - "kk", // Kazakh - "km", // Khmer - "sw", // Swahili - "in", // Indonesian - "ms", // Malay - "is", // Icelandic - "et", // Estonian - "cs", // Czech - "ar", // Arabic - "vi", // Vietnamese - "th", // Thai - "da", // Danish - "ro", // Romanian - "tr", // Turkish - "mt" // Maltese - */ - ); - - public static List getAllLanguageCodes() { - List allLocales = LocaleUtil.getAllLocales(); - - // Filter duplicate locale entries - Set allLocalesAsSet = allLocales.stream().filter(locale -> !locale.getLanguage().isEmpty() && - !locale.getDisplayLanguage().isEmpty()) - .map(Locale::getLanguage) - .collect(Collectors.toSet()); - - List allLanguageCodes = new ArrayList<>(); - allLanguageCodes.addAll(allLocalesAsSet); - allLanguageCodes.sort((o1, o2) -> getDisplayName(o1).compareTo(getDisplayName(o2))); - return allLanguageCodes; - } - - public static String getDefaultLanguage() { - // might be set later in pref or config, so not use Preferences.getDefaultLocale() anywhere in the code - return Preferences.getDefaultLocale().getLanguage(); - } - - public static String getDefaultLanguageLocaleAsCode() { - return new Locale(LanguageUtil.getDefaultLanguage(), "").getLanguage(); - } - - public static String getEnglishLanguageLocaleCode() { - return new Locale(Locale.ENGLISH.getLanguage(), "").getLanguage(); - } - - public static String getDisplayName(String code) { - return new Locale(code.toUpperCase()).getDisplayName(Preferences.getDefaultLocale()); - } - - public static List getUserLanguageCodes() { - return userLanguageCodes; - } -} diff --git a/network/src/main/java/io/bisq/messages/locale/LocaleUtil.java b/network/src/main/java/io/bisq/messages/locale/LocaleUtil.java deleted file mode 100644 index 02983fb635..0000000000 --- a/network/src/main/java/io/bisq/messages/locale/LocaleUtil.java +++ /dev/null @@ -1,201 +0,0 @@ -/* - * This file is part of bisq. - * - * bisq is free software: you can redistribute it and/or modify it - * under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or (at - * your option) any later version. - * - * bisq is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public - * License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with bisq. If not, see . - */ - -package io.bisq.messages.locale; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.ArrayList; -import java.util.List; -import java.util.Locale; - -public class LocaleUtil { - private static final Logger log = LoggerFactory.getLogger(LocaleUtil.class); - - public static List getAllLocales() { - - // derived form Locale.getAvailableLocales() and added some missing locales - List allLocales = new ArrayList<>(); - - allLocales.add(new Locale("bg", "", "")); - allLocales.add(new Locale("it", "", "")); - allLocales.add(new Locale("ko", "", "")); - allLocales.add(new Locale("uk", "", "")); - allLocales.add(new Locale("lv", "", "")); - allLocales.add(new Locale("pt", "", "")); - allLocales.add(new Locale("sk", "", "")); - allLocales.add(new Locale("ga", "", "")); - allLocales.add(new Locale("et", "", "")); - allLocales.add(new Locale("sv", "", "")); - allLocales.add(new Locale("cs", "", "")); - allLocales.add(new Locale("el", "", "")); - allLocales.add(new Locale("hu", "", "")); - allLocales.add(new Locale("in", "", "")); - allLocales.add(new Locale("be", "", "")); - allLocales.add(new Locale("es", "", "")); - allLocales.add(new Locale("tr", "", "")); - allLocales.add(new Locale("hr", "", "")); - allLocales.add(new Locale("lt", "", "")); - allLocales.add(new Locale("sq", "", "")); - allLocales.add(new Locale("fr", "", "")); - allLocales.add(new Locale("ja", "", "")); - allLocales.add(new Locale("is", "", "")); - allLocales.add(new Locale("de", "", "")); - allLocales.add(new Locale("en", "", "")); - allLocales.add(new Locale("ca", "", "")); - allLocales.add(new Locale("sl", "", "")); - allLocales.add(new Locale("fi", "", "")); - allLocales.add(new Locale("mk", "", "")); - allLocales.add(new Locale("sr", "", "")); - allLocales.add(new Locale("th", "", "")); - allLocales.add(new Locale("ar", "", "")); - allLocales.add(new Locale("ru", "", "")); - allLocales.add(new Locale("ms", "", "")); - allLocales.add(new Locale("hi", "", "")); - allLocales.add(new Locale("nl", "", "")); - allLocales.add(new Locale("vi", "", "")); - allLocales.add(new Locale("sr", "", "")); - allLocales.add(new Locale("mt", "", "")); - allLocales.add(new Locale("da", "", "")); - allLocales.add(new Locale("ro", "", "")); - allLocales.add(new Locale("no", "", "")); - allLocales.add(new Locale("pl", "", "")); - allLocales.add(new Locale("iw", "", "")); - allLocales.add(new Locale("zh", "", "")); - allLocales.add(new Locale("ar", "AE", "")); - allLocales.add(new Locale("sq", "AL", "")); - allLocales.add(new Locale("es", "AR", "")); - allLocales.add(new Locale("de", "AT", "")); - allLocales.add(new Locale("en", "AU", "")); - allLocales.add(new Locale("sr", "BA", "")); - allLocales.add(new Locale("sr", "BA", "")); - allLocales.add(new Locale("fr", "BE", "")); - allLocales.add(new Locale("nl", "BE", "")); - allLocales.add(new Locale("bg", "BG", "")); - allLocales.add(new Locale("ar", "BH", "")); - allLocales.add(new Locale("es", "BO", "")); - allLocales.add(new Locale("pt", "BR", "")); - allLocales.add(new Locale("be", "BY", "")); - allLocales.add(new Locale("fr", "CA", "")); - allLocales.add(new Locale("en", "CA", "")); - allLocales.add(new Locale("fr", "CH", "")); - allLocales.add(new Locale("de", "CH", "")); - allLocales.add(new Locale("it", "CH", "")); - allLocales.add(new Locale("es", "CL", "")); - allLocales.add(new Locale("zh", "CN", "")); - allLocales.add(new Locale("es", "CO", "")); - allLocales.add(new Locale("es", "CR", "")); - allLocales.add(new Locale("sr", "CS", "")); - allLocales.add(new Locale("es", "CU", "")); - allLocales.add(new Locale("el", "CY", "")); - allLocales.add(new Locale("cs", "CZ", "")); - allLocales.add(new Locale("de", "DE", "")); - allLocales.add(new Locale("da", "DK", "")); - allLocales.add(new Locale("es", "DO", "")); - allLocales.add(new Locale("ar", "DZ", "")); - allLocales.add(new Locale("es", "EC", "")); - allLocales.add(new Locale("et", "EE", "")); - allLocales.add(new Locale("ar", "EG", "")); - allLocales.add(new Locale("ca", "ES", "")); - allLocales.add(new Locale("es", "ES", "")); - allLocales.add(new Locale("fi", "FI", "")); - allLocales.add(new Locale("fr", "FR", "")); - allLocales.add(new Locale("en", "GB", "")); - allLocales.add(new Locale("el", "GR", "")); - allLocales.add(new Locale("de", "GR", "")); - allLocales.add(new Locale("es", "GT", "")); - allLocales.add(new Locale("zh", "HK", "")); - allLocales.add(new Locale("es", "HN", "")); - allLocales.add(new Locale("hr", "HR", "")); - allLocales.add(new Locale("hu", "HU", "")); - allLocales.add(new Locale("in", "ID", "")); - allLocales.add(new Locale("ga", "IE", "")); - allLocales.add(new Locale("en", "IE", "")); - allLocales.add(new Locale("iw", "IL", "")); - allLocales.add(new Locale("hi", "IN", "")); - allLocales.add(new Locale("en", "IN", "")); - allLocales.add(new Locale("ar", "IQ", "")); - allLocales.add(new Locale("is", "IS", "")); - allLocales.add(new Locale("it", "IT", "")); - allLocales.add(new Locale("ar", "JO", "")); - allLocales.add(new Locale("ja", "JP", "")); - allLocales.add(new Locale("ja", "JP", "")); - allLocales.add(new Locale("sw", "KE", "")); - allLocales.add(new Locale("km", "KH", "")); - allLocales.add(new Locale("ko", "KR", "")); - allLocales.add(new Locale("ar", "KW", "")); - allLocales.add(new Locale("kk", "KZ", "")); - allLocales.add(new Locale("ar", "LB", "")); - allLocales.add(new Locale("lt", "LT", "")); - allLocales.add(new Locale("fr", "LU", "")); - allLocales.add(new Locale("de", "LU", "")); - allLocales.add(new Locale("lv", "LV", "")); - allLocales.add(new Locale("ar", "LY", "")); - allLocales.add(new Locale("ar", "MA", "")); - allLocales.add(new Locale("ro", "MD", "")); - allLocales.add(new Locale("sr", "ME", "")); - allLocales.add(new Locale("sr", "ME", "")); - allLocales.add(new Locale("mk", "MK", "")); - allLocales.add(new Locale("mt", "MT", "")); - allLocales.add(new Locale("en", "MT", "")); - allLocales.add(new Locale("es", "MX", "")); - allLocales.add(new Locale("ms", "MY", "")); - allLocales.add(new Locale("es", "NI", "")); - allLocales.add(new Locale("nl", "NL", "")); - allLocales.add(new Locale("no", "NO", "")); - allLocales.add(new Locale("no", "NO", "")); - allLocales.add(new Locale("en", "NZ", "")); - allLocales.add(new Locale("ar", "OM", "")); - allLocales.add(new Locale("es", "PA", "")); - allLocales.add(new Locale("es", "PE", "")); - allLocales.add(new Locale("en", "PH", "")); - allLocales.add(new Locale("pl", "PL", "")); - allLocales.add(new Locale("es", "PR", "")); - allLocales.add(new Locale("pt", "PT", "")); - allLocales.add(new Locale("es", "PY", "")); - allLocales.add(new Locale("ar", "QA", "")); - allLocales.add(new Locale("ro", "RO", "")); - allLocales.add(new Locale("sr", "RS", "")); - allLocales.add(new Locale("sr", "RS", "")); - allLocales.add(new Locale("ru", "RU", "")); - allLocales.add(new Locale("ar", "SA", "")); - allLocales.add(new Locale("ar", "SD", "")); - allLocales.add(new Locale("sv", "SE", "")); - allLocales.add(new Locale("en", "SG", "")); - allLocales.add(new Locale("zh", "SG", "")); - allLocales.add(new Locale("sl", "SI", "")); - allLocales.add(new Locale("sk", "SK", "")); - allLocales.add(new Locale("es", "SV", "")); - allLocales.add(new Locale("ar", "SY", "")); - allLocales.add(new Locale("th", "TH", "")); - allLocales.add(new Locale("th", "TH", "")); - allLocales.add(new Locale("ar", "TN", "")); - allLocales.add(new Locale("tr", "TR", "")); - allLocales.add(new Locale("zh", "TW", "")); - allLocales.add(new Locale("uk", "UA", "")); - allLocales.add(new Locale("en", "US", "")); - allLocales.add(new Locale("es", "US", "")); - allLocales.add(new Locale("es", "UY", "")); - allLocales.add(new Locale("es", "VE", "")); - allLocales.add(new Locale("vi", "VN", "")); - allLocales.add(new Locale("ar", "YE", "")); - allLocales.add(new Locale("en", "ZA", "")); - - return allLocales; - } -} diff --git a/network/src/main/java/io/bisq/messages/locale/Region.java b/network/src/main/java/io/bisq/messages/locale/Region.java deleted file mode 100644 index 67d90c17dc..0000000000 --- a/network/src/main/java/io/bisq/messages/locale/Region.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * This file is part of bisq. - * - * bisq is free software: you can redistribute it and/or modify it - * under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or (at - * your option) any later version. - * - * bisq is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public - * License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with bisq. If not, see . - */ - -package io.bisq.messages.locale; - -import io.bisq.app.Version; -import io.bisq.common.persistance.Persistable; - -import javax.annotation.concurrent.Immutable; - -@Immutable -public final class Region implements Persistable { - // That object is saved to disc. We need to take care of changes to not break deserialization. - private static final long serialVersionUID = Version.LOCAL_DB_VERSION; - - public final String code; - public final String name; - - public Region(String code, String name) { - this.code = code; - this.name = name; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - - Region region = (Region) o; - - //noinspection SimplifiableIfStatement - if (code != null ? !code.equals(region.code) : region.code != null) return false; - return !(name != null ? !name.equals(region.name) : region.name != null); - - } - - @Override - public int hashCode() { - int result = code != null ? code.hashCode() : 0; - result = 31 * result + (name != null ? name.hashCode() : 0); - return result; - } - - @Override - public String toString() { - return "Region{" + - "code='" + code + '\'' + - ", name='" + name + '\'' + - '}'; - } -} diff --git a/network/src/main/java/io/bisq/messages/locale/TradeCurrency.java b/network/src/main/java/io/bisq/messages/locale/TradeCurrency.java deleted file mode 100644 index f5353ca345..0000000000 --- a/network/src/main/java/io/bisq/messages/locale/TradeCurrency.java +++ /dev/null @@ -1,102 +0,0 @@ -/* - * This file is part of bisq. - * - * bisq is free software: you can redistribute it and/or modify it - * under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or (at - * your option) any later version. - * - * bisq is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public - * License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with bisq. If not, see . - */ - -package io.bisq.messages.locale; - -import io.bisq.app.Version; -import io.bisq.common.persistance.Persistable; -import org.jetbrains.annotations.NotNull; - -public abstract class TradeCurrency implements Persistable, Comparable { - // That object is saved to disc. We need to take care of changes to not break deserialization. - private static final long serialVersionUID = Version.LOCAL_DB_VERSION; - - protected final String code; - protected final String name; - protected String symbol; - - - public TradeCurrency(String code) { - this.code = code; - this.name = CurrencyUtil.getNameByCode(code); - } - - protected TradeCurrency(String code, String name) { - this.code = code; - this.name = name; - } - - public TradeCurrency(String code, String name, String symbol) { - this.code = code; - this.name = name; - this.symbol = symbol; - } - - public String getCode() { - return code; - } - - public String getName() { - return name; - } - - public String getSymbol() { - return symbol; - } - - public String getDisplayPrefix() { - return ""; - } - - public String getNameAndCode() { - return name + " (" + code + ")"; - } - - public String getCodeAndName() { - return code + " (" + name + ")"; - } - - @Override - public int compareTo(@NotNull TradeCurrency other) { - return this.getName().compareTo(other.getName()); - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (!(o instanceof TradeCurrency)) return false; - - TradeCurrency that = (TradeCurrency) o; - - return !(getCode() != null ? !getCode().equals(that.getCode()) : that.getCode() != null); - - } - - @Override - public int hashCode() { - return getCode() != null ? getCode().hashCode() : 0; - } - - @Override - public String toString() { - return "TradeCurrency{" + - "code='" + code + '\'' + - ", name='" + name + '\'' + - ", symbol='" + symbol + '\'' + - '}'; - } -} diff --git a/network/src/main/java/io/bisq/messages/payment/PaymentMethod.java b/network/src/main/java/io/bisq/messages/payment/PaymentMethod.java deleted file mode 100644 index f3d5080142..0000000000 --- a/network/src/main/java/io/bisq/messages/payment/PaymentMethod.java +++ /dev/null @@ -1,211 +0,0 @@ -/* - * This file is part of bisq. - * - * bisq is free software: you can redistribute it and/or modify it - * under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or (at - * your option) any later version. - * - * bisq is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public - * License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with bisq. If not, see . - */ - -package io.bisq.messages.payment; - -import io.bisq.app.Version; -import io.bisq.common.persistance.Persistable; -import io.bisq.locale.Res; -import org.bitcoinj.core.Coin; -import org.jetbrains.annotations.NotNull; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Optional; - -// Don't use Enum as it breaks serialisation when changing entries and we want to stay flexible here -public final class PaymentMethod implements Persistable, Comparable { - // That object is saved to disc. We need to take care of changes to not break deserialization. - private static final long serialVersionUID = Version.LOCAL_DB_VERSION; - - protected final Logger log = LoggerFactory.getLogger(this.getClass()); - - // time in blocks (average 10 min for one block confirmation - private static final long HOUR = 3600_000; - private static final long DAY = HOUR * 24; - - public static final String OK_PAY_ID = "OK_PAY"; - public static final String PERFECT_MONEY_ID = "PERFECT_MONEY"; - public static final String SEPA_ID = "SEPA"; - public static final String FASTER_PAYMENTS_ID = "FASTER_PAYMENTS"; - public static final String NATIONAL_BANK_ID = "NATIONAL_BANK"; - public static final String SAME_BANK_ID = "SAME_BANK"; - public static final String SPECIFIC_BANKS_ID = "SPECIFIC_BANKS"; - public static final String SWISH_ID = "SWISH"; - public static final String ALI_PAY_ID = "ALI_PAY"; - public static final String CLEAR_X_CHANGE_ID = "CLEAR_X_CHANGE"; - public static final String CHASE_QUICK_PAY_ID = "CHASE_QUICK_PAY"; - public static final String INTERAC_E_TRANSFER_ID = "INTERAC_E_TRANSFER"; - public static final String US_POSTAL_MONEY_ORDER_ID = "US_POSTAL_MONEY_ORDER"; - public static final String CASH_DEPOSIT_ID = "CASH_DEPOSIT"; - public static final String BLOCK_CHAINS_ID = "BLOCK_CHAINS"; - - public static PaymentMethod OK_PAY; - public static PaymentMethod PERFECT_MONEY; - public static PaymentMethod SEPA; - public static PaymentMethod FASTER_PAYMENTS; - public static PaymentMethod NATIONAL_BANK; - public static PaymentMethod SAME_BANK; - public static PaymentMethod SPECIFIC_BANKS; - public static PaymentMethod SWISH; - public static PaymentMethod ALI_PAY; - public static PaymentMethod CLEAR_X_CHANGE; - public static PaymentMethod CHASE_QUICK_PAY; - public static PaymentMethod INTERAC_E_TRANSFER; - public static PaymentMethod US_POSTAL_MONEY_ORDER; - public static PaymentMethod CASH_DEPOSIT; - public static PaymentMethod BLOCK_CHAINS; - - public static final List ALL_VALUES = new ArrayList<>(Arrays.asList( - // EUR - SEPA = new PaymentMethod(SEPA_ID, 0, 8 * DAY, Coin.parseCoin("0.5")), // sepa takes 1-3 business days. We use 8 days to include safety for holidays - - // Global - NATIONAL_BANK = new PaymentMethod(NATIONAL_BANK_ID, 0, 4 * DAY, Coin.parseCoin("0.5")), - SAME_BANK = new PaymentMethod(SAME_BANK_ID, 0, 2 * DAY, Coin.parseCoin("0.5")), - SPECIFIC_BANKS = new PaymentMethod(SPECIFIC_BANKS_ID, 0, 4 * DAY, Coin.parseCoin("0.5")), - CASH_DEPOSIT = new PaymentMethod(CASH_DEPOSIT_ID, 0, 4 * DAY, Coin.parseCoin("0.5")), - - // Trans national - OK_PAY = new PaymentMethod(OK_PAY_ID, 0, DAY, Coin.parseCoin("1")), - PERFECT_MONEY = new PaymentMethod(PERFECT_MONEY_ID, 0, DAY, Coin.parseCoin("1")), - - // UK - FASTER_PAYMENTS = new PaymentMethod(FASTER_PAYMENTS_ID, 0, DAY, Coin.parseCoin("0.5")), - - // Canada - INTERAC_E_TRANSFER = new PaymentMethod(INTERAC_E_TRANSFER_ID, 0, DAY, Coin.parseCoin("0.5")), - - // US - CLEAR_X_CHANGE = new PaymentMethod(CLEAR_X_CHANGE_ID, 0, 4 * DAY, Coin.parseCoin("0.5")), - CHASE_QUICK_PAY = new PaymentMethod(CHASE_QUICK_PAY_ID, 0, DAY, Coin.parseCoin("0.5")), - US_POSTAL_MONEY_ORDER = new PaymentMethod(US_POSTAL_MONEY_ORDER_ID, 0, 8 * DAY, Coin.parseCoin("0.5")), - - // Sweden - SWISH = new PaymentMethod(SWISH_ID, 0, DAY, Coin.parseCoin("1")), - - // China - ALI_PAY = new PaymentMethod(ALI_PAY_ID, 0, DAY, Coin.parseCoin("1")), - - // Altcoins - BLOCK_CHAINS = new PaymentMethod(BLOCK_CHAINS_ID, 0, DAY, Coin.parseCoin("1")) - )); - - private final String id; - private long lockTime; - private long maxTradePeriod; - private Coin maxTradeLimit; - - /** - * @param id - * @param lockTime lock time when seller release BTC until the payout tx gets valid (bitcoin tx lockTime). Serves as protection - * against charge back risk. If Bank do the charge back quickly the Arbitrator and the seller can push another - * double spend tx to invalidate the time locked payout tx. For the moment we set all to 0 but will have it in - * place when needed. - * @param maxTradePeriod The min. period a trader need to wait until he gets displayed the contact form for opening a dispute. - * @param maxTradeLimit The max. allowed trade amount in Bitcoin for that payment method (depending on charge back risk) - */ - public PaymentMethod(String id, long lockTime, long maxTradePeriod, Coin maxTradeLimit) { - this.id = id; - this.lockTime = lockTime; - this.maxTradePeriod = maxTradePeriod; - this.maxTradeLimit = maxTradeLimit; - } - - private void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException { - try { - in.defaultReadObject(); - - // In case we update those values we want that the persisted accounts get updated as well - PaymentMethod paymentMethod = PaymentMethod.getPaymentMethodById(id); - this.lockTime = paymentMethod.getLockTime(); - this.maxTradePeriod = paymentMethod.getMaxTradePeriod(); - this.maxTradeLimit = paymentMethod.getMaxTradeLimit(); - } catch (Throwable t) { - log.warn("Cannot be deserialized." + t.getMessage()); - } - } - - public static PaymentMethod getPaymentMethodById(String name) { - Optional paymentMethodOptional = ALL_VALUES.stream().filter(e -> e.getId().equals(name)).findFirst(); - if (paymentMethodOptional.isPresent()) - return paymentMethodOptional.get(); - else - return new PaymentMethod(Res.get("shared.na"), 1, DAY, Coin.parseCoin("0")); - } - - public String getId() { - return id; - } - - public long getMaxTradePeriod() { - return maxTradePeriod; - } - - public long getLockTime() { - return lockTime; - } - - public Coin getMaxTradeLimit() { - return maxTradeLimit; - } - - @Override - public int compareTo(@NotNull Object other) { - if (id != null) - return this.id.compareTo(((PaymentMethod) other).id); - else - return 0; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (!(o instanceof PaymentMethod)) return false; - - PaymentMethod that = (PaymentMethod) o; - - if (lockTime != that.lockTime) return false; - if (maxTradePeriod != that.maxTradePeriod) return false; - if (id != null ? !id.equals(that.id) : that.id != null) return false; - return !(maxTradeLimit != null ? !maxTradeLimit.equals(that.maxTradeLimit) : that.maxTradeLimit != null); - - } - - @Override - public int hashCode() { - int result = id != null ? id.hashCode() : 0; - result = 31 * result + (int) (lockTime ^ (lockTime >>> 32)); - result = 31 * result + (int) (maxTradePeriod ^ (maxTradePeriod >>> 32)); - result = 31 * result + (maxTradeLimit != null ? maxTradeLimit.hashCode() : 0); - return result; - } - - @Override - public String toString() { - return "PaymentMethod{" + - "id='" + id + '\'' + - ", lockTime=" + lockTime + - ", maxTradePeriod=" + maxTradePeriod + - ", maxTradeLimitInBitcoin=" + maxTradeLimit + - '}'; - } -} diff --git a/network/src/main/java/io/bisq/messages/payment/payload/AliPayAccountContractData.java b/network/src/main/java/io/bisq/messages/payment/payload/AliPayAccountContractData.java deleted file mode 100644 index c799f61044..0000000000 --- a/network/src/main/java/io/bisq/messages/payment/payload/AliPayAccountContractData.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * This file is part of bisq. - * - * bisq is free software: you can redistribute it and/or modify it - * under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or (at - * your option) any later version. - * - * bisq is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public - * License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with bisq. If not, see . - */ - -package io.bisq.messages.payment.payload; - -import io.bisq.app.Version; -import io.bisq.common.wire.proto.Messages; - -public final class AliPayAccountContractData extends PaymentAccountContractData { - // That object is sent over the wire, so we need to take care of version compatibility. - private static final long serialVersionUID = Version.P2P_NETWORK_VERSION; - - private String accountNr; - - public AliPayAccountContractData(String paymentMethod, String id, long maxTradePeriod, String accountNr) { - this(paymentMethod, id, maxTradePeriod); - setAccountNr(accountNr); - } - - public AliPayAccountContractData(String paymentMethod, String id, long maxTradePeriod) { - super(paymentMethod, id, maxTradePeriod); - } - - public void setAccountNr(String accountNr) { - this.accountNr = accountNr; - } - - public String getAccountNr() { - return accountNr; - } - - @Override - public String getPaymentDetails() { - return "AliPay - Account no.: " + accountNr; - } - - @Override - public String getPaymentDetailsForTradePopup() { - return getPaymentDetails(); - } - - @Override - public Messages.PaymentAccountContractData toProtoBuf() { - Messages.AliPayAccountContractData.Builder thisClass = - Messages.AliPayAccountContractData.newBuilder().setAccountNr(accountNr); - Messages.PaymentAccountContractData.Builder paymentAccountContractData = - Messages.PaymentAccountContractData.newBuilder() - .setId(id) - .setPaymentMethodName(paymentMethodName) - .setMaxTradePeriod(maxTradePeriod) - .setAliPayAccountContractData(thisClass); - return paymentAccountContractData.build(); - } - - @Override - public String toString() { - return "AliPayAccountContractData{" + - "accountNr='" + accountNr + '\'' + - '}'; - } -} diff --git a/network/src/main/java/io/bisq/messages/payment/payload/BankAccountContractData.java b/network/src/main/java/io/bisq/messages/payment/payload/BankAccountContractData.java deleted file mode 100644 index db32df2a90..0000000000 --- a/network/src/main/java/io/bisq/messages/payment/payload/BankAccountContractData.java +++ /dev/null @@ -1,138 +0,0 @@ -/* - * This file is part of bisq. - * - * bisq is free software: you can redistribute it and/or modify it - * under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or (at - * your option) any later version. - * - * bisq is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public - * License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with bisq. If not, see . - */ - -package io.bisq.messages.payment.payload; - -import io.bisq.app.Version; -import io.bisq.messages.locale.BankUtil; -import io.bisq.messages.locale.CountryUtil; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import javax.annotation.Nullable; - -public abstract class BankAccountContractData extends CountryBasedPaymentAccountContractData { - // That object is sent over the wire, so we need to take care of version compatibility. - private static final long serialVersionUID = Version.P2P_NETWORK_VERSION; - - private static final Logger log = LoggerFactory.getLogger(BankAccountContractData.class); - - protected String holderName; - protected String bankName; - protected String bankId; - protected String branchId; - protected String accountNr; - protected String accountType; - - @Nullable - protected String holderTaxId; - - public BankAccountContractData(String paymentMethod, String id, long maxTradePeriod) { - super(paymentMethod, id, maxTradePeriod); - } - - @Override - public String getPaymentDetails() { - return "Bank account transfer - " + getPaymentDetailsForTradePopup().replace("\n", ", "); - } - - @Override - public String getPaymentDetailsForTradePopup() { - String bankName = BankUtil.isBankNameRequired(countryCode) ? BankUtil.getBankNameLabel(countryCode) + " " + this.bankName + "\n" : ""; - String bankId = BankUtil.isBankIdRequired(countryCode) ? BankUtil.getBankIdLabel(countryCode) + " " + this.bankId + "\n" : ""; - String branchId = BankUtil.isBranchIdRequired(countryCode) ? BankUtil.getBranchIdLabel(countryCode) + " " + this.branchId + "\n" : ""; - String accountNr = BankUtil.isAccountNrRequired(countryCode) ? BankUtil.getAccountNrLabel(countryCode) + " " + this.accountNr + "\n" : ""; - String accountType = BankUtil.isAccountTypeRequired(countryCode) ? BankUtil.getAccountTypeLabel(countryCode) + " " + this.accountType + "\n" : ""; - String holderIdString = BankUtil.isHolderIdRequired(countryCode) ? (BankUtil.getHolderIdLabel(countryCode) + " " + holderTaxId + "\n") : ""; - - return "Holder name: " + holderName + "\n" + - bankName + - bankId + - branchId + - accountNr + - accountType + - holderIdString + - "Country of bank: " + CountryUtil.getNameAndCode(getCountryCode()); - } - - - protected String getHolderIdLabel() { - return BankUtil.getHolderIdLabel(countryCode); - } - - public void setHolderName(String holderName) { - this.holderName = holderName; - } - - public String getHolderName() { - return holderName; - } - - public void setBankName(String bankName) { - this.bankName = bankName; - } - - @Nullable - public String getBankName() { - return bankName; - } - - public void setBankId(String bankId) { - this.bankId = bankId; - } - - @Nullable - public String getBankId() { - return BankUtil.isBankIdRequired(countryCode) ? bankId : bankName; - } - - public void setBranchId(String branchId) { - this.branchId = branchId; - } - - @Nullable - public String getBranchId() { - return branchId; - } - - public void setAccountNr(String accountNr) { - this.accountNr = accountNr; - } - - @Nullable - public String getAccountNr() { - return accountNr; - } - - public void setHolderTaxId(String holderTaxId) { - this.holderTaxId = holderTaxId; - } - - @Nullable - public String getHolderTaxId() { - return holderTaxId; - } - - public void setAccountType(String accountType) { - this.accountType = accountType; - } - - @Nullable - public String getAccountType() { - return accountType; - } -} diff --git a/network/src/main/java/io/bisq/messages/payment/payload/CashDepositAccountContractData.java b/network/src/main/java/io/bisq/messages/payment/payload/CashDepositAccountContractData.java deleted file mode 100644 index 5d12133032..0000000000 --- a/network/src/main/java/io/bisq/messages/payment/payload/CashDepositAccountContractData.java +++ /dev/null @@ -1,187 +0,0 @@ -/* - * This file is part of bisq. - * - * bisq is free software: you can redistribute it and/or modify it - * under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or (at - * your option) any later version. - * - * bisq is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public - * License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with bisq. If not, see . - */ - -package io.bisq.messages.payment.payload; - -import io.bisq.app.Version; -import io.bisq.common.wire.proto.Messages; -import io.bisq.messages.locale.BankUtil; -import io.bisq.messages.locale.CountryUtil; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import javax.annotation.Nullable; - -public class CashDepositAccountContractData extends CountryBasedPaymentAccountContractData { - // That object is sent over the wire, so we need to take care of version compatibility. - private static final long serialVersionUID = Version.P2P_NETWORK_VERSION; - - private static final Logger log = LoggerFactory.getLogger(CashDepositAccountContractData.class); - - protected String holderName; - protected String holderEmail; - protected String bankName; - protected String bankId; - protected String branchId; - protected String accountNr; - protected String accountType; - @Nullable - protected String requirements; - @Nullable - protected String holderTaxId; - - public CashDepositAccountContractData(String paymentMethod, String id, long maxTradePeriod) { - super(paymentMethod, id, maxTradePeriod); - } - - @Override - public String getPaymentDetails() { - return "Cash deposit - " + getPaymentDetailsForTradePopup().replace("\n", ", "); - } - - @Override - public String getPaymentDetailsForTradePopup() { - String bankName = BankUtil.isBankNameRequired(countryCode) ? BankUtil.getBankNameLabel(countryCode) + " " + this.bankName + "\n" : ""; - String bankId = BankUtil.isBankIdRequired(countryCode) ? BankUtil.getBankIdLabel(countryCode) + " " + this.bankId + "\n" : ""; - String branchId = BankUtil.isBranchIdRequired(countryCode) ? BankUtil.getBranchIdLabel(countryCode) + " " + this.branchId + "\n" : ""; - String accountNr = BankUtil.isAccountNrRequired(countryCode) ? BankUtil.getAccountNrLabel(countryCode) + " " + this.accountNr + "\n" : ""; - String accountType = BankUtil.isAccountTypeRequired(countryCode) ? BankUtil.getAccountTypeLabel(countryCode) + " " + this.accountType + "\n" : ""; - String holderIdString = BankUtil.isHolderIdRequired(countryCode) ? (BankUtil.getHolderIdLabel(countryCode) + " " + holderTaxId + "\n") : ""; - String requirementsString = requirements != null && !requirements.isEmpty() ? ("Extra requirements: " + requirements + "\n") : ""; - - return "Holder name: " + holderName + "\n" + - "Holder email: " + holderEmail + "\n" + - bankName + - bankId + - branchId + - accountNr + - accountType + - holderIdString + - requirementsString + - "Country of bank: " + CountryUtil.getNameAndCode(getCountryCode()); - } - - @Override - public Messages.PaymentAccountContractData toProtoBuf() { - Messages.CashDepositAccountContractData.Builder cashDepositAccountContractData = - Messages.CashDepositAccountContractData.newBuilder() - .setHolderName(holderName) - .setHolderEmail(holderEmail) - .setBankName(bankName) - .setBankId(bankId) - .setBranchId(branchId) - .setAccountNr(accountNr) - .setRequirements(requirements) - .setHolderTaxId(holderTaxId); - Messages.CountryBasedPaymentAccountContractData.Builder countryBasedPaymentAccountContractData = - Messages.CountryBasedPaymentAccountContractData.newBuilder() - .setCountryCode(countryCode) - .setCashDepositAccountContractData(cashDepositAccountContractData); - Messages.PaymentAccountContractData.Builder paymentAccountContractData = - Messages.PaymentAccountContractData.newBuilder() - .setId(id) - .setPaymentMethodName(paymentMethodName) - .setMaxTradePeriod(maxTradePeriod) - .setCountryBasedPaymentAccountContractData(countryBasedPaymentAccountContractData); - return paymentAccountContractData.build(); - } - - - protected String getHolderIdLabel() { - return BankUtil.getHolderIdLabel(countryCode); - } - - public void setHolderName(String holderName) { - this.holderName = holderName; - } - - public String getHolderName() { - return holderName; - } - - public void setHolderEmail(String holderEmail) { - this.holderEmail = holderEmail; - } - - public String getHolderEmail() { - return holderEmail; - } - - public void setBankName(String bankName) { - this.bankName = bankName; - } - - @Nullable - public String getBankName() { - return bankName; - } - - public void setBankId(String bankId) { - this.bankId = bankId; - } - - @Nullable - public String getBankId() { - return BankUtil.isBankIdRequired(countryCode) ? bankId : bankName; - } - - public void setBranchId(String branchId) { - this.branchId = branchId; - } - - @Nullable - public String getBranchId() { - return branchId; - } - - public void setAccountNr(String accountNr) { - this.accountNr = accountNr; - } - - @Nullable - public String getAccountNr() { - return accountNr; - } - - public void setHolderTaxId(String holderTaxId) { - this.holderTaxId = holderTaxId; - } - - @Nullable - public String getHolderTaxId() { - return holderTaxId; - } - - public void setAccountType(String accountType) { - this.accountType = accountType; - } - - @Nullable - public String getAccountType() { - return accountType; - } - - @Nullable - public String getRequirements() { - return requirements; - } - - public void setRequirements(String requirements) { - this.requirements = requirements; - } - -} diff --git a/network/src/main/java/io/bisq/messages/payment/payload/ChaseQuickPayAccountContractData.java b/network/src/main/java/io/bisq/messages/payment/payload/ChaseQuickPayAccountContractData.java deleted file mode 100644 index 1d1db60a58..0000000000 --- a/network/src/main/java/io/bisq/messages/payment/payload/ChaseQuickPayAccountContractData.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * This file is part of bisq. - * - * bisq is free software: you can redistribute it and/or modify it - * under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or (at - * your option) any later version. - * - * bisq is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public - * License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with bisq. If not, see . - */ - -package io.bisq.messages.payment.payload; - -import io.bisq.app.Version; -import io.bisq.common.wire.proto.Messages; - -public final class ChaseQuickPayAccountContractData extends PaymentAccountContractData { - // That object is sent over the wire, so we need to take care of version compatibility. - private static final long serialVersionUID = Version.P2P_NETWORK_VERSION; - - private String email; - private String holderName; - - public ChaseQuickPayAccountContractData(String paymentMethod, String id, long maxTradePeriod) { - super(paymentMethod, id, maxTradePeriod); - } - - public ChaseQuickPayAccountContractData(String paymentMethod, String id, long maxTradePeriod, String email, - String holderName) { - this(paymentMethod, id, maxTradePeriod); - setEmail(email); - setHolderName(holderName); - } - - public void setEmail(String email) { - this.email = email; - } - - public String getEmail() { - return email; - } - - public String getHolderName() { - return holderName; - } - - public void setHolderName(String holderName) { - this.holderName = holderName; - } - - @Override - public String getPaymentDetails() { - return "Chase QuickPay - Holder name: " + holderName + ", email: " + email; - } - - @Override - public String getPaymentDetailsForTradePopup() { - return "Holder name: " + holderName + "\n" + - "Email: " + email; - } - - @Override - public Messages.PaymentAccountContractData toProtoBuf() { - Messages.ChaseQuickPayAccountContractData.Builder chaseQuickPayAccountContractData = - Messages.ChaseQuickPayAccountContractData.newBuilder() - .setEmail(email) - .setHolderName(holderName); - Messages.PaymentAccountContractData.Builder paymentAccountContractData = - Messages.PaymentAccountContractData.newBuilder() - .setId(id) - .setPaymentMethodName(paymentMethodName) - .setMaxTradePeriod(maxTradePeriod) - .setChaseQuickPayAccountContractData(chaseQuickPayAccountContractData); - return paymentAccountContractData.build(); - } -} diff --git a/network/src/main/java/io/bisq/messages/payment/payload/ClearXchangeAccountContractData.java b/network/src/main/java/io/bisq/messages/payment/payload/ClearXchangeAccountContractData.java deleted file mode 100644 index 167c671ba3..0000000000 --- a/network/src/main/java/io/bisq/messages/payment/payload/ClearXchangeAccountContractData.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * This file is part of bisq. - * - * bisq is free software: you can redistribute it and/or modify it - * under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or (at - * your option) any later version. - * - * bisq is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public - * License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with bisq. If not, see . - */ - -package io.bisq.messages.payment.payload; - -import io.bisq.app.Version; -import io.bisq.common.wire.proto.Messages; - -public final class ClearXchangeAccountContractData extends PaymentAccountContractData { - // That object is sent over the wire, so we need to take care of version compatibility. - private static final long serialVersionUID = Version.P2P_NETWORK_VERSION; - - private String holderName; - private String emailOrMobileNr; - - public ClearXchangeAccountContractData(String paymentMethod, String id, long maxTradePeriod) { - super(paymentMethod, id, maxTradePeriod); - } - - public ClearXchangeAccountContractData(String paymentMethod, String id, long maxTradePeriod, String holderName, - String emailOrMobileNr) { - this(paymentMethod, id, maxTradePeriod); - setHolderName(holderName); - setEmailOrMobileNr(emailOrMobileNr); - } - - public String getHolderName() { - return holderName; - } - - public void setHolderName(String holderName) { - this.holderName = holderName; - } - - public void setEmailOrMobileNr(String emailOrMobileNr) { - this.emailOrMobileNr = emailOrMobileNr; - } - - public String getEmailOrMobileNr() { - return emailOrMobileNr; - } - - @Override - public String getPaymentDetails() { - return "ClearXchange - Holder name: " + holderName + ", email or mobile no.: " + emailOrMobileNr; - } - - @Override - public String getPaymentDetailsForTradePopup() { - return "Holder name: " + holderName + "\n" + - "Email or mobile no.: " + emailOrMobileNr; - } - - @Override - public Messages.PaymentAccountContractData toProtoBuf() { - Messages.ClearXchangeAccountContractData.Builder thisClass = - Messages.ClearXchangeAccountContractData.newBuilder() - .setHolderName(holderName) - .setEmailOrMobileNr(emailOrMobileNr); - Messages.PaymentAccountContractData.Builder paymentAccountContractData = - Messages.PaymentAccountContractData.newBuilder() - .setId(id) - .setPaymentMethodName(paymentMethodName) - .setMaxTradePeriod(maxTradePeriod) - .setClearXchangeAccountContractData(thisClass); - return paymentAccountContractData.build(); - } -} diff --git a/network/src/main/java/io/bisq/messages/payment/payload/CountryBasedPaymentAccountContractData.java b/network/src/main/java/io/bisq/messages/payment/payload/CountryBasedPaymentAccountContractData.java deleted file mode 100644 index ac9574a39a..0000000000 --- a/network/src/main/java/io/bisq/messages/payment/payload/CountryBasedPaymentAccountContractData.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * This file is part of bisq. - * - * bisq is free software: you can redistribute it and/or modify it - * under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or (at - * your option) any later version. - * - * bisq is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public - * License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with bisq. If not, see . - */ - -package io.bisq.messages.payment.payload; - -import io.bisq.app.Version; - -public abstract class CountryBasedPaymentAccountContractData extends PaymentAccountContractData { - // That object is sent over the wire, so we need to take care of version compatibility. - private static final long serialVersionUID = Version.P2P_NETWORK_VERSION; - - protected String countryCode = ""; - - - /////////////////////////////////////////////////////////////////////////////////////////// - // Constructor - /////////////////////////////////////////////////////////////////////////////////////////// - - CountryBasedPaymentAccountContractData(String paymentMethodName, String id, long maxTradePeriod) { - super(paymentMethodName, id, maxTradePeriod); - } - - /////////////////////////////////////////////////////////////////////////////////////////// - // Getter, Setter - /////////////////////////////////////////////////////////////////////////////////////////// - - public void setCountryCode(String countryCode) { - this.countryCode = countryCode; - } - - public String getCountryCode() { - return countryCode; - } - - - /////////////////////////////////////////////////////////////////////////////////////////// - // Getter - /////////////////////////////////////////////////////////////////////////////////////////// - - abstract public String getPaymentDetails(); - - abstract public String getPaymentDetailsForTradePopup(); - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (!(o instanceof CountryBasedPaymentAccountContractData)) return false; - if (!super.equals(o)) return false; - - CountryBasedPaymentAccountContractData that = (CountryBasedPaymentAccountContractData) o; - - return countryCode.equals(that.countryCode); - - } - - @Override - public int hashCode() { - int result = super.hashCode(); - result = 31 * result + countryCode.hashCode(); - return result; - } - - @Override - public String toString() { - return "CountryBasedPaymentAccountContractData{" + - "countryCode='" + countryCode + '\'' + - "} " + super.toString(); - } -} diff --git a/network/src/main/java/io/bisq/messages/payment/payload/CryptoCurrencyAccountContractData.java b/network/src/main/java/io/bisq/messages/payment/payload/CryptoCurrencyAccountContractData.java deleted file mode 100644 index f8862022a3..0000000000 --- a/network/src/main/java/io/bisq/messages/payment/payload/CryptoCurrencyAccountContractData.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * This file is part of bisq. - * - * bisq is free software: you can redistribute it and/or modify it - * under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or (at - * your option) any later version. - * - * bisq is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public - * License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with bisq. If not, see . - */ - -package io.bisq.messages.payment.payload; - -import io.bisq.app.Version; -import io.bisq.common.wire.proto.Messages; - -public final class CryptoCurrencyAccountContractData extends PaymentAccountContractData { - // That object is sent over the wire, so we need to take care of version compatibility. - private static final long serialVersionUID = Version.P2P_NETWORK_VERSION; - - private String address; - - public CryptoCurrencyAccountContractData(String paymentMethod, String id, long maxTradePeriod) { - super(paymentMethod, id, maxTradePeriod); - } - - public CryptoCurrencyAccountContractData(String paymentMethod, String id, long maxTradePeriod, String address) { - super(paymentMethod, id, maxTradePeriod); - this.address = address; - } - - public void setAddress(String address) { - this.address = address; - } - - public String getAddress() { - return address; - } - - @Override - public String getPaymentDetails() { - return "Receivers altcoin address: " + address; - } - - @Override - public String getPaymentDetailsForTradePopup() { - return getPaymentDetails(); - } - - @Override - public Messages.PaymentAccountContractData toProtoBuf() { - Messages.CryptoCurrencyAccountContractData.Builder cryptoCurrencyAccountContractData = - Messages.CryptoCurrencyAccountContractData.newBuilder().setAddress(address); - Messages.PaymentAccountContractData.Builder paymentAccountContractData = - Messages.PaymentAccountContractData.newBuilder() - .setId(id) - .setPaymentMethodName(paymentMethodName) - .setMaxTradePeriod(maxTradePeriod) - .setCryptoCurrencyAccountContractData(cryptoCurrencyAccountContractData); - return paymentAccountContractData.build(); - } -} diff --git a/network/src/main/java/io/bisq/messages/payment/payload/FasterPaymentsAccountContractData.java b/network/src/main/java/io/bisq/messages/payment/payload/FasterPaymentsAccountContractData.java deleted file mode 100644 index 9d4a5ca21c..0000000000 --- a/network/src/main/java/io/bisq/messages/payment/payload/FasterPaymentsAccountContractData.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * This file is part of bisq. - * - * bisq is free software: you can redistribute it and/or modify it - * under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or (at - * your option) any later version. - * - * bisq is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public - * License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with bisq. If not, see . - */ - -package io.bisq.messages.payment.payload; - -import io.bisq.app.Version; -import io.bisq.common.wire.proto.Messages; - -public final class FasterPaymentsAccountContractData extends PaymentAccountContractData { - // That object is sent over the wire, so we need to take care of version compatibility. - private static final long serialVersionUID = Version.P2P_NETWORK_VERSION; - - private String sortCode; - private String accountNr; - - public FasterPaymentsAccountContractData(String paymentMethod, String id, long maxTradePeriod) { - super(paymentMethod, id, maxTradePeriod); - } - - public FasterPaymentsAccountContractData(String paymentMethod, String id, long maxTradePeriod, - String sortCode, String accountNr) { - super(paymentMethod, id, maxTradePeriod); - this.sortCode = sortCode; - this.accountNr = accountNr; - } - - public void setAccountNr(String accountNr) { - this.accountNr = accountNr; - } - - public String getAccountNr() { - return accountNr; - } - - public String getSortCode() { - return sortCode; - } - - public void setSortCode(String sortCode) { - this.sortCode = sortCode; - } - - @Override - public String getPaymentDetails() { - return "FasterPayments - UK Sort code: " + sortCode + ", Account number: " + accountNr; - } - - @Override - public String getPaymentDetailsForTradePopup() { - return "UK Sort code: " + sortCode + "\n" + - "Account number: " + accountNr; - } - - @Override - public Messages.PaymentAccountContractData toProtoBuf() { - Messages.FasterPaymentsAccountContractData.Builder thisClass = - Messages.FasterPaymentsAccountContractData.newBuilder() - .setSortCode(sortCode) - .setAccountNr(accountNr); - Messages.PaymentAccountContractData.Builder paymentAccountContractData = - Messages.PaymentAccountContractData.newBuilder() - .setId(id) - .setPaymentMethodName(paymentMethodName) - .setMaxTradePeriod(maxTradePeriod) - .setFasterPaymentsAccountContractData(thisClass); - return paymentAccountContractData.build(); - } -} diff --git a/network/src/main/java/io/bisq/messages/payment/payload/InteracETransferAccountContractData.java b/network/src/main/java/io/bisq/messages/payment/payload/InteracETransferAccountContractData.java deleted file mode 100644 index 5683caa0e6..0000000000 --- a/network/src/main/java/io/bisq/messages/payment/payload/InteracETransferAccountContractData.java +++ /dev/null @@ -1,106 +0,0 @@ -/* - * This file is part of bisq. - * - * bisq is free software: you can redistribute it and/or modify it - * under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or (at - * your option) any later version. - * - * bisq is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public - * License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with bisq. If not, see . - */ - -package io.bisq.messages.payment.payload; - -import io.bisq.app.Version; -import io.bisq.common.wire.proto.Messages; - -public final class InteracETransferAccountContractData extends PaymentAccountContractData { - // That object is sent over the wire, so we need to take care of version compatibility. - private static final long serialVersionUID = Version.P2P_NETWORK_VERSION; - - private String email; - private String holderName; - private String question; - private String answer; - - public InteracETransferAccountContractData(String paymentMethod, String id, long maxTradePeriod) { - super(paymentMethod, id, maxTradePeriod); - } - - public InteracETransferAccountContractData(String paymentMethodName, String id, long maxTradePeriod, - String email, String holderName, String question, String answer) { - super(paymentMethodName, id, maxTradePeriod); - this.email = email; - this.holderName = holderName; - this.question = question; - this.answer = answer; - } - - public void setEmail(String email) { - this.email = email; - } - - public String getEmail() { - return email; - } - - public String getHolderName() { - return holderName; - } - - public void setHolderName(String holderName) { - this.holderName = holderName; - } - - public String getQuestion() { - return question; - } - - public void setQuestion(String question) { - this.question = question; - } - - public String getAnswer() { - return answer; - } - - public void setAnswer(String answer) { - this.answer = answer; - } - - @Override - public String getPaymentDetails() { - return "Interac e-Transfer - Holder name: " + holderName + ", email: " + email + ", secret question: " + question + ", answer: " + answer; - } - - @Override - public String getPaymentDetailsForTradePopup() { - return "Holder name: " + holderName + "\n" + - "Email: " + email + "\n" + - "Secret question: " + question + "\n" + - "Answer: " + answer; - } - - @Override - public Messages.PaymentAccountContractData toProtoBuf() { - Messages.InteracETransferAccountContractData.Builder interacETransferAccountContractData = - Messages.InteracETransferAccountContractData.newBuilder() - .setEmail(email) - .setHolderName(holderName) - .setQuestion(question) - .setAnswer(answer); - Messages.PaymentAccountContractData.Builder paymentAccountContractData = - Messages.PaymentAccountContractData.newBuilder() - .setId(id) - .setPaymentMethodName(paymentMethodName) - .setMaxTradePeriod(maxTradePeriod) - .setInteracETransferAccountContractData(interacETransferAccountContractData); - return paymentAccountContractData.build(); - } -} diff --git a/network/src/main/java/io/bisq/messages/payment/payload/NationalBankAccountContractData.java b/network/src/main/java/io/bisq/messages/payment/payload/NationalBankAccountContractData.java deleted file mode 100644 index 267401542e..0000000000 --- a/network/src/main/java/io/bisq/messages/payment/payload/NationalBankAccountContractData.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * This file is part of bisq. - * - * bisq is free software: you can redistribute it and/or modify it - * under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or (at - * your option) any later version. - * - * bisq is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public - * License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with bisq. If not, see . - */ - -package io.bisq.messages.payment.payload; - -import io.bisq.app.Version; -import io.bisq.common.wire.proto.Messages; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public final class NationalBankAccountContractData extends BankAccountContractData { - // That object is sent over the wire, so we need to take care of version compatibility. - private static final long serialVersionUID = Version.P2P_NETWORK_VERSION; - - private static final Logger log = LoggerFactory.getLogger(NationalBankAccountContractData.class); - - public NationalBankAccountContractData(String paymentMethod, String id, long maxTradePeriod) { - super(paymentMethod, id, maxTradePeriod); - } - - @Override - public String getPaymentDetails() { - return "National Bank transfer - " + getPaymentDetailsForTradePopup().replace("\n", ", "); - } - - @Override - public Messages.PaymentAccountContractData toProtoBuf() { - Messages.NationalBankAccountContractData.Builder thisClass = - Messages.NationalBankAccountContractData.newBuilder(); - Messages.BankAccountContractData.Builder bankAccountContractData = - Messages.BankAccountContractData.newBuilder() - .setHolderName(holderName) - .setBankName(bankName) - .setBankId(bankId) - .setBranchId(branchId) - .setAccountNr(accountNr) - .setAccountType(accountType) - .setHolderTaxId(holderTaxId) - .setNationalBankAccountContractData(thisClass); - Messages.CountryBasedPaymentAccountContractData.Builder countryBasedPaymentAccountContractData = - Messages.CountryBasedPaymentAccountContractData.newBuilder() - .setCountryCode(countryCode) - .setBankAccountContractData(bankAccountContractData); - Messages.PaymentAccountContractData.Builder paymentAccountContractData = - Messages.PaymentAccountContractData.newBuilder() - .setId(id) - .setPaymentMethodName(paymentMethodName) - .setMaxTradePeriod(maxTradePeriod) - .setCountryBasedPaymentAccountContractData(countryBasedPaymentAccountContractData); - return paymentAccountContractData.build(); - } -} diff --git a/network/src/main/java/io/bisq/messages/payment/payload/OKPayAccountContractData.java b/network/src/main/java/io/bisq/messages/payment/payload/OKPayAccountContractData.java deleted file mode 100644 index 9d743b32e8..0000000000 --- a/network/src/main/java/io/bisq/messages/payment/payload/OKPayAccountContractData.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * This file is part of bisq. - * - * bisq is free software: you can redistribute it and/or modify it - * under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or (at - * your option) any later version. - * - * bisq is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public - * License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with bisq. If not, see . - */ - -package io.bisq.messages.payment.payload; - -import io.bisq.app.Version; -import io.bisq.common.wire.proto.Messages; - -public final class OKPayAccountContractData extends PaymentAccountContractData { - // That object is sent over the wire, so we need to take care of version compatibility. - private static final long serialVersionUID = Version.P2P_NETWORK_VERSION; - - private String accountNr; - - public OKPayAccountContractData(String paymentMethod, String id, long maxTradePeriod) { - super(paymentMethod, id, maxTradePeriod); - } - - public OKPayAccountContractData(String paymentMethodName, String id, long maxTradePeriod, String accountNr) { - super(paymentMethodName, id, maxTradePeriod); - this.accountNr = accountNr; - } - - public void setAccountNr(String accountNr) { - this.accountNr = accountNr; - } - - public String getAccountNr() { - return accountNr; - } - - @Override - public String getPaymentDetails() { - return "OKPay - Account no.: " + accountNr; - } - - @Override - public String getPaymentDetailsForTradePopup() { - return getPaymentDetails(); - } - - @Override - public Messages.PaymentAccountContractData toProtoBuf() { - Messages.OKPayAccountContractData.Builder thisClass = - Messages.OKPayAccountContractData.newBuilder().setAccountNr(accountNr); - Messages.PaymentAccountContractData.Builder paymentAccountContractData = - Messages.PaymentAccountContractData.newBuilder() - .setId(id) - .setPaymentMethodName(paymentMethodName) - .setMaxTradePeriod(maxTradePeriod) - .setOKPayAccountContractData(thisClass); - return paymentAccountContractData.build(); - } -} diff --git a/network/src/main/java/io/bisq/messages/payment/payload/PaymentAccountContractData.java b/network/src/main/java/io/bisq/messages/payment/payload/PaymentAccountContractData.java deleted file mode 100644 index 962f414a1b..0000000000 --- a/network/src/main/java/io/bisq/messages/payment/payload/PaymentAccountContractData.java +++ /dev/null @@ -1,92 +0,0 @@ -/* - * This file is part of bisq. - * - * bisq is free software: you can redistribute it and/or modify it - * under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or (at - * your option) any later version. - * - * bisq is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public - * License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with bisq. If not, see . - */ - -package io.bisq.messages.payment.payload; - -import io.bisq.app.Version; -import io.bisq.common.wire.Payload; - -public abstract class PaymentAccountContractData implements Payload { - // That object is sent over the wire, so we need to take care of version compatibility. - private static final long serialVersionUID = Version.P2P_NETWORK_VERSION; - - protected final String paymentMethodName; - protected final String id; - protected final long maxTradePeriod; - - - /////////////////////////////////////////////////////////////////////////////////////////// - // Constructor - /////////////////////////////////////////////////////////////////////////////////////////// - - PaymentAccountContractData(String paymentMethodName, String id, long maxTradePeriod) { - this.paymentMethodName = paymentMethodName; - this.id = id; - this.maxTradePeriod = maxTradePeriod; - } - - /////////////////////////////////////////////////////////////////////////////////////////// - // Getter - /////////////////////////////////////////////////////////////////////////////////////////// - - public String getId() { - return id; - } - - public String getPaymentMethodName() { - return paymentMethodName; - } - - abstract public String getPaymentDetails(); - - abstract public String getPaymentDetailsForTradePopup(); - - public long getMaxTradePeriod() { - return maxTradePeriod; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (!(o instanceof PaymentAccountContractData)) return false; - - PaymentAccountContractData that = (PaymentAccountContractData) o; - - if (maxTradePeriod != that.maxTradePeriod) return false; - if (paymentMethodName != null ? !paymentMethodName.equals(that.paymentMethodName) : that.paymentMethodName != null) - return false; - return !(id != null ? !id.equals(that.id) : that.id != null); - - } - - @Override - public int hashCode() { - int result = paymentMethodName != null ? paymentMethodName.hashCode() : 0; - result = 31 * result + (id != null ? id.hashCode() : 0); - result = 31 * result + (int) (maxTradePeriod ^ (maxTradePeriod >>> 32)); - return result; - } - - @Override - public String toString() { - return "PaymentAccountContractData{" + - "paymentMethodName='" + paymentMethodName + '\'' + - ", id='" + id + '\'' + - ", maxTradePeriod=" + maxTradePeriod + - '}'; - } -} diff --git a/network/src/main/java/io/bisq/messages/payment/payload/PerfectMoneyAccountContractData.java b/network/src/main/java/io/bisq/messages/payment/payload/PerfectMoneyAccountContractData.java deleted file mode 100644 index b2805900c9..0000000000 --- a/network/src/main/java/io/bisq/messages/payment/payload/PerfectMoneyAccountContractData.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * This file is part of bisq. - * - * bisq is free software: you can redistribute it and/or modify it - * under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or (at - * your option) any later version. - * - * bisq is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public - * License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with bisq. If not, see . - */ - -package io.bisq.messages.payment.payload; - -import io.bisq.app.Version; -import io.bisq.common.wire.proto.Messages; - -public final class PerfectMoneyAccountContractData extends PaymentAccountContractData { - // That object is sent over the wire, so we need to take care of version compatibility. - private static final long serialVersionUID = Version.P2P_NETWORK_VERSION; - - private String accountNr; - - public PerfectMoneyAccountContractData(String paymentMethod, String id, long maxTradePeriod) { - super(paymentMethod, id, maxTradePeriod); - } - - public PerfectMoneyAccountContractData(String paymentMethodName, String id, long maxTradePeriod, String accountNr) { - super(paymentMethodName, id, maxTradePeriod); - this.accountNr = accountNr; - } - - public void setAccountNr(String accountNr) { - this.accountNr = accountNr; - } - - public String getAccountNr() { - return accountNr; - } - - @Override - public String getPaymentDetails() { - return "PerfectMoney - Account no.: " + accountNr; - } - - @Override - public String getPaymentDetailsForTradePopup() { - return getPaymentDetails(); - } - - @Override - public Messages.PaymentAccountContractData toProtoBuf() { - Messages.PerfectMoneyAccountContractData.Builder thisClass = - Messages.PerfectMoneyAccountContractData.newBuilder().setAccountNr(accountNr); - Messages.PaymentAccountContractData.Builder paymentAccountContractData = - Messages.PaymentAccountContractData.newBuilder() - .setId(id) - .setPaymentMethodName(paymentMethodName) - .setMaxTradePeriod(maxTradePeriod) - .setPerfectMoneyAccountContractData(thisClass); - return paymentAccountContractData.build(); - } -} diff --git a/network/src/main/java/io/bisq/messages/payment/payload/SameBankAccountContractData.java b/network/src/main/java/io/bisq/messages/payment/payload/SameBankAccountContractData.java deleted file mode 100644 index 5b868da730..0000000000 --- a/network/src/main/java/io/bisq/messages/payment/payload/SameBankAccountContractData.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * This file is part of bisq. - * - * bisq is free software: you can redistribute it and/or modify it - * under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or (at - * your option) any later version. - * - * bisq is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public - * License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with bisq. If not, see . - */ - -package io.bisq.messages.payment.payload; - -import io.bisq.app.Version; -import io.bisq.common.wire.proto.Messages; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public final class SameBankAccountContractData extends BankAccountContractData { - // That object is sent over the wire, so we need to take care of version compatibility. - private static final long serialVersionUID = Version.P2P_NETWORK_VERSION; - - private static final Logger log = LoggerFactory.getLogger(SameBankAccountContractData.class); - - - public SameBankAccountContractData(String paymentMethod, String id, long maxTradePeriod) { - super(paymentMethod, id, maxTradePeriod); - } - - @Override - public String getPaymentDetails() { - return "Transfer with same Bank - " + getPaymentDetailsForTradePopup().replace("\n", ", "); - } - - @Override - public Messages.PaymentAccountContractData toProtoBuf() { - Messages.SameBankAccountContractData sameBankAccountContractData = - Messages.SameBankAccountContractData.getDefaultInstance(); - Messages.BankAccountContractData.Builder bankAccountContractData = - Messages.BankAccountContractData.newBuilder() - .setHolderName(holderName) - .setBankName(bankName) - .setBankId(bankId) - .setBranchId(branchId) - .setAccountNr(accountNr) - .setAccountType(accountType) - .setHolderTaxId(holderTaxId) - .setSameBankAccontContractData(sameBankAccountContractData); - Messages.CountryBasedPaymentAccountContractData.Builder countryBasedPaymentAccountContractData = - Messages.CountryBasedPaymentAccountContractData.newBuilder() - .setCountryCode(countryCode) - .setBankAccountContractData(bankAccountContractData); - Messages.PaymentAccountContractData.Builder paymentAccountContractData = - Messages.PaymentAccountContractData.newBuilder() - .setId(id) - .setPaymentMethodName(paymentMethodName) - .setMaxTradePeriod(maxTradePeriod) - .setCountryBasedPaymentAccountContractData(countryBasedPaymentAccountContractData); - - return paymentAccountContractData.build(); - } -} diff --git a/network/src/main/java/io/bisq/messages/payment/payload/SepaAccountContractData.java b/network/src/main/java/io/bisq/messages/payment/payload/SepaAccountContractData.java deleted file mode 100644 index a7198676fa..0000000000 --- a/network/src/main/java/io/bisq/messages/payment/payload/SepaAccountContractData.java +++ /dev/null @@ -1,123 +0,0 @@ -/* - * This file is part of bisq. - * - * bisq is free software: you can redistribute it and/or modify it - * under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or (at - * your option) any later version. - * - * bisq is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public - * License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with bisq. If not, see . - */ - -package io.bisq.messages.payment.payload; - -import io.bisq.app.Version; -import io.bisq.common.wire.proto.Messages; -import io.bisq.messages.locale.CountryUtil; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.ArrayList; -import java.util.List; -import java.util.Set; -import java.util.stream.Collectors; - -// TODO refactor with BankAccountContractData -public final class SepaAccountContractData extends CountryBasedPaymentAccountContractData { - // That object is sent over the wire, so we need to take care of version compatibility. - private static final long serialVersionUID = Version.P2P_NETWORK_VERSION; - - private static final Logger log = LoggerFactory.getLogger(SepaAccountContractData.class); - - private String holderName; - private String iban; - private String bic; - // Dont use a set here as we need a deterministic ordering, otherwise the contract hash does not match - private final ArrayList acceptedCountryCodes; - - public SepaAccountContractData(String paymentMethod, String id, long maxTradePeriod) { - super(paymentMethod, id, maxTradePeriod); - Set acceptedCountryCodesAsSet = CountryUtil.getAllSepaCountries().stream().map(e -> e.code).collect(Collectors.toSet()); - acceptedCountryCodes = new ArrayList<>(acceptedCountryCodesAsSet); - acceptedCountryCodes.sort(String::compareTo); - } - - public void setHolderName(String holderName) { - this.holderName = holderName; - } - - public String getHolderName() { - return holderName; - } - - public void setIban(String iban) { - this.iban = iban; - } - - public String getIban() { - return iban; - } - - public void setBic(String bic) { - this.bic = bic; - } - - public String getBic() { - return bic; - } - - public void addAcceptedCountry(String countryCode) { - if (!acceptedCountryCodes.contains(countryCode)) - acceptedCountryCodes.add(countryCode); - } - - public void removeAcceptedCountry(String countryCode) { - if (acceptedCountryCodes.contains(countryCode)) - acceptedCountryCodes.remove(countryCode); - } - - public List getAcceptedCountryCodes() { - return acceptedCountryCodes; - } - - @Override - public String getPaymentDetails() { - return "SEPA - Holder name: " + holderName + ", IBAN: " + iban + ", BIC: " + bic + ", country code: " + getCountryCode(); - } - - @Override - public String getPaymentDetailsForTradePopup() { - return "Holder name: " + holderName + "\n" + - "IBAN: " + iban + "\n" + - "BIC: " + bic + "\n" + - "Country of bank: " + CountryUtil.getNameAndCode(getCountryCode()); - } - - @Override - public Messages.PaymentAccountContractData toProtoBuf() { - Messages.SepaAccountContractData.Builder sepaAccountContractData = - Messages.SepaAccountContractData.newBuilder() - .setHolderName(holderName) - .setIban(iban) - .setBic(bic) - .addAllAcceptedCountryCodes(acceptedCountryCodes); - Messages.CountryBasedPaymentAccountContractData.Builder countryBasedPaymentAccountContractData = - Messages.CountryBasedPaymentAccountContractData.newBuilder() - .setCountryCode(countryCode) - .setSepaAccountContractData(sepaAccountContractData); - Messages.PaymentAccountContractData.Builder paymentAccountContractData = - Messages.PaymentAccountContractData.newBuilder() - .setId(id) - .setPaymentMethodName(paymentMethodName) - .setMaxTradePeriod(maxTradePeriod) - .setCountryBasedPaymentAccountContractData(countryBasedPaymentAccountContractData); - - return paymentAccountContractData.build(); - } -} diff --git a/network/src/main/java/io/bisq/messages/payment/payload/SpecificBanksAccountContractData.java b/network/src/main/java/io/bisq/messages/payment/payload/SpecificBanksAccountContractData.java deleted file mode 100644 index f6260fd69f..0000000000 --- a/network/src/main/java/io/bisq/messages/payment/payload/SpecificBanksAccountContractData.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * This file is part of bisq. - * - * bisq is free software: you can redistribute it and/or modify it - * under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or (at - * your option) any later version. - * - * bisq is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public - * License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with bisq. If not, see . - */ - -package io.bisq.messages.payment.payload; - -import com.google.common.base.Joiner; -import io.bisq.app.Version; -import io.bisq.common.wire.proto.Messages; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.ArrayList; - -public final class SpecificBanksAccountContractData extends BankAccountContractData { - // That object is sent over the wire, so we need to take care of version compatibility. - private static final long serialVersionUID = Version.P2P_NETWORK_VERSION; - - private static final Logger log = LoggerFactory.getLogger(SpecificBanksAccountContractData.class); - - - // Dont use a set here as we need a deterministic ordering, otherwise the contract hash does not match - private ArrayList acceptedBanks; - - public SpecificBanksAccountContractData(String paymentMethod, String id, long maxTradePeriod) { - super(paymentMethod, id, maxTradePeriod); - acceptedBanks = new ArrayList<>(); - } - - public void clearAcceptedBanks() { - acceptedBanks = new ArrayList<>(); - } - - public void addAcceptedBank(String bankName) { - if (!acceptedBanks.contains(bankName)) - acceptedBanks.add(bankName); - } - - public ArrayList getAcceptedBanks() { - return acceptedBanks; - } - - - @Override - public String getPaymentDetails() { - return "Transfers with specific banks - " + getPaymentDetailsForTradePopup().replace("\n", ", "); - } - - @Override - public String getPaymentDetailsForTradePopup() { - return super.getPaymentDetailsForTradePopup() + "\n" + - "Accepted banks: " + Joiner.on(", ").join(acceptedBanks); - } - - @Override - public Messages.PaymentAccountContractData toProtoBuf() { - Messages.SpecificBanksAccountContractData.Builder specificBanksAccountContractData = - Messages.SpecificBanksAccountContractData.newBuilder().addAllAcceptedBanks(acceptedBanks); - Messages.BankAccountContractData.Builder bankAccountContractData = - Messages.BankAccountContractData.newBuilder() - .setHolderName(holderName) - .setBankName(bankName) - .setBankId(bankId) - .setBranchId(branchId) - .setAccountNr(accountNr) - .setAccountType(accountType) - .setHolderTaxId(holderTaxId) - .setSpecificBanksAccountContractData(specificBanksAccountContractData); - Messages.CountryBasedPaymentAccountContractData.Builder countryBasedPaymentAccountContractData = - Messages.CountryBasedPaymentAccountContractData.newBuilder() - .setCountryCode(countryCode) - .setBankAccountContractData(bankAccountContractData); - Messages.PaymentAccountContractData.Builder paymentAccountContractData = - Messages.PaymentAccountContractData.newBuilder() - .setId(id) - .setPaymentMethodName(paymentMethodName) - .setMaxTradePeriod(maxTradePeriod) - .setCountryBasedPaymentAccountContractData(countryBasedPaymentAccountContractData); - - return paymentAccountContractData.build(); - } -} diff --git a/network/src/main/java/io/bisq/messages/payment/payload/SwishAccountContractData.java b/network/src/main/java/io/bisq/messages/payment/payload/SwishAccountContractData.java deleted file mode 100644 index cc377ca574..0000000000 --- a/network/src/main/java/io/bisq/messages/payment/payload/SwishAccountContractData.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * This file is part of bisq. - * - * bisq is free software: you can redistribute it and/or modify it - * under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or (at - * your option) any later version. - * - * bisq is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public - * License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with bisq. If not, see . - */ - -package io.bisq.messages.payment.payload; - -import io.bisq.app.Version; -import io.bisq.common.wire.proto.Messages; - -public final class SwishAccountContractData extends PaymentAccountContractData { - // That object is sent over the wire, so we need to take care of version compatibility. - private static final long serialVersionUID = Version.P2P_NETWORK_VERSION; - - private String mobileNr; - private String holderName; - - public SwishAccountContractData(String paymentMethod, String id, long maxTradePeriod) { - super(paymentMethod, id, maxTradePeriod); - } - - public SwishAccountContractData(String paymentMethodName, String id, long maxTradePeriod, - String mobileNr, String holderName) { - super(paymentMethodName, id, maxTradePeriod); - this.mobileNr = mobileNr; - this.holderName = holderName; - } - - public void setMobileNr(String mobileNr) { - this.mobileNr = mobileNr; - } - - public String getMobileNr() { - return mobileNr; - } - - public String getHolderName() { - return holderName; - } - - public void setHolderName(String holderName) { - this.holderName = holderName; - } - - @Override - public String getPaymentDetails() { - return "Swish - Holder name: " + holderName + ", mobile no.: " + mobileNr; - } - - @Override - public String getPaymentDetailsForTradePopup() { - return "Holder name: " + holderName + "\n" + - "Mobile no.: " + mobileNr; - } - - @Override - public Messages.PaymentAccountContractData toProtoBuf() { - Messages.SwishAccountContractData.Builder thisClass = - Messages.SwishAccountContractData.newBuilder() - .setMobileNr(mobileNr) - .setHolderName(holderName); - Messages.PaymentAccountContractData.Builder paymentAccountContractData = - Messages.PaymentAccountContractData.newBuilder() - .setId(id) - .setPaymentMethodName(paymentMethodName) - .setMaxTradePeriod(maxTradePeriod) - .setSwishAccountContractData(thisClass); - return paymentAccountContractData.build(); - } -} diff --git a/network/src/main/java/io/bisq/messages/payment/payload/USPostalMoneyOrderAccountContractData.java b/network/src/main/java/io/bisq/messages/payment/payload/USPostalMoneyOrderAccountContractData.java deleted file mode 100644 index 2e2d0c30b2..0000000000 --- a/network/src/main/java/io/bisq/messages/payment/payload/USPostalMoneyOrderAccountContractData.java +++ /dev/null @@ -1,84 +0,0 @@ -/* - * This file is part of bisq. - * - * bisq is free software: you can redistribute it and/or modify it - * under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or (at - * your option) any later version. - * - * bisq is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public - * License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with bisq. If not, see . - */ - -package io.bisq.messages.payment.payload; - -import io.bisq.app.Version; -import io.bisq.common.wire.proto.Messages; - -public final class USPostalMoneyOrderAccountContractData extends PaymentAccountContractData { - // That object is sent over the wire, so we need to take care of version compatibility. - private static final long serialVersionUID = Version.P2P_NETWORK_VERSION; - - private String postalAddress; - private String holderName; - - - public USPostalMoneyOrderAccountContractData(String paymentMethod, String id, long maxTradePeriod) { - super(paymentMethod, id, maxTradePeriod); - } - - public USPostalMoneyOrderAccountContractData(String paymentMethodName, String id, long maxTradePeriod, - String postalAddress, String holderName) { - super(paymentMethodName, id, maxTradePeriod); - this.postalAddress = postalAddress; - this.holderName = holderName; - } - - public void setPostalAddress(String postalAddress) { - this.postalAddress = postalAddress; - } - - public String getPostalAddress() { - return postalAddress; - } - - public String getHolderName() { - return holderName; - } - - public void setHolderName(String holderName) { - this.holderName = holderName; - } - - @Override - public String getPaymentDetails() { - return "US Postal Money Order - Holder name: " + holderName + ", postal address: " + postalAddress; - } - - - @Override - public String getPaymentDetailsForTradePopup() { - return "Holder name: " + holderName + "\n" + - "Postal address: " + postalAddress; - } - - @Override - public Messages.PaymentAccountContractData toProtoBuf() { - Messages.USPostalMoneyOrderAccountContractData.Builder thisClass = - Messages.USPostalMoneyOrderAccountContractData.newBuilder() - .setPostalAddress(postalAddress) - .setHolderName(holderName); - Messages.PaymentAccountContractData.Builder paymentAccountContractData = - Messages.PaymentAccountContractData.newBuilder() - .setId(id) - .setPaymentMethodName(paymentMethodName) - .setMaxTradePeriod(maxTradePeriod) - .setUSPostalMoneyOrderAccountContractData(thisClass); - return paymentAccountContractData.build(); - } -} diff --git a/network/src/main/java/io/bisq/messages/protocol/availability/OfferAvailabilityModel.java b/network/src/main/java/io/bisq/messages/protocol/availability/OfferAvailabilityModel.java deleted file mode 100644 index 187b0f8976..0000000000 --- a/network/src/main/java/io/bisq/messages/protocol/availability/OfferAvailabilityModel.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * This file is part of bisq. - * - * bisq is free software: you can redistribute it and/or modify it - * under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or (at - * your option) any later version. - * - * bisq is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public - * License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with bisq. If not, see . - */ - -package io.bisq.messages.protocol.availability; - -import io.bisq.common.crypto.PubKeyRing; -import io.bisq.common.taskrunner.Model; -import io.bisq.messages.availability.OfferAvailabilityResponse; -import io.bisq.messages.trade.offer.payload.Offer; -import io.bisq.p2p.NodeAddress; -import io.bisq.p2p.P2PService; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class OfferAvailabilityModel implements Model { - private static final Logger log = LoggerFactory.getLogger(OfferAvailabilityModel.class); - - public final Offer offer; - public final PubKeyRing pubKeyRing; - public final P2PService p2PService; - - private NodeAddress peerNodeAddress; - private OfferAvailabilityResponse message; - - public OfferAvailabilityModel(Offer offer, - PubKeyRing pubKeyRing, - P2PService p2PService) { - this.offer = offer; - this.pubKeyRing = pubKeyRing; - this.p2PService = p2PService; - } - - public NodeAddress getPeerNodeAddress() { - return peerNodeAddress; - } - - public void setPeerNodeAddress(NodeAddress peerNodeAddress) { - this.peerNodeAddress = peerNodeAddress; - } - - public void setMessage(OfferAvailabilityResponse message) { - this.message = message; - } - - public OfferAvailabilityResponse getMessage() { - return message; - } - - public long getTakersTradePrice() { - return offer.getPrice() != null ? offer.getPrice().value : 0; - } - - @Override - public void persist() { - } - - @Override - public void onComplete() { - } -} diff --git a/network/src/main/java/io/bisq/messages/protocol/availability/OfferAvailabilityProtocol.java b/network/src/main/java/io/bisq/messages/protocol/availability/OfferAvailabilityProtocol.java deleted file mode 100644 index 4d946bcef9..0000000000 --- a/network/src/main/java/io/bisq/messages/protocol/availability/OfferAvailabilityProtocol.java +++ /dev/null @@ -1,152 +0,0 @@ -/* - * This file is part of bisq. - * - * bisq is free software: you can redistribute it and/or modify it - * under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or (at - * your option) any later version. - * - * bisq is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public - * License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with bisq. If not, see . - */ - -package io.bisq.messages.protocol.availability; - -import io.bisq.common.Timer; -import io.bisq.common.UserThread; -import io.bisq.common.handlers.ErrorMessageHandler; -import io.bisq.common.handlers.ResultHandler; -import io.bisq.common.taskrunner.TaskRunner; -import io.bisq.messages.Message; -import io.bisq.messages.availability.OfferAvailabilityResponse; -import io.bisq.messages.availability.OfferMessage; -import io.bisq.messages.protocol.availability.tasks.ProcessOfferAvailabilityResponse; -import io.bisq.messages.protocol.availability.tasks.SendOfferAvailabilityRequest; -import io.bisq.messages.trade.offer.payload.Offer; -import io.bisq.messages.util.Validator; -import io.bisq.p2p.messaging.DecryptedDirectMessageListener; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class OfferAvailabilityProtocol { - private static final Logger log = LoggerFactory.getLogger(OfferAvailabilityProtocol.class); - - private static final long TIMEOUT_SEC = 60; - - private final OfferAvailabilityModel model; - private final ResultHandler resultHandler; - private final ErrorMessageHandler errorMessageHandler; - private final DecryptedDirectMessageListener decryptedDirectMessageListener; - - private TaskRunner taskRunner; - private Timer timeoutTimer; - - - /////////////////////////////////////////////////////////////////////////////////////////// - // Constructor - /////////////////////////////////////////////////////////////////////////////////////////// - - public OfferAvailabilityProtocol(OfferAvailabilityModel model, ResultHandler resultHandler, ErrorMessageHandler errorMessageHandler) { - this.model = model; - this.resultHandler = resultHandler; - this.errorMessageHandler = errorMessageHandler; - - decryptedDirectMessageListener = (decryptedMessageWithPubKey, peersNodeAddress) -> { - Message message = decryptedMessageWithPubKey.message; - if (message instanceof OfferMessage) { - OfferMessage offerMessage = (OfferMessage) message; - Validator.nonEmptyStringOf(offerMessage.offerId); - if (message instanceof OfferAvailabilityResponse - && model.offer.getId().equals(offerMessage.offerId)) { - log.trace("handle OfferAvailabilityResponse = " + message.getClass().getSimpleName() + " from " + peersNodeAddress); - handle((OfferAvailabilityResponse) message); - } - } - }; - } - - private void cleanup() { - stopTimeout(); - model.p2PService.removeDecryptedDirectMessageListener(decryptedDirectMessageListener); - } - - - /////////////////////////////////////////////////////////////////////////////////////////// - // Called from UI - /////////////////////////////////////////////////////////////////////////////////////////// - - public void sendOfferAvailabilityRequest() { - // reset - model.offer.setState(Offer.State.UNDEFINED); - - model.p2PService.addDecryptedDirectMessageListener(decryptedDirectMessageListener); - model.setPeerNodeAddress(model.offer.getOffererNodeAddress()); - - taskRunner = new TaskRunner<>(model, - () -> log.debug("sequence at sendOfferAvailabilityRequest completed"), - (errorMessage) -> { - log.error(errorMessage); - stopTimeout(); - errorMessageHandler.handleErrorMessage(errorMessage); - } - ); - taskRunner.addTasks(SendOfferAvailabilityRequest.class); - startTimeout(); - taskRunner.run(); - } - - public void cancel() { - taskRunner.cancel(); - cleanup(); - } - - - /////////////////////////////////////////////////////////////////////////////////////////// - // Incoming message handling - /////////////////////////////////////////////////////////////////////////////////////////// - - private void handle(OfferAvailabilityResponse message) { - stopTimeout(); - startTimeout(); - model.setMessage(message); - - taskRunner = new TaskRunner<>(model, - () -> { - log.debug("sequence at handle OfferAvailabilityResponse completed"); - stopTimeout(); - resultHandler.handleResult(); - }, - (errorMessage) -> { - log.error(errorMessage); - stopTimeout(); - errorMessageHandler.handleErrorMessage(errorMessage); - } - ); - taskRunner.addTasks(ProcessOfferAvailabilityResponse.class); - taskRunner.run(); - } - - private void startTimeout() { - if (timeoutTimer == null) { - timeoutTimer = UserThread.runAfter(() -> { - log.debug("Timeout reached at " + this); - model.offer.setState(Offer.State.OFFERER_OFFLINE); - errorMessageHandler.handleErrorMessage("Timeout reached: Peer has not responded."); - }, TIMEOUT_SEC); - } else { - log.warn("timeoutTimer already created. That must not happen."); - } - } - - private void stopTimeout() { - if (timeoutTimer != null) { - timeoutTimer.stop(); - timeoutTimer = null; - } - } -} diff --git a/network/src/main/java/io/bisq/messages/protocol/availability/tasks/ProcessOfferAvailabilityResponse.java b/network/src/main/java/io/bisq/messages/protocol/availability/tasks/ProcessOfferAvailabilityResponse.java deleted file mode 100644 index c904a3f287..0000000000 --- a/network/src/main/java/io/bisq/messages/protocol/availability/tasks/ProcessOfferAvailabilityResponse.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * This file is part of bisq. - * - * bisq is free software: you can redistribute it and/or modify it - * under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or (at - * your option) any later version. - * - * bisq is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public - * License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with bisq. If not, see . - */ - -package io.bisq.messages.protocol.availability.tasks; - -import io.bisq.common.taskrunner.Task; -import io.bisq.common.taskrunner.TaskRunner; -import io.bisq.messages.availability.AvailabilityResult; -import io.bisq.messages.availability.OfferAvailabilityResponse; -import io.bisq.messages.protocol.availability.OfferAvailabilityModel; -import io.bisq.messages.trade.offer.payload.Offer; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class ProcessOfferAvailabilityResponse extends Task { - private static final Logger log = LoggerFactory.getLogger(ProcessOfferAvailabilityResponse.class); - - public ProcessOfferAvailabilityResponse(TaskRunner taskHandler, OfferAvailabilityModel model) { - super(taskHandler, model); - } - - @Override - protected void run() { - try { - runInterceptHook(); - OfferAvailabilityResponse offerAvailabilityResponse = model.getMessage(); - - if (model.offer.getState() != Offer.State.REMOVED) { - // TODO: isAvailable is kept for backward compatibility. Can be removed once everyone is on v0.4.9 - if (offerAvailabilityResponse.isAvailable || offerAvailabilityResponse.availabilityResult == AvailabilityResult.AVAILABLE) { - model.offer.setState(Offer.State.AVAILABLE); - } else { - model.offer.setState(Offer.State.NOT_AVAILABLE); - failed("Take offer attempt rejected because of: " + offerAvailabilityResponse.availabilityResult); - } - } - - complete(); - } catch (Throwable t) { - model.offer.setErrorMessage("An error occurred.\n" + - "Error message:\n" - + t.getMessage()); - - failed(t); - } - } -} diff --git a/network/src/main/java/io/bisq/messages/protocol/availability/tasks/SendOfferAvailabilityRequest.java b/network/src/main/java/io/bisq/messages/protocol/availability/tasks/SendOfferAvailabilityRequest.java deleted file mode 100644 index 5f42de56df..0000000000 --- a/network/src/main/java/io/bisq/messages/protocol/availability/tasks/SendOfferAvailabilityRequest.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * This file is part of bisq. - * - * bisq is free software: you can redistribute it and/or modify it - * under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or (at - * your option) any later version. - * - * bisq is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public - * License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with bisq. If not, see . - */ - -package io.bisq.messages.protocol.availability.tasks; - -import io.bisq.common.taskrunner.Task; -import io.bisq.common.taskrunner.TaskRunner; -import io.bisq.messages.availability.OfferAvailabilityRequest; -import io.bisq.messages.protocol.availability.OfferAvailabilityModel; -import io.bisq.messages.trade.offer.payload.Offer; -import io.bisq.p2p.messaging.SendDirectMessageListener; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class SendOfferAvailabilityRequest extends Task { - private static final Logger log = LoggerFactory.getLogger(SendOfferAvailabilityRequest.class); - - public SendOfferAvailabilityRequest(TaskRunner taskHandler, OfferAvailabilityModel model) { - super(taskHandler, model); - } - - @Override - protected void run() { - try { - runInterceptHook(); - - model.p2PService.sendEncryptedDirectMessage(model.getPeerNodeAddress(), - model.offer.getPubKeyRing(), - new OfferAvailabilityRequest(model.offer.getId(), model.pubKeyRing, model.getTakersTradePrice()), - new SendDirectMessageListener() { - @Override - public void onArrived() { - complete(); - } - - @Override - public void onFault() { - model.offer.setState(Offer.State.OFFERER_OFFLINE); - } - } - ); - } catch (Throwable t) { - model.offer.setErrorMessage("An error occurred.\n" + - "Error message:\n" - + t.getMessage()); - - failed(t); - } - } -} - diff --git a/network/src/main/java/io/bisq/messages/protocol/trade/TradeMessage.java b/network/src/main/java/io/bisq/messages/protocol/trade/TradeMessage.java deleted file mode 100644 index a42c8d3470..0000000000 --- a/network/src/main/java/io/bisq/messages/protocol/trade/TradeMessage.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * This file is part of bisq. - * - * bisq is free software: you can redistribute it and/or modify it - * under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or (at - * your option) any later version. - * - * bisq is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public - * License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with bisq. If not, see . - */ - -package io.bisq.messages.protocol.trade; - -import io.bisq.app.Version; -import io.bisq.p2p.messaging.DirectMessage; - -import javax.annotation.concurrent.Immutable; - -@Immutable -public abstract class TradeMessage implements DirectMessage { - //TODO add serialVersionUID also in superclasses as changes would break compatibility - // That object is sent over the wire, so we need to take care of version compatibility. - private static final long serialVersionUID = Version.P2P_NETWORK_VERSION; - - private final int messageVersion = Version.getP2PMessageVersion(); - public final String tradeId; - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (!(o instanceof TradeMessage)) return false; - - TradeMessage that = (TradeMessage) o; - - return !(tradeId != null ? !tradeId.equals(that.tradeId) : that.tradeId != null); - } - - @Override - public int hashCode() { - return tradeId != null ? tradeId.hashCode() : 0; - } - - protected TradeMessage(String tradeId) { - this.tradeId = tradeId; - } - - @Override - public int getMessageVersion() { - return messageVersion; - } -} diff --git a/network/src/main/java/io/bisq/messages/provider/price/MarketPrice.java b/network/src/main/java/io/bisq/messages/provider/price/MarketPrice.java deleted file mode 100644 index ea43387048..0000000000 --- a/network/src/main/java/io/bisq/messages/provider/price/MarketPrice.java +++ /dev/null @@ -1,69 +0,0 @@ -package io.bisq.messages.provider.price; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class MarketPrice { - private static final Logger log = LoggerFactory.getLogger(MarketPrice.class); - public final String currencyCode; - public final double ask; - public final double bid; - public final double last; - - public MarketPrice(String currencyCode, double ask, double bid, double last) { - this.currencyCode = currencyCode; - this.ask = ask; - this.bid = bid; - this.last = last; - } - - public double getPrice(PriceFeedService.Type type) { - switch (type) { - case ASK: - return ask; - case BID: - return (bid); - case LAST: - return last; - } - return 0; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (!(o instanceof MarketPrice)) return false; - - MarketPrice that = (MarketPrice) o; - - if (Double.compare(that.ask, ask) != 0) return false; - if (Double.compare(that.bid, bid) != 0) return false; - if (Double.compare(that.last, last) != 0) return false; - return !(currencyCode != null ? !currencyCode.equals(that.currencyCode) : that.currencyCode != null); - - } - - @Override - public int hashCode() { - int result; - long temp; - result = currencyCode != null ? currencyCode.hashCode() : 0; - temp = Double.doubleToLongBits(ask); - result = 31 * result + (int) (temp ^ (temp >>> 32)); - temp = Double.doubleToLongBits(bid); - result = 31 * result + (int) (temp ^ (temp >>> 32)); - temp = Double.doubleToLongBits(last); - result = 31 * result + (int) (temp ^ (temp >>> 32)); - return result; - } - - @Override - public String toString() { - return "MarketPrice{" + - "currencyCode='" + currencyCode + '\'' + - ", ask='" + ask + '\'' + - ", bid='" + bid + '\'' + - ", last='" + last + '\'' + - '}'; - } -} diff --git a/network/src/main/java/io/bisq/messages/provider/price/PriceFeedService.java b/network/src/main/java/io/bisq/messages/provider/price/PriceFeedService.java deleted file mode 100644 index 54756e9ce1..0000000000 --- a/network/src/main/java/io/bisq/messages/provider/price/PriceFeedService.java +++ /dev/null @@ -1,237 +0,0 @@ -package io.bisq.messages.provider.price; - -import com.google.common.util.concurrent.FutureCallback; -import com.google.common.util.concurrent.Futures; -import com.google.common.util.concurrent.SettableFuture; -import com.google.inject.Inject; -import io.bisq.app.Log; -import io.bisq.common.UserThread; -import io.bisq.common.handlers.FaultHandler; -import io.bisq.common.util.Tuple2; -import io.bisq.http.HttpClient; -import io.bisq.locale.Res; -import io.bisq.messages.btc.provider.ProvidersRepository; -import io.bisq.messages.btc.provider.price.PriceProvider; -import io.bisq.messages.btc.provider.price.PriceRequest; -import io.bisq.messages.btc.provider.price.PriceRequestException; -import javafx.beans.property.*; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import javax.annotation.Nullable; -import java.time.Instant; -import java.util.Date; -import java.util.HashMap; -import java.util.Map; -import java.util.Random; -import java.util.function.Consumer; - -import static com.google.common.base.Preconditions.checkNotNull; - -public class PriceFeedService { - private static final Logger log = LoggerFactory.getLogger(PriceFeedService.class); - - private final HttpClient httpClient; - private final ProvidersRepository providersRepository; - - - /////////////////////////////////////////////////////////////////////////////////////////// - // Enum - /////////////////////////////////////////////////////////////////////////////////////////// - - public enum Type { - ASK(Res.get("marketPrice.ask")), - BID(Res.get("marketPrice.bid")), - LAST(Res.get("marketPrice.last")); - - public final String name; - - Type(String name) { - this.name = name; - } - } - - private static final long PERIOD_SEC = 60; - - private final Map cache = new HashMap<>(); - private PriceProvider priceProvider; - private Consumer priceConsumer; - private FaultHandler faultHandler; - private Type type; - private String currencyCode; - private final StringProperty currencyCodeProperty = new SimpleStringProperty(); - private final ObjectProperty typeProperty = new SimpleObjectProperty<>(); - private final IntegerProperty currenciesUpdateFlag = new SimpleIntegerProperty(0); - private long epochInSecondAtLastRequest; - private Map timeStampMap = new HashMap<>(); - private int retryCounter = 0; - private int retryDelay = 1; - - - /////////////////////////////////////////////////////////////////////////////////////////// - // Constructor - /////////////////////////////////////////////////////////////////////////////////////////// - - @Inject - public PriceFeedService(HttpClient httpClient, ProvidersRepository providersRepository) { - this.httpClient = httpClient; - this.providersRepository = providersRepository; - this.priceProvider = new PriceProvider(httpClient, providersRepository.getBaseUrl()); - } - - - /////////////////////////////////////////////////////////////////////////////////////////// - // API - /////////////////////////////////////////////////////////////////////////////////////////// - - public void init(Consumer resultHandler, FaultHandler faultHandler) { - this.priceConsumer = resultHandler; - this.faultHandler = faultHandler; - - request(); - } - - - private void request() { - requestAllPrices(priceProvider, () -> { - applyPriceToConsumer(); - // after first response we know the providers timestamp and want to request quickly after next expected update - long delay = Math.max(40, Math.min(90, PERIOD_SEC - (Instant.now().getEpochSecond() - epochInSecondAtLastRequest) + 2 + new Random().nextInt(5))); - UserThread.runAfter(this::request, delay); - retryDelay = 1; - }, (errorMessage, throwable) -> { - // Try other provider if more then 1 is available - if (providersRepository.hasMoreProviders()) { - providersRepository.setNewRandomBaseUrl(); - priceProvider = new PriceProvider(httpClient, providersRepository.getBaseUrl()); - } - UserThread.runAfter(() -> { - retryCounter++; - retryDelay *= retryCounter; - request(); - }, retryDelay); - - this.faultHandler.handleFault(errorMessage, throwable); - }); - } - - @Nullable - public MarketPrice getMarketPrice(String currencyCode) { - if (cache.containsKey(currencyCode)) - return cache.get(currencyCode); - else - return null; - } - - /////////////////////////////////////////////////////////////////////////////////////////// - // Setter - /////////////////////////////////////////////////////////////////////////////////////////// - - public void setType(Type type) { - this.type = type; - typeProperty.set(type); - applyPriceToConsumer(); - } - - public void setCurrencyCode(String currencyCode) { - if (this.currencyCode == null || !this.currencyCode.equals(currencyCode)) { - this.currencyCode = currencyCode; - currencyCodeProperty.set(currencyCode); - applyPriceToConsumer(); - } - } - - - /////////////////////////////////////////////////////////////////////////////////////////// - // Getter - /////////////////////////////////////////////////////////////////////////////////////////// - - public Type getType() { - return type; - } - - public String getCurrencyCode() { - return currencyCode; - } - - public StringProperty currencyCodeProperty() { - return currencyCodeProperty; - } - - public ObjectProperty typeProperty() { - return typeProperty; - } - - public IntegerProperty currenciesUpdateFlagProperty() { - return currenciesUpdateFlag; - } - - public Date getLastRequestTimeStampBtcAverage() { - return new Date(epochInSecondAtLastRequest * 1000); - } - - public Date getLastRequestTimeStampPoloniex() { - Long ts = timeStampMap.get("btcAverageTs"); - if (ts != null) { - Date date = new Date(ts * 1000); - return date; - } else - return new Date(); - } - - public Date getLastRequestTimeStampCoinmarketcap() { - Long ts = timeStampMap.get("coinmarketcapTs"); - if (ts != null) { - Date date = new Date(ts * 1000); - return date; - } else - return new Date(); - } - - - /////////////////////////////////////////////////////////////////////////////////////////// - // Private - /////////////////////////////////////////////////////////////////////////////////////////// - - private void applyPriceToConsumer() { - if (priceConsumer != null && currencyCode != null && type != null) { - if (cache.containsKey(currencyCode)) { - try { - MarketPrice marketPrice = cache.get(currencyCode); - priceConsumer.accept(marketPrice.getPrice(type)); - } catch (Throwable t) { - log.warn("Error at applyPriceToConsumer " + t.getMessage()); - } - - } else { - String errorMessage = "We don't have a price for " + currencyCode; - log.debug(errorMessage); - faultHandler.handleFault(errorMessage, new PriceRequestException(errorMessage)); - } - } - currenciesUpdateFlag.setValue(currenciesUpdateFlag.get() + 1); - } - - private void requestAllPrices(PriceProvider provider, Runnable resultHandler, FaultHandler faultHandler) { - Log.traceCall(); - PriceRequest priceRequest = new PriceRequest(); - SettableFuture, Map>> future = priceRequest.requestAllPrices(provider); - Futures.addCallback(future, new FutureCallback, Map>>() { - @Override - public void onSuccess(@Nullable Tuple2, Map> result) { - UserThread.execute(() -> { - checkNotNull(result, "Result must not be null at requestAllPrices"); - timeStampMap = result.first; - epochInSecondAtLastRequest = timeStampMap.get("btcAverageTs"); - cache.putAll(result.second); - resultHandler.run(); - }); - } - - @Override - public void onFailure(Throwable throwable) { - UserThread.execute(() -> faultHandler.handleFault("Could not load marketPrices", throwable)); - } - }); - } -} diff --git a/network/src/main/java/io/bisq/messages/trade/exceptions/MarketPriceNotAvailableException.java b/network/src/main/java/io/bisq/messages/trade/exceptions/MarketPriceNotAvailableException.java deleted file mode 100644 index f4f9674865..0000000000 --- a/network/src/main/java/io/bisq/messages/trade/exceptions/MarketPriceNotAvailableException.java +++ /dev/null @@ -1,7 +0,0 @@ -package io.bisq.messages.trade.exceptions; - -public class MarketPriceNotAvailableException extends Exception { - public MarketPriceNotAvailableException(String message) { - super(message); - } -} diff --git a/network/src/main/java/io/bisq/messages/trade/exceptions/TradePriceOutOfToleranceException.java b/network/src/main/java/io/bisq/messages/trade/exceptions/TradePriceOutOfToleranceException.java deleted file mode 100644 index 388773c5d2..0000000000 --- a/network/src/main/java/io/bisq/messages/trade/exceptions/TradePriceOutOfToleranceException.java +++ /dev/null @@ -1,7 +0,0 @@ -package io.bisq.messages.trade.exceptions; - -public class TradePriceOutOfToleranceException extends Exception { - public TradePriceOutOfToleranceException(String message) { - super(message); - } -} diff --git a/network/src/main/java/io/bisq/messages/trade/payload/Contract.java b/network/src/main/java/io/bisq/messages/trade/payload/Contract.java deleted file mode 100644 index f77a585598..0000000000 --- a/network/src/main/java/io/bisq/messages/trade/payload/Contract.java +++ /dev/null @@ -1,287 +0,0 @@ -/* - * This file is part of bisq. - * - * bisq is free software: you can redistribute it and/or modify it - * under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or (at - * your option) any later version. - * - * bisq is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public - * License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with bisq. If not, see . - */ - -package io.bisq.messages.trade.payload; - -import com.google.common.base.Preconditions; -import com.google.protobuf.ByteString; -import io.bisq.app.Version; -import io.bisq.common.crypto.PubKeyRing; -import io.bisq.common.util.JsonExclude; -import io.bisq.common.wire.Payload; -import io.bisq.common.wire.proto.Messages; -import io.bisq.messages.payment.payload.PaymentAccountContractData; -import io.bisq.messages.trade.offer.payload.Offer; -import io.bisq.p2p.NodeAddress; -import org.bitcoinj.core.Coin; -import org.bitcoinj.core.Utils; -import org.bitcoinj.utils.Fiat; - -import javax.annotation.concurrent.Immutable; -import java.util.Arrays; - -@SuppressWarnings("WeakerAccess") -@Immutable -public final class Contract implements Payload { - // That object is sent over the wire, so we need to take care of version compatibility. - @JsonExclude - public static final long serialVersionUID = Version.P2P_NETWORK_VERSION; - - public final Offer offer; - private final long tradeAmount; - private final long tradePrice; - public final String takeOfferFeeTxID; - public final NodeAddress arbitratorNodeAddress; - private final boolean isBuyerOffererAndSellerTaker; - private final String offererAccountId; - private final String takerAccountId; - private final PaymentAccountContractData offererPaymentAccountContractData; - private final PaymentAccountContractData takerPaymentAccountContractData; - @JsonExclude - private final PubKeyRing offererPubKeyRing; - @JsonExclude - private final PubKeyRing takerPubKeyRing; - private final NodeAddress buyerNodeAddress; - private final NodeAddress sellerNodeAddress; - - - private final String offererPayoutAddressString; - private final String takerPayoutAddressString; - @JsonExclude - private final byte[] offererMultiSigPubKey; - @JsonExclude - private final byte[] takerMultiSigPubKey; - - public Contract(Offer offer, - Coin tradeAmount, - Fiat tradePrice, - String takeOfferFeeTxID, - NodeAddress buyerNodeAddress, - NodeAddress sellerNodeAddress, - NodeAddress arbitratorNodeAddress, - boolean isBuyerOffererAndSellerTaker, - String offererAccountId, - String takerAccountId, - PaymentAccountContractData offererPaymentAccountContractData, - PaymentAccountContractData takerPaymentAccountContractData, - PubKeyRing offererPubKeyRing, - PubKeyRing takerPubKeyRing, - String offererPayoutAddressString, - String takerPayoutAddressString, - byte[] offererMultiSigPubKey, - byte[] takerMultiSigPubKey) { - this.offer = offer; - this.tradePrice = tradePrice.value; - this.buyerNodeAddress = buyerNodeAddress; - this.sellerNodeAddress = sellerNodeAddress; - this.tradeAmount = tradeAmount.value; - this.takeOfferFeeTxID = takeOfferFeeTxID; - this.arbitratorNodeAddress = arbitratorNodeAddress; - this.isBuyerOffererAndSellerTaker = isBuyerOffererAndSellerTaker; - this.offererAccountId = offererAccountId; - this.takerAccountId = takerAccountId; - this.offererPaymentAccountContractData = offererPaymentAccountContractData; - this.takerPaymentAccountContractData = takerPaymentAccountContractData; - this.offererPubKeyRing = offererPubKeyRing; - this.takerPubKeyRing = takerPubKeyRing; - this.offererPayoutAddressString = offererPayoutAddressString; - this.takerPayoutAddressString = takerPayoutAddressString; - this.offererMultiSigPubKey = offererMultiSigPubKey; - this.takerMultiSigPubKey = takerMultiSigPubKey; - } - - public boolean isBuyerOffererAndSellerTaker() { - return isBuyerOffererAndSellerTaker; - } - - public String getBuyerAccountId() { - return isBuyerOffererAndSellerTaker ? offererAccountId : takerAccountId; - } - - public String getSellerAccountId() { - return isBuyerOffererAndSellerTaker ? takerAccountId : offererAccountId; - } - - - public String getBuyerPayoutAddressString() { - return isBuyerOffererAndSellerTaker ? offererPayoutAddressString : takerPayoutAddressString; - } - - public String getSellerPayoutAddressString() { - return isBuyerOffererAndSellerTaker ? takerPayoutAddressString : offererPayoutAddressString; - } - - public PubKeyRing getBuyerPubKeyRing() { - return isBuyerOffererAndSellerTaker ? offererPubKeyRing : takerPubKeyRing; - } - - public PubKeyRing getSellerPubKeyRing() { - return isBuyerOffererAndSellerTaker ? takerPubKeyRing : offererPubKeyRing; - } - - public byte[] getBuyerMultiSigPubKey() { - return isBuyerOffererAndSellerTaker ? offererMultiSigPubKey : takerMultiSigPubKey; - } - - public byte[] getSellerMultiSigPubKey() { - return isBuyerOffererAndSellerTaker ? takerMultiSigPubKey : offererMultiSigPubKey; - } - - public PaymentAccountContractData getBuyerPaymentAccountContractData() { - return isBuyerOffererAndSellerTaker ? offererPaymentAccountContractData : takerPaymentAccountContractData; - } - - public PaymentAccountContractData getSellerPaymentAccountContractData() { - return isBuyerOffererAndSellerTaker ? takerPaymentAccountContractData : offererPaymentAccountContractData; - } - - public String getPaymentMethodName() { - // PaymentMethod need to be the same - Preconditions.checkArgument(offererPaymentAccountContractData.getPaymentMethodName().equals(takerPaymentAccountContractData.getPaymentMethodName()), - "NOT offererPaymentAccountContractData.getPaymentMethodName().equals(takerPaymentAccountContractData.getPaymentMethodName())"); - return offererPaymentAccountContractData.getPaymentMethodName(); - } - - public Coin getTradeAmount() { - return Coin.valueOf(tradeAmount); - } - - public Fiat getTradePrice() { - return Fiat.valueOf(offer.getCurrencyCode(), tradePrice); - } - - public NodeAddress getBuyerNodeAddress() { - return buyerNodeAddress; - } - - - public NodeAddress getSellerNodeAddress() { - return sellerNodeAddress; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (!(o instanceof Contract)) return false; - - Contract contract = (Contract) o; - - if (tradeAmount != contract.tradeAmount) return false; - if (tradePrice != contract.tradePrice) return false; - if (isBuyerOffererAndSellerTaker != contract.isBuyerOffererAndSellerTaker) return false; - if (offer != null ? !offer.equals(contract.offer) : contract.offer != null) return false; - if (takeOfferFeeTxID != null ? !takeOfferFeeTxID.equals(contract.takeOfferFeeTxID) : contract.takeOfferFeeTxID != null) - return false; - if (arbitratorNodeAddress != null ? !arbitratorNodeAddress.equals(contract.arbitratorNodeAddress) : contract.arbitratorNodeAddress != null) - return false; - if (offererAccountId != null ? !offererAccountId.equals(contract.offererAccountId) : contract.offererAccountId != null) - return false; - if (takerAccountId != null ? !takerAccountId.equals(contract.takerAccountId) : contract.takerAccountId != null) - return false; - if (offererPaymentAccountContractData != null ? !offererPaymentAccountContractData.equals(contract.offererPaymentAccountContractData) : contract.offererPaymentAccountContractData != null) - return false; - if (takerPaymentAccountContractData != null ? !takerPaymentAccountContractData.equals(contract.takerPaymentAccountContractData) : contract.takerPaymentAccountContractData != null) - return false; - if (offererPubKeyRing != null ? !offererPubKeyRing.equals(contract.offererPubKeyRing) : contract.offererPubKeyRing != null) - return false; - if (takerPubKeyRing != null ? !takerPubKeyRing.equals(contract.takerPubKeyRing) : contract.takerPubKeyRing != null) - return false; - if (buyerNodeAddress != null ? !buyerNodeAddress.equals(contract.buyerNodeAddress) : contract.buyerNodeAddress != null) - return false; - if (sellerNodeAddress != null ? !sellerNodeAddress.equals(contract.sellerNodeAddress) : contract.sellerNodeAddress != null) - return false; - if (offererPayoutAddressString != null ? !offererPayoutAddressString.equals(contract.offererPayoutAddressString) : contract.offererPayoutAddressString != null) - return false; - if (takerPayoutAddressString != null ? !takerPayoutAddressString.equals(contract.takerPayoutAddressString) : contract.takerPayoutAddressString != null) - return false; - if (!Arrays.equals(offererMultiSigPubKey, contract.offererMultiSigPubKey)) return false; - return Arrays.equals(takerMultiSigPubKey, contract.takerMultiSigPubKey); - - } - - @Override - public int hashCode() { - int result = offer != null ? offer.hashCode() : 0; - result = 31 * result + (int) (tradeAmount ^ (tradeAmount >>> 32)); - result = 31 * result + (int) (tradePrice ^ (tradePrice >>> 32)); - result = 31 * result + (takeOfferFeeTxID != null ? takeOfferFeeTxID.hashCode() : 0); - result = 31 * result + (arbitratorNodeAddress != null ? arbitratorNodeAddress.hashCode() : 0); - result = 31 * result + (isBuyerOffererAndSellerTaker ? 1 : 0); - result = 31 * result + (offererAccountId != null ? offererAccountId.hashCode() : 0); - result = 31 * result + (takerAccountId != null ? takerAccountId.hashCode() : 0); - result = 31 * result + (offererPaymentAccountContractData != null ? offererPaymentAccountContractData.hashCode() : 0); - result = 31 * result + (takerPaymentAccountContractData != null ? takerPaymentAccountContractData.hashCode() : 0); - result = 31 * result + (offererPubKeyRing != null ? offererPubKeyRing.hashCode() : 0); - result = 31 * result + (takerPubKeyRing != null ? takerPubKeyRing.hashCode() : 0); - result = 31 * result + (buyerNodeAddress != null ? buyerNodeAddress.hashCode() : 0); - result = 31 * result + (sellerNodeAddress != null ? sellerNodeAddress.hashCode() : 0); - result = 31 * result + (offererPayoutAddressString != null ? offererPayoutAddressString.hashCode() : 0); - result = 31 * result + (takerPayoutAddressString != null ? takerPayoutAddressString.hashCode() : 0); - result = 31 * result + (offererMultiSigPubKey != null ? Arrays.hashCode(offererMultiSigPubKey) : 0); - result = 31 * result + (takerMultiSigPubKey != null ? Arrays.hashCode(takerMultiSigPubKey) : 0); - return result; - } - - @Override - public String toString() { - return "Contract{" + - "\n\toffer=" + offer + - "\n\ttradeAmount=" + tradeAmount + - "\n\ttradePrice=" + tradePrice + - "\n\ttakeOfferFeeTxID='" + takeOfferFeeTxID + '\'' + - "\n\tarbitratorAddress=" + arbitratorNodeAddress + - "\n\tisBuyerOffererAndSellerTaker=" + isBuyerOffererAndSellerTaker + - "\n\toffererAccountId='" + offererAccountId + '\'' + - "\n\ttakerAccountId='" + takerAccountId + '\'' + - "\n\toffererPaymentAccountContractData=" + offererPaymentAccountContractData + - "\n\ttakerPaymentAccountContractData=" + takerPaymentAccountContractData + - "\n\toffererPubKeyRing=" + offererPubKeyRing + - "\n\ttakerPubKeyRing=" + takerPubKeyRing + - "\n\tbuyerAddress=" + buyerNodeAddress + - "\n\tsellerAddress=" + sellerNodeAddress + - "\n\toffererPayoutAddressString='" + offererPayoutAddressString + '\'' + - "\n\ttakerPayoutAddressString='" + takerPayoutAddressString + '\'' + - "\n\toffererMultiSigPubKey=" + Utils.HEX.encode(offererMultiSigPubKey) + - "\n\ttakerMultiSigPubKey=" + Utils.HEX.encode(takerMultiSigPubKey) + - "\n\tBuyerMultiSigPubKey=" + Utils.HEX.encode(getBuyerMultiSigPubKey()) + - "\n\tSellerMultiSigPubKey=" + Utils.HEX.encode(getSellerMultiSigPubKey()) + - '}'; - } - - @Override - public Messages.Contract toProtoBuf() { - return Messages.Contract.newBuilder() - .setOffer(offer.toProtoBuf().getOffer()) - .setTradeAmount(tradeAmount) - .setTradePrice(tradePrice) - .setTakeOfferFeeTxId(takeOfferFeeTxID) - .setArbitratorNodeAddress(arbitratorNodeAddress.toProtoBuf()) - .setIsBuyerOffererAndSellerTaker(isBuyerOffererAndSellerTaker) - .setOffererAccountId(offererAccountId) - .setTakerAccountId(takerAccountId) - .setOffererPaymentAccountContractData((Messages.PaymentAccountContractData) offererPaymentAccountContractData.toProtoBuf()) - .setTakerPaymentAccountContractData((Messages.PaymentAccountContractData) takerPaymentAccountContractData.toProtoBuf()) - .setOffererPubKeyRing(offererPubKeyRing.toProtoBuf()) - .setTakerPubKeyRing(takerPubKeyRing.toProtoBuf()) - .setBuyerNodeAddress(buyerNodeAddress.toProtoBuf()) - .setSellerNodeAddress(sellerNodeAddress.toProtoBuf()) - .setOffererPayoutAddressstring(offererPayoutAddressString) - .setTakerPayoutAddressstring(takerPayoutAddressString) - .setOffererBtcPubKey(ByteString.copyFrom(offererMultiSigPubKey)) - .setTakerBtcPubKey(ByteString.copyFrom(takerMultiSigPubKey)).build(); - } -} diff --git a/network/src/main/java/io/bisq/messages/trade/protocol/trade/messages/DepositTxPublishedMessage.java b/network/src/main/java/io/bisq/messages/trade/protocol/trade/messages/DepositTxPublishedMessage.java deleted file mode 100644 index 5bcef040cd..0000000000 --- a/network/src/main/java/io/bisq/messages/trade/protocol/trade/messages/DepositTxPublishedMessage.java +++ /dev/null @@ -1,96 +0,0 @@ -/* - * This file is part of bisq. - * - * bisq is free software: you can redistribute it and/or modify it - * under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or (at - * your option) any later version. - * - * bisq is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public - * License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with bisq. If not, see . - */ - -package io.bisq.messages.trade.protocol.trade.messages; - -import com.google.protobuf.ByteString; -import io.bisq.app.Version; -import io.bisq.common.util.ProtoBufferUtils; -import io.bisq.common.wire.proto.Messages; -import io.bisq.messages.protocol.trade.TradeMessage; -import io.bisq.p2p.NodeAddress; -import io.bisq.p2p.messaging.MailboxMessage; - -import javax.annotation.concurrent.Immutable; -import java.util.Arrays; -import java.util.UUID; - -@Immutable -public final class DepositTxPublishedMessage extends TradeMessage implements MailboxMessage { - // That object is sent over the wire, so we need to take care of version compatibility. - private static final long serialVersionUID = Version.P2P_NETWORK_VERSION; - - public final byte[] depositTx; - private final NodeAddress senderNodeAddress; - private final String uid; - - public DepositTxPublishedMessage(String tradeId, byte[] depositTx, NodeAddress senderNodeAddress, String uid) { - super(tradeId); - this.depositTx = depositTx; - this.senderNodeAddress = senderNodeAddress; - this.uid = uid; - } - - public DepositTxPublishedMessage(String tradeId, byte[] depositTx, NodeAddress senderNodeAddress) { - this(tradeId, depositTx, senderNodeAddress, UUID.randomUUID().toString()); - } - - @Override - public NodeAddress getSenderNodeAddress() { - return senderNodeAddress; - } - - @Override - public String getUID() { - return uid; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (!(o instanceof DepositTxPublishedMessage)) return false; - if (!super.equals(o)) return false; - - DepositTxPublishedMessage that = (DepositTxPublishedMessage) o; - - if (!Arrays.equals(depositTx, that.depositTx)) return false; - if (senderNodeAddress != null ? !senderNodeAddress.equals(that.senderNodeAddress) : that.senderNodeAddress != null) - return false; - return !(uid != null ? !uid.equals(that.uid) : that.uid != null); - - } - - @Override - public int hashCode() { - int result = super.hashCode(); - result = 31 * result + (depositTx != null ? Arrays.hashCode(depositTx) : 0); - result = 31 * result + (senderNodeAddress != null ? senderNodeAddress.hashCode() : 0); - result = 31 * result + (uid != null ? uid.hashCode() : 0); - return result; - } - - @Override - public Messages.Envelope toProtoBuf() { - Messages.Envelope.Builder baseEnvelope = ProtoBufferUtils.getBaseEnvelope(); - return baseEnvelope.setDepositTxPublishedMessage(Messages.DepositTxPublishedMessage.newBuilder() - .setMessageVersion(getMessageVersion()) - .setTradeId(tradeId) - .setDepositTx(ByteString.copyFrom(depositTx)) - .setSenderNodeAddress(senderNodeAddress.toProtoBuf()) - .setUid(uid)).build(); - } -} diff --git a/network/src/main/java/io/bisq/messages/trade/protocol/trade/messages/FiatTransferStartedMessage.java b/network/src/main/java/io/bisq/messages/trade/protocol/trade/messages/FiatTransferStartedMessage.java deleted file mode 100644 index 0b60020749..0000000000 --- a/network/src/main/java/io/bisq/messages/trade/protocol/trade/messages/FiatTransferStartedMessage.java +++ /dev/null @@ -1,105 +0,0 @@ -/* - * This file is part of bisq. - * - * bisq is free software: you can redistribute it and/or modify it - * under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or (at - * your option) any later version. - * - * bisq is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public - * License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with bisq. If not, see . - */ - -package io.bisq.messages.trade.protocol.trade.messages; - -import io.bisq.app.Version; -import io.bisq.common.util.ProtoBufferUtils; -import io.bisq.common.wire.proto.Messages; -import io.bisq.messages.protocol.trade.TradeMessage; -import io.bisq.p2p.NodeAddress; -import io.bisq.p2p.messaging.MailboxMessage; - -import javax.annotation.concurrent.Immutable; -import java.util.UUID; - -@Immutable -public final class FiatTransferStartedMessage extends TradeMessage implements MailboxMessage { - // That object is sent over the wire, so we need to take care of version compatibility. - private static final long serialVersionUID = Version.P2P_NETWORK_VERSION; - - public final String buyerPayoutAddress; - private final NodeAddress senderNodeAddress; - private final String uid; - - public FiatTransferStartedMessage(String tradeId, String buyerPayoutAddress, - NodeAddress senderNodeAddress, String uid) { - super(tradeId); - this.buyerPayoutAddress = buyerPayoutAddress; - this.senderNodeAddress = senderNodeAddress; - this.uid = uid; - } - - public FiatTransferStartedMessage(String tradeId, String buyerPayoutAddress, NodeAddress senderNodeAddress) { - this(tradeId, buyerPayoutAddress, senderNodeAddress, UUID.randomUUID().toString()); - } - - @Override - public NodeAddress getSenderNodeAddress() { - return senderNodeAddress; - } - - @Override - public String getUID() { - return uid; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (!(o instanceof FiatTransferStartedMessage)) return false; - if (!super.equals(o)) return false; - - FiatTransferStartedMessage that = (FiatTransferStartedMessage) o; - - if (buyerPayoutAddress != null ? !buyerPayoutAddress.equals(that.buyerPayoutAddress) : that.buyerPayoutAddress != null) - return false; - if (senderNodeAddress != null ? !senderNodeAddress.equals(that.senderNodeAddress) : that.senderNodeAddress != null) - return false; - return !(uid != null ? !uid.equals(that.uid) : that.uid != null); - - } - - @Override - public int hashCode() { - int result = super.hashCode(); - result = 31 * result + (buyerPayoutAddress != null ? buyerPayoutAddress.hashCode() : 0); - result = 31 * result + (senderNodeAddress != null ? senderNodeAddress.hashCode() : 0); - result = 31 * result + (uid != null ? uid.hashCode() : 0); - return result; - } - - @Override - public String toString() { - return "FiatTransferStartedMessage{" + - "buyerPayoutAddress='" + buyerPayoutAddress + '\'' + - ", senderNodeAddress=" + senderNodeAddress + - ", uid='" + uid + '\'' + - "} " + super.toString(); - } - - @Override - public Messages.Envelope toProtoBuf() { - Messages.Envelope.Builder baseEnvelope = ProtoBufferUtils.getBaseEnvelope(); - return baseEnvelope.setFiatTransferStartedMessage(baseEnvelope.getFiatTransferStartedMessageBuilder() - .setMessageVersion(getMessageVersion()) - .setTradeId(tradeId) - .setBuyerPayoutAddress(buyerPayoutAddress) - .setSenderNodeAddress(senderNodeAddress.toProtoBuf()) - .setUid(uid)).build(); - } -} diff --git a/network/src/main/java/io/bisq/messages/trade/protocol/trade/messages/FinalizePayoutTxRequest.java b/network/src/main/java/io/bisq/messages/trade/protocol/trade/messages/FinalizePayoutTxRequest.java deleted file mode 100644 index 68c15ed39a..0000000000 --- a/network/src/main/java/io/bisq/messages/trade/protocol/trade/messages/FinalizePayoutTxRequest.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * This file is part of bisq. - * - * bisq is free software: you can redistribute it and/or modify it - * under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or (at - * your option) any later version. - * - * bisq is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public - * License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with bisq. If not, see . - */ - -package io.bisq.messages.trade.protocol.trade.messages; - -import com.google.protobuf.ByteString; -import io.bisq.app.Version; -import io.bisq.common.util.ProtoBufferUtils; -import io.bisq.common.wire.proto.Messages; -import io.bisq.messages.protocol.trade.TradeMessage; -import io.bisq.p2p.NodeAddress; -import io.bisq.p2p.messaging.MailboxMessage; - -import javax.annotation.concurrent.Immutable; -import java.util.Arrays; -import java.util.UUID; - -@Immutable -public final class FinalizePayoutTxRequest extends TradeMessage implements MailboxMessage { - // That object is sent over the wire, so we need to take care of version compatibility. - private static final long serialVersionUID = Version.P2P_NETWORK_VERSION; - - public final byte[] sellerSignature; - public final String sellerPayoutAddress; - public final long lockTimeAsBlockHeight; - private final NodeAddress senderNodeAddress; - private final String uid; - - public FinalizePayoutTxRequest(String tradeId, - byte[] sellerSignature, - String sellerPayoutAddress, - long lockTimeAsBlockHeight, - NodeAddress senderNodeAddress) { - this(tradeId, sellerSignature, sellerPayoutAddress, lockTimeAsBlockHeight, senderNodeAddress, - UUID.randomUUID().toString()); - } - - public FinalizePayoutTxRequest(String tradeId, - byte[] sellerSignature, - String sellerPayoutAddress, - long lockTimeAsBlockHeight, - NodeAddress senderNodeAddress, - String uid) { - super(tradeId); - this.sellerSignature = sellerSignature; - this.sellerPayoutAddress = sellerPayoutAddress; - this.lockTimeAsBlockHeight = lockTimeAsBlockHeight; - this.senderNodeAddress = senderNodeAddress; - this.uid = uid; - } - - @Override - public NodeAddress getSenderNodeAddress() { - return senderNodeAddress; - } - - @Override - public String getUID() { - return uid; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (!(o instanceof FinalizePayoutTxRequest)) return false; - if (!super.equals(o)) return false; - - FinalizePayoutTxRequest that = (FinalizePayoutTxRequest) o; - - if (lockTimeAsBlockHeight != that.lockTimeAsBlockHeight) return false; - if (!Arrays.equals(sellerSignature, that.sellerSignature)) return false; - if (sellerPayoutAddress != null ? !sellerPayoutAddress.equals(that.sellerPayoutAddress) : that.sellerPayoutAddress != null) - return false; - if (senderNodeAddress != null ? !senderNodeAddress.equals(that.senderNodeAddress) : that.senderNodeAddress != null) - return false; - return !(uid != null ? !uid.equals(that.uid) : that.uid != null); - - } - - @Override - public int hashCode() { - int result = super.hashCode(); - result = 31 * result + (sellerSignature != null ? Arrays.hashCode(sellerSignature) : 0); - result = 31 * result + (sellerPayoutAddress != null ? sellerPayoutAddress.hashCode() : 0); - result = 31 * result + (int) (lockTimeAsBlockHeight ^ (lockTimeAsBlockHeight >>> 32)); - result = 31 * result + (senderNodeAddress != null ? senderNodeAddress.hashCode() : 0); - result = 31 * result + (uid != null ? uid.hashCode() : 0); - return result; - } - - @Override - public Messages.Envelope toProtoBuf() { - Messages.Envelope.Builder baseEnvelope = ProtoBufferUtils.getBaseEnvelope(); - return baseEnvelope.setFinalizePayoutTxRequest(Messages.FinalizePayoutTxRequest.newBuilder() - .setMessageVersion(getMessageVersion()) - .setTradeId(tradeId) - .setSellerSignature(ByteString.copyFrom(sellerSignature)) - .setSellerPayoutAddress(sellerPayoutAddress) - .setLockTimeAsBlockHeight(lockTimeAsBlockHeight) - .setSenderNodeAddress(senderNodeAddress.toProtoBuf()) - .setUid(uid)).build(); - } -} diff --git a/network/src/main/java/io/bisq/messages/trade/protocol/trade/messages/PayDepositRequest.java b/network/src/main/java/io/bisq/messages/trade/protocol/trade/messages/PayDepositRequest.java deleted file mode 100644 index feff03eacd..0000000000 --- a/network/src/main/java/io/bisq/messages/trade/protocol/trade/messages/PayDepositRequest.java +++ /dev/null @@ -1,190 +0,0 @@ -/* - * This file is part of bisq. - * - * bisq is free software: you can redistribute it and/or modify it - * under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or (at - * your option) any later version. - * - * bisq is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public - * License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with bisq. If not, see . - */ - -package io.bisq.messages.trade.protocol.trade.messages; - -import com.google.protobuf.ByteString; -import io.bisq.app.Version; -import io.bisq.common.crypto.PubKeyRing; -import io.bisq.common.util.ProtoBufferUtils; -import io.bisq.common.wire.proto.Messages; -import io.bisq.messages.btc.data.RawTransactionInput; -import io.bisq.messages.payment.payload.PaymentAccountContractData; -import io.bisq.messages.protocol.trade.TradeMessage; -import io.bisq.p2p.NodeAddress; -import io.bisq.p2p.messaging.MailboxMessage; -import org.bitcoinj.core.Coin; - -import javax.annotation.Nullable; -import javax.annotation.concurrent.Immutable; -import java.util.Arrays; -import java.util.List; -import java.util.Optional; -import java.util.UUID; -import java.util.stream.Collectors; - -@Immutable -public final class PayDepositRequest extends TradeMessage implements MailboxMessage { - // That object is sent over the wire, so we need to take care of version compatibility. - private static final long serialVersionUID = Version.P2P_NETWORK_VERSION; - - public final long tradeAmount; - public final long tradePrice; - public final byte[] takerMultiSigPubKey; - public final Coin txFee; - public final Coin takeOfferFee; - public final List rawTransactionInputs; - public final long changeOutputValue; - @Nullable - public final String changeOutputAddress; - public final String takerPayoutAddressString; - public final PubKeyRing takerPubKeyRing; - public final PaymentAccountContractData takerPaymentAccountContractData; - public final String takerAccountId; - public final String takeOfferFeeTxId; - public final List acceptedArbitratorNodeAddresses; - public final NodeAddress arbitratorNodeAddress; - private final NodeAddress senderNodeAddress; - private final String uid; - - public PayDepositRequest(NodeAddress senderNodeAddress, - String tradeId, - long tradeAmount, - long tradePrice, - Coin txFee, - Coin takeOfferFee, - List rawTransactionInputs, - long changeOutputValue, - String changeOutputAddress, - byte[] takerMultiSigPubKey, - String takerPayoutAddressString, - PubKeyRing takerPubKeyRing, - PaymentAccountContractData takerPaymentAccountContractData, - String takerAccountId, - String takeOfferFeeTxId, - List acceptedArbitratorNodeAddresses, - NodeAddress arbitratorNodeAddress) { - super(tradeId); - this.senderNodeAddress = senderNodeAddress; - this.tradeAmount = tradeAmount; - this.tradePrice = tradePrice; - this.txFee = txFee; - this.takeOfferFee = takeOfferFee; - this.rawTransactionInputs = rawTransactionInputs; - this.changeOutputValue = changeOutputValue; - this.changeOutputAddress = changeOutputAddress; - this.takerPayoutAddressString = takerPayoutAddressString; - this.takerPubKeyRing = takerPubKeyRing; - this.takerMultiSigPubKey = takerMultiSigPubKey; - this.takerPaymentAccountContractData = takerPaymentAccountContractData; - this.takerAccountId = takerAccountId; - this.takeOfferFeeTxId = takeOfferFeeTxId; - this.acceptedArbitratorNodeAddresses = acceptedArbitratorNodeAddresses; - this.arbitratorNodeAddress = arbitratorNodeAddress; - uid = UUID.randomUUID().toString(); - } - - @Override - public NodeAddress getSenderNodeAddress() { - return senderNodeAddress; - } - - @Override - public String getUID() { - return uid; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (!(o instanceof PayDepositRequest)) return false; - if (!super.equals(o)) return false; - - PayDepositRequest that = (PayDepositRequest) o; - - if (tradeAmount != that.tradeAmount) return false; - if (changeOutputValue != that.changeOutputValue) return false; - if (!Arrays.equals(takerMultiSigPubKey, that.takerMultiSigPubKey)) return false; - if (rawTransactionInputs != null ? !rawTransactionInputs.equals(that.rawTransactionInputs) : that.rawTransactionInputs != null) - return false; - if (changeOutputAddress != null ? !changeOutputAddress.equals(that.changeOutputAddress) : that.changeOutputAddress != null) - return false; - if (takerPayoutAddressString != null ? !takerPayoutAddressString.equals(that.takerPayoutAddressString) : that.takerPayoutAddressString != null) - return false; - if (takerPubKeyRing != null ? !takerPubKeyRing.equals(that.takerPubKeyRing) : that.takerPubKeyRing != null) - return false; - if (takerPaymentAccountContractData != null ? !takerPaymentAccountContractData.equals(that.takerPaymentAccountContractData) : that.takerPaymentAccountContractData != null) - return false; - if (takerAccountId != null ? !takerAccountId.equals(that.takerAccountId) : that.takerAccountId != null) - return false; - if (takeOfferFeeTxId != null ? !takeOfferFeeTxId.equals(that.takeOfferFeeTxId) : that.takeOfferFeeTxId != null) - return false; - if (acceptedArbitratorNodeAddresses != null ? !acceptedArbitratorNodeAddresses.equals(that.acceptedArbitratorNodeAddresses) : that.acceptedArbitratorNodeAddresses != null) - return false; - if (arbitratorNodeAddress != null ? !arbitratorNodeAddress.equals(that.arbitratorNodeAddress) : that.arbitratorNodeAddress != null) - return false; - if (senderNodeAddress != null ? !senderNodeAddress.equals(that.senderNodeAddress) : that.senderNodeAddress != null) - return false; - return !(uid != null ? !uid.equals(that.uid) : that.uid != null); - - } - - @Override - public int hashCode() { - int result = super.hashCode(); - result = 31 * result + (int) (tradeAmount ^ (tradeAmount >>> 32)); - result = 31 * result + (takerMultiSigPubKey != null ? Arrays.hashCode(takerMultiSigPubKey) : 0); - result = 31 * result + (rawTransactionInputs != null ? rawTransactionInputs.hashCode() : 0); - result = 31 * result + (int) (changeOutputValue ^ (changeOutputValue >>> 32)); - result = 31 * result + (changeOutputAddress != null ? changeOutputAddress.hashCode() : 0); - result = 31 * result + (takerPayoutAddressString != null ? takerPayoutAddressString.hashCode() : 0); - result = 31 * result + (takerPubKeyRing != null ? takerPubKeyRing.hashCode() : 0); - result = 31 * result + (takerPaymentAccountContractData != null ? takerPaymentAccountContractData.hashCode() : 0); - result = 31 * result + (takerAccountId != null ? takerAccountId.hashCode() : 0); - result = 31 * result + (takeOfferFeeTxId != null ? takeOfferFeeTxId.hashCode() : 0); - result = 31 * result + (acceptedArbitratorNodeAddresses != null ? acceptedArbitratorNodeAddresses.hashCode() : 0); - result = 31 * result + (arbitratorNodeAddress != null ? arbitratorNodeAddress.hashCode() : 0); - result = 31 * result + (senderNodeAddress != null ? senderNodeAddress.hashCode() : 0); - result = 31 * result + (uid != null ? uid.hashCode() : 0); - return result; - } - - @Override - public Messages.Envelope toProtoBuf() { - Messages.Envelope.Builder baseEnvelope = ProtoBufferUtils.getBaseEnvelope(); - Messages.PayDepositRequest.Builder builderForValue = Messages.PayDepositRequest.newBuilder() - .setTradeId(tradeId) - .setTradeAmount(tradeAmount) - .setTradePrice(tradePrice) - .setTakerMultiSigPubKey(ByteString.copyFrom(takerMultiSigPubKey)) - .setTxFee(Messages.Coin.newBuilder().setValue(txFee.getValue())) - .setTakeOfferFee(Messages.Coin.newBuilder().setValue(takeOfferFee.getValue())) - .addAllRawTransactionInputs(rawTransactionInputs.stream().map(rawTransactionInput -> rawTransactionInput.toProtoBuf()).collect(Collectors.toList())) - .setChangeOutputValue(changeOutputValue) - .setTakerPayoutAddressString(takerPayoutAddressString) - .setTakerPubKeyRing(takerPubKeyRing.toProtoBuf()) - .setTakerPaymentAccountContractData((Messages.PaymentAccountContractData) takerPaymentAccountContractData.toProtoBuf()) - .setTakerAccountId(takerAccountId) - .setTakeOfferFeeTxId(takeOfferFeeTxId) - .addAllAcceptedArbitratorNodeAddresses(acceptedArbitratorNodeAddresses.stream().map(nodeAddress -> nodeAddress.toProtoBuf()).collect(Collectors.toList())) - .setArbitratorNodeAddress(arbitratorNodeAddress.toProtoBuf()) - .setSenderNodeAddress(senderNodeAddress.toProtoBuf()) - .setUid(uid); - Optional.ofNullable(changeOutputAddress).ifPresent(builderForValue::setChangeOutputAddress); - return baseEnvelope.setPayDepositRequest(builderForValue).build(); - } -} diff --git a/network/src/main/java/io/bisq/messages/trade/protocol/trade/messages/PayoutTxFinalizedMessage.java b/network/src/main/java/io/bisq/messages/trade/protocol/trade/messages/PayoutTxFinalizedMessage.java deleted file mode 100644 index e79e644b40..0000000000 --- a/network/src/main/java/io/bisq/messages/trade/protocol/trade/messages/PayoutTxFinalizedMessage.java +++ /dev/null @@ -1,96 +0,0 @@ -/* - * This file is part of bisq. - * - * bisq is free software: you can redistribute it and/or modify it - * under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or (at - * your option) any later version. - * - * bisq is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public - * License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with bisq. If not, see . - */ - -package io.bisq.messages.trade.protocol.trade.messages; - -import com.google.protobuf.ByteString; -import io.bisq.app.Version; -import io.bisq.common.util.ProtoBufferUtils; -import io.bisq.common.wire.proto.Messages; -import io.bisq.messages.protocol.trade.TradeMessage; -import io.bisq.p2p.NodeAddress; -import io.bisq.p2p.messaging.MailboxMessage; - -import javax.annotation.concurrent.Immutable; -import java.util.Arrays; -import java.util.UUID; - -@Immutable -public final class PayoutTxFinalizedMessage extends TradeMessage implements MailboxMessage { - // That object is sent over the wire, so we need to take care of version compatibility. - private static final long serialVersionUID = Version.P2P_NETWORK_VERSION; - - public final byte[] payoutTx; - private final NodeAddress senderNodeAddress; - private final String uid; - - public PayoutTxFinalizedMessage(String tradeId, byte[] payoutTx, NodeAddress senderNodeAddress) { - this(tradeId, payoutTx, senderNodeAddress, UUID.randomUUID().toString()); - } - - public PayoutTxFinalizedMessage(String tradeId, byte[] payoutTx, NodeAddress senderNodeAddress, String uid) { - super(tradeId); - this.payoutTx = payoutTx; - this.senderNodeAddress = senderNodeAddress; - this.uid = uid; - } - - @Override - public NodeAddress getSenderNodeAddress() { - return senderNodeAddress; - } - - @Override - public String getUID() { - return uid; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (!(o instanceof PayoutTxFinalizedMessage)) return false; - if (!super.equals(o)) return false; - - PayoutTxFinalizedMessage that = (PayoutTxFinalizedMessage) o; - - if (!Arrays.equals(payoutTx, that.payoutTx)) return false; - if (senderNodeAddress != null ? !senderNodeAddress.equals(that.senderNodeAddress) : that.senderNodeAddress != null) - return false; - return !(uid != null ? !uid.equals(that.uid) : that.uid != null); - - } - - @Override - public int hashCode() { - int result = super.hashCode(); - result = 31 * result + (payoutTx != null ? Arrays.hashCode(payoutTx) : 0); - result = 31 * result + (senderNodeAddress != null ? senderNodeAddress.hashCode() : 0); - result = 31 * result + (uid != null ? uid.hashCode() : 0); - return result; - } - - @Override - public Messages.Envelope toProtoBuf() { - Messages.Envelope.Builder baseEnvelope = ProtoBufferUtils.getBaseEnvelope(); - return baseEnvelope.setPayoutTxFinalizedMessage(baseEnvelope.getPayoutTxFinalizedMessageBuilder() - .setUid(uid) - .setMessageVersion(getMessageVersion()) - .setTradeId(tradeId) - .setPayoutTx(ByteString.copyFrom(payoutTx)) - .setSenderNodeAddress(senderNodeAddress.toProtoBuf())).build(); - } -} diff --git a/network/src/main/java/io/bisq/messages/trade/protocol/trade/messages/PublishDepositTxRequest.java b/network/src/main/java/io/bisq/messages/trade/protocol/trade/messages/PublishDepositTxRequest.java deleted file mode 100644 index df2d47409b..0000000000 --- a/network/src/main/java/io/bisq/messages/trade/protocol/trade/messages/PublishDepositTxRequest.java +++ /dev/null @@ -1,94 +0,0 @@ -/* - * This file is part of bisq. - * - * bisq is free software: you can redistribute it and/or modify it - * under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or (at - * your option) any later version. - * - * bisq is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public - * License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with bisq. If not, see . - */ - -package io.bisq.messages.trade.protocol.trade.messages; - -import com.google.protobuf.ByteString; -import io.bisq.app.Version; -import io.bisq.common.util.ProtoBufferUtils; -import io.bisq.common.util.Utilities; -import io.bisq.common.wire.proto.Messages; -import io.bisq.messages.btc.data.RawTransactionInput; -import io.bisq.messages.payment.payload.PaymentAccountContractData; -import io.bisq.messages.protocol.trade.TradeMessage; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import javax.annotation.concurrent.Immutable; -import java.util.ArrayList; -import java.util.List; -import java.util.stream.Collectors; - -@Immutable - -// TODO check if it should not implement MailboxMessage as well? -public final class PublishDepositTxRequest extends TradeMessage { - // That object is sent over the wire, so we need to take care of version compatibility. - private static final long serialVersionUID = Version.P2P_NETWORK_VERSION; - - private static final Logger log = LoggerFactory.getLogger(PublishDepositTxRequest.class); - - public final PaymentAccountContractData offererPaymentAccountContractData; - public final String offererAccountId; - public final String offererContractAsJson; - public final String offererContractSignature; - public final String offererPayoutAddressString; - public final byte[] preparedDepositTx; - public final List offererInputs; - public final byte[] offererMultiSigPubKey; - - public PublishDepositTxRequest(String tradeId, - PaymentAccountContractData offererPaymentAccountContractData, - String offererAccountId, - byte[] offererMultiSigPubKey, - String offererContractAsJson, - String offererContractSignature, - String offererPayoutAddressString, - byte[] preparedDepositTx, - List offererInputs) { - super(tradeId); - this.offererPaymentAccountContractData = offererPaymentAccountContractData; - this.offererAccountId = offererAccountId; - this.offererMultiSigPubKey = offererMultiSigPubKey; - this.offererContractAsJson = offererContractAsJson; - this.offererContractSignature = offererContractSignature; - this.offererPayoutAddressString = offererPayoutAddressString; - this.preparedDepositTx = preparedDepositTx; - this.offererInputs = offererInputs; - - log.trace("offererPaymentAccount size " + Utilities.serialize(offererPaymentAccountContractData).length); - log.trace("offererTradeWalletPubKey size " + offererMultiSigPubKey.length); - log.trace("preparedDepositTx size " + preparedDepositTx.length); - log.trace("offererInputs size " + Utilities.serialize(new ArrayList<>(offererInputs)).length); - } - - @Override - public Messages.Envelope toProtoBuf() { - Messages.Envelope.Builder baseEnvelope = ProtoBufferUtils.getBaseEnvelope(); - return baseEnvelope.setPublishDepositTxRequest(baseEnvelope.getPublishDepositTxRequestBuilder() - .setMessageVersion(getMessageVersion()) - .setTradeId(tradeId) - .setOffererPaymentAccountContractData((Messages.PaymentAccountContractData) offererPaymentAccountContractData.toProtoBuf()) - .setOffererAccountId(offererAccountId) - .setOffererMultiSigPubKey(ByteString.copyFrom(offererMultiSigPubKey)) - .setOffererContractAsJson(offererContractAsJson) - .setOffererContractSignature(offererContractSignature) - .setOffererPayoutAddressstring(offererPayoutAddressString) - .setPreparedDepositTx(ByteString.copyFrom(preparedDepositTx)) - .addAllOffererInputs(offererInputs.stream().map(rawTransactionInput -> rawTransactionInput.toProtoBuf()).collect(Collectors.toList()))).build(); - } -} diff --git a/network/src/main/java/io/bisq/messages/trade/statistics/payload/TradeStatistics.java b/network/src/main/java/io/bisq/messages/trade/statistics/payload/TradeStatistics.java deleted file mode 100644 index 9ebec8b10d..0000000000 --- a/network/src/main/java/io/bisq/messages/trade/statistics/payload/TradeStatistics.java +++ /dev/null @@ -1,208 +0,0 @@ -package io.bisq.messages.trade.statistics.payload; - -import io.bisq.app.Capabilities; -import io.bisq.app.Version; -import io.bisq.common.crypto.PubKeyRing; -import io.bisq.common.util.JsonExclude; -import io.bisq.common.wire.proto.Messages; -import io.bisq.messages.trade.offer.payload.Offer; -import io.bisq.p2p.storage.payload.CapabilityRequiringPayload; -import io.bisq.p2p.storage.payload.LazyProcessedStoragePayload; -import io.bisq.p2p.storage.payload.PersistedStoragePayload; -import org.bitcoinj.core.Coin; -import org.bitcoinj.utils.ExchangeRate; -import org.bitcoinj.utils.Fiat; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import javax.annotation.concurrent.Immutable; -import java.security.PublicKey; -import java.util.Arrays; -import java.util.Date; -import java.util.List; -import java.util.concurrent.TimeUnit; - -@Immutable -public final class TradeStatistics implements LazyProcessedStoragePayload, CapabilityRequiringPayload, PersistedStoragePayload { - private static final Logger log = LoggerFactory.getLogger(TradeStatistics.class); - - @JsonExclude - private static final long serialVersionUID = Version.P2P_NETWORK_VERSION; - @JsonExclude - public static final long TTL = TimeUnit.DAYS.toMillis(30); - - public final String currency; - public final Offer.Direction direction; - public final long tradePrice; - public final long tradeAmount; - public final long tradeDate; - public final String paymentMethod; - public final long offerDate; - public final boolean useMarketBasedPrice; - public final double marketPriceMargin; - public final long offerAmount; - public final long offerMinAmount; - public final String offerId; - public final String depositTxId; - @JsonExclude - public final PubKeyRing pubKeyRing; - - public TradeStatistics(Offer offer, Fiat tradePrice, Coin tradeAmount, Date tradeDate, String depositTxId, PubKeyRing pubKeyRing) { - this(offer.getDirection(), offer.getCurrencyCode(), offer.getPaymentMethod().getId(), offer.getDate().getTime() - , offer.getUseMarketBasedPrice(), offer.getMarketPriceMargin(), offer.getAmount().value, - offer.getMinAmount().value, offer.getId(), tradePrice.longValue(), tradeAmount.value, - tradeDate.getTime(), depositTxId, pubKeyRing); - } - - public TradeStatistics(Offer.Direction direction, String offerCurrency, String offerPaymentMethod, - long offerDate, boolean offerUseMarketBasedPrice, double offerMarketPriceMargin, - long offerAmount, long offerMinAmount, String offerId, long tradePrice, long tradeAmount, - long tradeDate, - String depositTxId, PubKeyRing pubKeyRing) { - this.direction = direction; - this.currency = offerCurrency; - this.paymentMethod = offerPaymentMethod; - this.offerDate = offerDate; - this.useMarketBasedPrice = offerUseMarketBasedPrice; - this.marketPriceMargin = offerMarketPriceMargin; - this.offerAmount = offerAmount; - this.offerMinAmount = offerMinAmount; - this.offerId = offerId; - - this.tradePrice = tradePrice; - this.tradeAmount = tradeAmount; - this.tradeDate = tradeDate; - this.depositTxId = depositTxId; - this.pubKeyRing = pubKeyRing; - } - - - @Override - public long getTTL() { - return TTL; - } - - @Override - public PublicKey getOwnerPubKey() { - return pubKeyRing.getSignaturePubKey(); - } - - @Override - public List getRequiredCapabilities() { - return Arrays.asList( - Capabilities.Capability.TRADE_STATISTICS.ordinal() - ); - } - - public Date getTradeDate() { - return new Date(tradeDate); - } - - public Fiat getTradePrice() { - return Fiat.valueOf(currency, tradePrice); - } - - public Coin getTradeAmount() { - return Coin.valueOf(tradeAmount); - } - - public Fiat getTradeVolume() { - return new ExchangeRate(getTradePrice()).coinToFiat(getTradeAmount()); - } - - public String getOfferId() { - return offerId; - } - - @Override - public Messages.StoragePayload toProtoBuf() { - return Messages.StoragePayload.newBuilder().setTradeStatistics(Messages.TradeStatistics.newBuilder() - .setTTL(TTL) - .setCurrency(currency) - .setDirection(Messages.Offer.Direction.forNumber(direction.ordinal())) - .setTradePrice(tradePrice) - .setTradeAmount(tradeAmount) - .setTradeDate(tradeDate) - .setPaymentMethod(paymentMethod) - .setOfferDate(offerDate) - .setUseMarketBasedPrice(useMarketBasedPrice) - .setMarketPriceMargin(marketPriceMargin) - .setOfferAmount(offerAmount) - .setOfferMinAmount(offerMinAmount) - .setOfferId(offerId) - .setDepositTxId(depositTxId) - .setPubKeyRing((Messages.PubKeyRing) pubKeyRing.toProtoBuf())).build(); - } - - - // We don't include the pubKeyRing as both traders might publish it if the offerer uses an old - // version and update later (taker publishes first, then later offerer) - // We also don't include the trade date as that is set locally and different for offerer and taker - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (!(o instanceof TradeStatistics)) return false; - - TradeStatistics that = (TradeStatistics) o; - - if (tradePrice != that.tradePrice) return false; - if (tradeAmount != that.tradeAmount) return false; - if (offerDate != that.offerDate) return false; - if (useMarketBasedPrice != that.useMarketBasedPrice) return false; - if (Double.compare(that.marketPriceMargin, marketPriceMargin) != 0) return false; - if (offerAmount != that.offerAmount) return false; - if (offerMinAmount != that.offerMinAmount) return false; - if (currency != null ? !currency.equals(that.currency) : that.currency != null) return false; - - if (direction != null && that.direction != null && direction.ordinal() != that.direction.ordinal()) - return false; - else if ((direction == null && that.direction != null) || (direction != null && that.direction == null)) - return false; - - if (paymentMethod != null ? !paymentMethod.equals(that.paymentMethod) : that.paymentMethod != null) - return false; - if (getOfferId() != null ? !getOfferId().equals(that.getOfferId()) : that.getOfferId() != null) return false; - return !(depositTxId != null ? !depositTxId.equals(that.depositTxId) : that.depositTxId != null); - } - - @Override - public int hashCode() { - int result; - long temp; - result = currency != null ? currency.hashCode() : 0; - result = 31 * result + (direction != null ? direction.ordinal() : 0); - result = 31 * result + (int) (tradePrice ^ (tradePrice >>> 32)); - result = 31 * result + (int) (tradeAmount ^ (tradeAmount >>> 32)); - result = 31 * result + (paymentMethod != null ? paymentMethod.hashCode() : 0); - result = 31 * result + (int) (offerDate ^ (offerDate >>> 32)); - result = 31 * result + (useMarketBasedPrice ? 1 : 0); - temp = Double.doubleToLongBits(marketPriceMargin); - result = 31 * result + (int) (temp ^ (temp >>> 32)); - result = 31 * result + (int) (offerAmount ^ (offerAmount >>> 32)); - result = 31 * result + (int) (offerMinAmount ^ (offerMinAmount >>> 32)); - result = 31 * result + (getOfferId() != null ? getOfferId().hashCode() : 0); - result = 31 * result + (depositTxId != null ? depositTxId.hashCode() : 0); - return result; - } - - @Override - public String toString() { - return "TradeStatistics{" + - "currency='" + currency + '\'' + - ", direction=" + direction + - ", tradePrice=" + tradePrice + - ", tradeAmount=" + tradeAmount + - ", tradeDate=" + tradeDate + - ", paymentMethod='" + paymentMethod + '\'' + - ", offerDate=" + offerDate + - ", useMarketBasedPrice=" + useMarketBasedPrice + - ", marketPriceMargin=" + marketPriceMargin + - ", offerAmount=" + offerAmount + - ", offerMinAmount=" + offerMinAmount + - ", offerId='" + getOfferId() + '\'' + - ", depositTxId='" + depositTxId + '\'' + - ", pubKeyRing=" + pubKeyRing + - ", hashCode=" + hashCode() + - '}'; - } -} diff --git a/network/src/main/java/io/bisq/messages/user/BlockChainExplorer.java b/network/src/main/java/io/bisq/messages/user/BlockChainExplorer.java deleted file mode 100644 index a9547a3eba..0000000000 --- a/network/src/main/java/io/bisq/messages/user/BlockChainExplorer.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * This file is part of bisq. - * - * bisq is free software: you can redistribute it and/or modify it - * under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or (at - * your option) any later version. - * - * bisq is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public - * License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with bisq. If not, see . - */ - -package io.bisq.messages.user; - -import io.bisq.app.Version; -import io.bisq.common.persistance.Persistable; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public final class BlockChainExplorer implements Persistable { - // That object is saved to disc. We need to take care of changes to not break deserialization. - private static final long serialVersionUID = Version.LOCAL_DB_VERSION; - - private static final Logger log = LoggerFactory.getLogger(BlockChainExplorer.class); - - public final String name; - public final String txUrl; - public final String addressUrl; - - public BlockChainExplorer(String name, String txUrl, String addressUrl) { - this.name = name; - this.txUrl = txUrl; - this.addressUrl = addressUrl; - } -} diff --git a/network/src/main/java/io/bisq/messages/user/Preferences.java b/network/src/main/java/io/bisq/messages/user/Preferences.java deleted file mode 100644 index 352f8ab9d4..0000000000 --- a/network/src/main/java/io/bisq/messages/user/Preferences.java +++ /dev/null @@ -1,716 +0,0 @@ -/* - * This file is part of bisq. - * - * bisq is free software: you can redistribute it and/or modify it - * under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or (at - * your option) any later version. - * - * bisq is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public - * License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with bisq. If not, see . - */ - -package io.bisq.messages.user; - -import io.bisq.app.BisqEnvironment; -import io.bisq.app.DevEnv; -import io.bisq.app.Version; -import io.bisq.common.persistance.Persistable; -import io.bisq.common.util.Utilities; -import io.bisq.locale.Res; -import io.bisq.messages.btc.BitcoinNetwork; -import io.bisq.messages.btc.BtcOptionKeys; -import io.bisq.messages.btc.Restrictions; -import io.bisq.messages.btc.provider.fee.FeeService; -import io.bisq.messages.locale.*; -import io.bisq.storage.Storage; -import javafx.beans.property.*; -import javafx.collections.FXCollections; -import javafx.collections.ListChangeListener; -import javafx.collections.ObservableList; -import org.bitcoinj.core.Coin; -import org.bitcoinj.utils.MonetaryFormat; -import org.jetbrains.annotations.NotNull; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import javax.inject.Inject; -import javax.inject.Named; -import java.util.*; - -public final class Preferences implements Persistable { - // That object is saved to disc. We need to take care of changes to not break deserialization. - private static final long serialVersionUID = Version.LOCAL_DB_VERSION; - - private static final Logger log = LoggerFactory.getLogger(Preferences.class); - - public static Preferences INSTANCE; - - - static { - defaultLocale = Locale.getDefault(); - Res.applyLocaleToResourceBundle(getDefaultLocale()); - } - - - // Deactivate mBit for now as most screens are not supporting it yet - private static final List BTC_DENOMINATIONS = Arrays.asList(MonetaryFormat.CODE_BTC/*, MonetaryFormat.CODE_MBTC*/); - - transient static final private ArrayList blockChainExplorersTestNet = new ArrayList<>(Arrays.asList( - new BlockChainExplorer("Blocktrail", "https://www.blocktrail.com/tBTC/tx/", "https://www.blocktrail.com/tBTC/address/"), - new BlockChainExplorer("Blockexplorer", "https://blockexplorer.com/testnet/tx/", "https://blockexplorer.com/testnet/address/"), - new BlockChainExplorer("Blockr.io", "https://tbtc.blockr.io/tx/info/", "https://tbtc.blockr.io/address/info/"), - new BlockChainExplorer("Biteasy", "https://www.biteasy.com/testnet/transactions/", "https://www.biteasy.com/testnet/addresses/"), - new BlockChainExplorer("Smartbit", "https://testnet.smartbit.com.au/tx/", "https://testnet.smartbit.com.au/address/"), - new BlockChainExplorer("SoChain. Wow.", "https://chain.so/tx/BTCTEST/", "https://chain.so/address/BTCTEST/") - )); - - transient static final private ArrayList blockChainExplorersMainNet = new ArrayList<>(Arrays.asList( - new BlockChainExplorer("Tradeblock.com", "https://tradeblock.com/bitcoin/tx/", "https://tradeblock.com/bitcoin/address/"), - new BlockChainExplorer("Blocktrail", "https://www.blocktrail.com/BTC/tx/", "https://www.blocktrail.com/BTC/address/"), - new BlockChainExplorer("Insight", "https://insight.bitpay.com/tx/", "https://insight.bitpay.com/address/"), - new BlockChainExplorer("Blockchain.info", "https://blockchain.info/tx/", "https://blockchain.info/address/"), - new BlockChainExplorer("Blockexplorer", "https://blockexplorer.com/tx/", "https://blockexplorer.com/address/"), - new BlockChainExplorer("Blockr.io", "https://btc.blockr.io/tx/info/", "https://btc.blockr.io/address/info/"), - new BlockChainExplorer("Biteasy", "https://www.biteasy.com/transactions/", "https://www.biteasy.com/addresses/"), - new BlockChainExplorer("Blockonomics", "https://www.blockonomics.co/api/tx?txid=", "https://www.blockonomics.co/#/search?q="), - new BlockChainExplorer("Chainflyer", "http://chainflyer.bitflyer.jp/Transaction/", "http://chainflyer.bitflyer.jp/Address/"), - new BlockChainExplorer("Smartbit", "https://www.smartbit.com.au/tx/", "https://www.smartbit.com.au/address/"), - new BlockChainExplorer("SoChain. Wow.", "https://chain.so/tx/BTC/", "https://chain.so/address/BTC/"), - new BlockChainExplorer("Bitaps", "https://bitaps.com/", "https://bitaps.com/") - )); - - public static List getBtcDenominations() { - return BTC_DENOMINATIONS; - } - - private static Locale defaultLocale; - - public static Locale getDefaultLocale() { - return defaultLocale; - } - - private static TradeCurrency defaultTradeCurrency = new FiatCurrency(CurrencyUtil.getCurrencyByCountryCode(CountryUtil.getDefaultCountryCode()).getCurrency().getCurrencyCode()); - - public static TradeCurrency getDefaultTradeCurrency() { - return defaultTradeCurrency; - } - - private static boolean staticUseAnimations = true; - - transient private final Storage storage; - transient private final BisqEnvironment bisqEnvironment; - - transient private BitcoinNetwork bitcoinNetwork; - - // Persisted fields - private String userLanguage = LanguageUtil.getDefaultLanguage(); - private Country userCountry = CountryUtil.getDefaultCountry(); - private String btcDenomination = MonetaryFormat.CODE_BTC; - private boolean useAnimations = DevEnv.STRESS_TEST_MODE ? false : true; - private final ArrayList fiatCurrencies; - private final ArrayList cryptoCurrencies; - private BlockChainExplorer blockChainExplorerMainNet; - private BlockChainExplorer blockChainExplorerTestNet; - private String backupDirectory; - private boolean autoSelectArbitrators = true; - private final Map dontShowAgainMap; - private boolean tacAccepted; - private boolean useTorForBitcoinJ = true; - - private boolean showOwnOffersInOfferBook = true; - private Locale preferredLocale; - private TradeCurrency preferredTradeCurrency; - private long withdrawalTxFeeInBytes = 100; - private boolean useCustomWithdrawalTxFee = false; - - private double maxPriceDistanceInPercent; - private String offerBookChartScreenCurrencyCode = CurrencyUtil.getDefaultTradeCurrency().getCode(); - private String tradeChartsScreenCurrencyCode = CurrencyUtil.getDefaultTradeCurrency().getCode(); - - private String buyScreenCurrencyCode = CurrencyUtil.getDefaultTradeCurrency().getCode(); - private String sellScreenCurrencyCode = CurrencyUtil.getDefaultTradeCurrency().getCode(); - private int tradeStatisticsTickUnitIndex = 3; - - private boolean useStickyMarketPrice = false; - private boolean sortMarketCurrenciesNumerically = true; - private boolean usePercentageBasedPrice = true; - private Map peerTagMap = new HashMap<>(); - private String bitcoinNodes = ""; - - private List ignoreTradersList = new ArrayList<>(); - private String directoryChooserPath; - private long securityDepositAsLong = Restrictions.DEFAULT_SECURITY_DEPOSIT.value; - - // Observable wrappers - transient private final StringProperty btcDenominationProperty = new SimpleStringProperty(btcDenomination); - transient private final BooleanProperty useAnimationsProperty = new SimpleBooleanProperty(useAnimations); - transient private final BooleanProperty useCustomWithdrawalTxFeeProperty = new SimpleBooleanProperty(useCustomWithdrawalTxFee); - transient private final LongProperty withdrawalTxFeeInBytesProperty = new SimpleLongProperty(withdrawalTxFeeInBytes); - transient private final ObservableList fiatCurrenciesAsObservable = FXCollections.observableArrayList(); - transient private final ObservableList cryptoCurrenciesAsObservable = FXCollections.observableArrayList(); - transient private final ObservableList tradeCurrenciesAsObservable = FXCollections.observableArrayList(); - - - /////////////////////////////////////////////////////////////////////////////////////////// - // Constructor - /////////////////////////////////////////////////////////////////////////////////////////// - - @SuppressWarnings("WeakerAccess") - @Inject - public Preferences(Storage storage, BisqEnvironment bisqEnvironment, - FeeService feeService, - @Named(BtcOptionKeys.BTC_NODES) String btcNodesFromOptions, - @Named(BtcOptionKeys.USE_TOR_FOR_BTC) String useTorFlagFromOptions) { - INSTANCE = this; - this.storage = storage; - this.bisqEnvironment = bisqEnvironment; - - directoryChooserPath = Utilities.getSystemHomeDirectory(); - - fiatCurrencies = new ArrayList<>(fiatCurrenciesAsObservable); - cryptoCurrencies = new ArrayList<>(cryptoCurrenciesAsObservable); - - btcDenominationProperty.addListener((ov) -> { - btcDenomination = btcDenominationProperty.get(); - storage.queueUpForSave(); - }); - useAnimationsProperty.addListener((ov) -> { - useAnimations = useAnimationsProperty.get(); - staticUseAnimations = useAnimations; - storage.queueUpForSave(); - }); - fiatCurrenciesAsObservable.addListener((javafx.beans.Observable ov) -> { - fiatCurrencies.clear(); - fiatCurrencies.addAll(fiatCurrenciesAsObservable); - fiatCurrencies.sort(TradeCurrency::compareTo); - storage.queueUpForSave(); - }); - cryptoCurrenciesAsObservable.addListener((javafx.beans.Observable ov) -> { - cryptoCurrencies.clear(); - cryptoCurrencies.addAll(cryptoCurrenciesAsObservable); - cryptoCurrencies.sort(TradeCurrency::compareTo); - storage.queueUpForSave(); - }); - - useCustomWithdrawalTxFeeProperty.addListener((ov) -> { - useCustomWithdrawalTxFee = useCustomWithdrawalTxFeeProperty.get(); - storage.queueUpForSave(); - }); - - withdrawalTxFeeInBytesProperty.addListener((ov) -> { - withdrawalTxFeeInBytes = withdrawalTxFeeInBytesProperty.get(); - storage.queueUpForSave(); - }); - - Preferences persisted = storage.initAndGetPersisted(this); - if (persisted != null) { - setBtcDenomination(persisted.btcDenomination); - setUseAnimations(persisted.useAnimations); - - setFiatCurrencies(persisted.fiatCurrencies); - setCryptoCurrencies(persisted.cryptoCurrencies); - - setBlockChainExplorerTestNet(persisted.getBlockChainExplorerTestNet()); - setBlockChainExplorerMainNet(persisted.getBlockChainExplorerMainNet()); - - setUseCustomWithdrawalTxFee(persisted.useCustomWithdrawalTxFee); - setWithdrawalTxFeeInBytes(persisted.withdrawalTxFeeInBytes); - - // In case of an older version without that data we set it to defaults - if (blockChainExplorerTestNet == null) - setBlockChainExplorerTestNet(blockChainExplorersTestNet.get(0)); - if (blockChainExplorerMainNet == null) - setBlockChainExplorerTestNet(blockChainExplorersMainNet.get(0)); - - backupDirectory = persisted.getBackupDirectory(); - autoSelectArbitrators = persisted.getAutoSelectArbitrators(); - dontShowAgainMap = persisted.getDontShowAgainMap(); - tacAccepted = persisted.getTacAccepted(); - - userLanguage = persisted.getUserLanguage(); - if (userLanguage == null) - userLanguage = LanguageUtil.getDefaultLanguage(); - userCountry = persisted.getUserCountry(); - if (userCountry == null) - userCountry = CountryUtil.getDefaultCountry(); - updateDefaultLocale(); - preferredTradeCurrency = persisted.getPreferredTradeCurrency(); - defaultTradeCurrency = preferredTradeCurrency; - useTorForBitcoinJ = persisted.getUseTorForBitcoinJ(); - - useStickyMarketPrice = persisted.getUseStickyMarketPrice(); - sortMarketCurrenciesNumerically = persisted.getSortMarketCurrenciesNumerically(); - - usePercentageBasedPrice = persisted.getUsePercentageBasedPrice(); - showOwnOffersInOfferBook = persisted.getShowOwnOffersInOfferBook(); - maxPriceDistanceInPercent = persisted.getMaxPriceDistanceInPercent(); - - bitcoinNodes = persisted.getBitcoinNodes(); - if (bitcoinNodes == null) - bitcoinNodes = ""; - - if (persisted.getPeerTagMap() != null) - peerTagMap = persisted.getPeerTagMap(); - - offerBookChartScreenCurrencyCode = persisted.getOfferBookChartScreenCurrencyCode(); - buyScreenCurrencyCode = persisted.getBuyScreenCurrencyCode(); - sellScreenCurrencyCode = persisted.getSellScreenCurrencyCode(); - tradeChartsScreenCurrencyCode = persisted.getTradeChartsScreenCurrencyCode(); - tradeStatisticsTickUnitIndex = persisted.getTradeStatisticsTickUnitIndex(); - - if (persisted.getIgnoreTradersList() != null) - ignoreTradersList = persisted.getIgnoreTradersList(); - - if (persisted.getDirectoryChooserPath() != null) - directoryChooserPath = persisted.getDirectoryChooserPath(); - - securityDepositAsLong = persisted.getSecurityDepositAsLong(); - } else { - setFiatCurrencies(CurrencyUtil.getAllMainFiatCurrencies()); - setCryptoCurrencies(CurrencyUtil.getMainCryptoCurrencies()); - - setBlockChainExplorerTestNet(blockChainExplorersTestNet.get(0)); - setBlockChainExplorerMainNet(blockChainExplorersMainNet.get(0)); - - dontShowAgainMap = new HashMap<>(); - preferredLocale = getDefaultLocale(); - preferredTradeCurrency = getDefaultTradeCurrency(); - maxPriceDistanceInPercent = 0.1; - - storage.queueUpForSave(); - } - - this.bitcoinNetwork = bisqEnvironment.getBitcoinNetwork(); - - fiatCurrenciesAsObservable.addListener(this::updateTradeCurrencies); - cryptoCurrenciesAsObservable.addListener(this::updateTradeCurrencies); - tradeCurrenciesAsObservable.addAll(fiatCurrencies); - tradeCurrenciesAsObservable.addAll(cryptoCurrencies); - - // Override settings with options if set - if (useTorFlagFromOptions != null && !useTorFlagFromOptions.isEmpty()) { - if (useTorFlagFromOptions.equals("false")) - setUseTorForBitcoinJ(false); - else if (useTorFlagFromOptions.equals("true")) - setUseTorForBitcoinJ(true); - } - - if (btcNodesFromOptions != null && !btcNodesFromOptions.isEmpty()) - setBitcoinNodes(btcNodesFromOptions); - - if (bitcoinNodes.equals("127.0.0.1") || bitcoinNodes.equals("localhost")) - setUseTorForBitcoinJ(false); - } - - public void dontShowAgain(String key, boolean dontShowAgain) { - dontShowAgainMap.put(key, dontShowAgain); - storage.queueUpForSave(); - } - - public void resetDontShowAgainForType() { - dontShowAgainMap.clear(); - storage.queueUpForSave(); - } - - - /////////////////////////////////////////////////////////////////////////////////////////// - // Setter - /////////////////////////////////////////////////////////////////////////////////////////// - - public void setBtcDenomination(String btcDenomination) { - this.btcDenominationProperty.set(btcDenomination); - } - - public void setUseAnimations(boolean useAnimations) { - this.useAnimationsProperty.set(useAnimations); - } - - public void setBitcoinNetwork(BitcoinNetwork bitcoinNetwork) { - if (this.bitcoinNetwork != bitcoinNetwork) - bisqEnvironment.saveBitcoinNetwork(bitcoinNetwork); - - this.bitcoinNetwork = bitcoinNetwork; - - // We don't store the bitcoinNetwork locally as BitcoinNetwork is not serializable! - } - - public void addFiatCurrency(FiatCurrency tradeCurrency) { - if (!fiatCurrenciesAsObservable.contains(tradeCurrency)) - fiatCurrenciesAsObservable.add(tradeCurrency); - } - - public void removeFiatCurrency(FiatCurrency tradeCurrency) { - if (tradeCurrenciesAsObservable.size() > 1) { - if (fiatCurrenciesAsObservable.contains(tradeCurrency)) - fiatCurrenciesAsObservable.remove(tradeCurrency); - - if (preferredTradeCurrency.equals(tradeCurrency)) - setPreferredTradeCurrency(tradeCurrenciesAsObservable.get(0)); - } else { - log.error("you cannot remove the last currency"); - } - } - - public void addCryptoCurrency(CryptoCurrency tradeCurrency) { - if (!cryptoCurrenciesAsObservable.contains(tradeCurrency)) - cryptoCurrenciesAsObservable.add(tradeCurrency); - } - - public void removeCryptoCurrency(CryptoCurrency tradeCurrency) { - if (tradeCurrenciesAsObservable.size() > 1) { - if (cryptoCurrenciesAsObservable.contains(tradeCurrency)) - cryptoCurrenciesAsObservable.remove(tradeCurrency); - - if (preferredTradeCurrency.equals(tradeCurrency)) - setPreferredTradeCurrency(tradeCurrenciesAsObservable.get(0)); - } else { - log.error("you cannot remove the last currency"); - } - } - - public void setBlockChainExplorer(BlockChainExplorer blockChainExplorer) { - if (bitcoinNetwork == BitcoinNetwork.MAINNET) - setBlockChainExplorerMainNet(blockChainExplorer); - else - setBlockChainExplorerTestNet(blockChainExplorer); - } - - public void setTacAccepted(boolean tacAccepted) { - this.tacAccepted = tacAccepted; - storage.queueUpForSave(); - } - - public void setUserLanguage(@NotNull String userLanguageCode) { - this.userLanguage = userLanguageCode; - updateDefaultLocale(); - storage.queueUpForSave(); - } - - public void setUserCountry(@NotNull Country userCountry) { - this.userCountry = userCountry; - updateDefaultLocale(); - storage.queueUpForSave(); - } - - public void setPreferredTradeCurrency(TradeCurrency preferredTradeCurrency) { - if (preferredTradeCurrency != null) { - this.preferredTradeCurrency = preferredTradeCurrency; - defaultTradeCurrency = preferredTradeCurrency; - storage.queueUpForSave(); - } - } - - public void setUseTorForBitcoinJ(boolean useTorForBitcoinJ) { - this.useTorForBitcoinJ = useTorForBitcoinJ; - storage.queueUpForSave(); - } - - public void setShowOwnOffersInOfferBook(boolean showOwnOffersInOfferBook) { - this.showOwnOffersInOfferBook = showOwnOffersInOfferBook; - storage.queueUpForSave(); - } - - public void setMaxPriceDistanceInPercent(double maxPriceDistanceInPercent) { - this.maxPriceDistanceInPercent = maxPriceDistanceInPercent; - storage.queueUpForSave(); - } - - public void setBackupDirectory(String backupDirectory) { - this.backupDirectory = backupDirectory; - storage.queueUpForSave(); - } - - public void setAutoSelectArbitrators(boolean autoSelectArbitrators) { - this.autoSelectArbitrators = autoSelectArbitrators; - storage.queueUpForSave(); - } - - public void setUsePercentageBasedPrice(boolean usePercentageBasedPrice) { - this.usePercentageBasedPrice = usePercentageBasedPrice; - storage.queueUpForSave(); - } - - public void setTagForPeer(String hostName, String tag) { - peerTagMap.put(hostName, tag); - storage.queueUpForSave(); - } - - public void setOfferBookChartScreenCurrencyCode(String offerBookChartScreenCurrencyCode) { - this.offerBookChartScreenCurrencyCode = offerBookChartScreenCurrencyCode; - storage.queueUpForSave(); - } - - public void setBuyScreenCurrencyCode(String buyScreenCurrencyCode) { - this.buyScreenCurrencyCode = buyScreenCurrencyCode; - storage.queueUpForSave(); - } - - public void setSellScreenCurrencyCode(String sellScreenCurrencyCode) { - this.sellScreenCurrencyCode = sellScreenCurrencyCode; - storage.queueUpForSave(); - } - - public void setIgnoreTradersList(List ignoreTradersList) { - this.ignoreTradersList = ignoreTradersList; - storage.queueUpForSave(); - } - - public void setDirectoryChooserPath(String directoryChooserPath) { - this.directoryChooserPath = directoryChooserPath; - storage.queueUpForSave(); - } - - public void setTradeChartsScreenCurrencyCode(String tradeChartsScreenCurrencyCode) { - this.tradeChartsScreenCurrencyCode = tradeChartsScreenCurrencyCode; - storage.queueUpForSave(); - } - - public void setTradeStatisticsTickUnitIndex(int tradeStatisticsTickUnitIndex) { - this.tradeStatisticsTickUnitIndex = tradeStatisticsTickUnitIndex; - storage.queueUpForSave(); - } - - public void setSortMarketCurrenciesNumerically(boolean sortMarketCurrenciesNumerically) { - this.sortMarketCurrenciesNumerically = sortMarketCurrenciesNumerically; - storage.queueUpForSave(); - } - - public void setBitcoinNodes(String bitcoinNodes) { - this.bitcoinNodes = bitcoinNodes; - storage.queueUpForSave(50); - } - - public void setUseCustomWithdrawalTxFee(boolean useCustomWithdrawalTxFee) { - useCustomWithdrawalTxFeeProperty.set(useCustomWithdrawalTxFee); - } - - public void setWithdrawalTxFeeInBytes(long withdrawalTxFeeInBytes) { - withdrawalTxFeeInBytesProperty.set(withdrawalTxFeeInBytes); - } - - public void setSecurityDepositAsLong(long securityDepositAsLong) { - this.securityDepositAsLong = securityDepositAsLong; - storage.queueUpForSave(); - } - - - /////////////////////////////////////////////////////////////////////////////////////////// - // Getter - /////////////////////////////////////////////////////////////////////////////////////////// - - public String getBtcDenomination() { - return btcDenominationProperty.get(); - } - - public StringProperty btcDenominationProperty() { - return btcDenominationProperty; - } - - public boolean getUseAnimations() { - return useAnimationsProperty.get(); - } - - public BooleanProperty useAnimationsProperty() { - return useAnimationsProperty; - } - - public static boolean useAnimations() { - return staticUseAnimations; - } - - public BitcoinNetwork getBitcoinNetwork() { - return bitcoinNetwork; - } - - public ObservableList getFiatCurrenciesAsObservable() { - return fiatCurrenciesAsObservable; - } - - public ObservableList getCryptoCurrenciesAsObservable() { - return cryptoCurrenciesAsObservable; - } - - public ObservableList getTradeCurrenciesAsObservable() { - return tradeCurrenciesAsObservable; - } - - public BlockChainExplorer getBlockChainExplorerTestNet() { - return blockChainExplorerTestNet; - } - - public BlockChainExplorer getBlockChainExplorerMainNet() { - return blockChainExplorerMainNet; - } - - public BlockChainExplorer getBlockChainExplorer() { - if (bitcoinNetwork == BitcoinNetwork.MAINNET) - return blockChainExplorerMainNet; - else - return blockChainExplorerTestNet; - } - - public ArrayList getBlockChainExplorers() { - if (bitcoinNetwork == BitcoinNetwork.MAINNET) - return blockChainExplorersMainNet; - else - return blockChainExplorersTestNet; - } - - public String getBackupDirectory() { - return backupDirectory; - } - - public boolean getAutoSelectArbitrators() { - return autoSelectArbitrators; - } - - public Map getDontShowAgainMap() { - return dontShowAgainMap; - } - - public boolean showAgain(String key) { - return !dontShowAgainMap.containsKey(key) || !dontShowAgainMap.get(key); - } - - public boolean getTacAccepted() { - return tacAccepted; - } - - public String getUserLanguage() { - return userLanguage; - } - - public TradeCurrency getPreferredTradeCurrency() { - return preferredTradeCurrency; - } - - public boolean getUseTorForBitcoinJ() { - return useTorForBitcoinJ; - } - - public boolean getShowOwnOffersInOfferBook() { - return showOwnOffersInOfferBook; - } - - public double getMaxPriceDistanceInPercent() { - return maxPriceDistanceInPercent; - } - - public boolean getUseStickyMarketPrice() { - return useStickyMarketPrice; - } - - public boolean getUsePercentageBasedPrice() { - return usePercentageBasedPrice; - } - - public Map getPeerTagMap() { - return peerTagMap; - } - - public String getOfferBookChartScreenCurrencyCode() { - return offerBookChartScreenCurrencyCode; - } - - public String getBuyScreenCurrencyCode() { - return buyScreenCurrencyCode; - } - - public String getSellScreenCurrencyCode() { - return sellScreenCurrencyCode; - } - - public List getIgnoreTradersList() { - return ignoreTradersList; - } - - public String getDirectoryChooserPath() { - return directoryChooserPath; - } - - public String getTradeChartsScreenCurrencyCode() { - return tradeChartsScreenCurrencyCode; - } - - public int getTradeStatisticsTickUnitIndex() { - return tradeStatisticsTickUnitIndex; - } - - public boolean getSortMarketCurrenciesNumerically() { - return sortMarketCurrenciesNumerically; - } - - public String getBitcoinNodes() { - return bitcoinNodes; - } - - public boolean getUseCustomWithdrawalTxFee() { - return useCustomWithdrawalTxFeeProperty.get(); - } - - public BooleanProperty useCustomWithdrawalTxFeeProperty() { - return useCustomWithdrawalTxFeeProperty; - } - - public LongProperty withdrawalTxFeeInBytesProperty() { - return withdrawalTxFeeInBytesProperty; - } - - public long getWithdrawalTxFeeInBytes() { - return withdrawalTxFeeInBytesProperty.get(); - } - - public long getSecurityDepositAsLong() { - return securityDepositAsLong; - } - - public Coin getSecurityDepositAsCoin() { - return Coin.valueOf(securityDepositAsLong); - } - - public Country getUserCountry() { - return userCountry; - } - - - /////////////////////////////////////////////////////////////////////////////////////////// - // Private - /////////////////////////////////////////////////////////////////////////////////////////// - - private void updateTradeCurrencies(ListChangeListener.Change change) { - change.next(); - if (change.wasAdded() && change.getAddedSize() == 1) - tradeCurrenciesAsObservable.add(change.getAddedSubList().get(0)); - else if (change.wasRemoved() && change.getRemovedSize() == 1) - tradeCurrenciesAsObservable.remove(change.getRemoved().get(0)); - } - - private void setFiatCurrencies(List currencies) { - fiatCurrenciesAsObservable.setAll(currencies); - } - - private void setCryptoCurrencies(List currencies) { - cryptoCurrenciesAsObservable.setAll(currencies); - } - - private void setBlockChainExplorerTestNet(BlockChainExplorer blockChainExplorerTestNet) { - this.blockChainExplorerTestNet = blockChainExplorerTestNet; - storage.queueUpForSave(); - } - - private void setBlockChainExplorerMainNet(BlockChainExplorer blockChainExplorerMainNet) { - this.blockChainExplorerMainNet = blockChainExplorerMainNet; - storage.queueUpForSave(); - } - - private void updateDefaultLocale() { - defaultLocale = new Locale(userLanguage, userCountry.code); - Res.applyLocaleToResourceBundle(defaultLocale); - } -} diff --git a/network/src/main/java/io/bisq/messages/util/Validator.java b/network/src/main/java/io/bisq/messages/util/Validator.java deleted file mode 100644 index 30dd8acc28..0000000000 --- a/network/src/main/java/io/bisq/messages/util/Validator.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * This file is part of bisq. - * - * bisq is free software: you can redistribute it and/or modify it - * under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or (at - * your option) any later version. - * - * bisq is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public - * License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with bisq. If not, see . - */ - -package io.bisq.messages.util; - -import io.bisq.messages.protocol.trade.TradeMessage; -import org.bitcoinj.core.Coin; - -import static com.google.common.base.Preconditions.checkArgument; -import static com.google.common.base.Preconditions.checkNotNull; - -/** - * Utility class for validating domain data. - */ -public class Validator { - - public static String nonEmptyStringOf(String value) { - checkNotNull(value); - checkArgument(value.length() > 0); - return value; - } - - public static long nonNegativeLongOf(long value) { - checkArgument(value >= 0); - return value; - } - - public static Coin nonZeroCoinOf(Coin value) { - checkNotNull(value); - checkArgument(!value.isZero()); - return value; - } - - public static Coin positiveCoinOf(Coin value) { - checkNotNull(value); - checkArgument(value.isPositive()); - return value; - } - - public static void checkTradeId(String tradeId, TradeMessage tradeMessage) { - checkArgument(tradeId.equals(tradeMessage.tradeId)); - } -} diff --git a/network/src/main/java/io/bisq/p2p/NetworkNotReadyException.java b/network/src/main/java/io/bisq/p2p/NetworkNotReadyException.java index 13e9e547d7..90387b3e71 100644 --- a/network/src/main/java/io/bisq/p2p/NetworkNotReadyException.java +++ b/network/src/main/java/io/bisq/p2p/NetworkNotReadyException.java @@ -1,6 +1,6 @@ package io.bisq.p2p; -class NetworkNotReadyException extends RuntimeException { +public class NetworkNotReadyException extends RuntimeException { public NetworkNotReadyException() { super("You must have bootstrapped before adding data to the P2P network."); diff --git a/network/src/main/java/io/bisq/p2p/P2PModule.java b/network/src/main/java/io/bisq/p2p/P2PModule.java index cd005b88cc..2663b7f9a8 100644 --- a/network/src/main/java/io/bisq/p2p/P2PModule.java +++ b/network/src/main/java/io/bisq/p2p/P2PModule.java @@ -23,6 +23,7 @@ import io.bisq.app.AppModule; import io.bisq.network.NetworkOptionKeys; import io.bisq.network.Socks5ProxyProvider; import io.bisq.p2p.seed.SeedNodesRepository; +import io.bisq.p2p.storage.P2PService; import org.springframework.core.env.Environment; import java.io.File; diff --git a/network/src/main/java/io/bisq/p2p/messaging/SendMailboxMessageListener.java b/network/src/main/java/io/bisq/p2p/messaging/SendMailboxMessageListener.java deleted file mode 100644 index 3d6966c079..0000000000 --- a/network/src/main/java/io/bisq/p2p/messaging/SendMailboxMessageListener.java +++ /dev/null @@ -1,9 +0,0 @@ -package io.bisq.p2p.messaging; - -public interface SendMailboxMessageListener { - void onArrived(); - - void onStoredInMailbox(); - - void onFault(String errorMessage); -} diff --git a/network/src/main/java/io/bisq/p2p/messaging/SupportedCapabilitiesMessage.java b/network/src/main/java/io/bisq/p2p/messaging/SupportedCapabilitiesMessage.java deleted file mode 100644 index 3b04c8e6fe..0000000000 --- a/network/src/main/java/io/bisq/p2p/messaging/SupportedCapabilitiesMessage.java +++ /dev/null @@ -1,11 +0,0 @@ -package io.bisq.p2p.messaging; - -import io.bisq.messages.Message; - -import javax.annotation.Nullable; -import java.util.ArrayList; - -public interface SupportedCapabilitiesMessage extends Message { - @Nullable - ArrayList getSupportedCapabilities(); -} diff --git a/network/src/main/java/io/bisq/p2p/network/Connection.java b/network/src/main/java/io/bisq/p2p/network/Connection.java index e9c6755e70..c03948758d 100644 --- a/network/src/main/java/io/bisq/p2p/network/Connection.java +++ b/network/src/main/java/io/bisq/p2p/network/Connection.java @@ -9,12 +9,12 @@ import io.bisq.common.UserThread; import io.bisq.common.util.Tuple2; import io.bisq.common.util.Utilities; import io.bisq.common.wire.proto.Messages; +import io.bisq.messages.CloseConnectionMessage; import io.bisq.messages.Message; -import io.bisq.p2p.NodeAddress; -import io.bisq.p2p.messaging.PrefixedSealedAndSignedMessage; -import io.bisq.p2p.messaging.SupportedCapabilitiesMessage; -import io.bisq.p2p.network.messages.CloseConnectionMessage; -import io.bisq.p2p.network.messages.SendersNodeAddressMessage; +import io.bisq.messages.NodeAddress; +import io.bisq.messages.SendersNodeAddressMessage; +import io.bisq.messages.p2p.messaging.PrefixedSealedAndSignedMessage; +import io.bisq.messages.p2p.messaging.SupportedCapabilitiesMessage; import io.bisq.p2p.peers.BanList; import io.bisq.p2p.peers.getdata.messages.GetDataRequest; import io.bisq.p2p.peers.getdata.messages.GetDataResponse; @@ -23,8 +23,8 @@ import io.bisq.p2p.peers.keepalive.messages.Ping; import io.bisq.p2p.peers.keepalive.messages.Pong; import io.bisq.p2p.storage.messages.AddDataMessage; import io.bisq.p2p.storage.messages.RefreshTTLMessage; -import io.bisq.p2p.storage.payload.CapabilityRequiringPayload; -import io.bisq.p2p.storage.payload.StoragePayload; +import io.bisq.payload.CapabilityRequiringPayload; +import io.bisq.payload.StoragePayload; import javafx.beans.property.ObjectProperty; import javafx.beans.property.ReadOnlyObjectProperty; import javafx.beans.property.SimpleObjectProperty; diff --git a/network/src/main/java/io/bisq/p2p/network/LocalhostNetworkNode.java b/network/src/main/java/io/bisq/p2p/network/LocalhostNetworkNode.java index c4b327a1a9..f54ec0b9ab 100644 --- a/network/src/main/java/io/bisq/p2p/network/LocalhostNetworkNode.java +++ b/network/src/main/java/io/bisq/p2p/network/LocalhostNetworkNode.java @@ -9,7 +9,7 @@ import com.msopentech.thali.java.toronionproxy.JavaOnionProxyManager; import io.bisq.app.Log; import io.bisq.common.UserThread; import io.bisq.common.util.Utilities; -import io.bisq.p2p.NodeAddress; +import io.bisq.messages.NodeAddress; import io.nucleo.net.HiddenServiceDescriptor; import io.nucleo.net.TorNode; import org.jetbrains.annotations.NotNull; diff --git a/network/src/main/java/io/bisq/p2p/network/NetworkNode.java b/network/src/main/java/io/bisq/p2p/network/NetworkNode.java index 8f9f65c335..0db8427aff 100644 --- a/network/src/main/java/io/bisq/p2p/network/NetworkNode.java +++ b/network/src/main/java/io/bisq/p2p/network/NetworkNode.java @@ -6,7 +6,7 @@ import io.bisq.app.Log; import io.bisq.common.UserThread; import io.bisq.common.util.Utilities; import io.bisq.messages.Message; -import io.bisq.p2p.NodeAddress; +import io.bisq.messages.NodeAddress; import javafx.beans.property.ObjectProperty; import javafx.beans.property.ReadOnlyObjectProperty; import javafx.beans.property.SimpleObjectProperty; diff --git a/network/src/main/java/io/bisq/p2p/network/OutboundConnection.java b/network/src/main/java/io/bisq/p2p/network/OutboundConnection.java index 214f996e0c..2ddd5a268b 100644 --- a/network/src/main/java/io/bisq/p2p/network/OutboundConnection.java +++ b/network/src/main/java/io/bisq/p2p/network/OutboundConnection.java @@ -1,6 +1,6 @@ package io.bisq.p2p.network; -import io.bisq.p2p.NodeAddress; +import io.bisq.messages.NodeAddress; import java.net.Socket; diff --git a/network/src/main/java/io/bisq/p2p/network/ProtoBufferUtilities.java b/network/src/main/java/io/bisq/p2p/network/ProtoBufferUtilities.java index bb47dd3b69..8eab4def1e 100644 --- a/network/src/main/java/io/bisq/p2p/network/ProtoBufferUtilities.java +++ b/network/src/main/java/io/bisq/p2p/network/ProtoBufferUtilities.java @@ -1,10 +1,11 @@ package io.bisq.p2p.network; import com.google.protobuf.ByteString; -import io.bisq.common.crypto.PubKeyRing; -import io.bisq.common.crypto.SealedAndSigned; import io.bisq.common.wire.proto.Messages; +import io.bisq.locale.CountryUtil; +import io.bisq.messages.CloseConnectionMessage; import io.bisq.messages.Message; +import io.bisq.messages.NodeAddress; import io.bisq.messages.alert.Alert; import io.bisq.messages.alert.PrivateNotification; import io.bisq.messages.alert.PrivateNotificationMessage; @@ -14,18 +15,17 @@ import io.bisq.messages.availability.AvailabilityResult; import io.bisq.messages.availability.OfferAvailabilityRequest; import io.bisq.messages.availability.OfferAvailabilityResponse; import io.bisq.messages.btc.data.RawTransactionInput; +import io.bisq.messages.crypto.PubKeyRing; +import io.bisq.messages.crypto.SealedAndSigned; import io.bisq.messages.dao.compensation.payload.CompensationRequestPayload; import io.bisq.messages.filter.payload.Filter; import io.bisq.messages.filter.payload.PaymentAccountFilter; +import io.bisq.messages.p2p.messaging.PrefixedSealedAndSignedMessage; import io.bisq.messages.payment.payload.*; -import io.bisq.messages.provider.price.PriceFeedService; -import io.bisq.messages.trade.offer.payload.Offer; +import io.bisq.messages.trade.offer.payload.OfferPayload; import io.bisq.messages.trade.payload.Contract; import io.bisq.messages.trade.protocol.trade.messages.*; import io.bisq.messages.trade.statistics.payload.TradeStatistics; -import io.bisq.p2p.NodeAddress; -import io.bisq.p2p.messaging.PrefixedSealedAndSignedMessage; -import io.bisq.p2p.network.messages.CloseConnectionMessage; import io.bisq.p2p.peers.getdata.messages.GetDataResponse; import io.bisq.p2p.peers.getdata.messages.GetUpdatedDataRequest; import io.bisq.p2p.peers.getdata.messages.PreliminaryGetDataRequest; @@ -38,10 +38,11 @@ import io.bisq.p2p.storage.messages.AddDataMessage; import io.bisq.p2p.storage.messages.RefreshTTLMessage; import io.bisq.p2p.storage.messages.RemoveDataMessage; import io.bisq.p2p.storage.messages.RemoveMailboxDataMessage; -import io.bisq.p2p.storage.payload.MailboxStoragePayload; -import io.bisq.p2p.storage.payload.StoragePayload; import io.bisq.p2p.storage.storageentry.ProtectedMailboxStorageEntry; import io.bisq.p2p.storage.storageentry.ProtectedStorageEntry; +import io.bisq.payload.MailboxStoragePayload; +import io.bisq.payload.StoragePayload; +import io.bisq.user.Preferences; import lombok.extern.slf4j.Slf4j; import org.apache.commons.io.output.WriterOutputStream; import org.bitcoinj.core.Coin; @@ -346,7 +347,7 @@ public class ProtoBufferUtilities { break; case SEPA_ACCOUNT_CONTRACT_DATA: SepaAccountContractData sepaAccountContractData = new SepaAccountContractData(protoEntry.getPaymentMethodName(), protoEntry.getId(), - protoEntry.getMaxTradePeriod()); + protoEntry.getMaxTradePeriod(), CountryUtil.getAllSepaCountries(Preferences.getDefaultLocale())); fillInCountryBasedPaymentAccountContractData(protoEntry, sepaAccountContractData); result = sepaAccountContractData; break; @@ -418,9 +419,8 @@ public class ProtoBufferUtilities { return Fiat.valueOf(currencyCode, tradePrice); } - public static Offer getOffer(Messages.Offer offer) { + public static OfferPayload getOffer(Messages.Offer offer) { List arbitratorNodeAddresses = offer.getArbitratorNodeAddressesList().stream().map(nodeAddress -> getNodeAddress(nodeAddress)).collect(Collectors.toList()); - PriceFeedService priceFeedService = null; // TODO refactor Offer, this should not be passed in the constructor, or we need to inject it in ProtoBufferUtilities // convert these lists because otherwise when they're empty they are lazyStringArrayList objects and NOT serializable, // which is needed for the P2PStorage getHash() operation List acceptedCountryCodes = offer.getAcceptedCountryCodesList().stream().collect(Collectors.toList()); @@ -432,9 +432,9 @@ public class ProtoBufferUtilities { } else { extraDataMapMap = offer.getExtraDataMapMap(); } - return new Offer(offer.getId(), offer.getDate(), getNodeAddress(offer.getOffererNodeAddress()), getPubKeyRing(offer.getPubKeyRing()), getDirection(offer.getDirection()), + return new OfferPayload(offer.getId(), offer.getDate(), getNodeAddress(offer.getOffererNodeAddress()), getPubKeyRing(offer.getPubKeyRing()), getDirection(offer.getDirection()), offer.getFiatPrice(), offer.getMarketPriceMargin(), offer.getUseMarketBasedPrice(), offer.getAmount(), offer.getMinAmount(), offer.getCurrencyCode(), arbitratorNodeAddresses, - offer.getPaymentMethodName(), offer.getOffererPaymentAccountId(), offer.getOfferFeePaymentTxID(), offer.getCountryCode(), acceptedCountryCodes, offer.getBankId(), acceptedBankIds, priceFeedService, + offer.getPaymentMethodName(), offer.getOffererPaymentAccountId(), offer.getOfferFeePaymentTxID(), offer.getCountryCode(), acceptedCountryCodes, offer.getBankId(), acceptedBankIds, offer.getVersionNr(), offer.getBlockHeightAtOfferCreation(), offer.getTxFee(), offer.getCreateOfferFee(), offer.getSecurityDeposit(), offer.getMaxTradeLimit(), offer.getMaxTradePeriod(), offer.getUseAutoClose(), offer.getUseReOpenAfterAutoClose(), offer.getLowerClosePrice(), offer.getUpperClosePrice(), offer.getIsPrivateOffer(), offer.getHashOfChallenge(), extraDataMapMap); } @@ -571,8 +571,8 @@ public class ProtoBufferUtilities { } @NotNull - public static Offer.Direction getDirection(Messages.Offer.Direction direction) { - return Offer.Direction.valueOf(direction.name()); + public static OfferPayload.Direction getDirection(Messages.Offer.Direction direction) { + return OfferPayload.Direction.valueOf(direction.name()); } @NotNull @@ -708,4 +708,5 @@ public class ProtoBufferUtilities { .stream() .map(ByteString::toByteArray).collect(Collectors.toList())); } + } diff --git a/network/src/main/java/io/bisq/p2p/network/TorNetworkNode.java b/network/src/main/java/io/bisq/p2p/network/TorNetworkNode.java index c12a1a710a..6bf1cc96b4 100644 --- a/network/src/main/java/io/bisq/p2p/network/TorNetworkNode.java +++ b/network/src/main/java/io/bisq/p2p/network/TorNetworkNode.java @@ -11,7 +11,7 @@ import io.bisq.app.Log; import io.bisq.common.Timer; import io.bisq.common.UserThread; import io.bisq.common.util.Utilities; -import io.bisq.p2p.NodeAddress; +import io.bisq.messages.NodeAddress; import io.bisq.p2p.Utils; import io.nucleo.net.HiddenServiceDescriptor; import io.nucleo.net.JavaTorNode; diff --git a/network/src/main/java/io/bisq/p2p/peers/BanList.java b/network/src/main/java/io/bisq/p2p/peers/BanList.java index 2d8cbf1efc..b710a4b73d 100644 --- a/network/src/main/java/io/bisq/p2p/peers/BanList.java +++ b/network/src/main/java/io/bisq/p2p/peers/BanList.java @@ -1,6 +1,6 @@ package io.bisq.p2p.peers; -import io.bisq.p2p.NodeAddress; +import io.bisq.messages.NodeAddress; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/network/src/main/java/io/bisq/p2p/peers/BroadcastHandler.java b/network/src/main/java/io/bisq/p2p/peers/BroadcastHandler.java index 1e5b20cc8f..ba4830d32c 100644 --- a/network/src/main/java/io/bisq/p2p/peers/BroadcastHandler.java +++ b/network/src/main/java/io/bisq/p2p/peers/BroadcastHandler.java @@ -7,7 +7,7 @@ import io.bisq.app.Log; import io.bisq.common.Timer; import io.bisq.common.UserThread; import io.bisq.common.util.Utilities; -import io.bisq.p2p.NodeAddress; +import io.bisq.messages.NodeAddress; import io.bisq.p2p.network.Connection; import io.bisq.p2p.network.NetworkNode; import io.bisq.p2p.storage.messages.BroadcastMessage; diff --git a/network/src/main/java/io/bisq/p2p/peers/Broadcaster.java b/network/src/main/java/io/bisq/p2p/peers/Broadcaster.java index 8ba2fc220d..896ce38d3c 100644 --- a/network/src/main/java/io/bisq/p2p/peers/Broadcaster.java +++ b/network/src/main/java/io/bisq/p2p/peers/Broadcaster.java @@ -2,7 +2,7 @@ package io.bisq.p2p.peers; import io.bisq.app.Log; import io.bisq.common.util.Utilities; -import io.bisq.p2p.NodeAddress; +import io.bisq.messages.NodeAddress; import io.bisq.p2p.network.NetworkNode; import io.bisq.p2p.storage.messages.BroadcastMessage; import org.jetbrains.annotations.Nullable; diff --git a/network/src/main/java/io/bisq/p2p/peers/PeerManager.java b/network/src/main/java/io/bisq/p2p/peers/PeerManager.java index 6b1319393a..75ef07d99d 100644 --- a/network/src/main/java/io/bisq/p2p/peers/PeerManager.java +++ b/network/src/main/java/io/bisq/p2p/peers/PeerManager.java @@ -4,7 +4,7 @@ import io.bisq.app.Log; import io.bisq.common.Clock; import io.bisq.common.Timer; import io.bisq.common.UserThread; -import io.bisq.p2p.NodeAddress; +import io.bisq.messages.NodeAddress; import io.bisq.p2p.network.*; import io.bisq.p2p.peers.peerexchange.Peer; import io.bisq.storage.Storage; diff --git a/network/src/main/java/io/bisq/p2p/peers/getdata/GetDataRequestHandler.java b/network/src/main/java/io/bisq/p2p/peers/getdata/GetDataRequestHandler.java index baa0e394fe..fb64996934 100644 --- a/network/src/main/java/io/bisq/p2p/peers/getdata/GetDataRequestHandler.java +++ b/network/src/main/java/io/bisq/p2p/peers/getdata/GetDataRequestHandler.java @@ -14,8 +14,8 @@ import io.bisq.p2p.peers.getdata.messages.GetDataRequest; import io.bisq.p2p.peers.getdata.messages.GetDataResponse; import io.bisq.p2p.peers.getdata.messages.GetUpdatedDataRequest; import io.bisq.p2p.storage.P2PDataStorage; -import io.bisq.p2p.storage.payload.CapabilityRequiringPayload; -import io.bisq.p2p.storage.payload.StoragePayload; +import io.bisq.payload.CapabilityRequiringPayload; +import io.bisq.payload.StoragePayload; import io.bisq.p2p.storage.storageentry.ProtectedStorageEntry; import org.jetbrains.annotations.NotNull; import org.slf4j.Logger; diff --git a/network/src/main/java/io/bisq/p2p/peers/getdata/RequestDataHandler.java b/network/src/main/java/io/bisq/p2p/peers/getdata/RequestDataHandler.java index 9ca9e12693..88a7dfb532 100644 --- a/network/src/main/java/io/bisq/p2p/peers/getdata/RequestDataHandler.java +++ b/network/src/main/java/io/bisq/p2p/peers/getdata/RequestDataHandler.java @@ -7,7 +7,7 @@ import io.bisq.app.Log; import io.bisq.common.Timer; import io.bisq.common.UserThread; import io.bisq.messages.Message; -import io.bisq.p2p.NodeAddress; +import io.bisq.messages.NodeAddress; import io.bisq.p2p.network.CloseConnectionReason; import io.bisq.p2p.network.Connection; import io.bisq.p2p.network.MessageListener; @@ -18,9 +18,9 @@ import io.bisq.p2p.peers.getdata.messages.GetDataResponse; import io.bisq.p2p.peers.getdata.messages.GetUpdatedDataRequest; import io.bisq.p2p.peers.getdata.messages.PreliminaryGetDataRequest; import io.bisq.p2p.storage.P2PDataStorage; -import io.bisq.p2p.storage.payload.LazyProcessedStoragePayload; -import io.bisq.p2p.storage.payload.PersistedStoragePayload; -import io.bisq.p2p.storage.payload.StoragePayload; +import io.bisq.payload.LazyProcessedStoragePayload; +import io.bisq.payload.PersistedStoragePayload; +import io.bisq.payload.StoragePayload; import io.bisq.p2p.storage.storageentry.ProtectedStorageEntry; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; diff --git a/network/src/main/java/io/bisq/p2p/peers/getdata/RequestDataManager.java b/network/src/main/java/io/bisq/p2p/peers/getdata/RequestDataManager.java index f87e75bc67..cc4fed995d 100644 --- a/network/src/main/java/io/bisq/p2p/peers/getdata/RequestDataManager.java +++ b/network/src/main/java/io/bisq/p2p/peers/getdata/RequestDataManager.java @@ -4,7 +4,7 @@ import io.bisq.app.Log; import io.bisq.common.Timer; import io.bisq.common.UserThread; import io.bisq.messages.Message; -import io.bisq.p2p.NodeAddress; +import io.bisq.messages.NodeAddress; import io.bisq.p2p.network.*; import io.bisq.p2p.peers.PeerManager; import io.bisq.p2p.peers.getdata.messages.GetDataRequest; diff --git a/network/src/main/java/io/bisq/p2p/peers/getdata/messages/GetDataResponse.java b/network/src/main/java/io/bisq/p2p/peers/getdata/messages/GetDataResponse.java index 528510e6c2..60685356cc 100644 --- a/network/src/main/java/io/bisq/p2p/peers/getdata/messages/GetDataResponse.java +++ b/network/src/main/java/io/bisq/p2p/peers/getdata/messages/GetDataResponse.java @@ -3,7 +3,7 @@ package io.bisq.p2p.peers.getdata.messages; import io.bisq.app.Capabilities; import io.bisq.app.Version; import io.bisq.common.wire.proto.Messages; -import io.bisq.p2p.messaging.SupportedCapabilitiesMessage; +import io.bisq.messages.p2p.messaging.SupportedCapabilitiesMessage; import io.bisq.p2p.storage.storageentry.ProtectedMailboxStorageEntry; import io.bisq.p2p.storage.storageentry.ProtectedStorageEntry; diff --git a/network/src/main/java/io/bisq/p2p/peers/getdata/messages/GetUpdatedDataRequest.java b/network/src/main/java/io/bisq/p2p/peers/getdata/messages/GetUpdatedDataRequest.java index 29aa01c9b9..37a8dc1fba 100644 --- a/network/src/main/java/io/bisq/p2p/peers/getdata/messages/GetUpdatedDataRequest.java +++ b/network/src/main/java/io/bisq/p2p/peers/getdata/messages/GetUpdatedDataRequest.java @@ -3,8 +3,8 @@ package io.bisq.p2p.peers.getdata.messages; import com.google.protobuf.ByteString; import io.bisq.app.Version; import io.bisq.common.wire.proto.Messages; -import io.bisq.p2p.NodeAddress; -import io.bisq.p2p.network.messages.SendersNodeAddressMessage; +import io.bisq.messages.NodeAddress; +import io.bisq.messages.SendersNodeAddressMessage; import java.util.Set; import java.util.stream.Collectors; diff --git a/network/src/main/java/io/bisq/p2p/peers/getdata/messages/PreliminaryGetDataRequest.java b/network/src/main/java/io/bisq/p2p/peers/getdata/messages/PreliminaryGetDataRequest.java index 30336837e0..1daaabc020 100644 --- a/network/src/main/java/io/bisq/p2p/peers/getdata/messages/PreliminaryGetDataRequest.java +++ b/network/src/main/java/io/bisq/p2p/peers/getdata/messages/PreliminaryGetDataRequest.java @@ -4,9 +4,9 @@ import com.google.protobuf.ByteString; import io.bisq.app.Capabilities; import io.bisq.app.Version; import io.bisq.common.wire.proto.Messages; +import io.bisq.messages.AnonymousMessage; import io.bisq.messages.ToProtoBuffer; -import io.bisq.p2p.messaging.SupportedCapabilitiesMessage; -import io.bisq.p2p.network.messages.AnonymousMessage; +import io.bisq.messages.p2p.messaging.SupportedCapabilitiesMessage; import javax.annotation.Nullable; import java.util.ArrayList; diff --git a/network/src/main/java/io/bisq/p2p/peers/keepalive/messages/Ping.java b/network/src/main/java/io/bisq/p2p/peers/keepalive/messages/Ping.java index 5d788a9041..f996999f41 100644 --- a/network/src/main/java/io/bisq/p2p/peers/keepalive/messages/Ping.java +++ b/network/src/main/java/io/bisq/p2p/peers/keepalive/messages/Ping.java @@ -1,8 +1,8 @@ package io.bisq.p2p.peers.keepalive.messages; import io.bisq.app.Version; -import io.bisq.common.util.ProtoBufferUtils; import io.bisq.common.wire.proto.Messages; +import io.bisq.messages.util.ProtoBufferUtils; public final class Ping extends KeepAliveMessage { // That object is sent over the wire, so we need to take care of version compatibility. diff --git a/network/src/main/java/io/bisq/p2p/peers/keepalive/messages/Pong.java b/network/src/main/java/io/bisq/p2p/peers/keepalive/messages/Pong.java index cf14a6a8b2..b7eca3117b 100644 --- a/network/src/main/java/io/bisq/p2p/peers/keepalive/messages/Pong.java +++ b/network/src/main/java/io/bisq/p2p/peers/keepalive/messages/Pong.java @@ -1,8 +1,8 @@ package io.bisq.p2p.peers.keepalive.messages; import io.bisq.app.Version; -import io.bisq.common.util.ProtoBufferUtils; import io.bisq.common.wire.proto.Messages; +import io.bisq.messages.util.ProtoBufferUtils; public final class Pong extends KeepAliveMessage { // That object is sent over the wire, so we need to take care of version compatibility. diff --git a/network/src/main/java/io/bisq/p2p/peers/peerexchange/Peer.java b/network/src/main/java/io/bisq/p2p/peers/peerexchange/Peer.java index f51fae942f..7423344c25 100644 --- a/network/src/main/java/io/bisq/p2p/peers/peerexchange/Peer.java +++ b/network/src/main/java/io/bisq/p2p/peers/peerexchange/Peer.java @@ -2,9 +2,9 @@ package io.bisq.p2p.peers.peerexchange; import io.bisq.app.Version; import io.bisq.common.persistance.Persistable; -import io.bisq.common.wire.Payload; import io.bisq.common.wire.proto.Messages; -import io.bisq.p2p.NodeAddress; +import io.bisq.messages.NodeAddress; +import io.bisq.messages.wire.Payload; import java.util.Date; diff --git a/network/src/main/java/io/bisq/p2p/peers/peerexchange/PeerExchangeHandler.java b/network/src/main/java/io/bisq/p2p/peers/peerexchange/PeerExchangeHandler.java index 7c894e11e2..5628a97179 100644 --- a/network/src/main/java/io/bisq/p2p/peers/peerexchange/PeerExchangeHandler.java +++ b/network/src/main/java/io/bisq/p2p/peers/peerexchange/PeerExchangeHandler.java @@ -7,7 +7,7 @@ import io.bisq.app.Log; import io.bisq.common.Timer; import io.bisq.common.UserThread; import io.bisq.messages.Message; -import io.bisq.p2p.NodeAddress; +import io.bisq.messages.NodeAddress; import io.bisq.p2p.network.CloseConnectionReason; import io.bisq.p2p.network.Connection; import io.bisq.p2p.network.MessageListener; diff --git a/network/src/main/java/io/bisq/p2p/peers/peerexchange/PeerExchangeManager.java b/network/src/main/java/io/bisq/p2p/peers/peerexchange/PeerExchangeManager.java index 464d303ebc..9e2a9d4b61 100644 --- a/network/src/main/java/io/bisq/p2p/peers/peerexchange/PeerExchangeManager.java +++ b/network/src/main/java/io/bisq/p2p/peers/peerexchange/PeerExchangeManager.java @@ -5,7 +5,7 @@ import io.bisq.app.Log; import io.bisq.common.Timer; import io.bisq.common.UserThread; import io.bisq.messages.Message; -import io.bisq.p2p.NodeAddress; +import io.bisq.messages.NodeAddress; import io.bisq.p2p.network.*; import io.bisq.p2p.peers.PeerManager; import io.bisq.p2p.peers.peerexchange.messages.GetPeersRequest; diff --git a/network/src/main/java/io/bisq/p2p/peers/peerexchange/messages/GetPeersRequest.java b/network/src/main/java/io/bisq/p2p/peers/peerexchange/messages/GetPeersRequest.java index ba89e308b2..b6a4ea09c5 100644 --- a/network/src/main/java/io/bisq/p2p/peers/peerexchange/messages/GetPeersRequest.java +++ b/network/src/main/java/io/bisq/p2p/peers/peerexchange/messages/GetPeersRequest.java @@ -3,10 +3,10 @@ package io.bisq.p2p.peers.peerexchange.messages; import io.bisq.app.Capabilities; import io.bisq.app.Version; import io.bisq.common.wire.proto.Messages; +import io.bisq.messages.NodeAddress; +import io.bisq.messages.SendersNodeAddressMessage; import io.bisq.messages.ToProtoBuffer; -import io.bisq.p2p.NodeAddress; -import io.bisq.p2p.messaging.SupportedCapabilitiesMessage; -import io.bisq.p2p.network.messages.SendersNodeAddressMessage; +import io.bisq.messages.p2p.messaging.SupportedCapabilitiesMessage; import io.bisq.p2p.peers.peerexchange.Peer; import javax.annotation.Nullable; diff --git a/network/src/main/java/io/bisq/p2p/peers/peerexchange/messages/GetPeersResponse.java b/network/src/main/java/io/bisq/p2p/peers/peerexchange/messages/GetPeersResponse.java index a8904a2588..7b25bee64f 100644 --- a/network/src/main/java/io/bisq/p2p/peers/peerexchange/messages/GetPeersResponse.java +++ b/network/src/main/java/io/bisq/p2p/peers/peerexchange/messages/GetPeersResponse.java @@ -3,7 +3,7 @@ package io.bisq.p2p.peers.peerexchange.messages; import io.bisq.app.Capabilities; import io.bisq.app.Version; import io.bisq.common.wire.proto.Messages; -import io.bisq.p2p.messaging.SupportedCapabilitiesMessage; +import io.bisq.messages.p2p.messaging.SupportedCapabilitiesMessage; import io.bisq.p2p.peers.peerexchange.Peer; import javax.annotation.Nullable; diff --git a/network/src/main/java/io/bisq/p2p/protocol/availability/Offer.java b/network/src/main/java/io/bisq/p2p/protocol/availability/Offer.java new file mode 100644 index 0000000000..f72f6b51d5 --- /dev/null +++ b/network/src/main/java/io/bisq/p2p/protocol/availability/Offer.java @@ -0,0 +1,329 @@ +package io.bisq.p2p.protocol.availability; + +import io.bisq.common.handlers.ErrorMessageHandler; +import io.bisq.common.handlers.ResultHandler; +import io.bisq.common.util.JsonExclude; +import io.bisq.common.util.MathUtils; +import io.bisq.locale.CurrencyUtil; +import io.bisq.messages.NodeAddress; +import io.bisq.messages.crypto.KeyRing; +import io.bisq.messages.crypto.PubKeyRing; +import io.bisq.messages.payment.PaymentMethod; +import io.bisq.messages.trade.exceptions.MarketPriceNotAvailableException; +import io.bisq.messages.trade.exceptions.TradePriceOutOfToleranceException; +import io.bisq.messages.trade.offer.payload.OfferPayload; +import io.bisq.provider.price.MarketPrice; +import io.bisq.provider.price.PriceFeedService; +import javafx.beans.property.*; +import lombok.Getter; +import lombok.Setter; +import lombok.extern.slf4j.Slf4j; +import org.bitcoinj.core.Coin; +import org.bitcoinj.utils.ExchangeRate; +import org.bitcoinj.utils.Fiat; + +import javax.annotation.Nullable; +import java.text.DecimalFormat; +import java.util.Date; +import java.util.List; + +import static com.google.common.base.Preconditions.checkArgument; +import static com.google.common.base.Preconditions.checkNotNull; + +@Slf4j +public class Offer { + + @Getter + private OfferPayload offerPayload; + @JsonExclude + transient private OfferPayload.State state = OfferPayload.State.UNDEFINED; + // Those state properties are transient and only used at runtime! + // don't access directly as it might be null; use getStateProperty() which creates an object if not instantiated + @JsonExclude + @Getter + transient private ObjectProperty stateProperty = new SimpleObjectProperty<>(state); + @JsonExclude + @Nullable + transient private OfferAvailabilityProtocol availabilityProtocol; + @JsonExclude + @Getter + transient private StringProperty errorMessageProperty = new SimpleStringProperty(); + @JsonExclude + @Getter + @Setter + transient private PriceFeedService priceFeedService; + @JsonExclude + transient private DecimalFormat decimalFormat; + + public Offer(OfferPayload offerPayload) { + this.offerPayload = offerPayload; + setState(OfferPayload.State.UNDEFINED); + init(); + } + + private void init() { + stateProperty = new SimpleObjectProperty<>(OfferPayload.State.UNDEFINED); + + // we don't need to fill it as the error message is only relevant locally, so we don't store it in the transmitted object + errorMessageProperty = new SimpleStringProperty(); + decimalFormat = new DecimalFormat("#.#"); + decimalFormat.setMaximumFractionDigits(Fiat.SMALLEST_UNIT_EXPONENT); + } + + public OfferPayload.State getState() { + return state; + } + + public void setState(OfferPayload.State state) { + this.state = state; + stateProperty().set(state); + } + + public ObjectProperty stateProperty() { + return stateProperty; + } + + //TODO update with new properties + public void validate() { + offerPayload.validate(); + checkNotNull(getPrice(), "Price is null"); + checkArgument(getPrice().isPositive(), "Price is not a positive value"); + } + + public void resetState() { + setState(OfferPayload.State.UNDEFINED); + } + + public ReadOnlyStringProperty errorMessageProperty() { + return errorMessageProperty; + } + + public void setErrorMessage(String errorMessage) { + this.errorMessageProperty.set(errorMessage); + } + + + /////////////////////////////////////////////////////////////////////////////////////////// + // Availability + /////////////////////////////////////////////////////////////////////////////////////////// + + // TODO refactor those out of OfferPayload, offerPayload should be pure value object + public void checkOfferAvailability(OfferAvailabilityModel model, ResultHandler resultHandler, + ErrorMessageHandler errorMessageHandler) { + availabilityProtocol = new OfferAvailabilityProtocol(model, + () -> { + cancelAvailabilityRequest(); + resultHandler.handleResult(); + }, + (errorMessage) -> { + if (availabilityProtocol != null) + availabilityProtocol.cancel(); + log.error(errorMessage); + errorMessageHandler.handleErrorMessage(errorMessage); + }); + availabilityProtocol.sendOfferAvailabilityRequest(); + } + + // TODO refactor those out of OfferPayload, offerPayload should be pure value object + public void cancelAvailabilityRequest() { + if (availabilityProtocol != null) + availabilityProtocol.cancel(); + } + + // TODO refactor those out of OfferPayload, offerPayload should be pure value object + @Nullable + public Fiat getPrice() { + if (offerPayload.isUseMarketBasedPrice()) { + checkNotNull(priceFeedService, "priceFeed must not be null"); + MarketPrice marketPrice = priceFeedService.getMarketPrice(offerPayload.getCurrencyCode()); + if (marketPrice != null) { + PriceFeedService.Type priceFeedType; + double factor; + if (CurrencyUtil.isCryptoCurrency(offerPayload.getCurrencyCode())) { + priceFeedType = offerPayload.getDirection() == OfferPayload.Direction.BUY ? PriceFeedService.Type.ASK : PriceFeedService.Type.BID; + factor = offerPayload.getDirection() == OfferPayload.Direction.SELL ? 1 - offerPayload.getMarketPriceMargin() : 1 + offerPayload.getMarketPriceMargin(); + } else { + priceFeedType = offerPayload.getDirection() == OfferPayload.Direction.SELL ? PriceFeedService.Type.ASK : PriceFeedService.Type.BID; + factor = offerPayload.getDirection() == OfferPayload.Direction.BUY ? 1 - offerPayload.getMarketPriceMargin() : 1 + offerPayload.getMarketPriceMargin(); + } + double marketPriceAsDouble = marketPrice.getPrice(priceFeedType); + double targetPrice = marketPriceAsDouble * factor; + if (CurrencyUtil.isCryptoCurrency(offerPayload.getCurrencyCode())) + targetPrice = targetPrice != 0 ? 1d / targetPrice : 0; + try { + final double rounded = MathUtils.roundDouble(targetPrice, Fiat.SMALLEST_UNIT_EXPONENT); + return Fiat.parseFiat(offerPayload.getCurrencyCode(), decimalFormat.format(rounded).replace(",", ".")); + } catch (Exception e) { + log.error("Exception at getPrice / parseToFiat: " + e.toString() + "\n" + + "That case should never happen."); + return null; + } + } else { + log.debug("We don't have a market price.\n" + + "That case could only happen if you don't have a price feed."); + return null; + } + } else { + return Fiat.valueOf(offerPayload.getCurrencyCode(), offerPayload.getFiatPrice()); + } + } + + // TODO refactor those out of OfferPayload, offerPayload should be pure value object + public void checkTradePriceTolerance(long takersTradePrice) throws TradePriceOutOfToleranceException, MarketPriceNotAvailableException, IllegalArgumentException { + checkArgument(takersTradePrice > 0, "takersTradePrice must be positive"); + Fiat tradePriceAsFiat = Fiat.valueOf(offerPayload.getCurrencyCode(), takersTradePrice); + Fiat offerPriceAsFiat = getPrice(); + + if (offerPriceAsFiat == null) + throw new MarketPriceNotAvailableException("Market price required for calculating trade price is not available."); + + double factor = (double) takersTradePrice / (double) offerPriceAsFiat.value; + // We allow max. 2 % difference between own offerPayload price calculation and takers calculation. + // Market price might be different at offerer's and takers side so we need a bit of tolerance. + // The tolerance will get smaller once we have multiple price feeds avoiding fast price fluctuations + // from one provider. + if (Math.abs(1 - factor) > 0.02) { + String msg = "Taker's trade price is too far away from our calculated price based on the market price.\n" + + "tradePriceAsFiat=" + tradePriceAsFiat.toFriendlyString() + "\n" + + "offerPriceAsFiat=" + offerPriceAsFiat.toFriendlyString(); + log.warn(msg); + throw new TradePriceOutOfToleranceException(msg); + } + } + + // TODO + @Nullable + public Fiat getVolumeByAmount(Coin amount) { + Fiat price = getPrice(); + if (price != null && amount != null) { + try { + return new ExchangeRate(price).coinToFiat(amount); + } catch (Throwable t) { + log.error("getVolumeByAmount failed. Error=" + t.getMessage()); + return null; + } + } else { + return null; + } + } + + @Nullable + public Fiat getOfferVolume() { + return getVolumeByAmount(offerPayload.getAmount()); + } + + @Nullable + public Fiat getMinOfferVolume() { + return getVolumeByAmount(offerPayload.getMinAmount()); + } + + public boolean isMyOffer(KeyRing keyRing) { + return getPubKeyRing().equals(keyRing.getPubKeyRing()); + } + + /////////////////////////////////// Decorator methods /////////////////////////////////////////// + + public String getShortId() { + return offerPayload.getShortId(); + } + + public String getId() { + return offerPayload.getId(); + } + + public OfferPayload.Direction getDirection() { + return offerPayload.getDirection(); + } + + public String getCurrencyCode() { + return offerPayload.getCurrencyCode(); + } + + public Coin getMinAmount() { + return offerPayload.getMinAmount(); + } + + public Coin getAmount() { + return offerPayload.getAmount(); + } + + public boolean isUseMarketBasedPrice() { + return offerPayload.isUseMarketBasedPrice(); + } + + public Date getDate() { + return offerPayload.getDate(); + } + + public double getMarketPriceMargin() { + return offerPayload.getMarketPriceMargin(); + } + + public PaymentMethod getPaymentMethod() { + return offerPayload.getPaymentMethod(); + } + + public String getOfferFeePaymentTxID() { + return offerPayload.getOfferFeePaymentTxID(); + } + + public PubKeyRing getPubKeyRing() { + return offerPayload.getPubKeyRing(); + } + + public NodeAddress getOffererNodeAddress() { + return offerPayload.getOffererNodeAddress(); + } + + public String getOffererPaymentAccountId() { + return offerPayload.getOffererPaymentAccountId(); + } + + public Coin getCreateOfferFee() { + return offerPayload.getCreateOfferFee(); + } + + public Coin getTxFee() { + return offerPayload.getTxFee(); + } + + public void setOfferFeePaymentTxID(String offerFeePaymentTxID) { + offerPayload.setOfferFeePaymentTxID(offerFeePaymentTxID); + } + + public Coin getSecurityDeposit() { + return offerPayload.getSecurityDeposit(); + } + + public NodeAddress getOwnerNodeAddress() { + return offerPayload.getOwnerNodeAddress(); + } + + public String getCountryCode() { + return offerPayload.getCountryCode(); + } + + public String getBankId() { + return offerPayload.getBankId(); + } + + public List getAcceptedCountryCodes() { + return offerPayload.getAcceptedCountryCodes(); + } + + public List getAcceptedBankIds() { + return offerPayload.getAcceptedBankIds(); + } + + public List getArbitratorNodeAddresses() { + return offerPayload.getArbitratorNodeAddresses(); + } + + public OfferPayload.Direction getMirroredDirection() { + return offerPayload.getMirroredDirection(); + } + + public long getProtocolVersion() { + return offerPayload.getProtocolVersion(); + } +} diff --git a/network/src/main/java/io/bisq/p2p/seed/SeedNodesRepository.java b/network/src/main/java/io/bisq/p2p/seed/SeedNodesRepository.java index c9daab0398..334f73852f 100644 --- a/network/src/main/java/io/bisq/p2p/seed/SeedNodesRepository.java +++ b/network/src/main/java/io/bisq/p2p/seed/SeedNodesRepository.java @@ -2,7 +2,7 @@ package io.bisq.p2p.seed; import com.google.common.collect.Sets; import io.bisq.app.DevEnv; -import io.bisq.p2p.NodeAddress; +import io.bisq.messages.NodeAddress; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/network/src/main/java/io/bisq/p2p/storage/P2PDataStorage.java b/network/src/main/java/io/bisq/p2p/storage/P2PDataStorage.java index 64573966dc..544a20e796 100644 --- a/network/src/main/java/io/bisq/p2p/storage/P2PDataStorage.java +++ b/network/src/main/java/io/bisq/p2p/storage/P2PDataStorage.java @@ -6,22 +6,22 @@ import io.bisq.app.Version; import io.bisq.common.Timer; import io.bisq.common.UserThread; import io.bisq.common.crypto.CryptoException; -import io.bisq.common.crypto.Hash; import io.bisq.common.crypto.Sig; import io.bisq.common.persistance.Persistable; import io.bisq.common.util.Tuple2; import io.bisq.common.util.Utilities; import io.bisq.common.wire.proto.Messages; import io.bisq.messages.Message; +import io.bisq.messages.NodeAddress; import io.bisq.messages.ToProtoBuffer; -import io.bisq.p2p.NodeAddress; +import io.bisq.messages.crypto.Hash; import io.bisq.p2p.network.*; import io.bisq.p2p.peers.BroadcastHandler; import io.bisq.p2p.peers.Broadcaster; import io.bisq.p2p.storage.messages.*; -import io.bisq.p2p.storage.payload.*; import io.bisq.p2p.storage.storageentry.ProtectedMailboxStorageEntry; import io.bisq.p2p.storage.storageentry.ProtectedStorageEntry; +import io.bisq.payload.*; import io.bisq.storage.FileUtil; import io.bisq.storage.ResourceNotFoundException; import io.bisq.storage.Storage; @@ -197,7 +197,7 @@ public class P2PDataStorage implements MessageListener, ConnectionListener { // We have a RequiresLiveOwnerData data object with the node address of the // disconnected peer. We remove that data from our map. - // Check if we have the data (e.g. Offer) + // Check if we have the data (e.g. OfferPayload) ByteArray hashOfPayload = getHashAsByteArray(expirablePayload); boolean containsKey = map.containsKey(hashOfPayload); if (containsKey) { @@ -549,7 +549,7 @@ public class P2PDataStorage implements MessageListener, ConnectionListener { payload.receiverPubKeyForRemoveOperation.equals(protectedStorageEntry.ownerPubKey); } else { // TODO We got sometimes a nullpointer at protectedStorageEntry.ownerPubKey - // Probably caused by an exception at deserialization: Offer: Cannot be deserialized.null + // Probably caused by an exception at deserialization: OfferPayload: Cannot be deserialized.null result = protectedStorageEntry != null && protectedStorageEntry.ownerPubKey != null && protectedStorageEntry.getStoragePayload() != null && protectedStorageEntry.ownerPubKey.equals(protectedStorageEntry.getStoragePayload().getOwnerPubKey()); diff --git a/network/src/main/java/io/bisq/p2p/P2PService.java b/network/src/main/java/io/bisq/p2p/storage/P2PService.java similarity index 98% rename from network/src/main/java/io/bisq/p2p/P2PService.java rename to network/src/main/java/io/bisq/p2p/storage/P2PService.java index caabd0248d..f99a963462 100644 --- a/network/src/main/java/io/bisq/p2p/P2PService.java +++ b/network/src/main/java/io/bisq/p2p/storage/P2PService.java @@ -1,5 +1,6 @@ -package io.bisq.p2p; +package io.bisq.p2p.storage; +import io.bisq.p2p.NetworkNotReadyException; import com.google.common.annotations.VisibleForTesting; import com.google.common.util.concurrent.FutureCallback; import com.google.common.util.concurrent.Futures; @@ -10,15 +11,18 @@ import io.bisq.app.Log; import io.bisq.common.Clock; import io.bisq.common.UserThread; import io.bisq.common.crypto.CryptoException; -import io.bisq.common.crypto.KeyRing; -import io.bisq.common.crypto.PubKeyRing; import io.bisq.common.util.Utilities; -import io.bisq.crypto.DecryptedMsgWithPubKey; import io.bisq.crypto.EncryptionService; +import io.bisq.messages.DecryptedDirectMessageListener; +import io.bisq.messages.DecryptedMsgWithPubKey; import io.bisq.messages.Message; +import io.bisq.messages.NodeAddress; +import io.bisq.messages.crypto.KeyRing; +import io.bisq.messages.crypto.PubKeyRing; +import io.bisq.messages.p2p.messaging.*; import io.bisq.network.NetworkOptionKeys; import io.bisq.network.Socks5ProxyProvider; -import io.bisq.p2p.messaging.*; +import io.bisq.p2p.P2PServiceListener; import io.bisq.p2p.network.*; import io.bisq.p2p.peers.BanList; import io.bisq.p2p.peers.BroadcastHandler; @@ -28,15 +32,13 @@ import io.bisq.p2p.peers.getdata.RequestDataManager; import io.bisq.p2p.peers.keepalive.KeepAliveManager; import io.bisq.p2p.peers.peerexchange.PeerExchangeManager; import io.bisq.p2p.seed.SeedNodesRepository; -import io.bisq.p2p.storage.HashMapChangedListener; -import io.bisq.p2p.storage.P2PDataStorage; import io.bisq.p2p.storage.messages.AddDataMessage; import io.bisq.p2p.storage.messages.BroadcastMessage; import io.bisq.p2p.storage.messages.RefreshTTLMessage; -import io.bisq.p2p.storage.payload.MailboxStoragePayload; -import io.bisq.p2p.storage.payload.StoragePayload; import io.bisq.p2p.storage.storageentry.ProtectedMailboxStorageEntry; import io.bisq.p2p.storage.storageentry.ProtectedStorageEntry; +import io.bisq.payload.MailboxStoragePayload; +import io.bisq.payload.StoragePayload; import io.bisq.storage.FileUtil; import io.bisq.storage.Storage; import javafx.beans.property.*; @@ -55,6 +57,7 @@ import java.util.*; import java.util.concurrent.CopyOnWriteArraySet; import java.util.stream.Collectors; + import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkNotNull; diff --git a/network/src/main/java/io/bisq/p2p/storage/messages/AddDataMessage.java b/network/src/main/java/io/bisq/p2p/storage/messages/AddDataMessage.java index 50a605d064..27b601b936 100644 --- a/network/src/main/java/io/bisq/p2p/storage/messages/AddDataMessage.java +++ b/network/src/main/java/io/bisq/p2p/storage/messages/AddDataMessage.java @@ -1,8 +1,8 @@ package io.bisq.p2p.storage.messages; import io.bisq.app.Version; -import io.bisq.common.util.ProtoBufferUtils; import io.bisq.common.wire.proto.Messages; +import io.bisq.messages.util.ProtoBufferUtils; import io.bisq.p2p.storage.storageentry.ProtectedMailboxStorageEntry; import io.bisq.p2p.storage.storageentry.ProtectedStorageEntry; diff --git a/network/src/main/java/io/bisq/p2p/storage/messages/RemoveDataMessage.java b/network/src/main/java/io/bisq/p2p/storage/messages/RemoveDataMessage.java index ee6a1f9e04..cf9438354a 100644 --- a/network/src/main/java/io/bisq/p2p/storage/messages/RemoveDataMessage.java +++ b/network/src/main/java/io/bisq/p2p/storage/messages/RemoveDataMessage.java @@ -1,8 +1,8 @@ package io.bisq.p2p.storage.messages; import io.bisq.app.Version; -import io.bisq.common.util.ProtoBufferUtils; import io.bisq.common.wire.proto.Messages; +import io.bisq.messages.util.ProtoBufferUtils; import io.bisq.p2p.storage.storageentry.ProtectedStorageEntry; public final class RemoveDataMessage extends BroadcastMessage { diff --git a/network/src/main/java/io/bisq/p2p/storage/messages/RemoveMailboxDataMessage.java b/network/src/main/java/io/bisq/p2p/storage/messages/RemoveMailboxDataMessage.java index 67ae118920..765ff6a877 100644 --- a/network/src/main/java/io/bisq/p2p/storage/messages/RemoveMailboxDataMessage.java +++ b/network/src/main/java/io/bisq/p2p/storage/messages/RemoveMailboxDataMessage.java @@ -1,8 +1,8 @@ package io.bisq.p2p.storage.messages; import io.bisq.app.Version; -import io.bisq.common.util.ProtoBufferUtils; import io.bisq.common.wire.proto.Messages; +import io.bisq.messages.util.ProtoBufferUtils; import io.bisq.p2p.storage.storageentry.ProtectedMailboxStorageEntry; public final class RemoveMailboxDataMessage extends BroadcastMessage { diff --git a/network/src/main/java/io/bisq/p2p/storage/payload/LazyProcessedStoragePayload.java b/network/src/main/java/io/bisq/p2p/storage/payload/LazyProcessedStoragePayload.java deleted file mode 100644 index efb67e6b3d..0000000000 --- a/network/src/main/java/io/bisq/p2p/storage/payload/LazyProcessedStoragePayload.java +++ /dev/null @@ -1,8 +0,0 @@ -package io.bisq.p2p.storage.payload; - -/** - * Marker interface for payload which gets delayed processed at startup so we don't hit performance too much. - * Used for TradeStatistics. - */ -public interface LazyProcessedStoragePayload extends StoragePayload { -} diff --git a/network/src/main/java/io/bisq/p2p/storage/payload/MailboxStoragePayload.java b/network/src/main/java/io/bisq/p2p/storage/payload/MailboxStoragePayload.java deleted file mode 100644 index f3c7090f15..0000000000 --- a/network/src/main/java/io/bisq/p2p/storage/payload/MailboxStoragePayload.java +++ /dev/null @@ -1,137 +0,0 @@ -package io.bisq.p2p.storage.payload; - -import com.google.protobuf.ByteString; -import io.bisq.app.Version; -import io.bisq.common.crypto.Sig; -import io.bisq.common.wire.proto.Messages; -import io.bisq.p2p.NodeAddress; -import io.bisq.p2p.messaging.PrefixedSealedAndSignedMessage; -import io.bisq.p2p.peers.BroadcastHandler; -import io.bisq.p2p.storage.P2PDataStorage; -import io.bisq.p2p.storage.storageentry.ProtectedStorageEntry; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.io.IOException; -import java.security.KeyFactory; -import java.security.NoSuchAlgorithmException; -import java.security.NoSuchProviderException; -import java.security.PublicKey; -import java.security.spec.InvalidKeySpecException; -import java.security.spec.X509EncodedKeySpec; -import java.util.concurrent.TimeUnit; - -/** - * Envelope message which support a time to live and sender and receiver's pub keys for storage operations. - * It differs from the ProtectedExpirableMessage in the way that the sender is permitted to do an add operation - * but only the receiver is permitted to remove the data. - * That is the typical requirement for a mailbox like system. - *

    - * Typical payloads are trade or dispute messages to be stored when the peer is offline. - */ -public final class MailboxStoragePayload implements StoragePayload { - // That object is sent over the wire, so we need to take care of version compatibility. - private static final long serialVersionUID = Version.P2P_NETWORK_VERSION; - private static final Logger log = LoggerFactory.getLogger(MailboxStoragePayload.class); - - private static final long TTL = TimeUnit.DAYS.toMillis(10); - - /** - * The encrypted and signed payload message - */ - public final PrefixedSealedAndSignedMessage prefixedSealedAndSignedMessage; - - /** - * Used for check if the add operation is permitted. - * senderStoragePublicKey has to be equal to the ownerPubKey of the ProtectedData - * - * @see ProtectedStorageEntry#ownerPubKey - * @see P2PDataStorage#add(ProtectedStorageEntry, NodeAddress, BroadcastHandler.Listener, boolean) - */ - public transient PublicKey senderPubKeyForAddOperation; - private final byte[] senderPubKeyForAddOperationBytes; - /** - * Used for check if the remove operation is permitted. - * senderStoragePublicKey has to be equal to the ownerPubKey of the ProtectedData - * - * @see ProtectedStorageEntry#ownerPubKey - * @see P2PDataStorage#remove(ProtectedStorageEntry, NodeAddress, boolean) - */ - public transient PublicKey receiverPubKeyForRemoveOperation; - private final byte[] receiverPubKeyForRemoveOperationBytes; - - public MailboxStoragePayload(PrefixedSealedAndSignedMessage prefixedSealedAndSignedMessage, PublicKey senderPubKeyForAddOperation, PublicKey receiverPubKeyForRemoveOperation) { - this(prefixedSealedAndSignedMessage, new X509EncodedKeySpec(senderPubKeyForAddOperation.getEncoded()).getEncoded(), - new X509EncodedKeySpec(receiverPubKeyForRemoveOperation.getEncoded()).getEncoded()); - } - - public MailboxStoragePayload(PrefixedSealedAndSignedMessage prefixedSealedAndSignedMessage, byte[] senderPubKeyForAddOperationBytes, byte[] receiverPubKeyForRemoveOperationBytes) { - this.prefixedSealedAndSignedMessage = prefixedSealedAndSignedMessage; - this.senderPubKeyForAddOperationBytes = senderPubKeyForAddOperationBytes; - this.receiverPubKeyForRemoveOperationBytes = receiverPubKeyForRemoveOperationBytes; - init(); - } - - private void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException { - try { - in.defaultReadObject(); - init(); - } catch (Throwable t) { - log.warn("Exception at readObject: " + t.getMessage() + "\nThis= " + this.toString()); - } - } - - private void init() { - try { - senderPubKeyForAddOperation = KeyFactory.getInstance(Sig.KEY_ALGO, "BC").generatePublic(new X509EncodedKeySpec(senderPubKeyForAddOperationBytes)); - receiverPubKeyForRemoveOperation = KeyFactory.getInstance(Sig.KEY_ALGO, "BC").generatePublic(new X509EncodedKeySpec(receiverPubKeyForRemoveOperationBytes)); - } catch (InvalidKeySpecException | NoSuchAlgorithmException | NoSuchProviderException e) { - log.error("Couldn't create the public keys", e); - } - } - - @Override - public long getTTL() { - return TTL; - } - - @Override - public PublicKey getOwnerPubKey() { - return receiverPubKeyForRemoveOperation; - } - - @Override - public Messages.StoragePayload toProtoBuf() { - return Messages.StoragePayload.newBuilder().setMailboxStoragePayload(Messages.MailboxStoragePayload.newBuilder() - .setTTL(TTL) - .setPrefixedSealedAndSignedMessage(prefixedSealedAndSignedMessage.toProtoBuf().getPrefixedSealedAndSignedMessage()) - .setSenderPubKeyForAddOperationBytes(ByteString.copyFrom(senderPubKeyForAddOperationBytes)) - .setReceiverPubKeyForRemoveOperationBytes(ByteString.copyFrom(receiverPubKeyForRemoveOperationBytes))).build(); - } - - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (!(o instanceof MailboxStoragePayload)) return false; - - MailboxStoragePayload that = (MailboxStoragePayload) o; - - return !(prefixedSealedAndSignedMessage != null ? !prefixedSealedAndSignedMessage.equals(that.prefixedSealedAndSignedMessage) : that.prefixedSealedAndSignedMessage != null); - - } - - @Override - public int hashCode() { - return prefixedSealedAndSignedMessage != null ? prefixedSealedAndSignedMessage.hashCode() : 0; - } - - @Override - public String toString() { - return "MailboxStoragePayload{" + - "prefixedSealedAndSignedMessage=" + prefixedSealedAndSignedMessage + - ", senderPubKeyForAddOperation.hashCode()=" + (senderPubKeyForAddOperation != null ? senderPubKeyForAddOperation.hashCode() : "null") + - ", receiverPubKeyForRemoveOperation.hashCode()=" + (receiverPubKeyForRemoveOperation != null ? receiverPubKeyForRemoveOperation.hashCode() : "null") + - '}'; - } -} diff --git a/network/src/main/java/io/bisq/p2p/storage/storageentry/ProtectedMailboxStorageEntry.java b/network/src/main/java/io/bisq/p2p/storage/storageentry/ProtectedMailboxStorageEntry.java index bfd5f627f6..7e9353a20f 100644 --- a/network/src/main/java/io/bisq/p2p/storage/storageentry/ProtectedMailboxStorageEntry.java +++ b/network/src/main/java/io/bisq/p2p/storage/storageentry/ProtectedMailboxStorageEntry.java @@ -5,7 +5,7 @@ import io.bisq.app.Version; import io.bisq.common.crypto.Sig; import io.bisq.common.wire.proto.Messages; import io.bisq.p2p.storage.P2PDataStorage; -import io.bisq.p2p.storage.payload.MailboxStoragePayload; +import io.bisq.payload.MailboxStoragePayload; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/network/src/main/java/io/bisq/p2p/storage/storageentry/ProtectedStorageEntry.java b/network/src/main/java/io/bisq/p2p/storage/storageentry/ProtectedStorageEntry.java index 1935924c16..e448b3d189 100644 --- a/network/src/main/java/io/bisq/p2p/storage/storageentry/ProtectedStorageEntry.java +++ b/network/src/main/java/io/bisq/p2p/storage/storageentry/ProtectedStorageEntry.java @@ -5,9 +5,9 @@ import com.google.protobuf.ByteString; import com.google.protobuf.Message; import io.bisq.app.Version; import io.bisq.common.crypto.Sig; -import io.bisq.common.wire.Payload; import io.bisq.common.wire.proto.Messages; -import io.bisq.p2p.storage.payload.StoragePayload; +import io.bisq.messages.wire.Payload; +import io.bisq.payload.StoragePayload; import lombok.EqualsAndHashCode; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/network/src/test/java/io/bisq/crypto/EncryptionServiceTests.java b/network/src/test/java/io/bisq/crypto/EncryptionServiceTests.java index b64f93946a..1358a4d7e3 100644 --- a/network/src/test/java/io/bisq/crypto/EncryptionServiceTests.java +++ b/network/src/test/java/io/bisq/crypto/EncryptionServiceTests.java @@ -19,12 +19,14 @@ package io.bisq.crypto; import io.bisq.app.Version; -import io.bisq.common.crypto.*; +import io.bisq.common.crypto.CryptoException; import io.bisq.common.wire.proto.Messages; +import io.bisq.messages.DecryptedMsgWithPubKey; import io.bisq.messages.Message; -import io.bisq.p2p.NodeAddress; -import io.bisq.p2p.messaging.MailboxMessage; -import io.bisq.p2p.messaging.PrefixedSealedAndSignedMessage; +import io.bisq.messages.NodeAddress; +import io.bisq.messages.crypto.*; +import io.bisq.messages.p2p.messaging.MailboxMessage; +import io.bisq.messages.p2p.messaging.PrefixedSealedAndSignedMessage; import io.bisq.p2p.peers.keepalive.messages.Ping; import io.bisq.storage.FileUtil; import org.bouncycastle.jce.provider.BouncyCastleProvider; diff --git a/network/src/test/java/io/bisq/p2p/DummySeedNode.java b/network/src/test/java/io/bisq/p2p/DummySeedNode.java index 9e8bb68beb..3042225644 100644 --- a/network/src/test/java/io/bisq/p2p/DummySeedNode.java +++ b/network/src/test/java/io/bisq/p2p/DummySeedNode.java @@ -8,9 +8,11 @@ import io.bisq.common.Clock; import io.bisq.common.CommonOptionKeys; import io.bisq.common.UserThread; import io.bisq.common.util.Utilities; +import io.bisq.messages.NodeAddress; import io.bisq.network.NetworkOptionKeys; import io.bisq.p2p.peers.BanList; import io.bisq.p2p.seed.SeedNodesRepository; +import io.bisq.p2p.storage.P2PService; import org.jetbrains.annotations.Nullable; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/network/src/test/java/io/bisq/p2p/PeerServiceTest.java b/network/src/test/java/io/bisq/p2p/PeerServiceTest.java index 6880d3c4bf..c651b8cdd4 100644 --- a/network/src/test/java/io/bisq/p2p/PeerServiceTest.java +++ b/network/src/test/java/io/bisq/p2p/PeerServiceTest.java @@ -1,6 +1,8 @@ package io.bisq.p2p; +import io.bisq.messages.NodeAddress; import io.bisq.p2p.network.LocalhostNetworkNode; +import io.bisq.p2p.storage.P2PService; import org.junit.After; import org.junit.Before; import org.junit.Ignore; diff --git a/network/src/test/java/io/bisq/p2p/TestUtils.java b/network/src/test/java/io/bisq/p2p/TestUtils.java index 5916a60107..90de79376f 100644 --- a/network/src/test/java/io/bisq/p2p/TestUtils.java +++ b/network/src/test/java/io/bisq/p2p/TestUtils.java @@ -1,9 +1,11 @@ package io.bisq.p2p; import io.bisq.common.Clock; -import io.bisq.common.crypto.KeyRing; import io.bisq.crypto.EncryptionService; +import io.bisq.messages.NodeAddress; +import io.bisq.messages.crypto.KeyRing; import io.bisq.p2p.seed.SeedNodesRepository; +import io.bisq.p2p.storage.P2PService; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/network/src/test/java/io/bisq/p2p/mocks/MockMailboxPayload.java b/network/src/test/java/io/bisq/p2p/mocks/MockMailboxPayload.java index a86f9b40c6..a8e66f3aca 100644 --- a/network/src/test/java/io/bisq/p2p/mocks/MockMailboxPayload.java +++ b/network/src/test/java/io/bisq/p2p/mocks/MockMailboxPayload.java @@ -2,9 +2,9 @@ package io.bisq.p2p.mocks; import io.bisq.app.Version; import io.bisq.common.wire.proto.Messages; -import io.bisq.p2p.NodeAddress; -import io.bisq.p2p.messaging.MailboxMessage; -import io.bisq.p2p.storage.payload.ExpirablePayload; +import io.bisq.messages.NodeAddress; +import io.bisq.messages.p2p.messaging.MailboxMessage; +import io.bisq.payload.ExpirablePayload; import sun.reflect.generics.reflectiveObjects.NotImplementedException; import java.util.UUID; diff --git a/network/src/test/java/io/bisq/p2p/mocks/MockPayload.java b/network/src/test/java/io/bisq/p2p/mocks/MockPayload.java index 1f24b9dec1..25468f3856 100644 --- a/network/src/test/java/io/bisq/p2p/mocks/MockPayload.java +++ b/network/src/test/java/io/bisq/p2p/mocks/MockPayload.java @@ -3,7 +3,7 @@ package io.bisq.p2p.mocks; import io.bisq.app.Version; import io.bisq.common.wire.proto.Messages; import io.bisq.messages.Message; -import io.bisq.p2p.storage.payload.ExpirablePayload; +import io.bisq.payload.ExpirablePayload; import sun.reflect.generics.reflectiveObjects.NotImplementedException; public final class MockPayload implements Message, ExpirablePayload { diff --git a/network/src/test/java/io/bisq/p2p/network/NetworkStressTest.java b/network/src/test/java/io/bisq/p2p/network/NetworkStressTest.java index 8b6ccab9bd..05c578dfed 100644 --- a/network/src/test/java/io/bisq/p2p/network/NetworkStressTest.java +++ b/network/src/test/java/io/bisq/p2p/network/NetworkStressTest.java @@ -3,16 +3,21 @@ package io.bisq.p2p.network; import io.bisq.app.Version; import io.bisq.common.Clock; import io.bisq.common.UserThread; -import io.bisq.common.crypto.KeyRing; -import io.bisq.common.crypto.KeyStorage; -import io.bisq.common.crypto.PubKeyRing; import io.bisq.common.util.Tuple3; import io.bisq.common.wire.proto.Messages; -import io.bisq.crypto.DecryptedMsgWithPubKey; import io.bisq.crypto.EncryptionService; -import io.bisq.p2p.*; -import io.bisq.p2p.messaging.*; +import io.bisq.messages.DecryptedDirectMessageListener; +import io.bisq.messages.DecryptedMsgWithPubKey; +import io.bisq.messages.NodeAddress; +import io.bisq.messages.crypto.KeyRing; +import io.bisq.messages.crypto.KeyStorage; +import io.bisq.messages.crypto.PubKeyRing; +import io.bisq.messages.p2p.messaging.*; +import io.bisq.p2p.DummySeedNode; +import io.bisq.p2p.P2PServiceListener; +import io.bisq.p2p.Utils; import io.bisq.p2p.seed.SeedNodesRepository; +import io.bisq.p2p.storage.P2PService; import javafx.beans.property.BooleanProperty; import javafx.beans.property.SimpleBooleanProperty; import org.bouncycastle.jce.provider.BouncyCastleProvider; diff --git a/network/src/test/java/io/bisq/p2p/network/ProtoBufferUtilitiesTest.java b/network/src/test/java/io/bisq/p2p/network/ProtoBufferUtilitiesTest.java index 78bd0552d2..a60e670d5f 100644 --- a/network/src/test/java/io/bisq/p2p/network/ProtoBufferUtilitiesTest.java +++ b/network/src/test/java/io/bisq/p2p/network/ProtoBufferUtilitiesTest.java @@ -1,7 +1,7 @@ package io.bisq.p2p.network; import io.bisq.common.wire.proto.Messages; -import io.bisq.messages.trade.offer.payload.Offer; +import io.bisq.messages.trade.offer.payload.OfferPayload; import org.junit.Test; import static org.junit.Assert.assertEquals; @@ -15,8 +15,8 @@ public class ProtoBufferUtilitiesTest { public void testEnum() { Messages.Offer.Direction direction = Messages.Offer.Direction.SELL; Messages.Offer.Direction direction2 = Messages.Offer.Direction.BUY; - Offer.Direction realDirection = ProtoBufferUtilities.getDirection(direction); - Offer.Direction realDirection2 = ProtoBufferUtilities.getDirection(direction2); + OfferPayload.Direction realDirection = ProtoBufferUtilities.getDirection(direction); + OfferPayload.Direction realDirection2 = ProtoBufferUtilities.getDirection(direction2); assertEquals("SELL", realDirection.name()); assertEquals("BUY", realDirection2.name()); } diff --git a/network/src/test/java/io/bisq/p2p/routing/PeerManagerTest.java b/network/src/test/java/io/bisq/p2p/routing/PeerManagerTest.java index 76f98d14b6..2f7f41b689 100644 --- a/network/src/test/java/io/bisq/p2p/routing/PeerManagerTest.java +++ b/network/src/test/java/io/bisq/p2p/routing/PeerManagerTest.java @@ -1,10 +1,10 @@ package io.bisq.p2p.routing; +import io.bisq.messages.NodeAddress; import io.bisq.p2p.DummySeedNode; -import io.bisq.p2p.NodeAddress; -import io.bisq.p2p.P2PService; import io.bisq.p2p.P2PServiceListener; import io.bisq.p2p.network.LocalhostNetworkNode; +import io.bisq.p2p.storage.P2PService; import org.junit.After; import org.junit.Before; import org.junit.Ignore; diff --git a/network/src/test/java/io/bisq/p2p/storage/P2PDataStorageTest.java b/network/src/test/java/io/bisq/p2p/storage/P2PDataStorageTest.java index 58fec4481f..4d88d019ce 100644 --- a/network/src/test/java/io/bisq/p2p/storage/P2PDataStorageTest.java +++ b/network/src/test/java/io/bisq/p2p/storage/P2PDataStorageTest.java @@ -3,20 +3,24 @@ package io.bisq.p2p.storage; import com.google.common.collect.Lists; import com.google.protobuf.InvalidProtocolBufferException; import com.google.protobuf.util.JsonFormat; -import io.bisq.common.crypto.*; +import io.bisq.common.crypto.CryptoException; +import io.bisq.common.crypto.Sig; import io.bisq.common.util.Utilities; import io.bisq.common.wire.proto.Messages; import io.bisq.crypto.EncryptionService; +import io.bisq.messages.NodeAddress; import io.bisq.messages.alert.Alert; -import io.bisq.messages.trade.offer.payload.Offer; -import io.bisq.p2p.NodeAddress; +import io.bisq.messages.crypto.Hash; +import io.bisq.messages.crypto.KeyRing; +import io.bisq.messages.crypto.KeyStorage; +import io.bisq.messages.trade.offer.payload.OfferPayload; import io.bisq.p2p.TestUtils; import io.bisq.p2p.network.NetworkNode; import io.bisq.p2p.network.ProtoBufferUtilities; import io.bisq.p2p.peers.Broadcaster; import io.bisq.p2p.storage.mocks.MockData; -import io.bisq.p2p.storage.payload.StoragePayload; import io.bisq.p2p.storage.storageentry.ProtectedStorageEntry; +import io.bisq.payload.StoragePayload; import io.bisq.storage.FileUtil; import lombok.extern.slf4j.Slf4j; import mockit.Mocked; @@ -129,10 +133,10 @@ public class P2PDataStorageTest { @Test public void testOfferRoundtrip() throws InvalidProtocolBufferException { - Offer offer1 = getDummyOffer(); + OfferPayload offer1 = getDummyOffer(); byte[] serialize = Utilities.serialize(offer1); byte[] serialize2 = Utilities.serialize(offer1); - Offer offer1des = Utilities.deserialize(serialize); + OfferPayload offer1des = Utilities.deserialize(serialize); assertTrue(Arrays.equals(serialize, serialize2)); assertTrue(Arrays.equals(Utilities.serialize(offer1des), serialize)); @@ -141,7 +145,7 @@ public class P2PDataStorageTest { JsonFormat.Parser parser = JsonFormat.parser(); Messages.Offer.Builder builder = Messages.Offer.newBuilder(); parser.merge(buffer, builder); - Offer offer2 = ProtoBufferUtilities.getOffer(builder.build()); + OfferPayload offer2 = ProtoBufferUtilities.getOffer(builder.build()); assertEquals(offer1, offer2); for (int i = 0; i < offer1.getArbitratorNodeAddresses().size(); i++) { if (!offer1.getArbitratorNodeAddresses().get(i).equals(offer2.getArbitratorNodeAddresses().get(i))) @@ -179,22 +183,50 @@ public class P2PDataStorageTest { } @NotNull - private Offer getDummyOffer() { + private OfferPayload getDummyOffer() { NodeAddress nodeAddress = new NodeAddress("host", 1000); NodeAddress nodeAddress2 = new NodeAddress("host1", 1001); NodeAddress nodeAddress3 = new NodeAddress("host2", 1002); NodeAddress nodeAddress4 = new NodeAddress("host3", 1002); - return new Offer("id", System.currentTimeMillis(), nodeAddress4, keyRing1.getPubKeyRing(), Offer.Direction.BUY, 1200, 1.5, true, 100, - 50, "USD", Lists.newArrayList(nodeAddress, nodeAddress2, nodeAddress3), "SEPA", "accountid", - "feetxId", "BE", Lists.newArrayList("BE", "AU"), "bankid", Lists.newArrayList("BANK1", "BANK2"), null, - "version", 100, 100, 100, 100, 1000, 1000, false, - false, 1000, 1000, false, "hash", null); + return new OfferPayload("id", + System.currentTimeMillis(), + nodeAddress4, + keyRing1.getPubKeyRing(), + OfferPayload.Direction.BUY, + 1200L, + 1.5, + true, + 100, + 50, + "USD", + Lists.newArrayList(nodeAddress, nodeAddress2, nodeAddress3), + "SEPA", + "accountid", + "feetxId", + "BE", + Lists.newArrayList("BE", "AU"), + "bankid", + Lists.newArrayList("BANK1", "BANK2"), + null, + 100, + 100, + 100, + 100, + 100, + 1000, + true, + true, + 1000, + 10000, + false, + "hash", + null); } @Test public void testProtectedStorageEntryRoundtrip() throws InvalidProtocolBufferException { NodeAddress nodeAddress = new NodeAddress("host", 1000); - Offer offer = getDummyOffer(); + OfferPayload offer = getDummyOffer(); try { String buffer = JsonFormat.printer().print(offer.toProtoBuf().getOffer()); JsonFormat.Parser parser = JsonFormat.parser(); diff --git a/network/src/test/java/io/bisq/p2p/storage/ProtectedDataStorageTest.java b/network/src/test/java/io/bisq/p2p/storage/ProtectedDataStorageTest.java index f1d89470ce..825e3f5970 100644 --- a/network/src/test/java/io/bisq/p2p/storage/ProtectedDataStorageTest.java +++ b/network/src/test/java/io/bisq/p2p/storage/ProtectedDataStorageTest.java @@ -1,10 +1,13 @@ package io.bisq.p2p.storage; import io.bisq.common.UserThread; -import io.bisq.common.crypto.*; +import io.bisq.common.crypto.CryptoException; +import io.bisq.common.crypto.Sig; import io.bisq.crypto.EncryptionService; -import io.bisq.p2p.NodeAddress; -import io.bisq.p2p.P2PService; +import io.bisq.messages.NodeAddress; +import io.bisq.messages.crypto.Hash; +import io.bisq.messages.crypto.KeyRing; +import io.bisq.messages.crypto.KeyStorage; import io.bisq.p2p.TestUtils; import io.bisq.p2p.network.NetworkNode; import io.bisq.p2p.peers.PeerManager; diff --git a/network/src/test/java/io/bisq/p2p/storage/messages/AddDataMessageTest.java b/network/src/test/java/io/bisq/p2p/storage/messages/AddDataMessageTest.java index 2a0b0ec468..2aea05872b 100644 --- a/network/src/test/java/io/bisq/p2p/storage/messages/AddDataMessageTest.java +++ b/network/src/test/java/io/bisq/p2p/storage/messages/AddDataMessageTest.java @@ -1,16 +1,16 @@ package io.bisq.p2p.storage.messages; import io.bisq.common.crypto.CryptoException; -import io.bisq.common.crypto.KeyRing; -import io.bisq.common.crypto.KeyStorage; -import io.bisq.common.crypto.SealedAndSigned; import io.bisq.common.wire.proto.Messages; -import io.bisq.p2p.NodeAddress; -import io.bisq.p2p.messaging.PrefixedSealedAndSignedMessage; +import io.bisq.messages.NodeAddress; +import io.bisq.messages.crypto.KeyRing; +import io.bisq.messages.crypto.KeyStorage; +import io.bisq.messages.crypto.SealedAndSigned; +import io.bisq.messages.p2p.messaging.PrefixedSealedAndSignedMessage; import io.bisq.p2p.network.ProtoBufferUtilities; -import io.bisq.p2p.storage.payload.MailboxStoragePayload; import io.bisq.p2p.storage.storageentry.ProtectedMailboxStorageEntry; import io.bisq.p2p.storage.storageentry.ProtectedStorageEntry; +import io.bisq.payload.MailboxStoragePayload; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.RandomUtils; import org.bouncycastle.jce.provider.BouncyCastleProvider; diff --git a/network/src/test/java/io/bisq/p2p/storage/mocks/MockData.java b/network/src/test/java/io/bisq/p2p/storage/mocks/MockData.java index 97e33294a2..88fcfc06bd 100644 --- a/network/src/test/java/io/bisq/p2p/storage/mocks/MockData.java +++ b/network/src/test/java/io/bisq/p2p/storage/mocks/MockData.java @@ -1,7 +1,7 @@ package io.bisq.p2p.storage.mocks; import io.bisq.common.wire.proto.Messages; -import io.bisq.p2p.storage.payload.StoragePayload; +import io.bisq.payload.StoragePayload; import sun.reflect.generics.reflectiveObjects.NotImplementedException; import java.security.PublicKey; diff --git a/package/linux/LICENSE b/package/linux/LICENSE index dba13ed2dd..5aec298772 100644 --- a/package/linux/LICENSE +++ b/package/linux/LICENSE @@ -25,7 +25,7 @@ want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. Developers that use our General Public Licenses protect your rights -with two steps: (1) assert copyright on the software, and (2) offer +with two steps: (1) assert copyright on the software, and (2) offerPayload you this License which gives you legal permission to copy, distribute and/or modify the software. @@ -191,7 +191,7 @@ keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. +and you may offerPayload support or warranty protection for a fee. 5. Conveying Modified Source Versions. @@ -244,8 +244,8 @@ in one of these ways: b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product + written offerPayload, valid for at least three years and valid for as + long as you offerPayload spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical @@ -255,13 +255,13 @@ in one of these ways: Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This + written offerPayload to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord + only if you received the object code with such an offerPayload, in accord with subsection 6b. d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the + place (gratis or for a charge), and offerPayload equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to @@ -474,7 +474,7 @@ this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and +make, use, sell, offerPayload for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express @@ -540,7 +540,7 @@ License would be to refrain entirely from conveying the Program. 13. Remote Network Interaction; Use with the GNU General Public License. Notwithstanding any other provision of this License, if you modify the -Program, your modified version must prominently offer all users +Program, your modified version must prominently offerPayload all users interacting with it remotely through a computer network (if your version supports such interaction) an opportunity to receive the Corresponding Source of your version by providing access to the Corresponding Source @@ -651,7 +651,7 @@ Also add information on how to contact you by electronic and paper mail. network, you should also make sure that it provides a way for users to get its source. For example, if your program is a web application, its interface could display a "Source" link that leads users to an archive -of the code. There are many ways you could offer source, and different +of the code. There are many ways you could offerPayload source, and different solutions will be better for different programs; see section 13 for the specific requirements. diff --git a/pom.xml b/pom.xml index fb7b02171a..6aa743e7d8 100644 --- a/pom.xml +++ b/pom.xml @@ -44,6 +44,7 @@ jsocks jtorctl jtorproxy + network-messages network gui headless @@ -230,6 +231,11 @@ ${spring.version} test + + org.apache.httpcomponents + httpcore + 4.4.1 + @@ -252,14 +258,14 @@ - + - - + + diff --git a/provider/src/main/java/io/bisq/provider/fee/FeeRequestService.java b/provider/src/main/java/io/bisq/provider/fee/FeeRequestService.java index c31219b1ca..3fd6fcf1e2 100644 --- a/provider/src/main/java/io/bisq/provider/fee/FeeRequestService.java +++ b/provider/src/main/java/io/bisq/provider/fee/FeeRequestService.java @@ -19,7 +19,7 @@ package io.bisq.provider.fee; import io.bisq.common.util.Utilities; import io.bisq.http.HttpException; -import io.bisq.messages.btc.provider.fee.FeeService; +import io.bisq.provider.fee.FeeService; import io.bisq.provider.fee.providers.BtcFeesProvider; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/provider/src/main/java/io/bisq/provider/fee/providers/BtcFeesProvider.java b/provider/src/main/java/io/bisq/provider/fee/providers/BtcFeesProvider.java index c0161a3f67..1dc85deac8 100644 --- a/provider/src/main/java/io/bisq/provider/fee/providers/BtcFeesProvider.java +++ b/provider/src/main/java/io/bisq/provider/fee/providers/BtcFeesProvider.java @@ -4,7 +4,7 @@ import com.google.gson.Gson; import com.google.gson.internal.LinkedTreeMap; import io.bisq.http.HttpClient; import io.bisq.http.HttpException; -import io.bisq.messages.btc.provider.fee.FeeService; +import io.bisq.provider.fee.FeeService; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/provider/src/main/java/io/bisq/provider/price/providers/CoinmarketcapProvider.java b/provider/src/main/java/io/bisq/provider/price/providers/CoinmarketcapProvider.java index f76262610e..5233a1bf27 100644 --- a/provider/src/main/java/io/bisq/provider/price/providers/CoinmarketcapProvider.java +++ b/provider/src/main/java/io/bisq/provider/price/providers/CoinmarketcapProvider.java @@ -4,8 +4,8 @@ import com.google.gson.Gson; import com.google.gson.internal.LinkedTreeMap; import io.bisq.http.HttpClient; import io.bisq.http.HttpException; -import io.bisq.messages.locale.CurrencyUtil; -import io.bisq.messages.locale.TradeCurrency; +import io.bisq.locale.CurrencyUtil; +import io.bisq.locale.TradeCurrency; import io.bisq.provider.price.PriceData; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/provider/src/main/java/io/bisq/provider/price/providers/PoloniexProvider.java b/provider/src/main/java/io/bisq/provider/price/providers/PoloniexProvider.java index f996268545..03d29ca80a 100644 --- a/provider/src/main/java/io/bisq/provider/price/providers/PoloniexProvider.java +++ b/provider/src/main/java/io/bisq/provider/price/providers/PoloniexProvider.java @@ -4,8 +4,8 @@ import com.google.gson.Gson; import com.google.gson.internal.LinkedTreeMap; import io.bisq.http.HttpClient; import io.bisq.http.HttpException; -import io.bisq.messages.locale.CurrencyUtil; -import io.bisq.messages.locale.TradeCurrency; +import io.bisq.locale.CurrencyUtil; +import io.bisq.locale.TradeCurrency; import io.bisq.provider.price.PriceData; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/seednode/src/main/java/io/bisq/seednode/SeedNode.java b/seednode/src/main/java/io/bisq/seednode/SeedNode.java index 8d808238e6..9a49073877 100644 --- a/seednode/src/main/java/io/bisq/seednode/SeedNode.java +++ b/seednode/src/main/java/io/bisq/seednode/SeedNode.java @@ -17,7 +17,7 @@ import io.bisq.common.handlers.ResultHandler; import io.bisq.common.util.LimitedKeyStrengthException; import io.bisq.common.util.Utilities; import io.bisq.p2p.BootstrapListener; -import io.bisq.p2p.P2PService; +import io.bisq.p2p.storage.P2PService; import io.bisq.trade.offer.OpenOfferManager; import io.bisq.trade.statistics.TradeStatisticsManager; import org.apache.commons.lang3.exception.ExceptionUtils; diff --git a/seednode/src/main/java/io/bisq/seednode/SeedNodeModule.java b/seednode/src/main/java/io/bisq/seednode/SeedNodeModule.java index b2a7509382..3898e6aace 100644 --- a/seednode/src/main/java/io/bisq/seednode/SeedNodeModule.java +++ b/seednode/src/main/java/io/bisq/seednode/SeedNodeModule.java @@ -24,12 +24,12 @@ import io.bisq.app.BisqEnvironment; import io.bisq.arbitration.ArbitratorModule; import io.bisq.btc.BitcoinModule; import io.bisq.common.Clock; -import io.bisq.common.crypto.KeyRing; -import io.bisq.common.crypto.KeyStorage; +import io.bisq.messages.crypto.KeyRing; +import io.bisq.messages.crypto.KeyStorage; import io.bisq.crypto.EncryptionServiceModule; import io.bisq.dao.DaoModule; import io.bisq.filter.FilterModule; -import io.bisq.messages.user.Preferences; +import io.bisq.user.Preferences; import io.bisq.p2p.P2PModule; import io.bisq.storage.Storage; import io.bisq.trade.TradeModule; diff --git a/statistics/src/main/java/io/bisq/statistics/Statistics.java b/statistics/src/main/java/io/bisq/statistics/Statistics.java index ee6dfbca80..adde8b837e 100644 --- a/statistics/src/main/java/io/bisq/statistics/Statistics.java +++ b/statistics/src/main/java/io/bisq/statistics/Statistics.java @@ -16,13 +16,13 @@ import io.bisq.common.UserThread; import io.bisq.common.handlers.ResultHandler; import io.bisq.common.util.LimitedKeyStrengthException; import io.bisq.common.util.Utilities; -import io.bisq.messages.locale.CurrencyUtil; -import io.bisq.messages.provider.price.PriceFeedService; import io.bisq.p2p.BootstrapListener; -import io.bisq.p2p.P2PService; +import io.bisq.p2p.storage.P2PService; +import io.bisq.provider.price.PriceFeedService; import io.bisq.trade.offer.OfferBookService; import io.bisq.trade.offer.OpenOfferManager; import io.bisq.trade.statistics.TradeStatisticsManager; +import io.bisq.user.Preferences; import org.apache.commons.lang3.exception.ExceptionUtils; import org.bitcoinj.store.BlockStoreException; import org.bouncycastle.jce.provider.BouncyCastleProvider; @@ -99,7 +99,7 @@ public class Statistics { priceFeedService = injector.getInstance(PriceFeedService.class); // We need the price feed for market based offers - priceFeedService.setCurrencyCode(CurrencyUtil.getDefaultTradeCurrency().getCode()); + priceFeedService.setCurrencyCode(Preferences.getDefaultTradeCurrency().getCode()); priceFeedService.setType(PriceFeedService.Type.LAST); priceFeedService.init(price -> log.debug("price " + price), (errorMessage, throwable) -> log.warn(throwable.getMessage())); diff --git a/statistics/src/main/java/io/bisq/statistics/StatisticsModule.java b/statistics/src/main/java/io/bisq/statistics/StatisticsModule.java index d8d61bf497..934b1956cd 100644 --- a/statistics/src/main/java/io/bisq/statistics/StatisticsModule.java +++ b/statistics/src/main/java/io/bisq/statistics/StatisticsModule.java @@ -24,12 +24,12 @@ import io.bisq.app.BisqEnvironment; import io.bisq.arbitration.ArbitratorModule; import io.bisq.btc.BitcoinModule; import io.bisq.common.Clock; -import io.bisq.common.crypto.KeyRing; -import io.bisq.common.crypto.KeyStorage; +import io.bisq.messages.crypto.KeyRing; +import io.bisq.messages.crypto.KeyStorage; import io.bisq.crypto.EncryptionServiceModule; import io.bisq.dao.DaoModule; import io.bisq.filter.FilterModule; -import io.bisq.messages.user.Preferences; +import io.bisq.user.Preferences; import io.bisq.p2p.P2PModule; import io.bisq.storage.Storage; import io.bisq.trade.TradeModule; From 7920fcb1059380d3a92b7f202f0881f9917daf7a Mon Sep 17 00:00:00 2001 From: Mike Rosseel Date: Thu, 16 Mar 2017 14:39:17 +0100 Subject: [PATCH 2/7] new files (or moves which intellij didn't recognize) --- .../main/java/io/bisq/locale/BankUtil.java | 240 ++++++ .../src/main/java/io/bisq/locale/Country.java | 70 ++ .../src/main/java/io/bisq/locale/Region.java | 65 ++ .../java/io/bisq/messages/alert/Alert.java | 170 +++++ .../messages/alert/PrivateNotification.java | 124 +++ .../alert/PrivateNotificationMessage.java | 86 +++ .../bisq/messages/arbitration/Arbitrator.java | 177 +++++ .../io/bisq/messages/arbitration/Dispute.java | 394 ++++++++++ .../DisputeCommunicationMessage.java | 219 ++++++ .../messages/arbitration/DisputeList.java | 95 +++ .../messages/arbitration/DisputeMessage.java | 47 ++ .../arbitration/DisputeResultMessage.java | 71 ++ .../arbitration/OpenNewDisputeMessage.java | 74 ++ .../arbitration/PeerOpenedDisputeMessage.java | 75 ++ .../PeerPublishedPayoutTxMessage.java | 84 ++ .../arbitration/payload/Attachment.java | 65 ++ .../availability/AvailabilityResult.java | 11 + .../OfferAvailabilityRequest.java | 72 ++ .../OfferAvailabilityResponse.java | 70 ++ .../messages/availability/OfferMessage.java | 50 ++ .../io/bisq/messages/btc/BitcoinNetwork.java | 41 + .../io/bisq/messages/btc/BtcOptionKeys.java | 9 + .../io/bisq/messages/btc/Restrictions.java | 38 + .../java/io/bisq/messages/btc/UserAgent.java | 44 ++ .../btc/data/RawTransactionInput.java | 78 ++ .../dao/blockchain/RpcOptionKeys.java | 9 + .../payload/CompensationRequestPayload.java | 306 ++++++++ .../bisq/messages/filter/payload/Filter.java | 156 ++++ .../filter/payload/PaymentAccountFilter.java | 40 + .../messaging/SendMailboxMessageListener.java | 9 + .../SupportedCapabilitiesMessage.java | 11 + .../bisq/messages/payment/PaymentMethod.java | 211 ++++++ .../payload/AliPayAccountContractData.java | 75 ++ .../payload/BankAccountContractData.java | 138 ++++ .../CashDepositAccountContractData.java | 187 +++++ .../ChaseQuickPayAccountContractData.java | 82 ++ .../ClearXchangeAccountContractData.java | 82 ++ ...ountryBasedPaymentAccountContractData.java | 88 +++ .../CryptoCurrencyAccountContractData.java | 68 ++ .../FasterPaymentsAccountContractData.java | 82 ++ .../InteracETransferAccountContractData.java | 106 +++ .../NationalBankAccountContractData.java | 66 ++ .../payload/OKPayAccountContractData.java | 68 ++ .../payload/PaymentAccountContractData.java | 92 +++ .../PerfectMoneyAccountContractData.java | 68 ++ .../payload/SameBankAccountContractData.java | 68 ++ .../payload/SepaAccountContractData.java | 130 ++++ .../SpecificBanksAccountContractData.java | 101 +++ .../payload/SwishAccountContractData.java | 82 ++ ...USPostalMoneyOrderAccountContractData.java | 84 ++ .../messages/protocol/trade/TradeMessage.java | 57 ++ .../MarketPriceNotAvailableException.java | 7 + .../TradePriceOutOfToleranceException.java | 7 + .../bisq/messages/trade/payload/Contract.java | 287 +++++++ .../messages/DepositTxPublishedMessage.java | 96 +++ .../messages/FiatTransferStartedMessage.java | 105 +++ .../messages/FinalizePayoutTxRequest.java | 117 +++ .../trade/messages/PayDepositRequest.java | 190 +++++ .../messages/PayoutTxFinalizedMessage.java | 96 +++ .../messages/PublishDepositTxRequest.java | 94 +++ .../statistics/payload/TradeStatistics.java | 208 +++++ .../java/io/bisq/messages/util/Validator.java | 57 ++ .../payload/LazyProcessedStoragePayload.java | 8 + .../bisq/payload/MailboxStoragePayload.java | 133 ++++ .../main/java/io/bisq/locale/CountryUtil.java | 220 ++++++ .../java/io/bisq/locale/CryptoCurrency.java | 52 ++ .../java/io/bisq/locale/CurrencyTuple.java | 40 + .../java/io/bisq/locale/CurrencyUtil.java | 360 +++++++++ .../java/io/bisq/locale/FiatCurrency.java | 72 ++ .../java/io/bisq/locale/LanguageUtil.java | 124 +++ .../main/java/io/bisq/locale/LocaleUtil.java | 201 +++++ .../java/io/bisq/locale/TradeCurrency.java | 96 +++ .../availability/OfferAvailabilityModel.java | 73 ++ .../OfferAvailabilityProtocol.java | 152 ++++ .../ProcessOfferAvailabilityResponse.java | 61 ++ .../tasks/SendOfferAvailabilityRequest.java | 65 ++ .../io/bisq/provider/HttpClientProvider.java | 21 + .../io/bisq/provider/ProvidersRepository.java | 62 ++ .../java/io/bisq/provider/fee/FeeData.java | 14 + .../io/bisq/provider/fee/FeeProvider.java | 40 + .../java/io/bisq/provider/fee/FeeRequest.java | 40 + .../java/io/bisq/provider/fee/FeeService.java | 155 ++++ .../io/bisq/provider/price/MarketPrice.java | 69 ++ .../bisq/provider/price/PriceFeedService.java | 234 ++++++ .../io/bisq/provider/price/PriceProvider.java | 47 ++ .../io/bisq/provider/price/PriceRequest.java | 40 + .../provider/price/PriceRequestException.java | 7 + .../java/io/bisq/user/BlockChainExplorer.java | 40 + .../main/java/io/bisq/user/Preferences.java | 715 ++++++++++++++++++ 89 files changed, 9340 insertions(+) create mode 100644 common/src/main/java/io/bisq/locale/BankUtil.java create mode 100644 common/src/main/java/io/bisq/locale/Country.java create mode 100644 common/src/main/java/io/bisq/locale/Region.java create mode 100644 network-messages/src/main/java/io/bisq/messages/alert/Alert.java create mode 100644 network-messages/src/main/java/io/bisq/messages/alert/PrivateNotification.java create mode 100644 network-messages/src/main/java/io/bisq/messages/alert/PrivateNotificationMessage.java create mode 100644 network-messages/src/main/java/io/bisq/messages/arbitration/Arbitrator.java create mode 100644 network-messages/src/main/java/io/bisq/messages/arbitration/Dispute.java create mode 100644 network-messages/src/main/java/io/bisq/messages/arbitration/DisputeCommunicationMessage.java create mode 100644 network-messages/src/main/java/io/bisq/messages/arbitration/DisputeList.java create mode 100644 network-messages/src/main/java/io/bisq/messages/arbitration/DisputeMessage.java create mode 100644 network-messages/src/main/java/io/bisq/messages/arbitration/DisputeResultMessage.java create mode 100644 network-messages/src/main/java/io/bisq/messages/arbitration/OpenNewDisputeMessage.java create mode 100644 network-messages/src/main/java/io/bisq/messages/arbitration/PeerOpenedDisputeMessage.java create mode 100644 network-messages/src/main/java/io/bisq/messages/arbitration/PeerPublishedPayoutTxMessage.java create mode 100644 network-messages/src/main/java/io/bisq/messages/arbitration/payload/Attachment.java create mode 100644 network-messages/src/main/java/io/bisq/messages/availability/AvailabilityResult.java create mode 100644 network-messages/src/main/java/io/bisq/messages/availability/OfferAvailabilityRequest.java create mode 100644 network-messages/src/main/java/io/bisq/messages/availability/OfferAvailabilityResponse.java create mode 100644 network-messages/src/main/java/io/bisq/messages/availability/OfferMessage.java create mode 100644 network-messages/src/main/java/io/bisq/messages/btc/BitcoinNetwork.java create mode 100644 network-messages/src/main/java/io/bisq/messages/btc/BtcOptionKeys.java create mode 100644 network-messages/src/main/java/io/bisq/messages/btc/Restrictions.java create mode 100644 network-messages/src/main/java/io/bisq/messages/btc/UserAgent.java create mode 100644 network-messages/src/main/java/io/bisq/messages/btc/data/RawTransactionInput.java create mode 100644 network-messages/src/main/java/io/bisq/messages/dao/blockchain/RpcOptionKeys.java create mode 100644 network-messages/src/main/java/io/bisq/messages/dao/compensation/payload/CompensationRequestPayload.java create mode 100644 network-messages/src/main/java/io/bisq/messages/filter/payload/Filter.java create mode 100644 network-messages/src/main/java/io/bisq/messages/filter/payload/PaymentAccountFilter.java create mode 100644 network-messages/src/main/java/io/bisq/messages/p2p/messaging/SendMailboxMessageListener.java create mode 100644 network-messages/src/main/java/io/bisq/messages/p2p/messaging/SupportedCapabilitiesMessage.java create mode 100644 network-messages/src/main/java/io/bisq/messages/payment/PaymentMethod.java create mode 100644 network-messages/src/main/java/io/bisq/messages/payment/payload/AliPayAccountContractData.java create mode 100644 network-messages/src/main/java/io/bisq/messages/payment/payload/BankAccountContractData.java create mode 100644 network-messages/src/main/java/io/bisq/messages/payment/payload/CashDepositAccountContractData.java create mode 100644 network-messages/src/main/java/io/bisq/messages/payment/payload/ChaseQuickPayAccountContractData.java create mode 100644 network-messages/src/main/java/io/bisq/messages/payment/payload/ClearXchangeAccountContractData.java create mode 100644 network-messages/src/main/java/io/bisq/messages/payment/payload/CountryBasedPaymentAccountContractData.java create mode 100644 network-messages/src/main/java/io/bisq/messages/payment/payload/CryptoCurrencyAccountContractData.java create mode 100644 network-messages/src/main/java/io/bisq/messages/payment/payload/FasterPaymentsAccountContractData.java create mode 100644 network-messages/src/main/java/io/bisq/messages/payment/payload/InteracETransferAccountContractData.java create mode 100644 network-messages/src/main/java/io/bisq/messages/payment/payload/NationalBankAccountContractData.java create mode 100644 network-messages/src/main/java/io/bisq/messages/payment/payload/OKPayAccountContractData.java create mode 100644 network-messages/src/main/java/io/bisq/messages/payment/payload/PaymentAccountContractData.java create mode 100644 network-messages/src/main/java/io/bisq/messages/payment/payload/PerfectMoneyAccountContractData.java create mode 100644 network-messages/src/main/java/io/bisq/messages/payment/payload/SameBankAccountContractData.java create mode 100644 network-messages/src/main/java/io/bisq/messages/payment/payload/SepaAccountContractData.java create mode 100644 network-messages/src/main/java/io/bisq/messages/payment/payload/SpecificBanksAccountContractData.java create mode 100644 network-messages/src/main/java/io/bisq/messages/payment/payload/SwishAccountContractData.java create mode 100644 network-messages/src/main/java/io/bisq/messages/payment/payload/USPostalMoneyOrderAccountContractData.java create mode 100644 network-messages/src/main/java/io/bisq/messages/protocol/trade/TradeMessage.java create mode 100644 network-messages/src/main/java/io/bisq/messages/trade/exceptions/MarketPriceNotAvailableException.java create mode 100644 network-messages/src/main/java/io/bisq/messages/trade/exceptions/TradePriceOutOfToleranceException.java create mode 100644 network-messages/src/main/java/io/bisq/messages/trade/payload/Contract.java create mode 100644 network-messages/src/main/java/io/bisq/messages/trade/protocol/trade/messages/DepositTxPublishedMessage.java create mode 100644 network-messages/src/main/java/io/bisq/messages/trade/protocol/trade/messages/FiatTransferStartedMessage.java create mode 100644 network-messages/src/main/java/io/bisq/messages/trade/protocol/trade/messages/FinalizePayoutTxRequest.java create mode 100644 network-messages/src/main/java/io/bisq/messages/trade/protocol/trade/messages/PayDepositRequest.java create mode 100644 network-messages/src/main/java/io/bisq/messages/trade/protocol/trade/messages/PayoutTxFinalizedMessage.java create mode 100644 network-messages/src/main/java/io/bisq/messages/trade/protocol/trade/messages/PublishDepositTxRequest.java create mode 100644 network-messages/src/main/java/io/bisq/messages/trade/statistics/payload/TradeStatistics.java create mode 100644 network-messages/src/main/java/io/bisq/messages/util/Validator.java create mode 100644 network-messages/src/main/java/io/bisq/payload/LazyProcessedStoragePayload.java create mode 100644 network-messages/src/main/java/io/bisq/payload/MailboxStoragePayload.java create mode 100644 network/src/main/java/io/bisq/locale/CountryUtil.java create mode 100644 network/src/main/java/io/bisq/locale/CryptoCurrency.java create mode 100644 network/src/main/java/io/bisq/locale/CurrencyTuple.java create mode 100644 network/src/main/java/io/bisq/locale/CurrencyUtil.java create mode 100644 network/src/main/java/io/bisq/locale/FiatCurrency.java create mode 100644 network/src/main/java/io/bisq/locale/LanguageUtil.java create mode 100644 network/src/main/java/io/bisq/locale/LocaleUtil.java create mode 100644 network/src/main/java/io/bisq/locale/TradeCurrency.java create mode 100644 network/src/main/java/io/bisq/p2p/protocol/availability/OfferAvailabilityModel.java create mode 100644 network/src/main/java/io/bisq/p2p/protocol/availability/OfferAvailabilityProtocol.java create mode 100644 network/src/main/java/io/bisq/protocol/availability/tasks/ProcessOfferAvailabilityResponse.java create mode 100644 network/src/main/java/io/bisq/protocol/availability/tasks/SendOfferAvailabilityRequest.java create mode 100644 network/src/main/java/io/bisq/provider/HttpClientProvider.java create mode 100644 network/src/main/java/io/bisq/provider/ProvidersRepository.java create mode 100644 network/src/main/java/io/bisq/provider/fee/FeeData.java create mode 100644 network/src/main/java/io/bisq/provider/fee/FeeProvider.java create mode 100644 network/src/main/java/io/bisq/provider/fee/FeeRequest.java create mode 100644 network/src/main/java/io/bisq/provider/fee/FeeService.java create mode 100644 network/src/main/java/io/bisq/provider/price/MarketPrice.java create mode 100644 network/src/main/java/io/bisq/provider/price/PriceFeedService.java create mode 100644 network/src/main/java/io/bisq/provider/price/PriceProvider.java create mode 100644 network/src/main/java/io/bisq/provider/price/PriceRequest.java create mode 100644 network/src/main/java/io/bisq/provider/price/PriceRequestException.java create mode 100644 network/src/main/java/io/bisq/user/BlockChainExplorer.java create mode 100644 network/src/main/java/io/bisq/user/Preferences.java diff --git a/common/src/main/java/io/bisq/locale/BankUtil.java b/common/src/main/java/io/bisq/locale/BankUtil.java new file mode 100644 index 0000000000..06461d7745 --- /dev/null +++ b/common/src/main/java/io/bisq/locale/BankUtil.java @@ -0,0 +1,240 @@ +/* + * This file is part of bisq. + * + * bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with bisq. If not, see . + */ + +package io.bisq.locale; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +public class BankUtil { + + private static final Logger log = LoggerFactory.getLogger(BankUtil.class); + + // BankName + public static boolean isBankNameRequired(String countryCode) { + switch (countryCode) { + case "GB": + case "US": + case "NZ": + case "AU": + case "CA": + case "SE": + case "HK": + // We show always the bank name as it is needed in specific banks. + // Though that handling should be optimized in futures. + return true; + // return false; + case "MX": + case "BR": + return true; + default: + return true; + } + } + + public static String getBankNameLabel(String countryCode) { + switch (countryCode) { + case "BR": + return Res.get("payment.bank.name"); + default: + return isBankNameRequired(countryCode) ? Res.get("payment.bank.name") : Res.get("payment.bank.nameOptional"); + } + } + + // BankId + public static boolean isBankIdRequired(String countryCode) { + switch (countryCode) { + case "GB": + case "US": + case "BR": + case "NZ": + case "AU": + case "SE": + case "CL": + case "NO": + return false; + case "CA": + case "MX": + case "HK": + return true; + default: + return true; + } + } + + public static String getBankIdLabel(String countryCode) { + switch (countryCode) { + case "CA": + return "Institution Number:";// do not translate as it is used in english only + case "MX": + case "HK": + return Res.get("payment.bankCode"); + default: + return isBankIdRequired(countryCode) ? Res.get("payment.bankId") : Res.get("payment.bankIdOptional"); + } + + } + + // BranchId + public static boolean isBranchIdRequired(String countryCode) { + switch (countryCode) { + case "GB": + case "US": + case "BR": + case "AU": + case "CA": + return true; + case "NZ": + case "MX": + case "HK": + case "SE": + case "NO": + return false; + default: + return true; + } + } + + public static String getBranchIdLabel(String countryCode) { + switch (countryCode) { + case "GB": + return "UK sort code:"; // do not translate as it is used in english only + case "US": + return "Routing Number:"; // do not translate as it is used in english only + case "BR": + return "Código da Agência:"; // do not translate as it is used in portuguese only + case "AU": + return "BSB code:"; // do not translate as it is used in english only + case "CA": + return "Transit Number:"; // do not translate as it is used in english only + default: + return isBranchIdRequired(countryCode) ? Res.get("payment.branchNr") : Res.get("payment.branchNrOptional"); + } + } + + + // AccountNr + public static boolean isAccountNrRequired(String countryCode) { + switch (countryCode) { + default: + return true; + } + } + + public static String getAccountNrLabel(String countryCode) { + switch (countryCode) { + case "GB": + case "US": + case "BR": + case "NZ": + case "AU": + case "CA": + case "HK": + return Res.get("payment.accountNr"); + case "NO": + return "Kontonummer:"; // do not translate as it is used in norwegian only + case "SE": + return "Bankgiro number:"; // do not translate as it is used in swedish only + case "MX": + return "CLABE:"; // do not translate as it is used in spanish only + case "CL": + return "Cuenta:"; // do not translate as it is used in spanish only + default: + return Res.get("payment.accountNrLabel"); + } + } + + // AccountType + public static boolean isAccountTypeRequired(String countryCode) { + switch (countryCode) { + case "US": + case "BR": + case "CA": + return true; + default: + return false; + } + } + + public static String getAccountTypeLabel(String countryCode) { + switch (countryCode) { + case "US": + case "BR": + case "CA": + return Res.get("payment.accountType"); + default: + return ""; + } + } + + public static List getAccountTypeValues(String countryCode) { + switch (countryCode) { + case "US": + case "BR": + case "CA": + return Arrays.asList(Res.get("payment.checking"), Res.get("payment.savings")); + default: + return new ArrayList<>(); + } + } + + + // HolderId + public static boolean isHolderIdRequired(String countryCode) { + switch (countryCode) { + case "BR": + case "CL": + return true; + default: + return false; + } + } + + public static String getHolderIdLabel(String countryCode) { + switch (countryCode) { + case "BR": + return "Cadastro de Pessoas Físicas (CPF):"; // do not translate as it is used in portuguese only + case "CL": + return "Rol Único Tributario (RUT):"; // do not translate as it is used in spanish only + default: + return Res.get("payment.personalId"); + } + } + + // Validation + public static boolean useValidation(String countryCode) { + switch (countryCode) { + case "GB": + case "US": + case "BR": + case "AU": + case "CA": + case "NZ": + case "MX": + case "HK": + case "SE": + case "NO": + return true; + default: + return false; + } + } +} diff --git a/common/src/main/java/io/bisq/locale/Country.java b/common/src/main/java/io/bisq/locale/Country.java new file mode 100644 index 0000000000..299cdb1942 --- /dev/null +++ b/common/src/main/java/io/bisq/locale/Country.java @@ -0,0 +1,70 @@ +/* + * This file is part of bisq. + * + * bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with bisq. If not, see . + */ + +package io.bisq.locale; + +import io.bisq.app.Version; +import io.bisq.common.persistance.Persistable; + +import javax.annotation.concurrent.Immutable; + +@Immutable +public final class Country implements Persistable { + // That object is saved to disc. We need to take care of changes to not break deserialization. + private static final long serialVersionUID = Version.LOCAL_DB_VERSION; + + public final String code; + public final String name; + public final Region region; + + public Country(String code, String name, Region region) { + this.code = code; + this.name = name; + this.region = region; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + + Country country = (Country) o; + + if (code != null ? !code.equals(country.code) : country.code != null) return false; + //noinspection SimplifiableIfStatement + if (name != null ? !name.equals(country.name) : country.name != null) return false; + return !(region != null ? !region.equals(country.region) : country.region != null); + + } + + @Override + public int hashCode() { + int result = code != null ? code.hashCode() : 0; + result = 31 * result + (name != null ? name.hashCode() : 0); + result = 31 * result + (region != null ? region.hashCode() : 0); + return result; + } + + @Override + public String toString() { + return "Country{" + + "code='" + code + '\'' + + ", name='" + name + '\'' + + ", region=" + region + + '}'; + } +} diff --git a/common/src/main/java/io/bisq/locale/Region.java b/common/src/main/java/io/bisq/locale/Region.java new file mode 100644 index 0000000000..c633ab260b --- /dev/null +++ b/common/src/main/java/io/bisq/locale/Region.java @@ -0,0 +1,65 @@ +/* + * This file is part of bisq. + * + * bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with bisq. If not, see . + */ + +package io.bisq.locale; + +import io.bisq.app.Version; +import io.bisq.common.persistance.Persistable; + +import javax.annotation.concurrent.Immutable; + +@Immutable +public final class Region implements Persistable { + // That object is saved to disc. We need to take care of changes to not break deserialization. + private static final long serialVersionUID = Version.LOCAL_DB_VERSION; + + public final String code; + public final String name; + + public Region(String code, String name) { + this.code = code; + this.name = name; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + + Region region = (Region) o; + + //noinspection SimplifiableIfStatement + if (code != null ? !code.equals(region.code) : region.code != null) return false; + return !(name != null ? !name.equals(region.name) : region.name != null); + + } + + @Override + public int hashCode() { + int result = code != null ? code.hashCode() : 0; + result = 31 * result + (name != null ? name.hashCode() : 0); + return result; + } + + @Override + public String toString() { + return "Region{" + + "code='" + code + '\'' + + ", name='" + name + '\'' + + '}'; + } +} diff --git a/network-messages/src/main/java/io/bisq/messages/alert/Alert.java b/network-messages/src/main/java/io/bisq/messages/alert/Alert.java new file mode 100644 index 0000000000..4257086263 --- /dev/null +++ b/network-messages/src/main/java/io/bisq/messages/alert/Alert.java @@ -0,0 +1,170 @@ +/* + * This file is part of bisq. + * + * bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with bisq. If not, see . + */ + +package io.bisq.messages.alert; + +import com.google.common.annotations.VisibleForTesting; +import com.google.protobuf.ByteString; +import io.bisq.app.Version; +import io.bisq.common.crypto.Sig; +import io.bisq.common.wire.proto.Messages; +import io.bisq.payload.StoragePayload; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.IOException; +import java.security.KeyFactory; +import java.security.NoSuchAlgorithmException; +import java.security.NoSuchProviderException; +import java.security.PublicKey; +import java.security.spec.InvalidKeySpecException; +import java.security.spec.X509EncodedKeySpec; +import java.util.Arrays; +import java.util.concurrent.TimeUnit; + +public final class Alert implements StoragePayload { + // That object is sent over the wire, so we need to take care of version compatibility. + private static final long serialVersionUID = Version.P2P_NETWORK_VERSION; + private static final Logger log = LoggerFactory.getLogger(Alert.class); + private static final long TTL = TimeUnit.DAYS.toMillis(21); + + public final String message; + public final String version; + public final boolean isUpdateInfo; + private String signatureAsBase64; + private transient PublicKey storagePublicKey; + private byte[] storagePublicKeyBytes; + + public Alert(String message, boolean isUpdateInfo, String version) { + this.message = message; + this.isUpdateInfo = isUpdateInfo; + this.version = version; + } + + public Alert(String message, boolean isUpdateInfo, String version, byte[] storagePublicKeyBytes, + String signatureAsBase64) { + this(message, isUpdateInfo, version); + this.storagePublicKeyBytes = storagePublicKeyBytes; + this.signatureAsBase64 = signatureAsBase64; + init(); + } + + private void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException { + try { + in.defaultReadObject(); + init(); + } catch (Throwable t) { + log.warn("Exception at readObject: " + t.getMessage()); + } + } + + private void init() { + try { + storagePublicKey = KeyFactory.getInstance(Sig.KEY_ALGO, "BC").generatePublic(new X509EncodedKeySpec(storagePublicKeyBytes)); + } catch (InvalidKeySpecException | NoSuchAlgorithmException | NoSuchProviderException e) { + log.error("Couldn't create the storage public key", e); + } + } + + public void setSigAndPubKey(String signatureAsBase64, PublicKey storagePublicKey) { + this.signatureAsBase64 = signatureAsBase64; + this.storagePublicKey = storagePublicKey; + this.storagePublicKeyBytes = new X509EncodedKeySpec(this.storagePublicKey.getEncoded()).getEncoded(); + } + + public String getSignatureAsBase64() { + return signatureAsBase64; + } + + public boolean isNewVersion() { + return isNewVersion(Version.VERSION); + } + + @VisibleForTesting + protected boolean isNewVersion(String appVersion) { + // Usually we use 3 digits (0.4.8) but to support also 4 digits in case of hotfixes (0.4.8.1) we + // add a 0 at all 3 digit versions to allow correct comparison: 0.4.8 -> 480; 0.4.8.1 -> 481; 481 > 480 + String myVersionString = appVersion.replace(".", ""); + if (myVersionString.length() == 3) + myVersionString += "0"; + int versionNum = Integer.valueOf(myVersionString); + + String alertVersionString = version.replace(".", ""); + if (alertVersionString.length() == 3) + alertVersionString += "0"; + int alertVersionNum = Integer.valueOf(alertVersionString); + return versionNum < alertVersionNum; + } + + @Override + public long getTTL() { + return TTL; + } + + @Override + public PublicKey getOwnerPubKey() { + return storagePublicKey; + } + + @Override + public Messages.StoragePayload toProtoBuf() { + return Messages.StoragePayload.newBuilder().setAlert(Messages.Alert.newBuilder().setTTL(TTL) + .setMessage(message) + .setVersion(version) + .setIsUpdateInfo(isUpdateInfo) + .setSignatureAsBase64(signatureAsBase64) + .setStoragePublicKeyBytes(ByteString.copyFrom(storagePublicKeyBytes))).build(); + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (!(o instanceof Alert)) return false; + + Alert alert = (Alert) o; + + if (isUpdateInfo != alert.isUpdateInfo) return false; + if (message != null ? !message.equals(alert.message) : alert.message != null) return false; + if (version != null ? !version.equals(alert.version) : alert.version != null) return false; + if (signatureAsBase64 != null ? !signatureAsBase64.equals(alert.signatureAsBase64) : alert.signatureAsBase64 != null) + return false; + return Arrays.equals(storagePublicKeyBytes, alert.storagePublicKeyBytes); + + } + + @Override + public int hashCode() { + int result = message != null ? message.hashCode() : 0; + result = 31 * result + (version != null ? version.hashCode() : 0); + result = 31 * result + (isUpdateInfo ? 1 : 0); + result = 31 * result + (signatureAsBase64 != null ? signatureAsBase64.hashCode() : 0); + result = 31 * result + (storagePublicKeyBytes != null ? Arrays.hashCode(storagePublicKeyBytes) : 0); + return result; + } + + + @Override + public String toString() { + return "Alert{" + + "message='" + message + '\'' + + ", version='" + version + '\'' + + ", isUpdateInfo=" + isUpdateInfo + + ", signatureAsBase64='" + signatureAsBase64 + '\'' + + ", storagePublicKeyBytes=" + Arrays.toString(storagePublicKeyBytes) + + '}'; + } +} diff --git a/network-messages/src/main/java/io/bisq/messages/alert/PrivateNotification.java b/network-messages/src/main/java/io/bisq/messages/alert/PrivateNotification.java new file mode 100644 index 0000000000..12160561c6 --- /dev/null +++ b/network-messages/src/main/java/io/bisq/messages/alert/PrivateNotification.java @@ -0,0 +1,124 @@ +/* + * This file is part of bisq. + * + * bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with bisq. If not, see . + */ + +package io.bisq.messages.alert; + +import com.google.protobuf.ByteString; +import io.bisq.app.Version; +import io.bisq.common.crypto.Sig; +import io.bisq.messages.wire.Payload; +import io.bisq.common.wire.proto.Messages; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.IOException; +import java.security.KeyFactory; +import java.security.NoSuchAlgorithmException; +import java.security.NoSuchProviderException; +import java.security.PublicKey; +import java.security.spec.InvalidKeySpecException; +import java.security.spec.X509EncodedKeySpec; +import java.util.Arrays; + +public final class PrivateNotification implements Payload { + // That object is sent over the wire, so we need to take care of version compatibility. + private static final long serialVersionUID = Version.P2P_NETWORK_VERSION; + private static final Logger log = LoggerFactory.getLogger(PrivateNotification.class); + + public final String message; + private String signatureAsBase64; + private transient PublicKey publicKey; + private byte[] publicKeyBytes; + + public PrivateNotification(String message) { + this.message = message; + } + + public PrivateNotification(String message, String signatureAsBase64, byte[] publicKeyBytes) { + this(message); + this.signatureAsBase64 = signatureAsBase64; + this.publicKeyBytes = publicKeyBytes; + init(); + } + + private void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException { + try { + in.defaultReadObject(); + init(); + } catch (Throwable t) { + log.warn("Exception at readObject: " + t.getMessage()); + } + } + + private void init() { + try { + publicKey = KeyFactory.getInstance(Sig.KEY_ALGO, "BC").generatePublic(new X509EncodedKeySpec(publicKeyBytes)); + } catch (InvalidKeySpecException | NoSuchAlgorithmException | NoSuchProviderException e) { + log.error("Could not create public key from bytes", e); + } + } + + public void setSigAndPubKey(String signatureAsBase64, PublicKey storagePublicKey) { + this.signatureAsBase64 = signatureAsBase64; + this.publicKey = storagePublicKey; + this.publicKeyBytes = new X509EncodedKeySpec(this.publicKey.getEncoded()).getEncoded(); + } + + public String getSignatureAsBase64() { + return signatureAsBase64; + } + + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (!(o instanceof PrivateNotification)) return false; + + PrivateNotification that = (PrivateNotification) o; + + if (message != null ? !message.equals(that.message) : that.message != null) return false; + if (signatureAsBase64 != null ? !signatureAsBase64.equals(that.signatureAsBase64) : that.signatureAsBase64 != null) + return false; + return Arrays.equals(publicKeyBytes, that.publicKeyBytes); + + } + + @Override + public int hashCode() { + int result = message != null ? message.hashCode() : 0; + result = 31 * result + (signatureAsBase64 != null ? signatureAsBase64.hashCode() : 0); + result = 31 * result + (publicKeyBytes != null ? Arrays.hashCode(publicKeyBytes) : 0); + return result; + } + + @Override + public String toString() { + return "PrivateNotification{" + + "message='" + message + '\'' + + ", signatureAsBase64='" + signatureAsBase64 + '\'' + + ", publicKeyBytes=" + Arrays.toString(publicKeyBytes) + + '}'; + } + + @Override + public Messages.PrivateNotification toProtoBuf() { + return Messages.PrivateNotification.newBuilder() + .setMessage(message) + .setSignatureAsBase64(signatureAsBase64) + .setPublicKeyBytes(ByteString.copyFrom(publicKeyBytes)).build(); + } +} diff --git a/network-messages/src/main/java/io/bisq/messages/alert/PrivateNotificationMessage.java b/network-messages/src/main/java/io/bisq/messages/alert/PrivateNotificationMessage.java new file mode 100644 index 0000000000..af00193ceb --- /dev/null +++ b/network-messages/src/main/java/io/bisq/messages/alert/PrivateNotificationMessage.java @@ -0,0 +1,86 @@ +package io.bisq.messages.alert; + +import io.bisq.app.Version; +import io.bisq.common.wire.proto.Messages; +import io.bisq.messages.NodeAddress; +import io.bisq.messages.p2p.messaging.MailboxMessage; +import io.bisq.messages.util.ProtoBufferUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.util.UUID; + +public class PrivateNotificationMessage implements MailboxMessage { + // That object is sent over the wire, so we need to take care of version compatibility. + private static final long serialVersionUID = Version.P2P_NETWORK_VERSION; + private static final Logger log = LoggerFactory.getLogger(PrivateNotificationMessage.class); + private NodeAddress myNodeAddress; + public PrivateNotification privateNotification; + private final String uid = UUID.randomUUID().toString(); + private final int messageVersion = Version.getP2PMessageVersion(); + + public PrivateNotificationMessage(PrivateNotification privateNotification, NodeAddress myNodeAddress) { + this.myNodeAddress = myNodeAddress; + this.privateNotification = privateNotification; + } + + @Override + public NodeAddress getSenderNodeAddress() { + return myNodeAddress; + } + + @Override + public String getUID() { + return uid; + } + + @Override + public int getMessageVersion() { + return messageVersion; + } + + @Override + public Messages.Envelope toProtoBuf() { + Messages.Envelope.Builder baseEnvelope = ProtoBufferUtils.getBaseEnvelope(); + return baseEnvelope.setPrivateNotificationMessage(baseEnvelope.getPrivateNotificationMessageBuilder() + .setMessageVersion(messageVersion) + .setUid(uid) + .setMyNodeAddress(myNodeAddress.toProtoBuf()) + .setPrivateNotification(privateNotification.toProtoBuf())).build(); + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (!(o instanceof PrivateNotificationMessage)) return false; + + PrivateNotificationMessage that = (PrivateNotificationMessage) o; + + if (messageVersion != that.messageVersion) return false; + if (myNodeAddress != null ? !myNodeAddress.equals(that.myNodeAddress) : that.myNodeAddress != null) + return false; + if (privateNotification != null ? !privateNotification.equals(that.privateNotification) : that.privateNotification != null) + return false; + return !(uid != null ? !uid.equals(that.uid) : that.uid != null); + + } + + @Override + public int hashCode() { + int result = myNodeAddress != null ? myNodeAddress.hashCode() : 0; + result = 31 * result + (privateNotification != null ? privateNotification.hashCode() : 0); + result = 31 * result + (uid != null ? uid.hashCode() : 0); + result = 31 * result + messageVersion; + return result; + } + + @Override + public String toString() { + return "PrivateNotificationMessage{" + + "myNodeAddress=" + myNodeAddress + + ", privateNotification=" + privateNotification + + ", uid='" + uid + '\'' + + ", messageVersion=" + messageVersion + + '}'; + } +} diff --git a/network-messages/src/main/java/io/bisq/messages/arbitration/Arbitrator.java b/network-messages/src/main/java/io/bisq/messages/arbitration/Arbitrator.java new file mode 100644 index 0000000000..7a4e362a37 --- /dev/null +++ b/network-messages/src/main/java/io/bisq/messages/arbitration/Arbitrator.java @@ -0,0 +1,177 @@ +/* + * This file is part of bisq. + * + * bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with bisq. If not, see . + */ + +package io.bisq.messages.arbitration; + +import com.google.protobuf.ByteString; +import io.bisq.app.Version; +import io.bisq.common.wire.proto.Messages; +import io.bisq.messages.NodeAddress; +import io.bisq.messages.crypto.PubKeyRing; +import io.bisq.payload.StoragePayload; + +import java.security.PublicKey; +import java.util.Arrays; +import java.util.Date; +import java.util.List; +import java.util.concurrent.TimeUnit; + +public final class Arbitrator implements StoragePayload { + // That object is sent over the wire, so we need to take care of version compatibility. + private static final long serialVersionUID = Version.P2P_NETWORK_VERSION; + + public static final long TTL = TimeUnit.DAYS.toMillis(10); + + // Persisted fields + private final byte[] btcPubKey; + private final PubKeyRing pubKeyRing; + private final NodeAddress arbitratorNodeAddress; + private final List languageCodes; + private final String btcAddress; + private final long registrationDate; + private final String registrationSignature; + private final byte[] registrationPubKey; + + public Arbitrator(NodeAddress arbitratorNodeAddress, + byte[] btcPubKey, + String btcAddress, + PubKeyRing pubKeyRing, + List languageCodes, + Date registrationDate, + byte[] registrationPubKey, + String registrationSignature) { + this.arbitratorNodeAddress = arbitratorNodeAddress; + this.btcPubKey = btcPubKey; + this.btcAddress = btcAddress; + this.pubKeyRing = pubKeyRing; + this.languageCodes = languageCodes; + this.registrationDate = registrationDate.getTime(); + this.registrationPubKey = registrationPubKey; + this.registrationSignature = registrationSignature; + } + + + /////////////////////////////////////////////////////////////////////////////////////////// + // Getters + /////////////////////////////////////////////////////////////////////////////////////////// + + @Override + public long getTTL() { + return TTL; + } + + @Override + public PublicKey getOwnerPubKey() { + return pubKeyRing.getSignaturePubKey(); + } + + public byte[] getBtcPubKey() { + return btcPubKey; + } + + public PubKeyRing getPubKeyRing() { + return pubKeyRing; + } + + public NodeAddress getArbitratorNodeAddress() { + return arbitratorNodeAddress; + } + + public Date getRegistrationDate() { + return new Date(registrationDate); + } + + public String getBtcAddress() { + return btcAddress; + } + + public List getLanguageCodes() { + return languageCodes; + } + + public String getRegistrationSignature() { + return registrationSignature; + } + + public byte[] getRegistrationPubKey() { + return registrationPubKey; + } + + + @Override + public Messages.StoragePayload toProtoBuf() { + return Messages.StoragePayload.newBuilder().setArbitrator(Messages.Arbitrator.newBuilder() + .setTTL(TTL) + .setBtcPubKey(ByteString.copyFrom(btcPubKey)) + .setPubKeyRing((Messages.PubKeyRing) pubKeyRing.toProtoBuf()) + .setArbitratorNodeAddress(arbitratorNodeAddress.toProtoBuf()) + .addAllLanguageCodes(languageCodes) + .setBtcAddress(btcAddress) + .setRegistrationDate(registrationDate) + .setRegistrationSignature(registrationSignature) + .setRegistrationPubKey(ByteString.copyFrom(registrationPubKey))).build(); + } + + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (!(o instanceof Arbitrator)) return false; + + Arbitrator that = (Arbitrator) o; + + if (registrationDate != that.registrationDate) return false; + if (!Arrays.equals(btcPubKey, that.btcPubKey)) return false; + if (pubKeyRing != null ? !pubKeyRing.equals(that.pubKeyRing) : that.pubKeyRing != null) return false; + if (arbitratorNodeAddress != null ? !arbitratorNodeAddress.equals(that.arbitratorNodeAddress) : that.arbitratorNodeAddress != null) + return false; + if (languageCodes != null ? !languageCodes.equals(that.languageCodes) : that.languageCodes != null) + return false; + if (btcAddress != null ? !btcAddress.equals(that.btcAddress) : that.btcAddress != null) return false; + if (registrationSignature != null ? !registrationSignature.equals(that.registrationSignature) : that.registrationSignature != null) + return false; + return Arrays.equals(registrationPubKey, that.registrationPubKey); + + } + + @Override + public int hashCode() { + int result = btcPubKey != null ? Arrays.hashCode(btcPubKey) : 0; + result = 31 * result + (pubKeyRing != null ? pubKeyRing.hashCode() : 0); + result = 31 * result + (arbitratorNodeAddress != null ? arbitratorNodeAddress.hashCode() : 0); + result = 31 * result + (languageCodes != null ? languageCodes.hashCode() : 0); + result = 31 * result + (btcAddress != null ? btcAddress.hashCode() : 0); + result = 31 * result + (int) (registrationDate ^ (registrationDate >>> 32)); + result = 31 * result + (registrationSignature != null ? registrationSignature.hashCode() : 0); + result = 31 * result + (registrationPubKey != null ? Arrays.hashCode(registrationPubKey) : 0); + return result; + } + + @Override + public String toString() { + return "Arbitrator{" + + "\n\tarbitratorAddress=" + arbitratorNodeAddress + + "\n\tlanguageCodes=" + languageCodes + + "\n\tbtcAddress='" + btcAddress + '\'' + + "\n\tregistrationDate=" + registrationDate + + "\n\tbtcPubKey.hashCode()=" + Arrays.toString(btcPubKey).hashCode() + + "\n\tpubKeyRing.hashCode()=" + pubKeyRing.hashCode() + + "\n\tregistrationSignature.hashCode()='" + registrationSignature.hashCode() + '\'' + + "\n\tregistrationPubKey.hashCode()=" + Arrays.toString(registrationPubKey).hashCode() + + '}'; + } +} diff --git a/network-messages/src/main/java/io/bisq/messages/arbitration/Dispute.java b/network-messages/src/main/java/io/bisq/messages/arbitration/Dispute.java new file mode 100644 index 0000000000..393c3a5d37 --- /dev/null +++ b/network-messages/src/main/java/io/bisq/messages/arbitration/Dispute.java @@ -0,0 +1,394 @@ +/* + * This file is part of bisq. + * + * bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with bisq. If not, see . + */ + +package io.bisq.messages.arbitration; + +import com.google.protobuf.ByteString; +import io.bisq.app.Version; +import io.bisq.messages.crypto.PubKeyRing; +import io.bisq.common.util.Utilities; +import io.bisq.messages.wire.Payload; +import io.bisq.common.wire.proto.Messages; +import io.bisq.messages.trade.payload.Contract; +import io.bisq.storage.Storage; +import javafx.beans.property.*; +import javafx.collections.FXCollections; +import javafx.collections.ObservableList; +import lombok.EqualsAndHashCode; +import lombok.extern.slf4j.Slf4j; + +import javax.annotation.Nullable; +import java.io.IOException; +import java.io.ObjectInputStream; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Date; +import java.util.Optional; +import java.util.stream.Collectors; + +@Slf4j +@EqualsAndHashCode +public final class Dispute implements Payload { + // That object is sent over the wire, so we need to take care of version compatibility. + private static final long serialVersionUID = Version.P2P_NETWORK_VERSION; + + /////////////////////////////////////////////////////////////////////////////////////////// + // Fields + /////////////////////////////////////////////////////////////////////////////////////////// + + private final String tradeId; + private final String id; + private final int traderId; + private final boolean disputeOpenerIsBuyer; + private final boolean disputeOpenerIsOfferer; + private final long openingDate; + private final PubKeyRing traderPubKeyRing; + private final long tradeDate; + private final Contract contract; + private final byte[] contractHash; + @Nullable + private final byte[] depositTxSerialized; + @Nullable + private final byte[] payoutTxSerialized; + @Nullable + private final String depositTxId; + @Nullable + private final String payoutTxId; + private final String contractAsJson; + @Nullable // not always filled in + private final String offererContractSignature; + @Nullable // not always filled in + private final String takerContractSignature; + private final PubKeyRing arbitratorPubKeyRing; + private final boolean isSupportTicket; + + private final ArrayList disputeCommunicationMessages = new ArrayList<>(); + + private boolean isClosed; + @Nullable // not always filled in + private DisputeResult disputeResult; + @Nullable + private String disputePayoutTxId; + + transient private Storage> storage; + transient private ObservableList disputeCommunicationMessagesAsObservableList = FXCollections.observableArrayList(disputeCommunicationMessages); + transient private BooleanProperty isClosedProperty = new SimpleBooleanProperty(isClosed); + transient private ObjectProperty disputeResultProperty = new SimpleObjectProperty<>(disputeResult); + + + /////////////////////////////////////////////////////////////////////////////////////////// + // Constructor + /////////////////////////////////////////////////////////////////////////////////////////// + + public Dispute(Storage> storage, + String tradeId, + int traderId, + boolean disputeOpenerIsBuyer, + boolean disputeOpenerIsOfferer, + PubKeyRing traderPubKeyRing, + Date tradeDate, + Contract contract, + byte[] contractHash, + @Nullable byte[] depositTxSerialized, + @Nullable byte[] payoutTxSerialized, + @Nullable String depositTxId, + @Nullable String payoutTxId, + String contractAsJson, + @Nullable String offererContractSignature, + @Nullable String takerContractSignature, + PubKeyRing arbitratorPubKeyRing, + boolean isSupportTicket) { + this(tradeId, traderId, disputeOpenerIsBuyer, disputeOpenerIsOfferer, traderPubKeyRing, tradeDate, + contract, contractHash, depositTxSerialized, payoutTxSerialized, depositTxId, + payoutTxId, contractAsJson, offererContractSignature, takerContractSignature, + arbitratorPubKeyRing, isSupportTicket); + this.storage = storage; + } + + public Dispute(String tradeId, + int traderId, + boolean disputeOpenerIsBuyer, + boolean disputeOpenerIsOfferer, + PubKeyRing traderPubKeyRing, + Date tradeDate, + Contract contract, + byte[] contractHash, + @Nullable byte[] depositTxSerialized, + @Nullable byte[] payoutTxSerialized, + @Nullable String depositTxId, + @Nullable String payoutTxId, + String contractAsJson, + @Nullable String offererContractSignature, + @Nullable String takerContractSignature, + PubKeyRing arbitratorPubKeyRing, + boolean isSupportTicket) { + this.tradeId = tradeId; + this.traderId = traderId; + this.disputeOpenerIsBuyer = disputeOpenerIsBuyer; + this.disputeOpenerIsOfferer = disputeOpenerIsOfferer; + this.traderPubKeyRing = traderPubKeyRing; + this.tradeDate = tradeDate.getTime(); + this.contract = contract; + this.contractHash = contractHash; + this.depositTxSerialized = depositTxSerialized; + this.payoutTxSerialized = payoutTxSerialized; + this.depositTxId = depositTxId; + this.payoutTxId = payoutTxId; + this.contractAsJson = contractAsJson; + this.offererContractSignature = offererContractSignature; + this.takerContractSignature = takerContractSignature; + this.arbitratorPubKeyRing = arbitratorPubKeyRing; + this.isSupportTicket = isSupportTicket; + this.openingDate = new Date().getTime(); + + id = tradeId + "_" + traderId; + fillInTransients(); + } + + private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { + try { + in.defaultReadObject(); + fillInTransients(); + } catch (Throwable t) { + log.warn("Cannot be deserialized." + t.getMessage()); + } + } + + private void fillInTransients() { + disputeCommunicationMessagesAsObservableList = FXCollections.observableArrayList(disputeCommunicationMessages); + isClosedProperty = new SimpleBooleanProperty(isClosed); + disputeResultProperty = new SimpleObjectProperty<>(disputeResult); + } + + public void addDisputeMessage(DisputeCommunicationMessage disputeCommunicationMessage) { + if (!disputeCommunicationMessages.contains(disputeCommunicationMessage)) { + disputeCommunicationMessages.add(disputeCommunicationMessage); + disputeCommunicationMessagesAsObservableList.add(disputeCommunicationMessage); + storage.queueUpForSave(); + } else { + log.error("disputeDirectMessage already exists"); + } + } + + + /////////////////////////////////////////////////////////////////////////////////////////// + // Setters + /////////////////////////////////////////////////////////////////////////////////////////// + + // In case we get the object via the network storage is not set as its transient, so we need to set it. + public void setStorage(Storage> storage) { + this.storage = storage; + } + + public void setIsClosed(boolean isClosed) { + boolean changed = this.isClosed != isClosed; + this.isClosed = isClosed; + isClosedProperty.set(isClosed); + if (changed) + storage.queueUpForSave(); + } + + public void setDisputeResult(DisputeResult disputeResult) { + boolean changed = this.disputeResult == null || !this.disputeResult.equals(disputeResult); + this.disputeResult = disputeResult; + disputeResultProperty.set(disputeResult); + if (changed) + storage.queueUpForSave(); + } + + public void setDisputePayoutTxId(String disputePayoutTxId) { + boolean changed = this.disputePayoutTxId == null || !this.disputePayoutTxId.equals(disputePayoutTxId); + this.disputePayoutTxId = disputePayoutTxId; + if (changed) + storage.queueUpForSave(); + } + + + /////////////////////////////////////////////////////////////////////////////////////////// + // Getters + /////////////////////////////////////////////////////////////////////////////////////////// + + public String getId() { + return id; + } + + public String getTradeId() { + return tradeId; + } + + public String getShortTradeId() { + return Utilities.getShortId(tradeId); + } + + public int getTraderId() { + return traderId; + } + + public boolean isDisputeOpenerIsBuyer() { + return disputeOpenerIsBuyer; + } + + public boolean isDisputeOpenerIsOfferer() { + return disputeOpenerIsOfferer; + } + + public Date getOpeningDate() { + return new Date(openingDate); + } + + public PubKeyRing getTraderPubKeyRing() { + return traderPubKeyRing; + } + + public Contract getContract() { + return contract; + } + + @Nullable + public byte[] getDepositTxSerialized() { + return depositTxSerialized; + } + + @Nullable + public byte[] getPayoutTxSerialized() { + return payoutTxSerialized; + } + + @Nullable + public String getDepositTxId() { + return depositTxId; + } + + @Nullable + public String getPayoutTxId() { + return payoutTxId; + } + + public String getContractAsJson() { + return contractAsJson; + } + + @Nullable + public String getOffererContractSignature() { + return offererContractSignature; + } + + @Nullable + public String getTakerContractSignature() { + return takerContractSignature; + } + + public ObservableList getDisputeCommunicationMessagesAsObservableList() { + return disputeCommunicationMessagesAsObservableList; + } + + public boolean isClosed() { + return isClosedProperty.get(); + } + + public ReadOnlyBooleanProperty isClosedProperty() { + return isClosedProperty; + } + + public PubKeyRing getArbitratorPubKeyRing() { + return arbitratorPubKeyRing; + } + + public ObjectProperty disputeResultProperty() { + return disputeResultProperty; + } + + public boolean isSupportTicket() { + return isSupportTicket; + } + + public byte[] getContractHash() { + return contractHash; + } + + public Date getTradeDate() { + return new Date(tradeDate); + } + + @org.jetbrains.annotations.Nullable + public String getDisputePayoutTxId() { + return disputePayoutTxId; + } + + @Override + public String toString() { + return "Dispute{" + + "tradeId='" + tradeId + '\'' + + ", id='" + id + '\'' + + ", traderId=" + traderId + + ", disputeOpenerIsBuyer=" + disputeOpenerIsBuyer + + ", disputeOpenerIsOfferer=" + disputeOpenerIsOfferer + + ", openingDate=" + openingDate + + ", traderPubKeyRing=" + traderPubKeyRing + + ", tradeDate=" + tradeDate + + ", contract=" + contract + + ", contractHash=" + Arrays.toString(contractHash) + + ", depositTxSerialized=" + Arrays.toString(depositTxSerialized) + + ", payoutTxSerialized=" + Arrays.toString(payoutTxSerialized) + + ", depositTxId='" + depositTxId + '\'' + + ", payoutTxId='" + payoutTxId + '\'' + + ", contractAsJson='" + contractAsJson + '\'' + + ", offererContractSignature='" + offererContractSignature + '\'' + + ", takerContractSignature='" + takerContractSignature + '\'' + + ", arbitratorPubKeyRing=" + arbitratorPubKeyRing + + ", isSupportTicket=" + isSupportTicket + + ", disputeCommunicationMessages=" + disputeCommunicationMessages + + ", isClosed=" + isClosed + + ", disputeResult=" + disputeResult + + ", disputePayoutTxId='" + disputePayoutTxId + '\'' + + ", disputeCommunicationMessagesAsObservableList=" + disputeCommunicationMessagesAsObservableList + + ", isClosedProperty=" + isClosedProperty + + ", disputeResultProperty=" + disputeResultProperty + + '}'; + } + + @Override + public Messages.Dispute toProtoBuf() { + Messages.Dispute.Builder builder = Messages.Dispute.newBuilder() + .setTradeId(tradeId) + .setId(id) + .setTraderId(traderId) + .setDisputeOpenerIsBuyer(disputeOpenerIsBuyer) + .setDisputeOpenerIsOfferer(disputeOpenerIsOfferer) + .setOpeningDate(openingDate) + .setTraderPubKeyRing(traderPubKeyRing.toProtoBuf()) + .setTradeDate(tradeDate) + .setContract(contract.toProtoBuf()) + .setContractHash(ByteString.copyFrom(contractHash)) + .setContractAsJson(contractAsJson) + .setArbitratorPubKeyRing(arbitratorPubKeyRing.toProtoBuf()) + .setIsSupportTicket(isSupportTicket) + .addAllDisputeCommunicationMessages(disputeCommunicationMessages.stream().map( + disputeCommunicationMessage -> disputeCommunicationMessage.toProtoBuf().getDisputeCommunicationMessage()).collect(Collectors.toList())) + .setIsClosed(isClosed); + + Optional.ofNullable(depositTxSerialized).ifPresent(tx -> builder.setDepositTxSerialized(ByteString.copyFrom(tx))); + Optional.ofNullable(payoutTxSerialized).ifPresent(tx -> builder.setPayoutTxSerialized(ByteString.copyFrom(tx))); + Optional.ofNullable(depositTxId).ifPresent(builder::setDepositTxId); + Optional.ofNullable(payoutTxId).ifPresent(builder::setPayoutTxId); + Optional.ofNullable(disputePayoutTxId).ifPresent(builder::setDisputePayoutTxId); + Optional.ofNullable(takerContractSignature).ifPresent(builder::setTakerContractSignature); + Optional.ofNullable(offererContractSignature).ifPresent(builder::setOffererContractSignature); + Optional.ofNullable(disputeResult).ifPresent(result -> builder.setDisputeResult(disputeResult.toProtoBuf())); + return builder.build(); + } +} diff --git a/network-messages/src/main/java/io/bisq/messages/arbitration/DisputeCommunicationMessage.java b/network-messages/src/main/java/io/bisq/messages/arbitration/DisputeCommunicationMessage.java new file mode 100644 index 0000000000..e1c2534fa6 --- /dev/null +++ b/network-messages/src/main/java/io/bisq/messages/arbitration/DisputeCommunicationMessage.java @@ -0,0 +1,219 @@ +/* + * This file is part of bisq. + * + * bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with bisq. If not, see . + */ + +package io.bisq.messages.arbitration; + +import io.bisq.app.Version; +import io.bisq.common.wire.proto.Messages; +import io.bisq.messages.NodeAddress; +import io.bisq.messages.arbitration.payload.Attachment; +import io.bisq.messages.util.ProtoBufferUtils; +import javafx.beans.property.BooleanProperty; +import javafx.beans.property.SimpleBooleanProperty; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.IOException; +import java.io.ObjectInputStream; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import java.util.Optional; +import java.util.stream.Collectors; + +public final class DisputeCommunicationMessage extends DisputeMessage { + // That object is sent over the wire, so we need to take care of version compatibility. + private static final long serialVersionUID = Version.P2P_NETWORK_VERSION; + private static final Logger log = LoggerFactory.getLogger(DisputeCommunicationMessage.class); + + private final long date; + private final String tradeId; + + private final int traderId; + private final boolean senderIsTrader; + private final String message; + private final ArrayList attachments = new ArrayList<>(); + private boolean arrived; + private boolean storedInMailbox; + private boolean isSystemMessage; + private final NodeAddress myNodeAddress; + + transient private BooleanProperty arrivedProperty = new SimpleBooleanProperty(); + transient private BooleanProperty storedInMailboxProperty = new SimpleBooleanProperty(); + + public DisputeCommunicationMessage(String tradeId, int traderId, boolean senderIsTrader, String message, + List attachments, NodeAddress myNodeAddress, long date, + boolean arrived, boolean storedInMailbox) { + this.tradeId = tradeId; + this.traderId = traderId; + this.senderIsTrader = senderIsTrader; + this.message = message; + this.myNodeAddress = myNodeAddress; + this.date = date; + this.arrived = arrived; + this.storedInMailbox = storedInMailbox; + Optional.ofNullable(attachments).ifPresent(attachments1 -> addAllAttachments(attachments)); + updateBooleanProperties(); + } + + public DisputeCommunicationMessage(String tradeId, int traderId, boolean senderIsTrader, String message, + NodeAddress myNodeAddress) { + this(tradeId, traderId, senderIsTrader, message, null, myNodeAddress, new Date().getTime(), + false, false); + } + + private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { + try { + in.defaultReadObject(); + updateBooleanProperties(); + } catch (Throwable t) { + log.warn("Cannot be deserialized." + t.getMessage()); + } + } + + private void updateBooleanProperties() { + arrivedProperty = new SimpleBooleanProperty(arrived); + storedInMailboxProperty = new SimpleBooleanProperty(storedInMailbox); + } + + + @Override + public NodeAddress getSenderNodeAddress() { + return myNodeAddress; + } + + public void addAttachment(Attachment attachment) { + attachments.add(attachment); + } + + public void addAllAttachments(List attachments) { + this.attachments.addAll(attachments); + } + + public void setArrived(boolean arrived) { + this.arrived = arrived; + this.arrivedProperty.set(arrived); + } + + public void setStoredInMailbox(boolean storedInMailbox) { + this.storedInMailbox = storedInMailbox; + this.storedInMailboxProperty.set(storedInMailbox); + } + + public Date getDate() { + return new Date(date); + } + + public boolean isSenderIsTrader() { + return senderIsTrader; + } + + public String getMessage() { + return message; + } + + public int getTraderId() { + return traderId; + } + + public BooleanProperty arrivedProperty() { + return arrivedProperty; + } + + public BooleanProperty storedInMailboxProperty() { + return storedInMailboxProperty; + } + + public List getAttachments() { + return attachments; + } + + public String getTradeId() { + return tradeId; + } + + public boolean isSystemMessage() { + return isSystemMessage; + } + + public void setIsSystemMessage(boolean isSystemMessage) { + this.isSystemMessage = isSystemMessage; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (!(o instanceof DisputeCommunicationMessage)) return false; + + DisputeCommunicationMessage that = (DisputeCommunicationMessage) o; + + if (date != that.date) return false; + if (traderId != that.traderId) return false; + if (senderIsTrader != that.senderIsTrader) return false; + if (arrived != that.arrived) return false; + if (storedInMailbox != that.storedInMailbox) return false; + if (isSystemMessage != that.isSystemMessage) return false; + if (tradeId != null ? !tradeId.equals(that.tradeId) : that.tradeId != null) return false; + if (message != null ? !message.equals(that.message) : that.message != null) return false; + if (attachments != null ? !attachments.equals(that.attachments) : that.attachments != null) return false; + return !(myNodeAddress != null ? !myNodeAddress.equals(that.myNodeAddress) : that.myNodeAddress != null); + + } + + @Override + public int hashCode() { + int result = (int) (date ^ (date >>> 32)); + result = 31 * result + (tradeId != null ? tradeId.hashCode() : 0); + result = 31 * result + traderId; + result = 31 * result + (senderIsTrader ? 1 : 0); + result = 31 * result + (message != null ? message.hashCode() : 0); + result = 31 * result + (attachments != null ? attachments.hashCode() : 0); + result = 31 * result + (arrived ? 1 : 0); + result = 31 * result + (storedInMailbox ? 1 : 0); + result = 31 * result + (isSystemMessage ? 1 : 0); + result = 31 * result + (myNodeAddress != null ? myNodeAddress.hashCode() : 0); + return result; + } + + @Override + public String toString() { + return "DisputeDirectMessage{" + + "date=" + date + + ", tradeId='" + tradeId + '\'' + + ", traderId='" + traderId + '\'' + + ", senderIsTrader=" + senderIsTrader + + ", message='" + message + '\'' + + ", attachments=" + attachments + + '}'; + } + + @Override + public Messages.Envelope toProtoBuf() { + Messages.Envelope.Builder baseEnvelope = ProtoBufferUtils.getBaseEnvelope(); + return baseEnvelope.setDisputeCommunicationMessage(Messages.DisputeCommunicationMessage.newBuilder() + .setDate(date) + .setTradeId(tradeId) + .setTraderId(traderId) + .setSenderIsTrader(senderIsTrader) + .setMessage(message) + .addAllAttachments(attachments.stream().map(attachment -> attachment.toProtoBuf()).collect(Collectors.toList())) + .setArrived(arrived) + .setStoredInMailbox(storedInMailbox) + .setIsSystemMessage(isSystemMessage) + .setMyNodeAddress(myNodeAddress.toProtoBuf())).build(); + } +} diff --git a/network-messages/src/main/java/io/bisq/messages/arbitration/DisputeList.java b/network-messages/src/main/java/io/bisq/messages/arbitration/DisputeList.java new file mode 100644 index 0000000000..6f6abae90f --- /dev/null +++ b/network-messages/src/main/java/io/bisq/messages/arbitration/DisputeList.java @@ -0,0 +1,95 @@ +/* + * This file is part of bisq. + * + * bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with bisq. If not, see . + */ + +package io.bisq.messages.arbitration; + +import io.bisq.app.Version; +import io.bisq.common.persistance.Persistable; +import io.bisq.storage.Storage; +import javafx.collections.FXCollections; +import javafx.collections.ObservableList; +import org.jetbrains.annotations.NotNull; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.IOException; +import java.io.ObjectInputStream; +import java.util.ArrayList; + +public final class DisputeList extends ArrayList implements Persistable { + // That object is saved to disc. We need to take care of changes to not break deserialization. + private static final long serialVersionUID = Version.LOCAL_DB_VERSION; + + private static final Logger log = LoggerFactory.getLogger(DisputeList.class); + + final transient private Storage> storage; + transient private ObservableList observableList; + + public DisputeList(Storage> storage) { + this.storage = storage; + + DisputeList persisted = storage.initAndGetPersisted(this); + if (persisted != null) { + this.addAll(persisted); + } + observableList = FXCollections.observableArrayList(this); + } + + private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { + try { + in.defaultReadObject(); + } catch (Throwable t) { + log.warn("Cannot be deserialized." + t.getMessage()); + } + } + + @Override + public boolean add(DisputeCase disputeCase) { + if (!super.contains(disputeCase)) { + boolean changed = super.add(disputeCase); + getObservableList().add(disputeCase); + if (changed) + storage.queueUpForSave(); + return changed; + } else { + return false; + } + } + + @Override + public boolean remove(Object disputeCase) { + boolean changed = super.remove(disputeCase); + getObservableList().remove(disputeCase); + if (changed) + storage.queueUpForSave(); + return changed; + } + + private ObservableList getObservableList() { + if (observableList == null) + observableList = FXCollections.observableArrayList(this); + return observableList; + } + + @NotNull + @Override + public String toString() { + return "DisputeList{" + + ", observableList=" + observableList + + '}'; + } +} diff --git a/network-messages/src/main/java/io/bisq/messages/arbitration/DisputeMessage.java b/network-messages/src/main/java/io/bisq/messages/arbitration/DisputeMessage.java new file mode 100644 index 0000000000..6a1ab8c0eb --- /dev/null +++ b/network-messages/src/main/java/io/bisq/messages/arbitration/DisputeMessage.java @@ -0,0 +1,47 @@ +/* + * This file is part of bisq. + * + * bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with bisq. If not, see . + */ + +package io.bisq.messages.arbitration; + +import io.bisq.app.Version; +import io.bisq.messages.p2p.messaging.MailboxMessage; + +import java.util.UUID; + +public abstract class DisputeMessage implements MailboxMessage { + //TODO add serialVersionUID also in superclasses as changes would break compatibility + private final int messageVersion = Version.getP2PMessageVersion(); + private final String uid; + + public DisputeMessage(String uid) { + this.uid = uid; + } + + public DisputeMessage() { + uid = UUID.randomUUID().toString(); + } + + @Override + public int getMessageVersion() { + return messageVersion; + } + + @Override + public String getUID() { + return uid; + } +} diff --git a/network-messages/src/main/java/io/bisq/messages/arbitration/DisputeResultMessage.java b/network-messages/src/main/java/io/bisq/messages/arbitration/DisputeResultMessage.java new file mode 100644 index 0000000000..f452c43789 --- /dev/null +++ b/network-messages/src/main/java/io/bisq/messages/arbitration/DisputeResultMessage.java @@ -0,0 +1,71 @@ +/* + * This file is part of bisq. + * + * bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with bisq. If not, see . + */ + +package io.bisq.messages.arbitration; + +import io.bisq.app.Version; +import io.bisq.common.wire.proto.Messages; +import io.bisq.messages.NodeAddress; +import io.bisq.messages.util.ProtoBufferUtils; + +public final class DisputeResultMessage extends DisputeMessage { + // That object is sent over the wire, so we need to take care of version compatibility. + private static final long serialVersionUID = Version.P2P_NETWORK_VERSION; + + public final DisputeResult disputeResult; + private final NodeAddress myNodeAddress; + + public DisputeResultMessage(DisputeResult disputeResult, NodeAddress myNodeAddress) { + this.disputeResult = disputeResult; + this.myNodeAddress = myNodeAddress; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (!(o instanceof DisputeResultMessage)) return false; + + DisputeResultMessage that = (DisputeResultMessage) o; + + if (disputeResult != null ? !disputeResult.equals(that.disputeResult) : that.disputeResult != null) + return false; + return !(myNodeAddress != null ? !myNodeAddress.equals(that.myNodeAddress) : that.myNodeAddress != null); + + } + + @Override + public int hashCode() { + int result = disputeResult != null ? disputeResult.hashCode() : 0; + result = 31 * result + (myNodeAddress != null ? myNodeAddress.hashCode() : 0); + return result; + } + + @Override + public NodeAddress getSenderNodeAddress() { + return myNodeAddress; + } + + @Override + public Messages.Envelope toProtoBuf() { + Messages.Envelope.Builder baseEnvelope = ProtoBufferUtils.getBaseEnvelope(); + return baseEnvelope.setDisputeResultMessage(Messages.DisputeResultMessage.newBuilder() + .setDisputeResult(disputeResult.toProtoBuf()) + .setMyNodeAddress(myNodeAddress.toProtoBuf()) + .setUid(getUID())) + .build(); + } +} diff --git a/network-messages/src/main/java/io/bisq/messages/arbitration/OpenNewDisputeMessage.java b/network-messages/src/main/java/io/bisq/messages/arbitration/OpenNewDisputeMessage.java new file mode 100644 index 0000000000..cd02875afb --- /dev/null +++ b/network-messages/src/main/java/io/bisq/messages/arbitration/OpenNewDisputeMessage.java @@ -0,0 +1,74 @@ +/* + * This file is part of bisq. + * + * bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with bisq. If not, see . + */ + +package io.bisq.messages.arbitration; + +import io.bisq.app.Version; +import io.bisq.common.wire.proto.Messages; +import io.bisq.messages.NodeAddress; +import io.bisq.messages.util.ProtoBufferUtils; + +public final class OpenNewDisputeMessage extends DisputeMessage { + // That object is sent over the wire, so we need to take care of version compatibility. + private static final long serialVersionUID = Version.P2P_NETWORK_VERSION; + + public final Dispute dispute; + private final NodeAddress myNodeAddress; + + public OpenNewDisputeMessage(Dispute dispute, NodeAddress myNodeAddress) { + super(); + this.dispute = dispute; + this.myNodeAddress = myNodeAddress; + } + + public OpenNewDisputeMessage(Dispute dispute, NodeAddress myNodeAddress, String uid) { + super(uid); + this.dispute = dispute; + this.myNodeAddress = myNodeAddress; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (!(o instanceof OpenNewDisputeMessage)) return false; + + OpenNewDisputeMessage that = (OpenNewDisputeMessage) o; + + if (dispute != null ? !dispute.equals(that.dispute) : that.dispute != null) return false; + return !(myNodeAddress != null ? !myNodeAddress.equals(that.myNodeAddress) : that.myNodeAddress != null); + + } + + @Override + public int hashCode() { + int result = dispute != null ? dispute.hashCode() : 0; + result = 31 * result + (myNodeAddress != null ? myNodeAddress.hashCode() : 0); + return result; + } + + @Override + public NodeAddress getSenderNodeAddress() { + return myNodeAddress; + } + + @Override + public Messages.Envelope toProtoBuf() { + Messages.Envelope.Builder baseEnvelope = ProtoBufferUtils.getBaseEnvelope(); + return baseEnvelope.setOpenNewDisputeMessage(Messages.OpenNewDisputeMessage.newBuilder() + .setDispute(dispute.toProtoBuf()).setMyNodeAddress(myNodeAddress.toProtoBuf()).setUid(getUID())).build(); + } +} diff --git a/network-messages/src/main/java/io/bisq/messages/arbitration/PeerOpenedDisputeMessage.java b/network-messages/src/main/java/io/bisq/messages/arbitration/PeerOpenedDisputeMessage.java new file mode 100644 index 0000000000..2916d68785 --- /dev/null +++ b/network-messages/src/main/java/io/bisq/messages/arbitration/PeerOpenedDisputeMessage.java @@ -0,0 +1,75 @@ +/* + * This file is part of bisq. + * + * bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with bisq. If not, see . + */ + +package io.bisq.messages.arbitration; + +import io.bisq.app.Version; +import io.bisq.common.wire.proto.Messages; +import io.bisq.messages.NodeAddress; +import io.bisq.messages.util.ProtoBufferUtils; + +public final class PeerOpenedDisputeMessage extends DisputeMessage { + // That object is sent over the wire, so we need to take care of version compatibility. + private static final long serialVersionUID = Version.P2P_NETWORK_VERSION; + + public final Dispute dispute; + private final NodeAddress myNodeAddress; + + public PeerOpenedDisputeMessage(Dispute dispute, NodeAddress myNodeAddress) { + this.dispute = dispute; + this.myNodeAddress = myNodeAddress; + } + + public PeerOpenedDisputeMessage(Dispute dispute, NodeAddress myNodeAddress, String uid) { + super(uid); + this.dispute = dispute; + this.myNodeAddress = myNodeAddress; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (!(o instanceof PeerOpenedDisputeMessage)) return false; + + PeerOpenedDisputeMessage that = (PeerOpenedDisputeMessage) o; + + if (dispute != null ? !dispute.equals(that.dispute) : that.dispute != null) return false; + return !(myNodeAddress != null ? !myNodeAddress.equals(that.myNodeAddress) : that.myNodeAddress != null); + + } + + @Override + public int hashCode() { + int result = dispute != null ? dispute.hashCode() : 0; + result = 31 * result + (myNodeAddress != null ? myNodeAddress.hashCode() : 0); + return result; + } + + @Override + public NodeAddress getSenderNodeAddress() { + return myNodeAddress; + } + + @Override + public Messages.Envelope toProtoBuf() { + Messages.Envelope.Builder baseEnvelope = ProtoBufferUtils.getBaseEnvelope(); + return baseEnvelope.setPeerOpenedDisputeMessage(Messages.PeerOpenedDisputeMessage.newBuilder() + .setDispute(dispute.toProtoBuf()) + .setMyNodeAddress(myNodeAddress.toProtoBuf()) + .setUid(getUID())).build(); + } +} diff --git a/network-messages/src/main/java/io/bisq/messages/arbitration/PeerPublishedPayoutTxMessage.java b/network-messages/src/main/java/io/bisq/messages/arbitration/PeerPublishedPayoutTxMessage.java new file mode 100644 index 0000000000..831a0f10b0 --- /dev/null +++ b/network-messages/src/main/java/io/bisq/messages/arbitration/PeerPublishedPayoutTxMessage.java @@ -0,0 +1,84 @@ +/* + * This file is part of bisq. + * + * bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with bisq. If not, see . + */ + +package io.bisq.messages.arbitration; + +import com.google.protobuf.ByteString; +import io.bisq.app.Version; +import io.bisq.common.wire.proto.Messages; +import io.bisq.messages.NodeAddress; +import io.bisq.messages.util.ProtoBufferUtils; + +import java.util.Arrays; + +public final class PeerPublishedPayoutTxMessage extends DisputeMessage { + // That object is sent over the wire, so we need to take care of version compatibility. + private static final long serialVersionUID = Version.P2P_NETWORK_VERSION; + + public final byte[] transaction; + public final String tradeId; + private final NodeAddress myNodeAddress; + + public PeerPublishedPayoutTxMessage(byte[] transaction, String tradeId, NodeAddress myNodeAddress) { + super(); + this.transaction = transaction; + this.tradeId = tradeId; + this.myNodeAddress = myNodeAddress; + } + + public PeerPublishedPayoutTxMessage(byte[] transaction, String tradeId, NodeAddress myNodeAddress, String uid) { + super(uid); + this.transaction = transaction; + this.tradeId = tradeId; + this.myNodeAddress = myNodeAddress; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (!(o instanceof PeerPublishedPayoutTxMessage)) return false; + + PeerPublishedPayoutTxMessage that = (PeerPublishedPayoutTxMessage) o; + + if (!Arrays.equals(transaction, that.transaction)) return false; + if (tradeId != null ? !tradeId.equals(that.tradeId) : that.tradeId != null) return false; + return !(myNodeAddress != null ? !myNodeAddress.equals(that.myNodeAddress) : that.myNodeAddress != null); + + } + + @Override + public int hashCode() { + int result = transaction != null ? Arrays.hashCode(transaction) : 0; + result = 31 * result + (tradeId != null ? tradeId.hashCode() : 0); + result = 31 * result + (myNodeAddress != null ? myNodeAddress.hashCode() : 0); + return result; + } + + @Override + public NodeAddress getSenderNodeAddress() { + return myNodeAddress; + } + + @Override + public Messages.Envelope toProtoBuf() { + Messages.Envelope.Builder baseEnvelope = ProtoBufferUtils.getBaseEnvelope(); + return baseEnvelope.setPeerPublishedPayoutTxMessage(Messages.PeerPublishedPayoutTxMessage.newBuilder() + .setTransaction(ByteString.copyFrom(transaction)) + .setTradeId(tradeId) + .setMyNodeAddress(myNodeAddress.toProtoBuf())).build(); + } +} diff --git a/network-messages/src/main/java/io/bisq/messages/arbitration/payload/Attachment.java b/network-messages/src/main/java/io/bisq/messages/arbitration/payload/Attachment.java new file mode 100644 index 0000000000..90cf3529c5 --- /dev/null +++ b/network-messages/src/main/java/io/bisq/messages/arbitration/payload/Attachment.java @@ -0,0 +1,65 @@ +package io.bisq.messages.arbitration.payload; + +import com.google.protobuf.ByteString; +import io.bisq.app.Version; +import io.bisq.messages.wire.Payload; +import io.bisq.common.wire.proto.Messages; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.util.Arrays; + +public final class Attachment implements Payload { + // That object is sent over the wire, so we need to take care of version compatibility. + private static final long serialVersionUID = Version.P2P_NETWORK_VERSION; + private static final Logger log = LoggerFactory.getLogger(Attachment.class); + + private final byte[] bytes; + private final String fileName; + + public Attachment(String fileName, byte[] bytes) { + this.fileName = fileName; + this.bytes = bytes; + } + + public byte[] getBytes() { + return bytes; + } + + public String getFileName() { + return fileName; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (!(o instanceof Attachment)) return false; + + Attachment that = (Attachment) o; + + if (!Arrays.equals(bytes, that.bytes)) return false; + return !(fileName != null ? !fileName.equals(that.fileName) : that.fileName != null); + + } + + @Override + public int hashCode() { + int result = bytes != null ? Arrays.hashCode(bytes) : 0; + result = 31 * result + (fileName != null ? fileName.hashCode() : 0); + return result; + } + + @Override + public String toString() { + return "Attachment{" + + "description=" + fileName + + ", data=" + Arrays.toString(bytes) + + '}'; + } + + @Override + public Messages.Attachment toProtoBuf() { + return Messages.Attachment.newBuilder().setBytes(ByteString.copyFrom(bytes)) + .setFileName(fileName).build(); + } +} \ No newline at end of file diff --git a/network-messages/src/main/java/io/bisq/messages/availability/AvailabilityResult.java b/network-messages/src/main/java/io/bisq/messages/availability/AvailabilityResult.java new file mode 100644 index 0000000000..aabde16a78 --- /dev/null +++ b/network-messages/src/main/java/io/bisq/messages/availability/AvailabilityResult.java @@ -0,0 +1,11 @@ +package io.bisq.messages.availability; + +public enum AvailabilityResult { + UNKNOWN_FAILURE, + AVAILABLE, + OFFER_TAKEN, + PRICE_OUT_OF_TOLERANCE, + MARKET_PRICE_NOT_AVAILABLE, + NO_ARBITRATORS, + USER_IGNORED +} diff --git a/network-messages/src/main/java/io/bisq/messages/availability/OfferAvailabilityRequest.java b/network-messages/src/main/java/io/bisq/messages/availability/OfferAvailabilityRequest.java new file mode 100644 index 0000000000..2e51016d12 --- /dev/null +++ b/network-messages/src/main/java/io/bisq/messages/availability/OfferAvailabilityRequest.java @@ -0,0 +1,72 @@ +/* + * This file is part of bisq. + * + * bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with bisq. If not, see . + */ + +package io.bisq.messages.availability; + +import io.bisq.app.Capabilities; +import io.bisq.app.Version; +import io.bisq.common.wire.proto.Messages; +import io.bisq.messages.crypto.PubKeyRing; +import io.bisq.messages.p2p.messaging.SupportedCapabilitiesMessage; + +import javax.annotation.Nullable; +import java.util.ArrayList; + +// We add here the SupportedCapabilitiesMessage interface as that message always predates a direct connection +// to the trading peer +public final class OfferAvailabilityRequest extends OfferMessage implements SupportedCapabilitiesMessage { + // That object is sent over the wire, so we need to take care of version compatibility. + private static final long serialVersionUID = Version.P2P_NETWORK_VERSION; + + private final PubKeyRing pubKeyRing; + public final long takersTradePrice; + @Nullable + private ArrayList supportedCapabilities = Capabilities.getCapabilities(); + + public OfferAvailabilityRequest(String offerId, PubKeyRing pubKeyRing, long takersTradePrice) { + super(offerId); + this.pubKeyRing = pubKeyRing; + this.takersTradePrice = takersTradePrice; + } + + @Override + @Nullable + public ArrayList getSupportedCapabilities() { + return supportedCapabilities; + } + + public PubKeyRing getPubKeyRing() { + return pubKeyRing; + } + + @Override + public String toString() { + return "OfferAvailabilityRequest{" + + "pubKeyRing=" + pubKeyRing + + "} " + super.toString(); + } + + @Override + public Messages.Envelope toProtoBuf() { + return Messages.Envelope.newBuilder() + .setOfferAvailabilityRequest(Messages.OfferAvailabilityRequest.newBuilder() + .setOfferId(offerId) + .setPubKeyRing(pubKeyRing.toProtoBuf()) + .setTakersTradePrice(takersTradePrice) + .addAllSupportedCapabilities(supportedCapabilities)).build(); + } +} diff --git a/network-messages/src/main/java/io/bisq/messages/availability/OfferAvailabilityResponse.java b/network-messages/src/main/java/io/bisq/messages/availability/OfferAvailabilityResponse.java new file mode 100644 index 0000000000..3b2f782a99 --- /dev/null +++ b/network-messages/src/main/java/io/bisq/messages/availability/OfferAvailabilityResponse.java @@ -0,0 +1,70 @@ +/* + * This file is part of bisq. + * + * bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with bisq. If not, see . + */ + +package io.bisq.messages.availability; + + +import io.bisq.app.Capabilities; +import io.bisq.app.Version; +import io.bisq.common.wire.proto.Messages; +import io.bisq.messages.p2p.messaging.SupportedCapabilitiesMessage; +import io.bisq.messages.util.ProtoBufferUtils; + +import javax.annotation.Nullable; +import java.util.ArrayList; + +// We add here the SupportedCapabilitiesMessage interface as that message always predates a direct connection +// to the trading peer +public final class OfferAvailabilityResponse extends OfferMessage implements SupportedCapabilitiesMessage { + // That object is sent over the wire, so we need to take care of version compatibility. + private static final long serialVersionUID = Version.P2P_NETWORK_VERSION; + + public final AvailabilityResult availabilityResult; + + // TODO keep for backward compatibility. Can be removed once everyone is on v0.4.9 + public boolean isAvailable; + @Nullable + private ArrayList supportedCapabilities = Capabilities.getCapabilities(); + + public OfferAvailabilityResponse(String offerId, AvailabilityResult availabilityResult) { + super(offerId); + this.availabilityResult = availabilityResult; + isAvailable = availabilityResult == AvailabilityResult.AVAILABLE; + } + + @Override + @Nullable + public ArrayList getSupportedCapabilities() { + return supportedCapabilities; + } + + @Override + public String toString() { + return "OfferAvailabilityResponse{" + + "availabilityResult=" + availabilityResult + + "} " + super.toString(); + } + + @Override + public Messages.Envelope toProtoBuf() { + Messages.Envelope.Builder baseEnvelope = ProtoBufferUtils.getBaseEnvelope(); + return baseEnvelope.setOfferAvailabilityResponse(Messages.OfferAvailabilityResponse.newBuilder().setMessageVersion(getMessageVersion()) + .setOfferId(offerId) + .setAvailabilityResult(Messages.AvailabilityResult.forNumber(availabilityResult.ordinal())) + .addAllSupportedCapabilities(supportedCapabilities)).build(); + } +} diff --git a/network-messages/src/main/java/io/bisq/messages/availability/OfferMessage.java b/network-messages/src/main/java/io/bisq/messages/availability/OfferMessage.java new file mode 100644 index 0000000000..702b2c1786 --- /dev/null +++ b/network-messages/src/main/java/io/bisq/messages/availability/OfferMessage.java @@ -0,0 +1,50 @@ +/* + * This file is part of bisq. + * + * bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with bisq. If not, see . + */ + +package io.bisq.messages.availability; + +import io.bisq.app.Version; +import io.bisq.messages.p2p.messaging.DirectMessage; + +import javax.annotation.concurrent.Immutable; + +@Immutable +public abstract class OfferMessage implements DirectMessage { + //TODO add serialVersionUID also in superclasses as changes would break compatibility + // That object is sent over the wire, so we need to take care of version compatibility. + private static final long serialVersionUID = Version.getP2PMessageVersion(); + + private final int messageVersion = Version.getP2PMessageVersion(); + public final String offerId; + + OfferMessage(String offerId) { + this.offerId = offerId; + } + + @Override + public int getMessageVersion() { + return messageVersion; + } + + @Override + public String toString() { + return "OfferMessage{" + + "messageVersion=" + messageVersion + + ", offerId='" + offerId + '\'' + + '}'; + } +} diff --git a/network-messages/src/main/java/io/bisq/messages/btc/BitcoinNetwork.java b/network-messages/src/main/java/io/bisq/messages/btc/BitcoinNetwork.java new file mode 100644 index 0000000000..af700217c8 --- /dev/null +++ b/network-messages/src/main/java/io/bisq/messages/btc/BitcoinNetwork.java @@ -0,0 +1,41 @@ +/* + * This file is part of bisq. + * + * bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with bisq. If not, see . + */ + +package io.bisq.messages.btc; + +import org.bitcoinj.core.NetworkParameters; +import org.bitcoinj.params.MainNetParams; +import org.bitcoinj.params.RegTestParams; +import org.bitcoinj.params.TestNet3Params; + +public enum BitcoinNetwork { + MAINNET(MainNetParams.get()), + TESTNET(TestNet3Params.get()), + REGTEST(RegTestParams.get()); + + public static final BitcoinNetwork DEFAULT = MAINNET; + + private final NetworkParameters parameters; + + BitcoinNetwork(NetworkParameters parameters) { + this.parameters = parameters; + } + + public NetworkParameters getParameters() { + return parameters; + } +} diff --git a/network-messages/src/main/java/io/bisq/messages/btc/BtcOptionKeys.java b/network-messages/src/main/java/io/bisq/messages/btc/BtcOptionKeys.java new file mode 100644 index 0000000000..1a539917e2 --- /dev/null +++ b/network-messages/src/main/java/io/bisq/messages/btc/BtcOptionKeys.java @@ -0,0 +1,9 @@ +package io.bisq.messages.btc; + +public class BtcOptionKeys { + public static final String BTC_NETWORK = "bitcoinNetwork"; + public static final String REG_TEST_HOST = "bitcoinRegtestHost"; + public static final String WALLET_DIR = "walletDir"; + public static final String BTC_NODES = "btcNodes"; + public static final String USE_TOR_FOR_BTC = "useTorForBtc"; +} diff --git a/network-messages/src/main/java/io/bisq/messages/btc/Restrictions.java b/network-messages/src/main/java/io/bisq/messages/btc/Restrictions.java new file mode 100644 index 0000000000..1096dbf1b0 --- /dev/null +++ b/network-messages/src/main/java/io/bisq/messages/btc/Restrictions.java @@ -0,0 +1,38 @@ +/* + * This file is part of bisq. + * + * bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with bisq. If not, see . + */ + +package io.bisq.messages.btc; + +import org.bitcoinj.core.Coin; +import org.bitcoinj.core.Transaction; + +public class Restrictions { + + public static final Coin MIN_TRADE_AMOUNT = Coin.parseCoin("0.0001"); // 4 cent @ 400 EUR/BTC + + public static final Coin MAX_SECURITY_DEPOSIT = Coin.parseCoin("0.2"); + public static final Coin MIN_SECURITY_DEPOSIT = Coin.parseCoin("0.001"); + public static final Coin DEFAULT_SECURITY_DEPOSIT = Coin.parseCoin("0.03"); + + public static boolean isAboveDust(Coin amount, Coin txFee) { + return amount != null && amount.compareTo(txFee.add(Transaction.MIN_NONDUST_OUTPUT)) >= 0; + } + + public static boolean isAboveDust(Coin amount) { + return amount != null && amount.compareTo(Transaction.MIN_NONDUST_OUTPUT) >= 0; + } +} diff --git a/network-messages/src/main/java/io/bisq/messages/btc/UserAgent.java b/network-messages/src/main/java/io/bisq/messages/btc/UserAgent.java new file mode 100644 index 0000000000..3912c31f98 --- /dev/null +++ b/network-messages/src/main/java/io/bisq/messages/btc/UserAgent.java @@ -0,0 +1,44 @@ +/* + * This file is part of bisq. + * + * bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with bisq. If not, see . + */ + +package io.bisq.messages.btc; + +import javax.inject.Inject; +import javax.inject.Named; + +public class UserAgent { + public static final String NAME_KEY = "useragent.name"; + public static final String VERSION_KEY = "useragent.version"; + + private final String name; + private final String version; + + @Inject + public UserAgent(@Named(NAME_KEY) String name, @Named(VERSION_KEY) String version) { + this.name = name; + this.version = version; + } + + public String getName() { + return name; + } + + public String getVersion() { + return version; + } +} + diff --git a/network-messages/src/main/java/io/bisq/messages/btc/data/RawTransactionInput.java b/network-messages/src/main/java/io/bisq/messages/btc/data/RawTransactionInput.java new file mode 100644 index 0000000000..67df82b108 --- /dev/null +++ b/network-messages/src/main/java/io/bisq/messages/btc/data/RawTransactionInput.java @@ -0,0 +1,78 @@ +/* + * This file is part of bisq. + * + * bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with bisq. If not, see . + */ + +package io.bisq.messages.btc.data; + +import com.google.protobuf.ByteString; +import io.bisq.app.Version; +import io.bisq.messages.wire.Payload; +import io.bisq.common.wire.proto.Messages; + +import java.util.Arrays; + +public final class RawTransactionInput implements Payload { + // That object is sent over the wire, so we need to take care of version compatibility. + private static final long serialVersionUID = Version.P2P_NETWORK_VERSION; + + public final long index; + public final byte[] parentTransaction; + public final long value; + + public RawTransactionInput(long index, byte[] parentTransaction, long value) { + this.index = index; + this.parentTransaction = parentTransaction; + this.value = value; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (!(o instanceof RawTransactionInput)) return false; + + RawTransactionInput rawTransactionInput = (RawTransactionInput) o; + + if (index != rawTransactionInput.index) return false; + if (value != rawTransactionInput.value) return false; + return Arrays.equals(parentTransaction, rawTransactionInput.parentTransaction); + + } + + @Override + public int hashCode() { + int result = (int) (index ^ (index >>> 32)); + result = 31 * result + (parentTransaction != null ? Arrays.hashCode(parentTransaction) : 0); + result = 31 * result + (int) (value ^ (value >>> 32)); + return result; + } + + @Override + public String toString() { + return "RawTransactionInput{" + + "index=" + index + + ", parentTransaction=" + Arrays.toString(parentTransaction) + + ", value=" + value + + '}'; + } + + @Override + public Messages.RawTransactionInput toProtoBuf() { + return Messages.RawTransactionInput.newBuilder() + .setIndex(index) + .setParentTransaction(ByteString.copyFrom(parentTransaction)) + .setValue(value).build(); + } +} diff --git a/network-messages/src/main/java/io/bisq/messages/dao/blockchain/RpcOptionKeys.java b/network-messages/src/main/java/io/bisq/messages/dao/blockchain/RpcOptionKeys.java new file mode 100644 index 0000000000..8fd90a26e2 --- /dev/null +++ b/network-messages/src/main/java/io/bisq/messages/dao/blockchain/RpcOptionKeys.java @@ -0,0 +1,9 @@ +package io.bisq.messages.dao.blockchain; + +public class RpcOptionKeys { + public static final String RPC_USER = "rpcUser"; + public static final String RPC_PASSWORD = "rpcPassword"; + public static final String RPC_PORT = "rpcPort"; + public static final String RPC_BLOCK_PORT = "rpcBlockPort"; + public static final String RPC_WALLET_PORT = "rpcWalletPort"; +} diff --git a/network-messages/src/main/java/io/bisq/messages/dao/compensation/payload/CompensationRequestPayload.java b/network-messages/src/main/java/io/bisq/messages/dao/compensation/payload/CompensationRequestPayload.java new file mode 100644 index 0000000000..5b1b6ebe0e --- /dev/null +++ b/network-messages/src/main/java/io/bisq/messages/dao/compensation/payload/CompensationRequestPayload.java @@ -0,0 +1,306 @@ +/* + * This file is part of bisq. + * + * bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with bisq. If not, see . + */ + +package io.bisq.messages.dao.compensation.payload; + +import io.bisq.app.Version; +import io.bisq.common.crypto.Sig; +import io.bisq.common.util.JsonExclude; +import io.bisq.common.wire.proto.Messages; +import io.bisq.messages.NodeAddress; +import io.bisq.payload.LazyProcessedStoragePayload; +import io.bisq.payload.PersistedStoragePayload; +import org.bitcoinj.core.Coin; +import org.bitcoinj.core.Utils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.IOException; +import java.io.ObjectInputStream; +import java.security.KeyFactory; +import java.security.NoSuchAlgorithmException; +import java.security.NoSuchProviderException; +import java.security.PublicKey; +import java.security.spec.InvalidKeySpecException; +import java.security.spec.X509EncodedKeySpec; +import java.util.Date; +import java.util.concurrent.TimeUnit; + +// The data of the CompensationRequest +public final class CompensationRequestPayload implements LazyProcessedStoragePayload, PersistedStoragePayload { + // That object is sent over the wire, so we need to take care of version compatibility. + private static final long serialVersionUID = Version.P2P_NETWORK_VERSION; + + private static final Logger log = LoggerFactory.getLogger(CompensationRequestPayload.class); + + public static final long TTL = TimeUnit.DAYS.toMillis(30); + + public final byte version; + private final long creationDate; + + public final String uid; + public final String name; + public final String title; + public final String category; + public final String description; + public final String link; + public final long startDate; + public final long endDate; + private final long requestedBtc; + public final String btcAddress; + private final String nodeAddress; + + @JsonExclude + private transient PublicKey p2pStorageSignaturePubKey; + @JsonExclude + private final byte[] p2pStorageSignaturePubKeyBytes; + + // used for json + private final String p2pStorageSignaturePubKeyAsHex; + + // Signature of the JSON data of this object excluding the signature and feeTxId fields using the standard Bitcoin + // messaging signing format as a base64 encoded string. + @JsonExclude + public String signature; + + // Set after we signed and set the hash. The hash is used in the OP_RETURN of the fee tx + @JsonExclude + public String feeTxId; + + public CompensationRequestPayload(String uid, + String name, + String title, + String category, + String description, + String link, + Date startDate, + Date endDate, + Coin requestedBtc, + String btcAddress, + NodeAddress nodeAddress, + PublicKey p2pStorageSignaturePubKey) { + + version = Version.COMPENSATION_REQUEST_VERSION; + creationDate = new Date().getTime(); + + this.uid = uid; + this.name = name; + this.title = title; + this.category = category; + this.description = description; + this.link = link; + this.startDate = startDate.getTime(); + this.endDate = endDate.getTime(); + this.requestedBtc = requestedBtc.value; + this.btcAddress = btcAddress; + this.nodeAddress = nodeAddress.getFullAddress(); + this.p2pStorageSignaturePubKey = p2pStorageSignaturePubKey; + this.p2pStorageSignaturePubKeyBytes = new X509EncodedKeySpec(p2pStorageSignaturePubKey.getEncoded()).getEncoded(); + p2pStorageSignaturePubKeyAsHex = Utils.HEX.encode(p2pStorageSignaturePubKey.getEncoded()); + init(); + } + + public CompensationRequestPayload(String uid, + String name, + String title, + String category, + String description, + String link, + Date startDate, + Date endDate, + Coin requestedBtc, + String btcAddress, + NodeAddress nodeAddress, + byte[] p2pStorageSignaturePubKeyBytes) { + + version = Version.COMPENSATION_REQUEST_VERSION; + creationDate = new Date().getTime(); + + this.uid = uid; + this.name = name; + this.title = title; + this.category = category; + this.description = description; + this.link = link; + this.startDate = startDate.getTime(); + this.endDate = endDate.getTime(); + this.requestedBtc = requestedBtc.value; + this.btcAddress = btcAddress; + this.nodeAddress = nodeAddress.getFullAddress(); + this.p2pStorageSignaturePubKey = p2pStorageSignaturePubKey; + this.p2pStorageSignaturePubKeyBytes = p2pStorageSignaturePubKeyBytes; + init(); + this.p2pStorageSignaturePubKeyAsHex = Utils.HEX.encode(p2pStorageSignaturePubKey.getEncoded()); + } + + private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { + try { + in.defaultReadObject(); + init(); + } catch (Throwable t) { + log.warn("Cannot be deserialized." + t.getMessage()); + } + } + + private void init() { + try { + p2pStorageSignaturePubKey = KeyFactory.getInstance(Sig.KEY_ALGO, "BC").generatePublic(new X509EncodedKeySpec(p2pStorageSignaturePubKeyBytes)); + } catch (InvalidKeySpecException | NoSuchAlgorithmException | NoSuchProviderException e) { + log.error("Couldn't create the p2p storage public key", e); + } + } + + public void setSignature(String signature) { + this.signature = signature; + } + + // Called after tx is published + public void setFeeTxId(String feeTxId) { + this.feeTxId = feeTxId; + } + + @Override + public long getTTL() { + return TTL; + } + + @Override + public PublicKey getOwnerPubKey() { + return p2pStorageSignaturePubKey; + } + + public Date getStartDate() { + return new Date(startDate); + } + + public Date getEndDate() { + return new Date(endDate); + } + + public Date getCreationDate() { + return new Date(creationDate); + } + + public Coin getRequestedBtc() { + return Coin.valueOf(requestedBtc); + } + + public NodeAddress getNodeAddress() { + return new NodeAddress(nodeAddress); + } + + public String getShortId() { + return uid.substring(0, 8); + } + + @Override + public Messages.StoragePayload toProtoBuf() { + return Messages.StoragePayload.newBuilder().setCompensationRequestPayload( + Messages.CompensationRequestPayload.newBuilder() + .setTTL(TTL) + .setVersion(version) + .setCreationDate(creationDate) + .setUid(uid) + .setName(name) + .setTitle(title) + .setCategory(category) + .setDescription(description) + .setLink(link) + .setStartDate(startDate) + .setEndDate(endDate) + .setRequestedBtc(requestedBtc) + .setBtcAddress(btcAddress) + .setNodeAddress(nodeAddress) + .setP2PStorageSignaturePubKeyAsHex(p2pStorageSignaturePubKeyAsHex) + .setSignature(signature) + .setFeeTxId(feeTxId)).build(); + } + + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + + CompensationRequestPayload that = (CompensationRequestPayload) o; + + if (version != that.version) return false; + if (startDate != that.startDate) return false; + if (endDate != that.endDate) return false; + if (requestedBtc != that.requestedBtc) return false; + if (creationDate != that.creationDate) return false; + if (uid != null ? !uid.equals(that.uid) : that.uid != null) return false; + if (name != null ? !name.equals(that.name) : that.name != null) return false; + if (title != null ? !title.equals(that.title) : that.title != null) return false; + if (category != null ? !category.equals(that.category) : that.category != null) return false; + if (description != null ? !description.equals(that.description) : that.description != null) return false; + if (link != null ? !link.equals(that.link) : that.link != null) return false; + if (btcAddress != null ? !btcAddress.equals(that.btcAddress) : that.btcAddress != null) return false; + if (nodeAddress != null ? !nodeAddress.equals(that.nodeAddress) : that.nodeAddress != null) return false; + if (p2pStorageSignaturePubKey != null ? !p2pStorageSignaturePubKey.equals(that.p2pStorageSignaturePubKey) : that.p2pStorageSignaturePubKey != null) + return false; + if (p2pStorageSignaturePubKeyAsHex != null ? !p2pStorageSignaturePubKeyAsHex.equals(that.p2pStorageSignaturePubKeyAsHex) : that.p2pStorageSignaturePubKeyAsHex != null) + return false; + if (signature != null ? !signature.equals(that.signature) : that.signature != null) return false; + return !(feeTxId != null ? !feeTxId.equals(that.feeTxId) : that.feeTxId != null); + + } + + @Override + public int hashCode() { + int result = (int) version; + result = 31 * result + (uid != null ? uid.hashCode() : 0); + result = 31 * result + (name != null ? name.hashCode() : 0); + result = 31 * result + (title != null ? title.hashCode() : 0); + result = 31 * result + (category != null ? category.hashCode() : 0); + result = 31 * result + (description != null ? description.hashCode() : 0); + result = 31 * result + (link != null ? link.hashCode() : 0); + result = 31 * result + (int) (startDate ^ (startDate >>> 32)); + result = 31 * result + (int) (endDate ^ (endDate >>> 32)); + result = 31 * result + (int) (requestedBtc ^ (requestedBtc >>> 32)); + result = 31 * result + (btcAddress != null ? btcAddress.hashCode() : 0); + result = 31 * result + (nodeAddress != null ? nodeAddress.hashCode() : 0); + result = 31 * result + (int) (creationDate ^ (creationDate >>> 32)); + result = 31 * result + (p2pStorageSignaturePubKey != null ? p2pStorageSignaturePubKey.hashCode() : 0); + result = 31 * result + (p2pStorageSignaturePubKeyAsHex != null ? p2pStorageSignaturePubKeyAsHex.hashCode() : 0); + result = 31 * result + (signature != null ? signature.hashCode() : 0); + result = 31 * result + (feeTxId != null ? feeTxId.hashCode() : 0); + return result; + } + + @Override + public String toString() { + return "CompensationRequestPayload{" + + "version=" + version + + ", uid='" + uid + '\'' + + ", name='" + name + '\'' + + ", title='" + title + '\'' + + ", category='" + category + '\'' + + ", description='" + description + '\'' + + ", link='" + link + '\'' + + ", startDate=" + getStartDate() + + ", endDate=" + getEndDate() + + ", requestedBtc=" + requestedBtc + + ", btcAddress='" + btcAddress + '\'' + + ", nodeAddress='" + getNodeAddress() + '\'' + + ", creationDate=" + getCreationDate() + + ", p2pStorageSignaturePubKeyAsHex='" + p2pStorageSignaturePubKeyAsHex + '\'' + + ", signature='" + signature + '\'' + + ", feeTxId='" + feeTxId + '\'' + + '}'; + } +} diff --git a/network-messages/src/main/java/io/bisq/messages/filter/payload/Filter.java b/network-messages/src/main/java/io/bisq/messages/filter/payload/Filter.java new file mode 100644 index 0000000000..158b8c1d34 --- /dev/null +++ b/network-messages/src/main/java/io/bisq/messages/filter/payload/Filter.java @@ -0,0 +1,156 @@ +/* + * This file is part of bisq. + * + * bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with bisq. If not, see . + */ + +package io.bisq.messages.filter.payload; + +import com.google.protobuf.ByteString; +import io.bisq.app.Version; +import io.bisq.common.crypto.Sig; +import io.bisq.common.wire.proto.Messages; +import io.bisq.payload.StoragePayload; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.IOException; +import java.security.KeyFactory; +import java.security.NoSuchAlgorithmException; +import java.security.NoSuchProviderException; +import java.security.PublicKey; +import java.security.spec.InvalidKeySpecException; +import java.security.spec.X509EncodedKeySpec; +import java.util.Arrays; +import java.util.List; +import java.util.concurrent.TimeUnit; +import java.util.stream.Collectors; + +public final class Filter implements StoragePayload { + // That object is sent over the wire, so we need to take care of version compatibility. + private static final long serialVersionUID = Version.P2P_NETWORK_VERSION; + private static final Logger log = LoggerFactory.getLogger(Filter.class); + private static final long TTL = TimeUnit.DAYS.toMillis(21); + + public final List bannedNodeAddress; + public final List bannedOfferIds; + public final List bannedPaymentAccounts; + private String signatureAsBase64; + private byte[] publicKeyBytes; + + private transient PublicKey publicKey; + + public Filter(List bannedOfferIds, List bannedNodeAddress, List bannedPaymentAccounts) { + this.bannedOfferIds = bannedOfferIds; + this.bannedNodeAddress = bannedNodeAddress; + this.bannedPaymentAccounts = bannedPaymentAccounts; + } + + public Filter(List bannedOfferIds, List bannedNodeAddress, List bannedPaymentAccounts, + String signatureAsBase64, byte[] publicKeyBytes) { + this(bannedOfferIds, bannedNodeAddress, bannedPaymentAccounts); + init(); + } + + private void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException { + try { + in.defaultReadObject(); + init(); + } catch (Throwable t) { + log.warn("Exception at readObject: " + t.getMessage()); + } + } + + private void init() { + try { + publicKey = KeyFactory.getInstance(Sig.KEY_ALGO, "BC").generatePublic(new X509EncodedKeySpec(publicKeyBytes)); + } catch (InvalidKeySpecException | NoSuchAlgorithmException | NoSuchProviderException e) { + log.error("Couldn't create the storage public key", e); + } + } + + public void setSigAndPubKey(String signatureAsBase64, PublicKey storagePublicKey) { + this.signatureAsBase64 = signatureAsBase64; + this.publicKey = storagePublicKey; + this.publicKeyBytes = new X509EncodedKeySpec(this.publicKey.getEncoded()).getEncoded(); + } + + public String getSignatureAsBase64() { + return signatureAsBase64; + } + + @Override + public long getTTL() { + return TTL; + } + + @Override + public PublicKey getOwnerPubKey() { + return publicKey; + } + + + @Override + public Messages.StoragePayload toProtoBuf() { + List paymentAccountFilterList; + paymentAccountFilterList = bannedPaymentAccounts.stream() + .map(paymentAccountFilter -> paymentAccountFilter.toProtoBuf()).collect(Collectors.toList()); + return Messages.StoragePayload.newBuilder().setFilter(Messages.Filter.newBuilder() + .setTTL(TTL) + .addAllBannedNodeAddress(bannedNodeAddress) + .addAllBannedOfferIds(bannedOfferIds) + .addAllBannedPaymentAccounts(paymentAccountFilterList) + .setSignatureAsBase64(signatureAsBase64) + .setPublicKeyBytes(ByteString.copyFrom(publicKeyBytes))).build(); + } + + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (!(o instanceof Filter)) return false; + + Filter filter = (Filter) o; + + if (bannedNodeAddress != null ? !bannedNodeAddress.equals(filter.bannedNodeAddress) : filter.bannedNodeAddress != null) + return false; + if (bannedOfferIds != null ? !bannedOfferIds.equals(filter.bannedOfferIds) : filter.bannedOfferIds != null) + return false; + if (bannedPaymentAccounts != null ? !bannedPaymentAccounts.equals(filter.bannedPaymentAccounts) : filter.bannedPaymentAccounts != null) + return false; + if (signatureAsBase64 != null ? !signatureAsBase64.equals(filter.signatureAsBase64) : filter.signatureAsBase64 != null) + return false; + return Arrays.equals(publicKeyBytes, filter.publicKeyBytes); + + } + + @Override + public int hashCode() { + int result = bannedNodeAddress != null ? bannedNodeAddress.hashCode() : 0; + result = 31 * result + (bannedOfferIds != null ? bannedOfferIds.hashCode() : 0); + result = 31 * result + (bannedPaymentAccounts != null ? bannedPaymentAccounts.hashCode() : 0); + result = 31 * result + (signatureAsBase64 != null ? signatureAsBase64.hashCode() : 0); + result = 31 * result + (publicKeyBytes != null ? Arrays.hashCode(publicKeyBytes) : 0); + return result; + } + + @Override + public String toString() { + return "Filter{" + + "bannedNodeAddress=" + bannedNodeAddress + + ", bannedOfferIds=" + bannedOfferIds + + ", bannedPaymentAccounts=" + bannedPaymentAccounts + + '}'; + } +} diff --git a/network-messages/src/main/java/io/bisq/messages/filter/payload/PaymentAccountFilter.java b/network-messages/src/main/java/io/bisq/messages/filter/payload/PaymentAccountFilter.java new file mode 100644 index 0000000000..300b16187e --- /dev/null +++ b/network-messages/src/main/java/io/bisq/messages/filter/payload/PaymentAccountFilter.java @@ -0,0 +1,40 @@ +package io.bisq.messages.filter.payload; + +import io.bisq.app.Version; +import io.bisq.common.wire.proto.Messages; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.Serializable; + +public class PaymentAccountFilter implements Serializable { + // That object is sent over the wire, so we need to take care of version compatibility. + private static final long serialVersionUID = Version.P2P_NETWORK_VERSION; + private static final Logger log = LoggerFactory.getLogger(PaymentAccountFilter.class); + + public final String paymentMethodId; + public final String getMethodName; + public final String value; + + public PaymentAccountFilter(String paymentMethodId, String getMethodName, String value) { + this.paymentMethodId = paymentMethodId; + this.getMethodName = getMethodName; + this.value = value; + } + + @Override + public String toString() { + return "PaymentAccountFilter{" + + "paymentMethodId='" + paymentMethodId + '\'' + + ", getMethodName='" + getMethodName + '\'' + + ", value='" + value + '\'' + + '}'; + } + + public Messages.PaymentAccountFilter toProtoBuf() { + return Messages.PaymentAccountFilter.newBuilder() + .setPaymentMethodId(paymentMethodId) + .setGetMethodName(getMethodName) + .setValue(value).build(); + } +} diff --git a/network-messages/src/main/java/io/bisq/messages/p2p/messaging/SendMailboxMessageListener.java b/network-messages/src/main/java/io/bisq/messages/p2p/messaging/SendMailboxMessageListener.java new file mode 100644 index 0000000000..914deaac73 --- /dev/null +++ b/network-messages/src/main/java/io/bisq/messages/p2p/messaging/SendMailboxMessageListener.java @@ -0,0 +1,9 @@ +package io.bisq.messages.p2p.messaging; + +public interface SendMailboxMessageListener { + void onArrived(); + + void onStoredInMailbox(); + + void onFault(String errorMessage); +} diff --git a/network-messages/src/main/java/io/bisq/messages/p2p/messaging/SupportedCapabilitiesMessage.java b/network-messages/src/main/java/io/bisq/messages/p2p/messaging/SupportedCapabilitiesMessage.java new file mode 100644 index 0000000000..e4c8bf53c2 --- /dev/null +++ b/network-messages/src/main/java/io/bisq/messages/p2p/messaging/SupportedCapabilitiesMessage.java @@ -0,0 +1,11 @@ +package io.bisq.messages.p2p.messaging; + +import io.bisq.messages.Message; + +import javax.annotation.Nullable; +import java.util.ArrayList; + +public interface SupportedCapabilitiesMessage extends Message { + @Nullable + ArrayList getSupportedCapabilities(); +} diff --git a/network-messages/src/main/java/io/bisq/messages/payment/PaymentMethod.java b/network-messages/src/main/java/io/bisq/messages/payment/PaymentMethod.java new file mode 100644 index 0000000000..f3d5080142 --- /dev/null +++ b/network-messages/src/main/java/io/bisq/messages/payment/PaymentMethod.java @@ -0,0 +1,211 @@ +/* + * This file is part of bisq. + * + * bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with bisq. If not, see . + */ + +package io.bisq.messages.payment; + +import io.bisq.app.Version; +import io.bisq.common.persistance.Persistable; +import io.bisq.locale.Res; +import org.bitcoinj.core.Coin; +import org.jetbrains.annotations.NotNull; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Optional; + +// Don't use Enum as it breaks serialisation when changing entries and we want to stay flexible here +public final class PaymentMethod implements Persistable, Comparable { + // That object is saved to disc. We need to take care of changes to not break deserialization. + private static final long serialVersionUID = Version.LOCAL_DB_VERSION; + + protected final Logger log = LoggerFactory.getLogger(this.getClass()); + + // time in blocks (average 10 min for one block confirmation + private static final long HOUR = 3600_000; + private static final long DAY = HOUR * 24; + + public static final String OK_PAY_ID = "OK_PAY"; + public static final String PERFECT_MONEY_ID = "PERFECT_MONEY"; + public static final String SEPA_ID = "SEPA"; + public static final String FASTER_PAYMENTS_ID = "FASTER_PAYMENTS"; + public static final String NATIONAL_BANK_ID = "NATIONAL_BANK"; + public static final String SAME_BANK_ID = "SAME_BANK"; + public static final String SPECIFIC_BANKS_ID = "SPECIFIC_BANKS"; + public static final String SWISH_ID = "SWISH"; + public static final String ALI_PAY_ID = "ALI_PAY"; + public static final String CLEAR_X_CHANGE_ID = "CLEAR_X_CHANGE"; + public static final String CHASE_QUICK_PAY_ID = "CHASE_QUICK_PAY"; + public static final String INTERAC_E_TRANSFER_ID = "INTERAC_E_TRANSFER"; + public static final String US_POSTAL_MONEY_ORDER_ID = "US_POSTAL_MONEY_ORDER"; + public static final String CASH_DEPOSIT_ID = "CASH_DEPOSIT"; + public static final String BLOCK_CHAINS_ID = "BLOCK_CHAINS"; + + public static PaymentMethod OK_PAY; + public static PaymentMethod PERFECT_MONEY; + public static PaymentMethod SEPA; + public static PaymentMethod FASTER_PAYMENTS; + public static PaymentMethod NATIONAL_BANK; + public static PaymentMethod SAME_BANK; + public static PaymentMethod SPECIFIC_BANKS; + public static PaymentMethod SWISH; + public static PaymentMethod ALI_PAY; + public static PaymentMethod CLEAR_X_CHANGE; + public static PaymentMethod CHASE_QUICK_PAY; + public static PaymentMethod INTERAC_E_TRANSFER; + public static PaymentMethod US_POSTAL_MONEY_ORDER; + public static PaymentMethod CASH_DEPOSIT; + public static PaymentMethod BLOCK_CHAINS; + + public static final List ALL_VALUES = new ArrayList<>(Arrays.asList( + // EUR + SEPA = new PaymentMethod(SEPA_ID, 0, 8 * DAY, Coin.parseCoin("0.5")), // sepa takes 1-3 business days. We use 8 days to include safety for holidays + + // Global + NATIONAL_BANK = new PaymentMethod(NATIONAL_BANK_ID, 0, 4 * DAY, Coin.parseCoin("0.5")), + SAME_BANK = new PaymentMethod(SAME_BANK_ID, 0, 2 * DAY, Coin.parseCoin("0.5")), + SPECIFIC_BANKS = new PaymentMethod(SPECIFIC_BANKS_ID, 0, 4 * DAY, Coin.parseCoin("0.5")), + CASH_DEPOSIT = new PaymentMethod(CASH_DEPOSIT_ID, 0, 4 * DAY, Coin.parseCoin("0.5")), + + // Trans national + OK_PAY = new PaymentMethod(OK_PAY_ID, 0, DAY, Coin.parseCoin("1")), + PERFECT_MONEY = new PaymentMethod(PERFECT_MONEY_ID, 0, DAY, Coin.parseCoin("1")), + + // UK + FASTER_PAYMENTS = new PaymentMethod(FASTER_PAYMENTS_ID, 0, DAY, Coin.parseCoin("0.5")), + + // Canada + INTERAC_E_TRANSFER = new PaymentMethod(INTERAC_E_TRANSFER_ID, 0, DAY, Coin.parseCoin("0.5")), + + // US + CLEAR_X_CHANGE = new PaymentMethod(CLEAR_X_CHANGE_ID, 0, 4 * DAY, Coin.parseCoin("0.5")), + CHASE_QUICK_PAY = new PaymentMethod(CHASE_QUICK_PAY_ID, 0, DAY, Coin.parseCoin("0.5")), + US_POSTAL_MONEY_ORDER = new PaymentMethod(US_POSTAL_MONEY_ORDER_ID, 0, 8 * DAY, Coin.parseCoin("0.5")), + + // Sweden + SWISH = new PaymentMethod(SWISH_ID, 0, DAY, Coin.parseCoin("1")), + + // China + ALI_PAY = new PaymentMethod(ALI_PAY_ID, 0, DAY, Coin.parseCoin("1")), + + // Altcoins + BLOCK_CHAINS = new PaymentMethod(BLOCK_CHAINS_ID, 0, DAY, Coin.parseCoin("1")) + )); + + private final String id; + private long lockTime; + private long maxTradePeriod; + private Coin maxTradeLimit; + + /** + * @param id + * @param lockTime lock time when seller release BTC until the payout tx gets valid (bitcoin tx lockTime). Serves as protection + * against charge back risk. If Bank do the charge back quickly the Arbitrator and the seller can push another + * double spend tx to invalidate the time locked payout tx. For the moment we set all to 0 but will have it in + * place when needed. + * @param maxTradePeriod The min. period a trader need to wait until he gets displayed the contact form for opening a dispute. + * @param maxTradeLimit The max. allowed trade amount in Bitcoin for that payment method (depending on charge back risk) + */ + public PaymentMethod(String id, long lockTime, long maxTradePeriod, Coin maxTradeLimit) { + this.id = id; + this.lockTime = lockTime; + this.maxTradePeriod = maxTradePeriod; + this.maxTradeLimit = maxTradeLimit; + } + + private void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException { + try { + in.defaultReadObject(); + + // In case we update those values we want that the persisted accounts get updated as well + PaymentMethod paymentMethod = PaymentMethod.getPaymentMethodById(id); + this.lockTime = paymentMethod.getLockTime(); + this.maxTradePeriod = paymentMethod.getMaxTradePeriod(); + this.maxTradeLimit = paymentMethod.getMaxTradeLimit(); + } catch (Throwable t) { + log.warn("Cannot be deserialized." + t.getMessage()); + } + } + + public static PaymentMethod getPaymentMethodById(String name) { + Optional paymentMethodOptional = ALL_VALUES.stream().filter(e -> e.getId().equals(name)).findFirst(); + if (paymentMethodOptional.isPresent()) + return paymentMethodOptional.get(); + else + return new PaymentMethod(Res.get("shared.na"), 1, DAY, Coin.parseCoin("0")); + } + + public String getId() { + return id; + } + + public long getMaxTradePeriod() { + return maxTradePeriod; + } + + public long getLockTime() { + return lockTime; + } + + public Coin getMaxTradeLimit() { + return maxTradeLimit; + } + + @Override + public int compareTo(@NotNull Object other) { + if (id != null) + return this.id.compareTo(((PaymentMethod) other).id); + else + return 0; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (!(o instanceof PaymentMethod)) return false; + + PaymentMethod that = (PaymentMethod) o; + + if (lockTime != that.lockTime) return false; + if (maxTradePeriod != that.maxTradePeriod) return false; + if (id != null ? !id.equals(that.id) : that.id != null) return false; + return !(maxTradeLimit != null ? !maxTradeLimit.equals(that.maxTradeLimit) : that.maxTradeLimit != null); + + } + + @Override + public int hashCode() { + int result = id != null ? id.hashCode() : 0; + result = 31 * result + (int) (lockTime ^ (lockTime >>> 32)); + result = 31 * result + (int) (maxTradePeriod ^ (maxTradePeriod >>> 32)); + result = 31 * result + (maxTradeLimit != null ? maxTradeLimit.hashCode() : 0); + return result; + } + + @Override + public String toString() { + return "PaymentMethod{" + + "id='" + id + '\'' + + ", lockTime=" + lockTime + + ", maxTradePeriod=" + maxTradePeriod + + ", maxTradeLimitInBitcoin=" + maxTradeLimit + + '}'; + } +} diff --git a/network-messages/src/main/java/io/bisq/messages/payment/payload/AliPayAccountContractData.java b/network-messages/src/main/java/io/bisq/messages/payment/payload/AliPayAccountContractData.java new file mode 100644 index 0000000000..c799f61044 --- /dev/null +++ b/network-messages/src/main/java/io/bisq/messages/payment/payload/AliPayAccountContractData.java @@ -0,0 +1,75 @@ +/* + * This file is part of bisq. + * + * bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with bisq. If not, see . + */ + +package io.bisq.messages.payment.payload; + +import io.bisq.app.Version; +import io.bisq.common.wire.proto.Messages; + +public final class AliPayAccountContractData extends PaymentAccountContractData { + // That object is sent over the wire, so we need to take care of version compatibility. + private static final long serialVersionUID = Version.P2P_NETWORK_VERSION; + + private String accountNr; + + public AliPayAccountContractData(String paymentMethod, String id, long maxTradePeriod, String accountNr) { + this(paymentMethod, id, maxTradePeriod); + setAccountNr(accountNr); + } + + public AliPayAccountContractData(String paymentMethod, String id, long maxTradePeriod) { + super(paymentMethod, id, maxTradePeriod); + } + + public void setAccountNr(String accountNr) { + this.accountNr = accountNr; + } + + public String getAccountNr() { + return accountNr; + } + + @Override + public String getPaymentDetails() { + return "AliPay - Account no.: " + accountNr; + } + + @Override + public String getPaymentDetailsForTradePopup() { + return getPaymentDetails(); + } + + @Override + public Messages.PaymentAccountContractData toProtoBuf() { + Messages.AliPayAccountContractData.Builder thisClass = + Messages.AliPayAccountContractData.newBuilder().setAccountNr(accountNr); + Messages.PaymentAccountContractData.Builder paymentAccountContractData = + Messages.PaymentAccountContractData.newBuilder() + .setId(id) + .setPaymentMethodName(paymentMethodName) + .setMaxTradePeriod(maxTradePeriod) + .setAliPayAccountContractData(thisClass); + return paymentAccountContractData.build(); + } + + @Override + public String toString() { + return "AliPayAccountContractData{" + + "accountNr='" + accountNr + '\'' + + '}'; + } +} diff --git a/network-messages/src/main/java/io/bisq/messages/payment/payload/BankAccountContractData.java b/network-messages/src/main/java/io/bisq/messages/payment/payload/BankAccountContractData.java new file mode 100644 index 0000000000..90a3aa2d30 --- /dev/null +++ b/network-messages/src/main/java/io/bisq/messages/payment/payload/BankAccountContractData.java @@ -0,0 +1,138 @@ +/* + * This file is part of bisq. + * + * bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with bisq. If not, see . + */ + +package io.bisq.messages.payment.payload; + +import io.bisq.app.Version; +import io.bisq.locale.BankUtil; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import javax.annotation.Nullable; +import java.util.Locale; + +public abstract class BankAccountContractData extends CountryBasedPaymentAccountContractData { + // That object is sent over the wire, so we need to take care of version compatibility. + private static final long serialVersionUID = Version.P2P_NETWORK_VERSION; + + private static final Logger log = LoggerFactory.getLogger(BankAccountContractData.class); + + protected String holderName; + protected String bankName; + protected String bankId; + protected String branchId; + protected String accountNr; + protected String accountType; + + @Nullable + protected String holderTaxId; + + public BankAccountContractData(String paymentMethod, String id, long maxTradePeriod) { + super(paymentMethod, id, maxTradePeriod); + } + + @Override + public String getPaymentDetails(Locale locale) { + return "Bank account transfer - " + getPaymentDetailsForTradePopup(locale).replace("\n", ", "); + } + + @Override + public String getPaymentDetailsForTradePopup(Locale locale) { + String bankName = BankUtil.isBankNameRequired(countryCode) ? BankUtil.getBankNameLabel(countryCode) + " " + this.bankName + "\n" : ""; + String bankId = BankUtil.isBankIdRequired(countryCode) ? BankUtil.getBankIdLabel(countryCode) + " " + this.bankId + "\n" : ""; + String branchId = BankUtil.isBranchIdRequired(countryCode) ? BankUtil.getBranchIdLabel(countryCode) + " " + this.branchId + "\n" : ""; + String accountNr = BankUtil.isAccountNrRequired(countryCode) ? BankUtil.getAccountNrLabel(countryCode) + " " + this.accountNr + "\n" : ""; + String accountType = BankUtil.isAccountTypeRequired(countryCode) ? BankUtil.getAccountTypeLabel(countryCode) + " " + this.accountType + "\n" : ""; + String holderIdString = BankUtil.isHolderIdRequired(countryCode) ? (BankUtil.getHolderIdLabel(countryCode) + " " + holderTaxId + "\n") : ""; + + return "Holder name: " + holderName + "\n" + + bankName + + bankId + + branchId + + accountNr + + accountType + + holderIdString + + "Country of bank: " + new Locale(locale.getLanguage(), countryCode).getDisplayCountry(); + } + + + protected String getHolderIdLabel() { + return BankUtil.getHolderIdLabel(countryCode); + } + + public void setHolderName(String holderName) { + this.holderName = holderName; + } + + public String getHolderName() { + return holderName; + } + + public void setBankName(String bankName) { + this.bankName = bankName; + } + + @Nullable + public String getBankName() { + return bankName; + } + + public void setBankId(String bankId) { + this.bankId = bankId; + } + + @Nullable + public String getBankId() { + return BankUtil.isBankIdRequired(countryCode) ? bankId : bankName; + } + + public void setBranchId(String branchId) { + this.branchId = branchId; + } + + @Nullable + public String getBranchId() { + return branchId; + } + + public void setAccountNr(String accountNr) { + this.accountNr = accountNr; + } + + @Nullable + public String getAccountNr() { + return accountNr; + } + + public void setHolderTaxId(String holderTaxId) { + this.holderTaxId = holderTaxId; + } + + @Nullable + public String getHolderTaxId() { + return holderTaxId; + } + + public void setAccountType(String accountType) { + this.accountType = accountType; + } + + @Nullable + public String getAccountType() { + return accountType; + } +} diff --git a/network-messages/src/main/java/io/bisq/messages/payment/payload/CashDepositAccountContractData.java b/network-messages/src/main/java/io/bisq/messages/payment/payload/CashDepositAccountContractData.java new file mode 100644 index 0000000000..3d67b27796 --- /dev/null +++ b/network-messages/src/main/java/io/bisq/messages/payment/payload/CashDepositAccountContractData.java @@ -0,0 +1,187 @@ +/* + * This file is part of bisq. + * + * bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with bisq. If not, see . + */ + +package io.bisq.messages.payment.payload; + +import io.bisq.app.Version; +import io.bisq.common.wire.proto.Messages; +import io.bisq.locale.BankUtil; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import javax.annotation.Nullable; +import java.util.Locale; + +public class CashDepositAccountContractData extends CountryBasedPaymentAccountContractData { + // That object is sent over the wire, so we need to take care of version compatibility. + private static final long serialVersionUID = Version.P2P_NETWORK_VERSION; + + private static final Logger log = LoggerFactory.getLogger(CashDepositAccountContractData.class); + + protected String holderName; + protected String holderEmail; + protected String bankName; + protected String bankId; + protected String branchId; + protected String accountNr; + protected String accountType; + @Nullable + protected String requirements; + @Nullable + protected String holderTaxId; + + public CashDepositAccountContractData(String paymentMethod, String id, long maxTradePeriod) { + super(paymentMethod, id, maxTradePeriod); + } + + @Override + public String getPaymentDetails(Locale locale) { + return "Cash deposit - " + getPaymentDetailsForTradePopup().replace("\n", ", "); + } + + @Override + public String getPaymentDetailsForTradePopup(Locale locale) { + String bankName = BankUtil.isBankNameRequired(countryCode) ? BankUtil.getBankNameLabel(countryCode) + " " + this.bankName + "\n" : ""; + String bankId = BankUtil.isBankIdRequired(countryCode) ? BankUtil.getBankIdLabel(countryCode) + " " + this.bankId + "\n" : ""; + String branchId = BankUtil.isBranchIdRequired(countryCode) ? BankUtil.getBranchIdLabel(countryCode) + " " + this.branchId + "\n" : ""; + String accountNr = BankUtil.isAccountNrRequired(countryCode) ? BankUtil.getAccountNrLabel(countryCode) + " " + this.accountNr + "\n" : ""; + String accountType = BankUtil.isAccountTypeRequired(countryCode) ? BankUtil.getAccountTypeLabel(countryCode) + " " + this.accountType + "\n" : ""; + String holderIdString = BankUtil.isHolderIdRequired(countryCode) ? (BankUtil.getHolderIdLabel(countryCode) + " " + holderTaxId + "\n") : ""; + String requirementsString = requirements != null && !requirements.isEmpty() ? ("Extra requirements: " + requirements + "\n") : ""; + + return "Holder name: " + holderName + "\n" + + "Holder email: " + holderEmail + "\n" + + bankName + + bankId + + branchId + + accountNr + + accountType + + holderIdString + + requirementsString + + "Country of bank: " + new Locale(locale.getLanguage(), countryCode).getDisplayCountry(); + } + + @Override + public Messages.PaymentAccountContractData toProtoBuf() { + Messages.CashDepositAccountContractData.Builder cashDepositAccountContractData = + Messages.CashDepositAccountContractData.newBuilder() + .setHolderName(holderName) + .setHolderEmail(holderEmail) + .setBankName(bankName) + .setBankId(bankId) + .setBranchId(branchId) + .setAccountNr(accountNr) + .setRequirements(requirements) + .setHolderTaxId(holderTaxId); + Messages.CountryBasedPaymentAccountContractData.Builder countryBasedPaymentAccountContractData = + Messages.CountryBasedPaymentAccountContractData.newBuilder() + .setCountryCode(countryCode) + .setCashDepositAccountContractData(cashDepositAccountContractData); + Messages.PaymentAccountContractData.Builder paymentAccountContractData = + Messages.PaymentAccountContractData.newBuilder() + .setId(id) + .setPaymentMethodName(paymentMethodName) + .setMaxTradePeriod(maxTradePeriod) + .setCountryBasedPaymentAccountContractData(countryBasedPaymentAccountContractData); + return paymentAccountContractData.build(); + } + + + protected String getHolderIdLabel() { + return BankUtil.getHolderIdLabel(countryCode); + } + + public void setHolderName(String holderName) { + this.holderName = holderName; + } + + public String getHolderName() { + return holderName; + } + + public void setHolderEmail(String holderEmail) { + this.holderEmail = holderEmail; + } + + public String getHolderEmail() { + return holderEmail; + } + + public void setBankName(String bankName) { + this.bankName = bankName; + } + + @Nullable + public String getBankName() { + return bankName; + } + + public void setBankId(String bankId) { + this.bankId = bankId; + } + + @Nullable + public String getBankId() { + return BankUtil.isBankIdRequired(countryCode) ? bankId : bankName; + } + + public void setBranchId(String branchId) { + this.branchId = branchId; + } + + @Nullable + public String getBranchId() { + return branchId; + } + + public void setAccountNr(String accountNr) { + this.accountNr = accountNr; + } + + @Nullable + public String getAccountNr() { + return accountNr; + } + + public void setHolderTaxId(String holderTaxId) { + this.holderTaxId = holderTaxId; + } + + @Nullable + public String getHolderTaxId() { + return holderTaxId; + } + + public void setAccountType(String accountType) { + this.accountType = accountType; + } + + @Nullable + public String getAccountType() { + return accountType; + } + + @Nullable + public String getRequirements() { + return requirements; + } + + public void setRequirements(String requirements) { + this.requirements = requirements; + } + +} diff --git a/network-messages/src/main/java/io/bisq/messages/payment/payload/ChaseQuickPayAccountContractData.java b/network-messages/src/main/java/io/bisq/messages/payment/payload/ChaseQuickPayAccountContractData.java new file mode 100644 index 0000000000..1d1db60a58 --- /dev/null +++ b/network-messages/src/main/java/io/bisq/messages/payment/payload/ChaseQuickPayAccountContractData.java @@ -0,0 +1,82 @@ +/* + * This file is part of bisq. + * + * bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with bisq. If not, see . + */ + +package io.bisq.messages.payment.payload; + +import io.bisq.app.Version; +import io.bisq.common.wire.proto.Messages; + +public final class ChaseQuickPayAccountContractData extends PaymentAccountContractData { + // That object is sent over the wire, so we need to take care of version compatibility. + private static final long serialVersionUID = Version.P2P_NETWORK_VERSION; + + private String email; + private String holderName; + + public ChaseQuickPayAccountContractData(String paymentMethod, String id, long maxTradePeriod) { + super(paymentMethod, id, maxTradePeriod); + } + + public ChaseQuickPayAccountContractData(String paymentMethod, String id, long maxTradePeriod, String email, + String holderName) { + this(paymentMethod, id, maxTradePeriod); + setEmail(email); + setHolderName(holderName); + } + + public void setEmail(String email) { + this.email = email; + } + + public String getEmail() { + return email; + } + + public String getHolderName() { + return holderName; + } + + public void setHolderName(String holderName) { + this.holderName = holderName; + } + + @Override + public String getPaymentDetails() { + return "Chase QuickPay - Holder name: " + holderName + ", email: " + email; + } + + @Override + public String getPaymentDetailsForTradePopup() { + return "Holder name: " + holderName + "\n" + + "Email: " + email; + } + + @Override + public Messages.PaymentAccountContractData toProtoBuf() { + Messages.ChaseQuickPayAccountContractData.Builder chaseQuickPayAccountContractData = + Messages.ChaseQuickPayAccountContractData.newBuilder() + .setEmail(email) + .setHolderName(holderName); + Messages.PaymentAccountContractData.Builder paymentAccountContractData = + Messages.PaymentAccountContractData.newBuilder() + .setId(id) + .setPaymentMethodName(paymentMethodName) + .setMaxTradePeriod(maxTradePeriod) + .setChaseQuickPayAccountContractData(chaseQuickPayAccountContractData); + return paymentAccountContractData.build(); + } +} diff --git a/network-messages/src/main/java/io/bisq/messages/payment/payload/ClearXchangeAccountContractData.java b/network-messages/src/main/java/io/bisq/messages/payment/payload/ClearXchangeAccountContractData.java new file mode 100644 index 0000000000..167c671ba3 --- /dev/null +++ b/network-messages/src/main/java/io/bisq/messages/payment/payload/ClearXchangeAccountContractData.java @@ -0,0 +1,82 @@ +/* + * This file is part of bisq. + * + * bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with bisq. If not, see . + */ + +package io.bisq.messages.payment.payload; + +import io.bisq.app.Version; +import io.bisq.common.wire.proto.Messages; + +public final class ClearXchangeAccountContractData extends PaymentAccountContractData { + // That object is sent over the wire, so we need to take care of version compatibility. + private static final long serialVersionUID = Version.P2P_NETWORK_VERSION; + + private String holderName; + private String emailOrMobileNr; + + public ClearXchangeAccountContractData(String paymentMethod, String id, long maxTradePeriod) { + super(paymentMethod, id, maxTradePeriod); + } + + public ClearXchangeAccountContractData(String paymentMethod, String id, long maxTradePeriod, String holderName, + String emailOrMobileNr) { + this(paymentMethod, id, maxTradePeriod); + setHolderName(holderName); + setEmailOrMobileNr(emailOrMobileNr); + } + + public String getHolderName() { + return holderName; + } + + public void setHolderName(String holderName) { + this.holderName = holderName; + } + + public void setEmailOrMobileNr(String emailOrMobileNr) { + this.emailOrMobileNr = emailOrMobileNr; + } + + public String getEmailOrMobileNr() { + return emailOrMobileNr; + } + + @Override + public String getPaymentDetails() { + return "ClearXchange - Holder name: " + holderName + ", email or mobile no.: " + emailOrMobileNr; + } + + @Override + public String getPaymentDetailsForTradePopup() { + return "Holder name: " + holderName + "\n" + + "Email or mobile no.: " + emailOrMobileNr; + } + + @Override + public Messages.PaymentAccountContractData toProtoBuf() { + Messages.ClearXchangeAccountContractData.Builder thisClass = + Messages.ClearXchangeAccountContractData.newBuilder() + .setHolderName(holderName) + .setEmailOrMobileNr(emailOrMobileNr); + Messages.PaymentAccountContractData.Builder paymentAccountContractData = + Messages.PaymentAccountContractData.newBuilder() + .setId(id) + .setPaymentMethodName(paymentMethodName) + .setMaxTradePeriod(maxTradePeriod) + .setClearXchangeAccountContractData(thisClass); + return paymentAccountContractData.build(); + } +} diff --git a/network-messages/src/main/java/io/bisq/messages/payment/payload/CountryBasedPaymentAccountContractData.java b/network-messages/src/main/java/io/bisq/messages/payment/payload/CountryBasedPaymentAccountContractData.java new file mode 100644 index 0000000000..38abf579a2 --- /dev/null +++ b/network-messages/src/main/java/io/bisq/messages/payment/payload/CountryBasedPaymentAccountContractData.java @@ -0,0 +1,88 @@ +/* + * This file is part of bisq. + * + * bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with bisq. If not, see . + */ + +package io.bisq.messages.payment.payload; + +import io.bisq.app.Version; +import sun.reflect.generics.reflectiveObjects.NotImplementedException; + +import java.util.Locale; + +public abstract class CountryBasedPaymentAccountContractData extends PaymentAccountContractData { + // That object is sent over the wire, so we need to take care of version compatibility. + private static final long serialVersionUID = Version.P2P_NETWORK_VERSION; + + protected String countryCode = ""; + + + /////////////////////////////////////////////////////////////////////////////////////////// + // Constructor + /////////////////////////////////////////////////////////////////////////////////////////// + + CountryBasedPaymentAccountContractData(String paymentMethodName, String id, long maxTradePeriod) { + super(paymentMethodName, id, maxTradePeriod); + } + + /////////////////////////////////////////////////////////////////////////////////////////// + // Getter, Setter + /////////////////////////////////////////////////////////////////////////////////////////// + + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; + } + + public String getCountryCode() { + return countryCode; + } + + + /////////////////////////////////////////////////////////////////////////////////////////// + // Getter + /////////////////////////////////////////////////////////////////////////////////////////// + public String getPaymentDetails() { throw new NotImplementedException();} + abstract public String getPaymentDetails(Locale locale); + + /** needs Locale for country based */ + public String getPaymentDetailsForTradePopup() { throw new NotImplementedException();} + abstract public String getPaymentDetailsForTradePopup(Locale locale); + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (!(o instanceof CountryBasedPaymentAccountContractData)) return false; + if (!super.equals(o)) return false; + + CountryBasedPaymentAccountContractData that = (CountryBasedPaymentAccountContractData) o; + + return countryCode.equals(that.countryCode); + + } + + @Override + public int hashCode() { + int result = super.hashCode(); + result = 31 * result + countryCode.hashCode(); + return result; + } + + @Override + public String toString() { + return "CountryBasedPaymentAccountContractData{" + + "countryCode='" + countryCode + '\'' + + "} " + super.toString(); + } +} diff --git a/network-messages/src/main/java/io/bisq/messages/payment/payload/CryptoCurrencyAccountContractData.java b/network-messages/src/main/java/io/bisq/messages/payment/payload/CryptoCurrencyAccountContractData.java new file mode 100644 index 0000000000..f8862022a3 --- /dev/null +++ b/network-messages/src/main/java/io/bisq/messages/payment/payload/CryptoCurrencyAccountContractData.java @@ -0,0 +1,68 @@ +/* + * This file is part of bisq. + * + * bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with bisq. If not, see . + */ + +package io.bisq.messages.payment.payload; + +import io.bisq.app.Version; +import io.bisq.common.wire.proto.Messages; + +public final class CryptoCurrencyAccountContractData extends PaymentAccountContractData { + // That object is sent over the wire, so we need to take care of version compatibility. + private static final long serialVersionUID = Version.P2P_NETWORK_VERSION; + + private String address; + + public CryptoCurrencyAccountContractData(String paymentMethod, String id, long maxTradePeriod) { + super(paymentMethod, id, maxTradePeriod); + } + + public CryptoCurrencyAccountContractData(String paymentMethod, String id, long maxTradePeriod, String address) { + super(paymentMethod, id, maxTradePeriod); + this.address = address; + } + + public void setAddress(String address) { + this.address = address; + } + + public String getAddress() { + return address; + } + + @Override + public String getPaymentDetails() { + return "Receivers altcoin address: " + address; + } + + @Override + public String getPaymentDetailsForTradePopup() { + return getPaymentDetails(); + } + + @Override + public Messages.PaymentAccountContractData toProtoBuf() { + Messages.CryptoCurrencyAccountContractData.Builder cryptoCurrencyAccountContractData = + Messages.CryptoCurrencyAccountContractData.newBuilder().setAddress(address); + Messages.PaymentAccountContractData.Builder paymentAccountContractData = + Messages.PaymentAccountContractData.newBuilder() + .setId(id) + .setPaymentMethodName(paymentMethodName) + .setMaxTradePeriod(maxTradePeriod) + .setCryptoCurrencyAccountContractData(cryptoCurrencyAccountContractData); + return paymentAccountContractData.build(); + } +} diff --git a/network-messages/src/main/java/io/bisq/messages/payment/payload/FasterPaymentsAccountContractData.java b/network-messages/src/main/java/io/bisq/messages/payment/payload/FasterPaymentsAccountContractData.java new file mode 100644 index 0000000000..9d4a5ca21c --- /dev/null +++ b/network-messages/src/main/java/io/bisq/messages/payment/payload/FasterPaymentsAccountContractData.java @@ -0,0 +1,82 @@ +/* + * This file is part of bisq. + * + * bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with bisq. If not, see . + */ + +package io.bisq.messages.payment.payload; + +import io.bisq.app.Version; +import io.bisq.common.wire.proto.Messages; + +public final class FasterPaymentsAccountContractData extends PaymentAccountContractData { + // That object is sent over the wire, so we need to take care of version compatibility. + private static final long serialVersionUID = Version.P2P_NETWORK_VERSION; + + private String sortCode; + private String accountNr; + + public FasterPaymentsAccountContractData(String paymentMethod, String id, long maxTradePeriod) { + super(paymentMethod, id, maxTradePeriod); + } + + public FasterPaymentsAccountContractData(String paymentMethod, String id, long maxTradePeriod, + String sortCode, String accountNr) { + super(paymentMethod, id, maxTradePeriod); + this.sortCode = sortCode; + this.accountNr = accountNr; + } + + public void setAccountNr(String accountNr) { + this.accountNr = accountNr; + } + + public String getAccountNr() { + return accountNr; + } + + public String getSortCode() { + return sortCode; + } + + public void setSortCode(String sortCode) { + this.sortCode = sortCode; + } + + @Override + public String getPaymentDetails() { + return "FasterPayments - UK Sort code: " + sortCode + ", Account number: " + accountNr; + } + + @Override + public String getPaymentDetailsForTradePopup() { + return "UK Sort code: " + sortCode + "\n" + + "Account number: " + accountNr; + } + + @Override + public Messages.PaymentAccountContractData toProtoBuf() { + Messages.FasterPaymentsAccountContractData.Builder thisClass = + Messages.FasterPaymentsAccountContractData.newBuilder() + .setSortCode(sortCode) + .setAccountNr(accountNr); + Messages.PaymentAccountContractData.Builder paymentAccountContractData = + Messages.PaymentAccountContractData.newBuilder() + .setId(id) + .setPaymentMethodName(paymentMethodName) + .setMaxTradePeriod(maxTradePeriod) + .setFasterPaymentsAccountContractData(thisClass); + return paymentAccountContractData.build(); + } +} diff --git a/network-messages/src/main/java/io/bisq/messages/payment/payload/InteracETransferAccountContractData.java b/network-messages/src/main/java/io/bisq/messages/payment/payload/InteracETransferAccountContractData.java new file mode 100644 index 0000000000..5683caa0e6 --- /dev/null +++ b/network-messages/src/main/java/io/bisq/messages/payment/payload/InteracETransferAccountContractData.java @@ -0,0 +1,106 @@ +/* + * This file is part of bisq. + * + * bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with bisq. If not, see . + */ + +package io.bisq.messages.payment.payload; + +import io.bisq.app.Version; +import io.bisq.common.wire.proto.Messages; + +public final class InteracETransferAccountContractData extends PaymentAccountContractData { + // That object is sent over the wire, so we need to take care of version compatibility. + private static final long serialVersionUID = Version.P2P_NETWORK_VERSION; + + private String email; + private String holderName; + private String question; + private String answer; + + public InteracETransferAccountContractData(String paymentMethod, String id, long maxTradePeriod) { + super(paymentMethod, id, maxTradePeriod); + } + + public InteracETransferAccountContractData(String paymentMethodName, String id, long maxTradePeriod, + String email, String holderName, String question, String answer) { + super(paymentMethodName, id, maxTradePeriod); + this.email = email; + this.holderName = holderName; + this.question = question; + this.answer = answer; + } + + public void setEmail(String email) { + this.email = email; + } + + public String getEmail() { + return email; + } + + public String getHolderName() { + return holderName; + } + + public void setHolderName(String holderName) { + this.holderName = holderName; + } + + public String getQuestion() { + return question; + } + + public void setQuestion(String question) { + this.question = question; + } + + public String getAnswer() { + return answer; + } + + public void setAnswer(String answer) { + this.answer = answer; + } + + @Override + public String getPaymentDetails() { + return "Interac e-Transfer - Holder name: " + holderName + ", email: " + email + ", secret question: " + question + ", answer: " + answer; + } + + @Override + public String getPaymentDetailsForTradePopup() { + return "Holder name: " + holderName + "\n" + + "Email: " + email + "\n" + + "Secret question: " + question + "\n" + + "Answer: " + answer; + } + + @Override + public Messages.PaymentAccountContractData toProtoBuf() { + Messages.InteracETransferAccountContractData.Builder interacETransferAccountContractData = + Messages.InteracETransferAccountContractData.newBuilder() + .setEmail(email) + .setHolderName(holderName) + .setQuestion(question) + .setAnswer(answer); + Messages.PaymentAccountContractData.Builder paymentAccountContractData = + Messages.PaymentAccountContractData.newBuilder() + .setId(id) + .setPaymentMethodName(paymentMethodName) + .setMaxTradePeriod(maxTradePeriod) + .setInteracETransferAccountContractData(interacETransferAccountContractData); + return paymentAccountContractData.build(); + } +} diff --git a/network-messages/src/main/java/io/bisq/messages/payment/payload/NationalBankAccountContractData.java b/network-messages/src/main/java/io/bisq/messages/payment/payload/NationalBankAccountContractData.java new file mode 100644 index 0000000000..267401542e --- /dev/null +++ b/network-messages/src/main/java/io/bisq/messages/payment/payload/NationalBankAccountContractData.java @@ -0,0 +1,66 @@ +/* + * This file is part of bisq. + * + * bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with bisq. If not, see . + */ + +package io.bisq.messages.payment.payload; + +import io.bisq.app.Version; +import io.bisq.common.wire.proto.Messages; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public final class NationalBankAccountContractData extends BankAccountContractData { + // That object is sent over the wire, so we need to take care of version compatibility. + private static final long serialVersionUID = Version.P2P_NETWORK_VERSION; + + private static final Logger log = LoggerFactory.getLogger(NationalBankAccountContractData.class); + + public NationalBankAccountContractData(String paymentMethod, String id, long maxTradePeriod) { + super(paymentMethod, id, maxTradePeriod); + } + + @Override + public String getPaymentDetails() { + return "National Bank transfer - " + getPaymentDetailsForTradePopup().replace("\n", ", "); + } + + @Override + public Messages.PaymentAccountContractData toProtoBuf() { + Messages.NationalBankAccountContractData.Builder thisClass = + Messages.NationalBankAccountContractData.newBuilder(); + Messages.BankAccountContractData.Builder bankAccountContractData = + Messages.BankAccountContractData.newBuilder() + .setHolderName(holderName) + .setBankName(bankName) + .setBankId(bankId) + .setBranchId(branchId) + .setAccountNr(accountNr) + .setAccountType(accountType) + .setHolderTaxId(holderTaxId) + .setNationalBankAccountContractData(thisClass); + Messages.CountryBasedPaymentAccountContractData.Builder countryBasedPaymentAccountContractData = + Messages.CountryBasedPaymentAccountContractData.newBuilder() + .setCountryCode(countryCode) + .setBankAccountContractData(bankAccountContractData); + Messages.PaymentAccountContractData.Builder paymentAccountContractData = + Messages.PaymentAccountContractData.newBuilder() + .setId(id) + .setPaymentMethodName(paymentMethodName) + .setMaxTradePeriod(maxTradePeriod) + .setCountryBasedPaymentAccountContractData(countryBasedPaymentAccountContractData); + return paymentAccountContractData.build(); + } +} diff --git a/network-messages/src/main/java/io/bisq/messages/payment/payload/OKPayAccountContractData.java b/network-messages/src/main/java/io/bisq/messages/payment/payload/OKPayAccountContractData.java new file mode 100644 index 0000000000..9d743b32e8 --- /dev/null +++ b/network-messages/src/main/java/io/bisq/messages/payment/payload/OKPayAccountContractData.java @@ -0,0 +1,68 @@ +/* + * This file is part of bisq. + * + * bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with bisq. If not, see . + */ + +package io.bisq.messages.payment.payload; + +import io.bisq.app.Version; +import io.bisq.common.wire.proto.Messages; + +public final class OKPayAccountContractData extends PaymentAccountContractData { + // That object is sent over the wire, so we need to take care of version compatibility. + private static final long serialVersionUID = Version.P2P_NETWORK_VERSION; + + private String accountNr; + + public OKPayAccountContractData(String paymentMethod, String id, long maxTradePeriod) { + super(paymentMethod, id, maxTradePeriod); + } + + public OKPayAccountContractData(String paymentMethodName, String id, long maxTradePeriod, String accountNr) { + super(paymentMethodName, id, maxTradePeriod); + this.accountNr = accountNr; + } + + public void setAccountNr(String accountNr) { + this.accountNr = accountNr; + } + + public String getAccountNr() { + return accountNr; + } + + @Override + public String getPaymentDetails() { + return "OKPay - Account no.: " + accountNr; + } + + @Override + public String getPaymentDetailsForTradePopup() { + return getPaymentDetails(); + } + + @Override + public Messages.PaymentAccountContractData toProtoBuf() { + Messages.OKPayAccountContractData.Builder thisClass = + Messages.OKPayAccountContractData.newBuilder().setAccountNr(accountNr); + Messages.PaymentAccountContractData.Builder paymentAccountContractData = + Messages.PaymentAccountContractData.newBuilder() + .setId(id) + .setPaymentMethodName(paymentMethodName) + .setMaxTradePeriod(maxTradePeriod) + .setOKPayAccountContractData(thisClass); + return paymentAccountContractData.build(); + } +} diff --git a/network-messages/src/main/java/io/bisq/messages/payment/payload/PaymentAccountContractData.java b/network-messages/src/main/java/io/bisq/messages/payment/payload/PaymentAccountContractData.java new file mode 100644 index 0000000000..e856841b42 --- /dev/null +++ b/network-messages/src/main/java/io/bisq/messages/payment/payload/PaymentAccountContractData.java @@ -0,0 +1,92 @@ +/* + * This file is part of bisq. + * + * bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with bisq. If not, see . + */ + +package io.bisq.messages.payment.payload; + +import io.bisq.app.Version; +import io.bisq.messages.wire.Payload; + +public abstract class PaymentAccountContractData implements Payload { + // That object is sent over the wire, so we need to take care of version compatibility. + private static final long serialVersionUID = Version.P2P_NETWORK_VERSION; + + protected final String paymentMethodName; + protected final String id; + protected final long maxTradePeriod; + + + /////////////////////////////////////////////////////////////////////////////////////////// + // Constructor + /////////////////////////////////////////////////////////////////////////////////////////// + + PaymentAccountContractData(String paymentMethodName, String id, long maxTradePeriod) { + this.paymentMethodName = paymentMethodName; + this.id = id; + this.maxTradePeriod = maxTradePeriod; + } + + /////////////////////////////////////////////////////////////////////////////////////////// + // Getter + /////////////////////////////////////////////////////////////////////////////////////////// + + public String getId() { + return id; + } + + public String getPaymentMethodName() { + return paymentMethodName; + } + + abstract public String getPaymentDetails(); + + abstract public String getPaymentDetailsForTradePopup(); + + public long getMaxTradePeriod() { + return maxTradePeriod; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (!(o instanceof PaymentAccountContractData)) return false; + + PaymentAccountContractData that = (PaymentAccountContractData) o; + + if (maxTradePeriod != that.maxTradePeriod) return false; + if (paymentMethodName != null ? !paymentMethodName.equals(that.paymentMethodName) : that.paymentMethodName != null) + return false; + return !(id != null ? !id.equals(that.id) : that.id != null); + + } + + @Override + public int hashCode() { + int result = paymentMethodName != null ? paymentMethodName.hashCode() : 0; + result = 31 * result + (id != null ? id.hashCode() : 0); + result = 31 * result + (int) (maxTradePeriod ^ (maxTradePeriod >>> 32)); + return result; + } + + @Override + public String toString() { + return "PaymentAccountContractData{" + + "paymentMethodName='" + paymentMethodName + '\'' + + ", id='" + id + '\'' + + ", maxTradePeriod=" + maxTradePeriod + + '}'; + } +} diff --git a/network-messages/src/main/java/io/bisq/messages/payment/payload/PerfectMoneyAccountContractData.java b/network-messages/src/main/java/io/bisq/messages/payment/payload/PerfectMoneyAccountContractData.java new file mode 100644 index 0000000000..b2805900c9 --- /dev/null +++ b/network-messages/src/main/java/io/bisq/messages/payment/payload/PerfectMoneyAccountContractData.java @@ -0,0 +1,68 @@ +/* + * This file is part of bisq. + * + * bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with bisq. If not, see . + */ + +package io.bisq.messages.payment.payload; + +import io.bisq.app.Version; +import io.bisq.common.wire.proto.Messages; + +public final class PerfectMoneyAccountContractData extends PaymentAccountContractData { + // That object is sent over the wire, so we need to take care of version compatibility. + private static final long serialVersionUID = Version.P2P_NETWORK_VERSION; + + private String accountNr; + + public PerfectMoneyAccountContractData(String paymentMethod, String id, long maxTradePeriod) { + super(paymentMethod, id, maxTradePeriod); + } + + public PerfectMoneyAccountContractData(String paymentMethodName, String id, long maxTradePeriod, String accountNr) { + super(paymentMethodName, id, maxTradePeriod); + this.accountNr = accountNr; + } + + public void setAccountNr(String accountNr) { + this.accountNr = accountNr; + } + + public String getAccountNr() { + return accountNr; + } + + @Override + public String getPaymentDetails() { + return "PerfectMoney - Account no.: " + accountNr; + } + + @Override + public String getPaymentDetailsForTradePopup() { + return getPaymentDetails(); + } + + @Override + public Messages.PaymentAccountContractData toProtoBuf() { + Messages.PerfectMoneyAccountContractData.Builder thisClass = + Messages.PerfectMoneyAccountContractData.newBuilder().setAccountNr(accountNr); + Messages.PaymentAccountContractData.Builder paymentAccountContractData = + Messages.PaymentAccountContractData.newBuilder() + .setId(id) + .setPaymentMethodName(paymentMethodName) + .setMaxTradePeriod(maxTradePeriod) + .setPerfectMoneyAccountContractData(thisClass); + return paymentAccountContractData.build(); + } +} diff --git a/network-messages/src/main/java/io/bisq/messages/payment/payload/SameBankAccountContractData.java b/network-messages/src/main/java/io/bisq/messages/payment/payload/SameBankAccountContractData.java new file mode 100644 index 0000000000..5b868da730 --- /dev/null +++ b/network-messages/src/main/java/io/bisq/messages/payment/payload/SameBankAccountContractData.java @@ -0,0 +1,68 @@ +/* + * This file is part of bisq. + * + * bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with bisq. If not, see . + */ + +package io.bisq.messages.payment.payload; + +import io.bisq.app.Version; +import io.bisq.common.wire.proto.Messages; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public final class SameBankAccountContractData extends BankAccountContractData { + // That object is sent over the wire, so we need to take care of version compatibility. + private static final long serialVersionUID = Version.P2P_NETWORK_VERSION; + + private static final Logger log = LoggerFactory.getLogger(SameBankAccountContractData.class); + + + public SameBankAccountContractData(String paymentMethod, String id, long maxTradePeriod) { + super(paymentMethod, id, maxTradePeriod); + } + + @Override + public String getPaymentDetails() { + return "Transfer with same Bank - " + getPaymentDetailsForTradePopup().replace("\n", ", "); + } + + @Override + public Messages.PaymentAccountContractData toProtoBuf() { + Messages.SameBankAccountContractData sameBankAccountContractData = + Messages.SameBankAccountContractData.getDefaultInstance(); + Messages.BankAccountContractData.Builder bankAccountContractData = + Messages.BankAccountContractData.newBuilder() + .setHolderName(holderName) + .setBankName(bankName) + .setBankId(bankId) + .setBranchId(branchId) + .setAccountNr(accountNr) + .setAccountType(accountType) + .setHolderTaxId(holderTaxId) + .setSameBankAccontContractData(sameBankAccountContractData); + Messages.CountryBasedPaymentAccountContractData.Builder countryBasedPaymentAccountContractData = + Messages.CountryBasedPaymentAccountContractData.newBuilder() + .setCountryCode(countryCode) + .setBankAccountContractData(bankAccountContractData); + Messages.PaymentAccountContractData.Builder paymentAccountContractData = + Messages.PaymentAccountContractData.newBuilder() + .setId(id) + .setPaymentMethodName(paymentMethodName) + .setMaxTradePeriod(maxTradePeriod) + .setCountryBasedPaymentAccountContractData(countryBasedPaymentAccountContractData); + + return paymentAccountContractData.build(); + } +} diff --git a/network-messages/src/main/java/io/bisq/messages/payment/payload/SepaAccountContractData.java b/network-messages/src/main/java/io/bisq/messages/payment/payload/SepaAccountContractData.java new file mode 100644 index 0000000000..ca599a0af3 --- /dev/null +++ b/network-messages/src/main/java/io/bisq/messages/payment/payload/SepaAccountContractData.java @@ -0,0 +1,130 @@ +/* + * This file is part of bisq. + * + * bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with bisq. If not, see . + */ + +package io.bisq.messages.payment.payload; + +import io.bisq.app.Version; +import io.bisq.common.wire.proto.Messages; +import io.bisq.locale.Country; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.util.ArrayList; +import java.util.List; +import java.util.Locale; +import java.util.Set; +import java.util.stream.Collectors; + +// TODO refactor with BankAccountContractData +public final class SepaAccountContractData extends CountryBasedPaymentAccountContractData { + // That object is sent over the wire, so we need to take care of version compatibility. + private static final long serialVersionUID = Version.P2P_NETWORK_VERSION; + + private static final Logger log = LoggerFactory.getLogger(SepaAccountContractData.class); + + private String holderName; + private String iban; + private String bic; + // Dont use a set here as we need a deterministic ordering, otherwise the contract hash does not match + private final List acceptedCountryCodes; + + public SepaAccountContractData(String paymentMethod, String id, long maxTradePeriod, List acceptedCountries) { + super(paymentMethod, id, maxTradePeriod); + Set acceptedCountryCodesAsSet = acceptedCountries.stream() + .map(e -> e.code).collect(Collectors.toSet()); + acceptedCountryCodes = new ArrayList<>(acceptedCountryCodesAsSet); + acceptedCountryCodes.sort(String::compareTo); + } + + public void setHolderName(String holderName) { + this.holderName = holderName; + } + + public String getHolderName() { + return holderName; + } + + public void setIban(String iban) { + this.iban = iban; + } + + public String getIban() { + return iban; + } + + public void setBic(String bic) { + this.bic = bic; + } + + public String getBic() { + return bic; + } + + public void addAcceptedCountry(String countryCode) { + if (!acceptedCountryCodes.contains(countryCode)) + acceptedCountryCodes.add(countryCode); + } + + public void removeAcceptedCountry(String countryCode) { + if (acceptedCountryCodes.contains(countryCode)) + acceptedCountryCodes.remove(countryCode); + } + + public List getAcceptedCountryCodes() { + return acceptedCountryCodes; + } + + @Override + public String getPaymentDetails(Locale locale) { + return "SEPA - Holder name: " + holderName + ", IBAN: " + iban + ", BIC: " + bic + ", country code: " + getCountryCode(); + } + + @Override + public String getPaymentDetailsForTradePopup() { + return null; + } + + @Override + public String getPaymentDetailsForTradePopup(Locale locale) { + return "Holder name: " + holderName + "\n" + + "IBAN: " + iban + "\n" + + "BIC: " + bic + "\n" + + "Country of bank: " + new Locale(locale.getLanguage(), countryCode).getDisplayCountry(); + } + + @Override + public Messages.PaymentAccountContractData toProtoBuf() { + Messages.SepaAccountContractData.Builder sepaAccountContractData = + Messages.SepaAccountContractData.newBuilder() + .setHolderName(holderName) + .setIban(iban) + .setBic(bic) + .addAllAcceptedCountryCodes(acceptedCountryCodes); + Messages.CountryBasedPaymentAccountContractData.Builder countryBasedPaymentAccountContractData = + Messages.CountryBasedPaymentAccountContractData.newBuilder() + .setCountryCode(countryCode) + .setSepaAccountContractData(sepaAccountContractData); + Messages.PaymentAccountContractData.Builder paymentAccountContractData = + Messages.PaymentAccountContractData.newBuilder() + .setId(id) + .setPaymentMethodName(paymentMethodName) + .setMaxTradePeriod(maxTradePeriod) + .setCountryBasedPaymentAccountContractData(countryBasedPaymentAccountContractData); + + return paymentAccountContractData.build(); + } +} diff --git a/network-messages/src/main/java/io/bisq/messages/payment/payload/SpecificBanksAccountContractData.java b/network-messages/src/main/java/io/bisq/messages/payment/payload/SpecificBanksAccountContractData.java new file mode 100644 index 0000000000..a0f11b1f74 --- /dev/null +++ b/network-messages/src/main/java/io/bisq/messages/payment/payload/SpecificBanksAccountContractData.java @@ -0,0 +1,101 @@ +/* + * This file is part of bisq. + * + * bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with bisq. If not, see . + */ + +package io.bisq.messages.payment.payload; + +import com.google.common.base.Joiner; +import io.bisq.app.Version; +import io.bisq.common.wire.proto.Messages; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.util.ArrayList; +import java.util.Locale; + +public final class SpecificBanksAccountContractData extends BankAccountContractData { + // That object is sent over the wire, so we need to take care of version compatibility. + private static final long serialVersionUID = Version.P2P_NETWORK_VERSION; + + private static final Logger log = LoggerFactory.getLogger(SpecificBanksAccountContractData.class); + + + // Dont use a set here as we need a deterministic ordering, otherwise the contract hash does not match + private ArrayList acceptedBanks; + + public SpecificBanksAccountContractData(String paymentMethod, String id, long maxTradePeriod) { + super(paymentMethod, id, maxTradePeriod); + acceptedBanks = new ArrayList<>(); + } + + public void clearAcceptedBanks() { + acceptedBanks = new ArrayList<>(); + } + + public void addAcceptedBank(String bankName) { + if (!acceptedBanks.contains(bankName)) + acceptedBanks.add(bankName); + } + + public ArrayList getAcceptedBanks() { + return acceptedBanks; + } + + + @Override + public String getPaymentDetails() { + return "Transfers with specific banks - " + getPaymentDetailsForTradePopup().replace("\n", ", "); + } + + @Override + public String getPaymentDetailsForTradePopup() { + return null; + } + + @Override + public String getPaymentDetailsForTradePopup(Locale locale) { + return super.getPaymentDetailsForTradePopup(locale) + "\n" + + "Accepted banks: " + Joiner.on(", ").join(acceptedBanks); + } + + @Override + public Messages.PaymentAccountContractData toProtoBuf() { + Messages.SpecificBanksAccountContractData.Builder specificBanksAccountContractData = + Messages.SpecificBanksAccountContractData.newBuilder().addAllAcceptedBanks(acceptedBanks); + Messages.BankAccountContractData.Builder bankAccountContractData = + Messages.BankAccountContractData.newBuilder() + .setHolderName(holderName) + .setBankName(bankName) + .setBankId(bankId) + .setBranchId(branchId) + .setAccountNr(accountNr) + .setAccountType(accountType) + .setHolderTaxId(holderTaxId) + .setSpecificBanksAccountContractData(specificBanksAccountContractData); + Messages.CountryBasedPaymentAccountContractData.Builder countryBasedPaymentAccountContractData = + Messages.CountryBasedPaymentAccountContractData.newBuilder() + .setCountryCode(countryCode) + .setBankAccountContractData(bankAccountContractData); + Messages.PaymentAccountContractData.Builder paymentAccountContractData = + Messages.PaymentAccountContractData.newBuilder() + .setId(id) + .setPaymentMethodName(paymentMethodName) + .setMaxTradePeriod(maxTradePeriod) + .setCountryBasedPaymentAccountContractData(countryBasedPaymentAccountContractData); + + return paymentAccountContractData.build(); + } +} diff --git a/network-messages/src/main/java/io/bisq/messages/payment/payload/SwishAccountContractData.java b/network-messages/src/main/java/io/bisq/messages/payment/payload/SwishAccountContractData.java new file mode 100644 index 0000000000..cc377ca574 --- /dev/null +++ b/network-messages/src/main/java/io/bisq/messages/payment/payload/SwishAccountContractData.java @@ -0,0 +1,82 @@ +/* + * This file is part of bisq. + * + * bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with bisq. If not, see . + */ + +package io.bisq.messages.payment.payload; + +import io.bisq.app.Version; +import io.bisq.common.wire.proto.Messages; + +public final class SwishAccountContractData extends PaymentAccountContractData { + // That object is sent over the wire, so we need to take care of version compatibility. + private static final long serialVersionUID = Version.P2P_NETWORK_VERSION; + + private String mobileNr; + private String holderName; + + public SwishAccountContractData(String paymentMethod, String id, long maxTradePeriod) { + super(paymentMethod, id, maxTradePeriod); + } + + public SwishAccountContractData(String paymentMethodName, String id, long maxTradePeriod, + String mobileNr, String holderName) { + super(paymentMethodName, id, maxTradePeriod); + this.mobileNr = mobileNr; + this.holderName = holderName; + } + + public void setMobileNr(String mobileNr) { + this.mobileNr = mobileNr; + } + + public String getMobileNr() { + return mobileNr; + } + + public String getHolderName() { + return holderName; + } + + public void setHolderName(String holderName) { + this.holderName = holderName; + } + + @Override + public String getPaymentDetails() { + return "Swish - Holder name: " + holderName + ", mobile no.: " + mobileNr; + } + + @Override + public String getPaymentDetailsForTradePopup() { + return "Holder name: " + holderName + "\n" + + "Mobile no.: " + mobileNr; + } + + @Override + public Messages.PaymentAccountContractData toProtoBuf() { + Messages.SwishAccountContractData.Builder thisClass = + Messages.SwishAccountContractData.newBuilder() + .setMobileNr(mobileNr) + .setHolderName(holderName); + Messages.PaymentAccountContractData.Builder paymentAccountContractData = + Messages.PaymentAccountContractData.newBuilder() + .setId(id) + .setPaymentMethodName(paymentMethodName) + .setMaxTradePeriod(maxTradePeriod) + .setSwishAccountContractData(thisClass); + return paymentAccountContractData.build(); + } +} diff --git a/network-messages/src/main/java/io/bisq/messages/payment/payload/USPostalMoneyOrderAccountContractData.java b/network-messages/src/main/java/io/bisq/messages/payment/payload/USPostalMoneyOrderAccountContractData.java new file mode 100644 index 0000000000..2e2d0c30b2 --- /dev/null +++ b/network-messages/src/main/java/io/bisq/messages/payment/payload/USPostalMoneyOrderAccountContractData.java @@ -0,0 +1,84 @@ +/* + * This file is part of bisq. + * + * bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with bisq. If not, see . + */ + +package io.bisq.messages.payment.payload; + +import io.bisq.app.Version; +import io.bisq.common.wire.proto.Messages; + +public final class USPostalMoneyOrderAccountContractData extends PaymentAccountContractData { + // That object is sent over the wire, so we need to take care of version compatibility. + private static final long serialVersionUID = Version.P2P_NETWORK_VERSION; + + private String postalAddress; + private String holderName; + + + public USPostalMoneyOrderAccountContractData(String paymentMethod, String id, long maxTradePeriod) { + super(paymentMethod, id, maxTradePeriod); + } + + public USPostalMoneyOrderAccountContractData(String paymentMethodName, String id, long maxTradePeriod, + String postalAddress, String holderName) { + super(paymentMethodName, id, maxTradePeriod); + this.postalAddress = postalAddress; + this.holderName = holderName; + } + + public void setPostalAddress(String postalAddress) { + this.postalAddress = postalAddress; + } + + public String getPostalAddress() { + return postalAddress; + } + + public String getHolderName() { + return holderName; + } + + public void setHolderName(String holderName) { + this.holderName = holderName; + } + + @Override + public String getPaymentDetails() { + return "US Postal Money Order - Holder name: " + holderName + ", postal address: " + postalAddress; + } + + + @Override + public String getPaymentDetailsForTradePopup() { + return "Holder name: " + holderName + "\n" + + "Postal address: " + postalAddress; + } + + @Override + public Messages.PaymentAccountContractData toProtoBuf() { + Messages.USPostalMoneyOrderAccountContractData.Builder thisClass = + Messages.USPostalMoneyOrderAccountContractData.newBuilder() + .setPostalAddress(postalAddress) + .setHolderName(holderName); + Messages.PaymentAccountContractData.Builder paymentAccountContractData = + Messages.PaymentAccountContractData.newBuilder() + .setId(id) + .setPaymentMethodName(paymentMethodName) + .setMaxTradePeriod(maxTradePeriod) + .setUSPostalMoneyOrderAccountContractData(thisClass); + return paymentAccountContractData.build(); + } +} diff --git a/network-messages/src/main/java/io/bisq/messages/protocol/trade/TradeMessage.java b/network-messages/src/main/java/io/bisq/messages/protocol/trade/TradeMessage.java new file mode 100644 index 0000000000..b6db9159ba --- /dev/null +++ b/network-messages/src/main/java/io/bisq/messages/protocol/trade/TradeMessage.java @@ -0,0 +1,57 @@ +/* + * This file is part of bisq. + * + * bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with bisq. If not, see . + */ + +package io.bisq.messages.protocol.trade; + +import io.bisq.app.Version; +import io.bisq.messages.p2p.messaging.DirectMessage; + +import javax.annotation.concurrent.Immutable; + +@Immutable +public abstract class TradeMessage implements DirectMessage { + //TODO add serialVersionUID also in superclasses as changes would break compatibility + // That object is sent over the wire, so we need to take care of version compatibility. + private static final long serialVersionUID = Version.P2P_NETWORK_VERSION; + + private final int messageVersion = Version.getP2PMessageVersion(); + public final String tradeId; + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (!(o instanceof TradeMessage)) return false; + + TradeMessage that = (TradeMessage) o; + + return !(tradeId != null ? !tradeId.equals(that.tradeId) : that.tradeId != null); + } + + @Override + public int hashCode() { + return tradeId != null ? tradeId.hashCode() : 0; + } + + protected TradeMessage(String tradeId) { + this.tradeId = tradeId; + } + + @Override + public int getMessageVersion() { + return messageVersion; + } +} diff --git a/network-messages/src/main/java/io/bisq/messages/trade/exceptions/MarketPriceNotAvailableException.java b/network-messages/src/main/java/io/bisq/messages/trade/exceptions/MarketPriceNotAvailableException.java new file mode 100644 index 0000000000..f4f9674865 --- /dev/null +++ b/network-messages/src/main/java/io/bisq/messages/trade/exceptions/MarketPriceNotAvailableException.java @@ -0,0 +1,7 @@ +package io.bisq.messages.trade.exceptions; + +public class MarketPriceNotAvailableException extends Exception { + public MarketPriceNotAvailableException(String message) { + super(message); + } +} diff --git a/network-messages/src/main/java/io/bisq/messages/trade/exceptions/TradePriceOutOfToleranceException.java b/network-messages/src/main/java/io/bisq/messages/trade/exceptions/TradePriceOutOfToleranceException.java new file mode 100644 index 0000000000..388773c5d2 --- /dev/null +++ b/network-messages/src/main/java/io/bisq/messages/trade/exceptions/TradePriceOutOfToleranceException.java @@ -0,0 +1,7 @@ +package io.bisq.messages.trade.exceptions; + +public class TradePriceOutOfToleranceException extends Exception { + public TradePriceOutOfToleranceException(String message) { + super(message); + } +} diff --git a/network-messages/src/main/java/io/bisq/messages/trade/payload/Contract.java b/network-messages/src/main/java/io/bisq/messages/trade/payload/Contract.java new file mode 100644 index 0000000000..a64f10a1c7 --- /dev/null +++ b/network-messages/src/main/java/io/bisq/messages/trade/payload/Contract.java @@ -0,0 +1,287 @@ +/* + * This file is part of bisq. + * + * bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with bisq. If not, see . + */ + +package io.bisq.messages.trade.payload; + +import com.google.common.base.Preconditions; +import com.google.protobuf.ByteString; +import io.bisq.app.Version; +import io.bisq.common.util.JsonExclude; +import io.bisq.messages.trade.offer.payload.OfferPayload; +import io.bisq.messages.wire.Payload; +import io.bisq.common.wire.proto.Messages; +import io.bisq.messages.NodeAddress; +import io.bisq.messages.crypto.PubKeyRing; +import io.bisq.messages.payment.payload.PaymentAccountContractData; +import org.bitcoinj.core.Coin; +import org.bitcoinj.core.Utils; +import org.bitcoinj.utils.Fiat; + +import javax.annotation.concurrent.Immutable; +import java.util.Arrays; + +@SuppressWarnings("WeakerAccess") +@Immutable +public final class Contract implements Payload { + // That object is sent over the wire, so we need to take care of version compatibility. + @JsonExclude + public static final long serialVersionUID = Version.P2P_NETWORK_VERSION; + + public final OfferPayload offer; + private final long tradeAmount; + private final long tradePrice; + public final String takeOfferFeeTxID; + public final NodeAddress arbitratorNodeAddress; + private final boolean isBuyerOffererAndSellerTaker; + private final String offererAccountId; + private final String takerAccountId; + private final PaymentAccountContractData offererPaymentAccountContractData; + private final PaymentAccountContractData takerPaymentAccountContractData; + @JsonExclude + private final PubKeyRing offererPubKeyRing; + @JsonExclude + private final PubKeyRing takerPubKeyRing; + private final NodeAddress buyerNodeAddress; + private final NodeAddress sellerNodeAddress; + + + private final String offererPayoutAddressString; + private final String takerPayoutAddressString; + @JsonExclude + private final byte[] offererMultiSigPubKey; + @JsonExclude + private final byte[] takerMultiSigPubKey; + + public Contract(OfferPayload offer, + Coin tradeAmount, + Fiat tradePrice, + String takeOfferFeeTxID, + NodeAddress buyerNodeAddress, + NodeAddress sellerNodeAddress, + NodeAddress arbitratorNodeAddress, + boolean isBuyerOffererAndSellerTaker, + String offererAccountId, + String takerAccountId, + PaymentAccountContractData offererPaymentAccountContractData, + PaymentAccountContractData takerPaymentAccountContractData, + PubKeyRing offererPubKeyRing, + PubKeyRing takerPubKeyRing, + String offererPayoutAddressString, + String takerPayoutAddressString, + byte[] offererMultiSigPubKey, + byte[] takerMultiSigPubKey) { + this.offer = offer; + this.tradePrice = tradePrice.value; + this.buyerNodeAddress = buyerNodeAddress; + this.sellerNodeAddress = sellerNodeAddress; + this.tradeAmount = tradeAmount.value; + this.takeOfferFeeTxID = takeOfferFeeTxID; + this.arbitratorNodeAddress = arbitratorNodeAddress; + this.isBuyerOffererAndSellerTaker = isBuyerOffererAndSellerTaker; + this.offererAccountId = offererAccountId; + this.takerAccountId = takerAccountId; + this.offererPaymentAccountContractData = offererPaymentAccountContractData; + this.takerPaymentAccountContractData = takerPaymentAccountContractData; + this.offererPubKeyRing = offererPubKeyRing; + this.takerPubKeyRing = takerPubKeyRing; + this.offererPayoutAddressString = offererPayoutAddressString; + this.takerPayoutAddressString = takerPayoutAddressString; + this.offererMultiSigPubKey = offererMultiSigPubKey; + this.takerMultiSigPubKey = takerMultiSigPubKey; + } + + public boolean isBuyerOffererAndSellerTaker() { + return isBuyerOffererAndSellerTaker; + } + + public String getBuyerAccountId() { + return isBuyerOffererAndSellerTaker ? offererAccountId : takerAccountId; + } + + public String getSellerAccountId() { + return isBuyerOffererAndSellerTaker ? takerAccountId : offererAccountId; + } + + + public String getBuyerPayoutAddressString() { + return isBuyerOffererAndSellerTaker ? offererPayoutAddressString : takerPayoutAddressString; + } + + public String getSellerPayoutAddressString() { + return isBuyerOffererAndSellerTaker ? takerPayoutAddressString : offererPayoutAddressString; + } + + public PubKeyRing getBuyerPubKeyRing() { + return isBuyerOffererAndSellerTaker ? offererPubKeyRing : takerPubKeyRing; + } + + public PubKeyRing getSellerPubKeyRing() { + return isBuyerOffererAndSellerTaker ? takerPubKeyRing : offererPubKeyRing; + } + + public byte[] getBuyerMultiSigPubKey() { + return isBuyerOffererAndSellerTaker ? offererMultiSigPubKey : takerMultiSigPubKey; + } + + public byte[] getSellerMultiSigPubKey() { + return isBuyerOffererAndSellerTaker ? takerMultiSigPubKey : offererMultiSigPubKey; + } + + public PaymentAccountContractData getBuyerPaymentAccountContractData() { + return isBuyerOffererAndSellerTaker ? offererPaymentAccountContractData : takerPaymentAccountContractData; + } + + public PaymentAccountContractData getSellerPaymentAccountContractData() { + return isBuyerOffererAndSellerTaker ? takerPaymentAccountContractData : offererPaymentAccountContractData; + } + + public String getPaymentMethodName() { + // PaymentMethod need to be the same + Preconditions.checkArgument(offererPaymentAccountContractData.getPaymentMethodName().equals(takerPaymentAccountContractData.getPaymentMethodName()), + "NOT offererPaymentAccountContractData.getPaymentMethodName().equals(takerPaymentAccountContractData.getPaymentMethodName())"); + return offererPaymentAccountContractData.getPaymentMethodName(); + } + + public Coin getTradeAmount() { + return Coin.valueOf(tradeAmount); + } + + public Fiat getTradePrice() { + return Fiat.valueOf(offer.getCurrencyCode(), tradePrice); + } + + public NodeAddress getBuyerNodeAddress() { + return buyerNodeAddress; + } + + + public NodeAddress getSellerNodeAddress() { + return sellerNodeAddress; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (!(o instanceof Contract)) return false; + + Contract contract = (Contract) o; + + if (tradeAmount != contract.tradeAmount) return false; + if (tradePrice != contract.tradePrice) return false; + if (isBuyerOffererAndSellerTaker != contract.isBuyerOffererAndSellerTaker) return false; + if (offer != null ? !offer.equals(contract.offer) : contract.offer != null) return false; + if (takeOfferFeeTxID != null ? !takeOfferFeeTxID.equals(contract.takeOfferFeeTxID) : contract.takeOfferFeeTxID != null) + return false; + if (arbitratorNodeAddress != null ? !arbitratorNodeAddress.equals(contract.arbitratorNodeAddress) : contract.arbitratorNodeAddress != null) + return false; + if (offererAccountId != null ? !offererAccountId.equals(contract.offererAccountId) : contract.offererAccountId != null) + return false; + if (takerAccountId != null ? !takerAccountId.equals(contract.takerAccountId) : contract.takerAccountId != null) + return false; + if (offererPaymentAccountContractData != null ? !offererPaymentAccountContractData.equals(contract.offererPaymentAccountContractData) : contract.offererPaymentAccountContractData != null) + return false; + if (takerPaymentAccountContractData != null ? !takerPaymentAccountContractData.equals(contract.takerPaymentAccountContractData) : contract.takerPaymentAccountContractData != null) + return false; + if (offererPubKeyRing != null ? !offererPubKeyRing.equals(contract.offererPubKeyRing) : contract.offererPubKeyRing != null) + return false; + if (takerPubKeyRing != null ? !takerPubKeyRing.equals(contract.takerPubKeyRing) : contract.takerPubKeyRing != null) + return false; + if (buyerNodeAddress != null ? !buyerNodeAddress.equals(contract.buyerNodeAddress) : contract.buyerNodeAddress != null) + return false; + if (sellerNodeAddress != null ? !sellerNodeAddress.equals(contract.sellerNodeAddress) : contract.sellerNodeAddress != null) + return false; + if (offererPayoutAddressString != null ? !offererPayoutAddressString.equals(contract.offererPayoutAddressString) : contract.offererPayoutAddressString != null) + return false; + if (takerPayoutAddressString != null ? !takerPayoutAddressString.equals(contract.takerPayoutAddressString) : contract.takerPayoutAddressString != null) + return false; + if (!Arrays.equals(offererMultiSigPubKey, contract.offererMultiSigPubKey)) return false; + return Arrays.equals(takerMultiSigPubKey, contract.takerMultiSigPubKey); + + } + + @Override + public int hashCode() { + int result = offer != null ? offer.hashCode() : 0; + result = 31 * result + (int) (tradeAmount ^ (tradeAmount >>> 32)); + result = 31 * result + (int) (tradePrice ^ (tradePrice >>> 32)); + result = 31 * result + (takeOfferFeeTxID != null ? takeOfferFeeTxID.hashCode() : 0); + result = 31 * result + (arbitratorNodeAddress != null ? arbitratorNodeAddress.hashCode() : 0); + result = 31 * result + (isBuyerOffererAndSellerTaker ? 1 : 0); + result = 31 * result + (offererAccountId != null ? offererAccountId.hashCode() : 0); + result = 31 * result + (takerAccountId != null ? takerAccountId.hashCode() : 0); + result = 31 * result + (offererPaymentAccountContractData != null ? offererPaymentAccountContractData.hashCode() : 0); + result = 31 * result + (takerPaymentAccountContractData != null ? takerPaymentAccountContractData.hashCode() : 0); + result = 31 * result + (offererPubKeyRing != null ? offererPubKeyRing.hashCode() : 0); + result = 31 * result + (takerPubKeyRing != null ? takerPubKeyRing.hashCode() : 0); + result = 31 * result + (buyerNodeAddress != null ? buyerNodeAddress.hashCode() : 0); + result = 31 * result + (sellerNodeAddress != null ? sellerNodeAddress.hashCode() : 0); + result = 31 * result + (offererPayoutAddressString != null ? offererPayoutAddressString.hashCode() : 0); + result = 31 * result + (takerPayoutAddressString != null ? takerPayoutAddressString.hashCode() : 0); + result = 31 * result + (offererMultiSigPubKey != null ? Arrays.hashCode(offererMultiSigPubKey) : 0); + result = 31 * result + (takerMultiSigPubKey != null ? Arrays.hashCode(takerMultiSigPubKey) : 0); + return result; + } + + @Override + public String toString() { + return "Contract{" + + "\n\toffer=" + offer + + "\n\ttradeAmount=" + tradeAmount + + "\n\ttradePrice=" + tradePrice + + "\n\ttakeOfferFeeTxID='" + takeOfferFeeTxID + '\'' + + "\n\tarbitratorAddress=" + arbitratorNodeAddress + + "\n\tisBuyerOffererAndSellerTaker=" + isBuyerOffererAndSellerTaker + + "\n\toffererAccountId='" + offererAccountId + '\'' + + "\n\ttakerAccountId='" + takerAccountId + '\'' + + "\n\toffererPaymentAccountContractData=" + offererPaymentAccountContractData + + "\n\ttakerPaymentAccountContractData=" + takerPaymentAccountContractData + + "\n\toffererPubKeyRing=" + offererPubKeyRing + + "\n\ttakerPubKeyRing=" + takerPubKeyRing + + "\n\tbuyerAddress=" + buyerNodeAddress + + "\n\tsellerAddress=" + sellerNodeAddress + + "\n\toffererPayoutAddressString='" + offererPayoutAddressString + '\'' + + "\n\ttakerPayoutAddressString='" + takerPayoutAddressString + '\'' + + "\n\toffererMultiSigPubKey=" + Utils.HEX.encode(offererMultiSigPubKey) + + "\n\ttakerMultiSigPubKey=" + Utils.HEX.encode(takerMultiSigPubKey) + + "\n\tBuyerMultiSigPubKey=" + Utils.HEX.encode(getBuyerMultiSigPubKey()) + + "\n\tSellerMultiSigPubKey=" + Utils.HEX.encode(getSellerMultiSigPubKey()) + + '}'; + } + + @Override + public Messages.Contract toProtoBuf() { + return Messages.Contract.newBuilder() + .setOffer(offer.toProtoBuf().getOffer()) + .setTradeAmount(tradeAmount) + .setTradePrice(tradePrice) + .setTakeOfferFeeTxId(takeOfferFeeTxID) + .setArbitratorNodeAddress(arbitratorNodeAddress.toProtoBuf()) + .setIsBuyerOffererAndSellerTaker(isBuyerOffererAndSellerTaker) + .setOffererAccountId(offererAccountId) + .setTakerAccountId(takerAccountId) + .setOffererPaymentAccountContractData((Messages.PaymentAccountContractData) offererPaymentAccountContractData.toProtoBuf()) + .setTakerPaymentAccountContractData((Messages.PaymentAccountContractData) takerPaymentAccountContractData.toProtoBuf()) + .setOffererPubKeyRing(offererPubKeyRing.toProtoBuf()) + .setTakerPubKeyRing(takerPubKeyRing.toProtoBuf()) + .setBuyerNodeAddress(buyerNodeAddress.toProtoBuf()) + .setSellerNodeAddress(sellerNodeAddress.toProtoBuf()) + .setOffererPayoutAddressstring(offererPayoutAddressString) + .setTakerPayoutAddressstring(takerPayoutAddressString) + .setOffererBtcPubKey(ByteString.copyFrom(offererMultiSigPubKey)) + .setTakerBtcPubKey(ByteString.copyFrom(takerMultiSigPubKey)).build(); + } +} diff --git a/network-messages/src/main/java/io/bisq/messages/trade/protocol/trade/messages/DepositTxPublishedMessage.java b/network-messages/src/main/java/io/bisq/messages/trade/protocol/trade/messages/DepositTxPublishedMessage.java new file mode 100644 index 0000000000..e3ee8c074b --- /dev/null +++ b/network-messages/src/main/java/io/bisq/messages/trade/protocol/trade/messages/DepositTxPublishedMessage.java @@ -0,0 +1,96 @@ +/* + * This file is part of bisq. + * + * bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with bisq. If not, see . + */ + +package io.bisq.messages.trade.protocol.trade.messages; + +import com.google.protobuf.ByteString; +import io.bisq.app.Version; +import io.bisq.common.wire.proto.Messages; +import io.bisq.messages.NodeAddress; +import io.bisq.messages.p2p.messaging.MailboxMessage; +import io.bisq.messages.protocol.trade.TradeMessage; +import io.bisq.messages.util.ProtoBufferUtils; + +import javax.annotation.concurrent.Immutable; +import java.util.Arrays; +import java.util.UUID; + +@Immutable +public final class DepositTxPublishedMessage extends TradeMessage implements MailboxMessage { + // That object is sent over the wire, so we need to take care of version compatibility. + private static final long serialVersionUID = Version.P2P_NETWORK_VERSION; + + public final byte[] depositTx; + private final NodeAddress senderNodeAddress; + private final String uid; + + public DepositTxPublishedMessage(String tradeId, byte[] depositTx, NodeAddress senderNodeAddress, String uid) { + super(tradeId); + this.depositTx = depositTx; + this.senderNodeAddress = senderNodeAddress; + this.uid = uid; + } + + public DepositTxPublishedMessage(String tradeId, byte[] depositTx, NodeAddress senderNodeAddress) { + this(tradeId, depositTx, senderNodeAddress, UUID.randomUUID().toString()); + } + + @Override + public NodeAddress getSenderNodeAddress() { + return senderNodeAddress; + } + + @Override + public String getUID() { + return uid; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (!(o instanceof DepositTxPublishedMessage)) return false; + if (!super.equals(o)) return false; + + DepositTxPublishedMessage that = (DepositTxPublishedMessage) o; + + if (!Arrays.equals(depositTx, that.depositTx)) return false; + if (senderNodeAddress != null ? !senderNodeAddress.equals(that.senderNodeAddress) : that.senderNodeAddress != null) + return false; + return !(uid != null ? !uid.equals(that.uid) : that.uid != null); + + } + + @Override + public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (depositTx != null ? Arrays.hashCode(depositTx) : 0); + result = 31 * result + (senderNodeAddress != null ? senderNodeAddress.hashCode() : 0); + result = 31 * result + (uid != null ? uid.hashCode() : 0); + return result; + } + + @Override + public Messages.Envelope toProtoBuf() { + Messages.Envelope.Builder baseEnvelope = ProtoBufferUtils.getBaseEnvelope(); + return baseEnvelope.setDepositTxPublishedMessage(Messages.DepositTxPublishedMessage.newBuilder() + .setMessageVersion(getMessageVersion()) + .setTradeId(tradeId) + .setDepositTx(ByteString.copyFrom(depositTx)) + .setSenderNodeAddress(senderNodeAddress.toProtoBuf()) + .setUid(uid)).build(); + } +} diff --git a/network-messages/src/main/java/io/bisq/messages/trade/protocol/trade/messages/FiatTransferStartedMessage.java b/network-messages/src/main/java/io/bisq/messages/trade/protocol/trade/messages/FiatTransferStartedMessage.java new file mode 100644 index 0000000000..6c09007bbf --- /dev/null +++ b/network-messages/src/main/java/io/bisq/messages/trade/protocol/trade/messages/FiatTransferStartedMessage.java @@ -0,0 +1,105 @@ +/* + * This file is part of bisq. + * + * bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with bisq. If not, see . + */ + +package io.bisq.messages.trade.protocol.trade.messages; + +import io.bisq.app.Version; +import io.bisq.common.wire.proto.Messages; +import io.bisq.messages.NodeAddress; +import io.bisq.messages.p2p.messaging.MailboxMessage; +import io.bisq.messages.protocol.trade.TradeMessage; +import io.bisq.messages.util.ProtoBufferUtils; + +import javax.annotation.concurrent.Immutable; +import java.util.UUID; + +@Immutable +public final class FiatTransferStartedMessage extends TradeMessage implements MailboxMessage { + // That object is sent over the wire, so we need to take care of version compatibility. + private static final long serialVersionUID = Version.P2P_NETWORK_VERSION; + + public final String buyerPayoutAddress; + private final NodeAddress senderNodeAddress; + private final String uid; + + public FiatTransferStartedMessage(String tradeId, String buyerPayoutAddress, + NodeAddress senderNodeAddress, String uid) { + super(tradeId); + this.buyerPayoutAddress = buyerPayoutAddress; + this.senderNodeAddress = senderNodeAddress; + this.uid = uid; + } + + public FiatTransferStartedMessage(String tradeId, String buyerPayoutAddress, NodeAddress senderNodeAddress) { + this(tradeId, buyerPayoutAddress, senderNodeAddress, UUID.randomUUID().toString()); + } + + @Override + public NodeAddress getSenderNodeAddress() { + return senderNodeAddress; + } + + @Override + public String getUID() { + return uid; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (!(o instanceof FiatTransferStartedMessage)) return false; + if (!super.equals(o)) return false; + + FiatTransferStartedMessage that = (FiatTransferStartedMessage) o; + + if (buyerPayoutAddress != null ? !buyerPayoutAddress.equals(that.buyerPayoutAddress) : that.buyerPayoutAddress != null) + return false; + if (senderNodeAddress != null ? !senderNodeAddress.equals(that.senderNodeAddress) : that.senderNodeAddress != null) + return false; + return !(uid != null ? !uid.equals(that.uid) : that.uid != null); + + } + + @Override + public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (buyerPayoutAddress != null ? buyerPayoutAddress.hashCode() : 0); + result = 31 * result + (senderNodeAddress != null ? senderNodeAddress.hashCode() : 0); + result = 31 * result + (uid != null ? uid.hashCode() : 0); + return result; + } + + @Override + public String toString() { + return "FiatTransferStartedMessage{" + + "buyerPayoutAddress='" + buyerPayoutAddress + '\'' + + ", senderNodeAddress=" + senderNodeAddress + + ", uid='" + uid + '\'' + + "} " + super.toString(); + } + + @Override + public Messages.Envelope toProtoBuf() { + Messages.Envelope.Builder baseEnvelope = ProtoBufferUtils.getBaseEnvelope(); + return baseEnvelope.setFiatTransferStartedMessage(baseEnvelope.getFiatTransferStartedMessageBuilder() + .setMessageVersion(getMessageVersion()) + .setTradeId(tradeId) + .setBuyerPayoutAddress(buyerPayoutAddress) + .setSenderNodeAddress(senderNodeAddress.toProtoBuf()) + .setUid(uid)).build(); + } +} diff --git a/network-messages/src/main/java/io/bisq/messages/trade/protocol/trade/messages/FinalizePayoutTxRequest.java b/network-messages/src/main/java/io/bisq/messages/trade/protocol/trade/messages/FinalizePayoutTxRequest.java new file mode 100644 index 0000000000..e99aed07bb --- /dev/null +++ b/network-messages/src/main/java/io/bisq/messages/trade/protocol/trade/messages/FinalizePayoutTxRequest.java @@ -0,0 +1,117 @@ +/* + * This file is part of bisq. + * + * bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with bisq. If not, see . + */ + +package io.bisq.messages.trade.protocol.trade.messages; + +import com.google.protobuf.ByteString; +import io.bisq.app.Version; +import io.bisq.common.wire.proto.Messages; +import io.bisq.messages.NodeAddress; +import io.bisq.messages.p2p.messaging.MailboxMessage; +import io.bisq.messages.protocol.trade.TradeMessage; +import io.bisq.messages.util.ProtoBufferUtils; + +import javax.annotation.concurrent.Immutable; +import java.util.Arrays; +import java.util.UUID; + +@Immutable +public final class FinalizePayoutTxRequest extends TradeMessage implements MailboxMessage { + // That object is sent over the wire, so we need to take care of version compatibility. + private static final long serialVersionUID = Version.P2P_NETWORK_VERSION; + + public final byte[] sellerSignature; + public final String sellerPayoutAddress; + public final long lockTimeAsBlockHeight; + private final NodeAddress senderNodeAddress; + private final String uid; + + public FinalizePayoutTxRequest(String tradeId, + byte[] sellerSignature, + String sellerPayoutAddress, + long lockTimeAsBlockHeight, + NodeAddress senderNodeAddress) { + this(tradeId, sellerSignature, sellerPayoutAddress, lockTimeAsBlockHeight, senderNodeAddress, + UUID.randomUUID().toString()); + } + + public FinalizePayoutTxRequest(String tradeId, + byte[] sellerSignature, + String sellerPayoutAddress, + long lockTimeAsBlockHeight, + NodeAddress senderNodeAddress, + String uid) { + super(tradeId); + this.sellerSignature = sellerSignature; + this.sellerPayoutAddress = sellerPayoutAddress; + this.lockTimeAsBlockHeight = lockTimeAsBlockHeight; + this.senderNodeAddress = senderNodeAddress; + this.uid = uid; + } + + @Override + public NodeAddress getSenderNodeAddress() { + return senderNodeAddress; + } + + @Override + public String getUID() { + return uid; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (!(o instanceof FinalizePayoutTxRequest)) return false; + if (!super.equals(o)) return false; + + FinalizePayoutTxRequest that = (FinalizePayoutTxRequest) o; + + if (lockTimeAsBlockHeight != that.lockTimeAsBlockHeight) return false; + if (!Arrays.equals(sellerSignature, that.sellerSignature)) return false; + if (sellerPayoutAddress != null ? !sellerPayoutAddress.equals(that.sellerPayoutAddress) : that.sellerPayoutAddress != null) + return false; + if (senderNodeAddress != null ? !senderNodeAddress.equals(that.senderNodeAddress) : that.senderNodeAddress != null) + return false; + return !(uid != null ? !uid.equals(that.uid) : that.uid != null); + + } + + @Override + public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (sellerSignature != null ? Arrays.hashCode(sellerSignature) : 0); + result = 31 * result + (sellerPayoutAddress != null ? sellerPayoutAddress.hashCode() : 0); + result = 31 * result + (int) (lockTimeAsBlockHeight ^ (lockTimeAsBlockHeight >>> 32)); + result = 31 * result + (senderNodeAddress != null ? senderNodeAddress.hashCode() : 0); + result = 31 * result + (uid != null ? uid.hashCode() : 0); + return result; + } + + @Override + public Messages.Envelope toProtoBuf() { + Messages.Envelope.Builder baseEnvelope = ProtoBufferUtils.getBaseEnvelope(); + return baseEnvelope.setFinalizePayoutTxRequest(Messages.FinalizePayoutTxRequest.newBuilder() + .setMessageVersion(getMessageVersion()) + .setTradeId(tradeId) + .setSellerSignature(ByteString.copyFrom(sellerSignature)) + .setSellerPayoutAddress(sellerPayoutAddress) + .setLockTimeAsBlockHeight(lockTimeAsBlockHeight) + .setSenderNodeAddress(senderNodeAddress.toProtoBuf()) + .setUid(uid)).build(); + } +} diff --git a/network-messages/src/main/java/io/bisq/messages/trade/protocol/trade/messages/PayDepositRequest.java b/network-messages/src/main/java/io/bisq/messages/trade/protocol/trade/messages/PayDepositRequest.java new file mode 100644 index 0000000000..8da6b89345 --- /dev/null +++ b/network-messages/src/main/java/io/bisq/messages/trade/protocol/trade/messages/PayDepositRequest.java @@ -0,0 +1,190 @@ +/* + * This file is part of bisq. + * + * bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with bisq. If not, see . + */ + +package io.bisq.messages.trade.protocol.trade.messages; + +import com.google.protobuf.ByteString; +import io.bisq.app.Version; +import io.bisq.common.wire.proto.Messages; +import io.bisq.messages.NodeAddress; +import io.bisq.messages.btc.data.RawTransactionInput; +import io.bisq.messages.crypto.PubKeyRing; +import io.bisq.messages.p2p.messaging.MailboxMessage; +import io.bisq.messages.payment.payload.PaymentAccountContractData; +import io.bisq.messages.protocol.trade.TradeMessage; +import io.bisq.messages.util.ProtoBufferUtils; +import org.bitcoinj.core.Coin; + +import javax.annotation.Nullable; +import javax.annotation.concurrent.Immutable; +import java.util.Arrays; +import java.util.List; +import java.util.Optional; +import java.util.UUID; +import java.util.stream.Collectors; + +@Immutable +public final class PayDepositRequest extends TradeMessage implements MailboxMessage { + // That object is sent over the wire, so we need to take care of version compatibility. + private static final long serialVersionUID = Version.P2P_NETWORK_VERSION; + + public final long tradeAmount; + public final long tradePrice; + public final byte[] takerMultiSigPubKey; + public final Coin txFee; + public final Coin takeOfferFee; + public final List rawTransactionInputs; + public final long changeOutputValue; + @Nullable + public final String changeOutputAddress; + public final String takerPayoutAddressString; + public final PubKeyRing takerPubKeyRing; + public final PaymentAccountContractData takerPaymentAccountContractData; + public final String takerAccountId; + public final String takeOfferFeeTxId; + public final List acceptedArbitratorNodeAddresses; + public final NodeAddress arbitratorNodeAddress; + private final NodeAddress senderNodeAddress; + private final String uid; + + public PayDepositRequest(NodeAddress senderNodeAddress, + String tradeId, + long tradeAmount, + long tradePrice, + Coin txFee, + Coin takeOfferFee, + List rawTransactionInputs, + long changeOutputValue, + String changeOutputAddress, + byte[] takerMultiSigPubKey, + String takerPayoutAddressString, + PubKeyRing takerPubKeyRing, + PaymentAccountContractData takerPaymentAccountContractData, + String takerAccountId, + String takeOfferFeeTxId, + List acceptedArbitratorNodeAddresses, + NodeAddress arbitratorNodeAddress) { + super(tradeId); + this.senderNodeAddress = senderNodeAddress; + this.tradeAmount = tradeAmount; + this.tradePrice = tradePrice; + this.txFee = txFee; + this.takeOfferFee = takeOfferFee; + this.rawTransactionInputs = rawTransactionInputs; + this.changeOutputValue = changeOutputValue; + this.changeOutputAddress = changeOutputAddress; + this.takerPayoutAddressString = takerPayoutAddressString; + this.takerPubKeyRing = takerPubKeyRing; + this.takerMultiSigPubKey = takerMultiSigPubKey; + this.takerPaymentAccountContractData = takerPaymentAccountContractData; + this.takerAccountId = takerAccountId; + this.takeOfferFeeTxId = takeOfferFeeTxId; + this.acceptedArbitratorNodeAddresses = acceptedArbitratorNodeAddresses; + this.arbitratorNodeAddress = arbitratorNodeAddress; + uid = UUID.randomUUID().toString(); + } + + @Override + public NodeAddress getSenderNodeAddress() { + return senderNodeAddress; + } + + @Override + public String getUID() { + return uid; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (!(o instanceof PayDepositRequest)) return false; + if (!super.equals(o)) return false; + + PayDepositRequest that = (PayDepositRequest) o; + + if (tradeAmount != that.tradeAmount) return false; + if (changeOutputValue != that.changeOutputValue) return false; + if (!Arrays.equals(takerMultiSigPubKey, that.takerMultiSigPubKey)) return false; + if (rawTransactionInputs != null ? !rawTransactionInputs.equals(that.rawTransactionInputs) : that.rawTransactionInputs != null) + return false; + if (changeOutputAddress != null ? !changeOutputAddress.equals(that.changeOutputAddress) : that.changeOutputAddress != null) + return false; + if (takerPayoutAddressString != null ? !takerPayoutAddressString.equals(that.takerPayoutAddressString) : that.takerPayoutAddressString != null) + return false; + if (takerPubKeyRing != null ? !takerPubKeyRing.equals(that.takerPubKeyRing) : that.takerPubKeyRing != null) + return false; + if (takerPaymentAccountContractData != null ? !takerPaymentAccountContractData.equals(that.takerPaymentAccountContractData) : that.takerPaymentAccountContractData != null) + return false; + if (takerAccountId != null ? !takerAccountId.equals(that.takerAccountId) : that.takerAccountId != null) + return false; + if (takeOfferFeeTxId != null ? !takeOfferFeeTxId.equals(that.takeOfferFeeTxId) : that.takeOfferFeeTxId != null) + return false; + if (acceptedArbitratorNodeAddresses != null ? !acceptedArbitratorNodeAddresses.equals(that.acceptedArbitratorNodeAddresses) : that.acceptedArbitratorNodeAddresses != null) + return false; + if (arbitratorNodeAddress != null ? !arbitratorNodeAddress.equals(that.arbitratorNodeAddress) : that.arbitratorNodeAddress != null) + return false; + if (senderNodeAddress != null ? !senderNodeAddress.equals(that.senderNodeAddress) : that.senderNodeAddress != null) + return false; + return !(uid != null ? !uid.equals(that.uid) : that.uid != null); + + } + + @Override + public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (int) (tradeAmount ^ (tradeAmount >>> 32)); + result = 31 * result + (takerMultiSigPubKey != null ? Arrays.hashCode(takerMultiSigPubKey) : 0); + result = 31 * result + (rawTransactionInputs != null ? rawTransactionInputs.hashCode() : 0); + result = 31 * result + (int) (changeOutputValue ^ (changeOutputValue >>> 32)); + result = 31 * result + (changeOutputAddress != null ? changeOutputAddress.hashCode() : 0); + result = 31 * result + (takerPayoutAddressString != null ? takerPayoutAddressString.hashCode() : 0); + result = 31 * result + (takerPubKeyRing != null ? takerPubKeyRing.hashCode() : 0); + result = 31 * result + (takerPaymentAccountContractData != null ? takerPaymentAccountContractData.hashCode() : 0); + result = 31 * result + (takerAccountId != null ? takerAccountId.hashCode() : 0); + result = 31 * result + (takeOfferFeeTxId != null ? takeOfferFeeTxId.hashCode() : 0); + result = 31 * result + (acceptedArbitratorNodeAddresses != null ? acceptedArbitratorNodeAddresses.hashCode() : 0); + result = 31 * result + (arbitratorNodeAddress != null ? arbitratorNodeAddress.hashCode() : 0); + result = 31 * result + (senderNodeAddress != null ? senderNodeAddress.hashCode() : 0); + result = 31 * result + (uid != null ? uid.hashCode() : 0); + return result; + } + + @Override + public Messages.Envelope toProtoBuf() { + Messages.Envelope.Builder baseEnvelope = ProtoBufferUtils.getBaseEnvelope(); + Messages.PayDepositRequest.Builder builderForValue = Messages.PayDepositRequest.newBuilder() + .setTradeId(tradeId) + .setTradeAmount(tradeAmount) + .setTradePrice(tradePrice) + .setTakerMultiSigPubKey(ByteString.copyFrom(takerMultiSigPubKey)) + .setTxFee(Messages.Coin.newBuilder().setValue(txFee.getValue())) + .setTakeOfferFee(Messages.Coin.newBuilder().setValue(takeOfferFee.getValue())) + .addAllRawTransactionInputs(rawTransactionInputs.stream().map(rawTransactionInput -> rawTransactionInput.toProtoBuf()).collect(Collectors.toList())) + .setChangeOutputValue(changeOutputValue) + .setTakerPayoutAddressString(takerPayoutAddressString) + .setTakerPubKeyRing(takerPubKeyRing.toProtoBuf()) + .setTakerPaymentAccountContractData((Messages.PaymentAccountContractData) takerPaymentAccountContractData.toProtoBuf()) + .setTakerAccountId(takerAccountId) + .setTakeOfferFeeTxId(takeOfferFeeTxId) + .addAllAcceptedArbitratorNodeAddresses(acceptedArbitratorNodeAddresses.stream().map(nodeAddress -> nodeAddress.toProtoBuf()).collect(Collectors.toList())) + .setArbitratorNodeAddress(arbitratorNodeAddress.toProtoBuf()) + .setSenderNodeAddress(senderNodeAddress.toProtoBuf()) + .setUid(uid); + Optional.ofNullable(changeOutputAddress).ifPresent(builderForValue::setChangeOutputAddress); + return baseEnvelope.setPayDepositRequest(builderForValue).build(); + } +} diff --git a/network-messages/src/main/java/io/bisq/messages/trade/protocol/trade/messages/PayoutTxFinalizedMessage.java b/network-messages/src/main/java/io/bisq/messages/trade/protocol/trade/messages/PayoutTxFinalizedMessage.java new file mode 100644 index 0000000000..7a0e473500 --- /dev/null +++ b/network-messages/src/main/java/io/bisq/messages/trade/protocol/trade/messages/PayoutTxFinalizedMessage.java @@ -0,0 +1,96 @@ +/* + * This file is part of bisq. + * + * bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with bisq. If not, see . + */ + +package io.bisq.messages.trade.protocol.trade.messages; + +import com.google.protobuf.ByteString; +import io.bisq.app.Version; +import io.bisq.common.wire.proto.Messages; +import io.bisq.messages.NodeAddress; +import io.bisq.messages.p2p.messaging.MailboxMessage; +import io.bisq.messages.protocol.trade.TradeMessage; +import io.bisq.messages.util.ProtoBufferUtils; + +import javax.annotation.concurrent.Immutable; +import java.util.Arrays; +import java.util.UUID; + +@Immutable +public final class PayoutTxFinalizedMessage extends TradeMessage implements MailboxMessage { + // That object is sent over the wire, so we need to take care of version compatibility. + private static final long serialVersionUID = Version.P2P_NETWORK_VERSION; + + public final byte[] payoutTx; + private final NodeAddress senderNodeAddress; + private final String uid; + + public PayoutTxFinalizedMessage(String tradeId, byte[] payoutTx, NodeAddress senderNodeAddress) { + this(tradeId, payoutTx, senderNodeAddress, UUID.randomUUID().toString()); + } + + public PayoutTxFinalizedMessage(String tradeId, byte[] payoutTx, NodeAddress senderNodeAddress, String uid) { + super(tradeId); + this.payoutTx = payoutTx; + this.senderNodeAddress = senderNodeAddress; + this.uid = uid; + } + + @Override + public NodeAddress getSenderNodeAddress() { + return senderNodeAddress; + } + + @Override + public String getUID() { + return uid; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (!(o instanceof PayoutTxFinalizedMessage)) return false; + if (!super.equals(o)) return false; + + PayoutTxFinalizedMessage that = (PayoutTxFinalizedMessage) o; + + if (!Arrays.equals(payoutTx, that.payoutTx)) return false; + if (senderNodeAddress != null ? !senderNodeAddress.equals(that.senderNodeAddress) : that.senderNodeAddress != null) + return false; + return !(uid != null ? !uid.equals(that.uid) : that.uid != null); + + } + + @Override + public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (payoutTx != null ? Arrays.hashCode(payoutTx) : 0); + result = 31 * result + (senderNodeAddress != null ? senderNodeAddress.hashCode() : 0); + result = 31 * result + (uid != null ? uid.hashCode() : 0); + return result; + } + + @Override + public Messages.Envelope toProtoBuf() { + Messages.Envelope.Builder baseEnvelope = ProtoBufferUtils.getBaseEnvelope(); + return baseEnvelope.setPayoutTxFinalizedMessage(baseEnvelope.getPayoutTxFinalizedMessageBuilder() + .setUid(uid) + .setMessageVersion(getMessageVersion()) + .setTradeId(tradeId) + .setPayoutTx(ByteString.copyFrom(payoutTx)) + .setSenderNodeAddress(senderNodeAddress.toProtoBuf())).build(); + } +} diff --git a/network-messages/src/main/java/io/bisq/messages/trade/protocol/trade/messages/PublishDepositTxRequest.java b/network-messages/src/main/java/io/bisq/messages/trade/protocol/trade/messages/PublishDepositTxRequest.java new file mode 100644 index 0000000000..fb77d9da7f --- /dev/null +++ b/network-messages/src/main/java/io/bisq/messages/trade/protocol/trade/messages/PublishDepositTxRequest.java @@ -0,0 +1,94 @@ +/* + * This file is part of bisq. + * + * bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with bisq. If not, see . + */ + +package io.bisq.messages.trade.protocol.trade.messages; + +import com.google.protobuf.ByteString; +import io.bisq.app.Version; +import io.bisq.common.util.Utilities; +import io.bisq.common.wire.proto.Messages; +import io.bisq.messages.btc.data.RawTransactionInput; +import io.bisq.messages.payment.payload.PaymentAccountContractData; +import io.bisq.messages.protocol.trade.TradeMessage; +import io.bisq.messages.util.ProtoBufferUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import javax.annotation.concurrent.Immutable; +import java.util.ArrayList; +import java.util.List; +import java.util.stream.Collectors; + +@Immutable + +// TODO check if it should not implement MailboxMessage as well? +public final class PublishDepositTxRequest extends TradeMessage { + // That object is sent over the wire, so we need to take care of version compatibility. + private static final long serialVersionUID = Version.P2P_NETWORK_VERSION; + + private static final Logger log = LoggerFactory.getLogger(PublishDepositTxRequest.class); + + public final PaymentAccountContractData offererPaymentAccountContractData; + public final String offererAccountId; + public final String offererContractAsJson; + public final String offererContractSignature; + public final String offererPayoutAddressString; + public final byte[] preparedDepositTx; + public final List offererInputs; + public final byte[] offererMultiSigPubKey; + + public PublishDepositTxRequest(String tradeId, + PaymentAccountContractData offererPaymentAccountContractData, + String offererAccountId, + byte[] offererMultiSigPubKey, + String offererContractAsJson, + String offererContractSignature, + String offererPayoutAddressString, + byte[] preparedDepositTx, + List offererInputs) { + super(tradeId); + this.offererPaymentAccountContractData = offererPaymentAccountContractData; + this.offererAccountId = offererAccountId; + this.offererMultiSigPubKey = offererMultiSigPubKey; + this.offererContractAsJson = offererContractAsJson; + this.offererContractSignature = offererContractSignature; + this.offererPayoutAddressString = offererPayoutAddressString; + this.preparedDepositTx = preparedDepositTx; + this.offererInputs = offererInputs; + + log.trace("offererPaymentAccount size " + Utilities.serialize(offererPaymentAccountContractData).length); + log.trace("offererTradeWalletPubKey size " + offererMultiSigPubKey.length); + log.trace("preparedDepositTx size " + preparedDepositTx.length); + log.trace("offererInputs size " + Utilities.serialize(new ArrayList<>(offererInputs)).length); + } + + @Override + public Messages.Envelope toProtoBuf() { + Messages.Envelope.Builder baseEnvelope = ProtoBufferUtils.getBaseEnvelope(); + return baseEnvelope.setPublishDepositTxRequest(baseEnvelope.getPublishDepositTxRequestBuilder() + .setMessageVersion(getMessageVersion()) + .setTradeId(tradeId) + .setOffererPaymentAccountContractData((Messages.PaymentAccountContractData) offererPaymentAccountContractData.toProtoBuf()) + .setOffererAccountId(offererAccountId) + .setOffererMultiSigPubKey(ByteString.copyFrom(offererMultiSigPubKey)) + .setOffererContractAsJson(offererContractAsJson) + .setOffererContractSignature(offererContractSignature) + .setOffererPayoutAddressstring(offererPayoutAddressString) + .setPreparedDepositTx(ByteString.copyFrom(preparedDepositTx)) + .addAllOffererInputs(offererInputs.stream().map(rawTransactionInput -> rawTransactionInput.toProtoBuf()).collect(Collectors.toList()))).build(); + } +} diff --git a/network-messages/src/main/java/io/bisq/messages/trade/statistics/payload/TradeStatistics.java b/network-messages/src/main/java/io/bisq/messages/trade/statistics/payload/TradeStatistics.java new file mode 100644 index 0000000000..cbed654e79 --- /dev/null +++ b/network-messages/src/main/java/io/bisq/messages/trade/statistics/payload/TradeStatistics.java @@ -0,0 +1,208 @@ +package io.bisq.messages.trade.statistics.payload; + +import io.bisq.app.Capabilities; +import io.bisq.app.Version; +import io.bisq.common.util.JsonExclude; +import io.bisq.common.wire.proto.Messages; +import io.bisq.messages.crypto.PubKeyRing; +import io.bisq.messages.trade.offer.payload.OfferPayload; +import io.bisq.payload.CapabilityRequiringPayload; +import io.bisq.payload.LazyProcessedStoragePayload; +import io.bisq.payload.PersistedStoragePayload; +import org.bitcoinj.core.Coin; +import org.bitcoinj.utils.ExchangeRate; +import org.bitcoinj.utils.Fiat; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import javax.annotation.concurrent.Immutable; +import java.security.PublicKey; +import java.util.Arrays; +import java.util.Date; +import java.util.List; +import java.util.concurrent.TimeUnit; + +@Immutable +public final class TradeStatistics implements LazyProcessedStoragePayload, CapabilityRequiringPayload, PersistedStoragePayload { + private static final Logger log = LoggerFactory.getLogger(TradeStatistics.class); + + @JsonExclude + private static final long serialVersionUID = Version.P2P_NETWORK_VERSION; + @JsonExclude + public static final long TTL = TimeUnit.DAYS.toMillis(30); + + public final String currency; + public final OfferPayload.Direction direction; + public final long tradePrice; + public final long tradeAmount; + public final long tradeDate; + public final String paymentMethod; + public final long offerDate; + public final boolean useMarketBasedPrice; + public final double marketPriceMargin; + public final long offerAmount; + public final long offerMinAmount; + public final String offerId; + public final String depositTxId; + @JsonExclude + public final PubKeyRing pubKeyRing; + + public TradeStatistics(OfferPayload offer, Fiat tradePrice, Coin tradeAmount, Date tradeDate, String depositTxId, PubKeyRing pubKeyRing) { + this(offer.getDirection(), offer.getCurrencyCode(), offer.getPaymentMethod().getId(), offer.getDate().getTime() + , offer.isUseMarketBasedPrice(), offer.getMarketPriceMargin(), offer.getAmount().value, + offer.getMinAmount().value, offer.getId(), tradePrice.longValue(), tradeAmount.value, + tradeDate.getTime(), depositTxId, pubKeyRing); + } + + public TradeStatistics(OfferPayload.Direction direction, String offerCurrency, String offerPaymentMethod, + long offerDate, boolean offerUseMarketBasedPrice, double offerMarketPriceMargin, + long offerAmount, long offerMinAmount, String offerId, long tradePrice, long tradeAmount, + long tradeDate, + String depositTxId, PubKeyRing pubKeyRing) { + this.direction = direction; + this.currency = offerCurrency; + this.paymentMethod = offerPaymentMethod; + this.offerDate = offerDate; + this.useMarketBasedPrice = offerUseMarketBasedPrice; + this.marketPriceMargin = offerMarketPriceMargin; + this.offerAmount = offerAmount; + this.offerMinAmount = offerMinAmount; + this.offerId = offerId; + + this.tradePrice = tradePrice; + this.tradeAmount = tradeAmount; + this.tradeDate = tradeDate; + this.depositTxId = depositTxId; + this.pubKeyRing = pubKeyRing; + } + + + @Override + public long getTTL() { + return TTL; + } + + @Override + public PublicKey getOwnerPubKey() { + return pubKeyRing.getSignaturePubKey(); + } + + @Override + public List getRequiredCapabilities() { + return Arrays.asList( + Capabilities.Capability.TRADE_STATISTICS.ordinal() + ); + } + + public Date getTradeDate() { + return new Date(tradeDate); + } + + public Fiat getTradePrice() { + return Fiat.valueOf(currency, tradePrice); + } + + public Coin getTradeAmount() { + return Coin.valueOf(tradeAmount); + } + + public Fiat getTradeVolume() { + return new ExchangeRate(getTradePrice()).coinToFiat(getTradeAmount()); + } + + public String getOfferId() { + return offerId; + } + + @Override + public Messages.StoragePayload toProtoBuf() { + return Messages.StoragePayload.newBuilder().setTradeStatistics(Messages.TradeStatistics.newBuilder() + .setTTL(TTL) + .setCurrency(currency) + .setDirection(Messages.Offer.Direction.forNumber(direction.ordinal())) + .setTradePrice(tradePrice) + .setTradeAmount(tradeAmount) + .setTradeDate(tradeDate) + .setPaymentMethod(paymentMethod) + .setOfferDate(offerDate) + .setUseMarketBasedPrice(useMarketBasedPrice) + .setMarketPriceMargin(marketPriceMargin) + .setOfferAmount(offerAmount) + .setOfferMinAmount(offerMinAmount) + .setOfferId(offerId) + .setDepositTxId(depositTxId) + .setPubKeyRing((Messages.PubKeyRing) pubKeyRing.toProtoBuf())).build(); + } + + + // We don't include the pubKeyRing as both traders might publish it if the offerer uses an old + // version and update later (taker publishes first, then later offerer) + // We also don't include the trade date as that is set locally and different for offerer and taker + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (!(o instanceof TradeStatistics)) return false; + + TradeStatistics that = (TradeStatistics) o; + + if (tradePrice != that.tradePrice) return false; + if (tradeAmount != that.tradeAmount) return false; + if (offerDate != that.offerDate) return false; + if (useMarketBasedPrice != that.useMarketBasedPrice) return false; + if (Double.compare(that.marketPriceMargin, marketPriceMargin) != 0) return false; + if (offerAmount != that.offerAmount) return false; + if (offerMinAmount != that.offerMinAmount) return false; + if (currency != null ? !currency.equals(that.currency) : that.currency != null) return false; + + if (direction != null && that.direction != null && direction.ordinal() != that.direction.ordinal()) + return false; + else if ((direction == null && that.direction != null) || (direction != null && that.direction == null)) + return false; + + if (paymentMethod != null ? !paymentMethod.equals(that.paymentMethod) : that.paymentMethod != null) + return false; + if (getOfferId() != null ? !getOfferId().equals(that.getOfferId()) : that.getOfferId() != null) return false; + return !(depositTxId != null ? !depositTxId.equals(that.depositTxId) : that.depositTxId != null); + } + + @Override + public int hashCode() { + int result; + long temp; + result = currency != null ? currency.hashCode() : 0; + result = 31 * result + (direction != null ? direction.ordinal() : 0); + result = 31 * result + (int) (tradePrice ^ (tradePrice >>> 32)); + result = 31 * result + (int) (tradeAmount ^ (tradeAmount >>> 32)); + result = 31 * result + (paymentMethod != null ? paymentMethod.hashCode() : 0); + result = 31 * result + (int) (offerDate ^ (offerDate >>> 32)); + result = 31 * result + (useMarketBasedPrice ? 1 : 0); + temp = Double.doubleToLongBits(marketPriceMargin); + result = 31 * result + (int) (temp ^ (temp >>> 32)); + result = 31 * result + (int) (offerAmount ^ (offerAmount >>> 32)); + result = 31 * result + (int) (offerMinAmount ^ (offerMinAmount >>> 32)); + result = 31 * result + (getOfferId() != null ? getOfferId().hashCode() : 0); + result = 31 * result + (depositTxId != null ? depositTxId.hashCode() : 0); + return result; + } + + @Override + public String toString() { + return "TradeStatistics{" + + "currency='" + currency + '\'' + + ", direction=" + direction + + ", tradePrice=" + tradePrice + + ", tradeAmount=" + tradeAmount + + ", tradeDate=" + tradeDate + + ", paymentMethod='" + paymentMethod + '\'' + + ", offerDate=" + offerDate + + ", useMarketBasedPrice=" + useMarketBasedPrice + + ", marketPriceMargin=" + marketPriceMargin + + ", offerAmount=" + offerAmount + + ", offerMinAmount=" + offerMinAmount + + ", offerId='" + getOfferId() + '\'' + + ", depositTxId='" + depositTxId + '\'' + + ", pubKeyRing=" + pubKeyRing + + ", hashCode=" + hashCode() + + '}'; + } +} diff --git a/network-messages/src/main/java/io/bisq/messages/util/Validator.java b/network-messages/src/main/java/io/bisq/messages/util/Validator.java new file mode 100644 index 0000000000..30dd8acc28 --- /dev/null +++ b/network-messages/src/main/java/io/bisq/messages/util/Validator.java @@ -0,0 +1,57 @@ +/* + * This file is part of bisq. + * + * bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with bisq. If not, see . + */ + +package io.bisq.messages.util; + +import io.bisq.messages.protocol.trade.TradeMessage; +import org.bitcoinj.core.Coin; + +import static com.google.common.base.Preconditions.checkArgument; +import static com.google.common.base.Preconditions.checkNotNull; + +/** + * Utility class for validating domain data. + */ +public class Validator { + + public static String nonEmptyStringOf(String value) { + checkNotNull(value); + checkArgument(value.length() > 0); + return value; + } + + public static long nonNegativeLongOf(long value) { + checkArgument(value >= 0); + return value; + } + + public static Coin nonZeroCoinOf(Coin value) { + checkNotNull(value); + checkArgument(!value.isZero()); + return value; + } + + public static Coin positiveCoinOf(Coin value) { + checkNotNull(value); + checkArgument(value.isPositive()); + return value; + } + + public static void checkTradeId(String tradeId, TradeMessage tradeMessage) { + checkArgument(tradeId.equals(tradeMessage.tradeId)); + } +} diff --git a/network-messages/src/main/java/io/bisq/payload/LazyProcessedStoragePayload.java b/network-messages/src/main/java/io/bisq/payload/LazyProcessedStoragePayload.java new file mode 100644 index 0000000000..8681aa6d0b --- /dev/null +++ b/network-messages/src/main/java/io/bisq/payload/LazyProcessedStoragePayload.java @@ -0,0 +1,8 @@ +package io.bisq.payload; + +/** + * Marker interface for payload which gets delayed processed at startup so we don't hit performance too much. + * Used for TradeStatistics. + */ +public interface LazyProcessedStoragePayload extends StoragePayload { +} diff --git a/network-messages/src/main/java/io/bisq/payload/MailboxStoragePayload.java b/network-messages/src/main/java/io/bisq/payload/MailboxStoragePayload.java new file mode 100644 index 0000000000..3cbe827f49 --- /dev/null +++ b/network-messages/src/main/java/io/bisq/payload/MailboxStoragePayload.java @@ -0,0 +1,133 @@ +package io.bisq.payload; + +import com.google.protobuf.ByteString; +import io.bisq.app.Version; +import io.bisq.common.crypto.Sig; +import io.bisq.common.wire.proto.Messages; +import io.bisq.messages.p2p.messaging.PrefixedSealedAndSignedMessage; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.IOException; +import java.security.KeyFactory; +import java.security.NoSuchAlgorithmException; +import java.security.NoSuchProviderException; +import java.security.PublicKey; +import java.security.spec.InvalidKeySpecException; +import java.security.spec.X509EncodedKeySpec; +import java.util.concurrent.TimeUnit; + +/** + * Envelope message which support a time to live and sender and receiver's pub keys for storage operations. + * It differs from the ProtectedExpirableMessage in the way that the sender is permitted to do an add operation + * but only the receiver is permitted to remove the data. + * That is the typical requirement for a mailbox like system. + *

    + * Typical payloads are trade or dispute messages to be stored when the peer is offline. + */ +public final class MailboxStoragePayload implements StoragePayload { + // That object is sent over the wire, so we need to take care of version compatibility. + private static final long serialVersionUID = Version.P2P_NETWORK_VERSION; + private static final Logger log = LoggerFactory.getLogger(MailboxStoragePayload.class); + + private static final long TTL = TimeUnit.DAYS.toMillis(10); + + /** + * The encrypted and signed payload message + */ + public final PrefixedSealedAndSignedMessage prefixedSealedAndSignedMessage; + + /** + * Used for check if the add operation is permitted. + * senderStoragePublicKey has to be equal to the ownerPubKey of the ProtectedData + * + * @see ProtectedStorageEntry#ownerPubKey + * @see P2PDataStorage#add(ProtectedStorageEntry, NodeAddress, BroadcastHandler.Listener, boolean) + */ + public transient PublicKey senderPubKeyForAddOperation; + private final byte[] senderPubKeyForAddOperationBytes; + /** + * Used for check if the remove operation is permitted. + * senderStoragePublicKey has to be equal to the ownerPubKey of the ProtectedData + * + * @see ProtectedStorageEntry#ownerPubKey + * @see P2PDataStorage#remove(ProtectedStorageEntry, NodeAddress, boolean) + */ + public transient PublicKey receiverPubKeyForRemoveOperation; + private final byte[] receiverPubKeyForRemoveOperationBytes; + + public MailboxStoragePayload(PrefixedSealedAndSignedMessage prefixedSealedAndSignedMessage, PublicKey senderPubKeyForAddOperation, PublicKey receiverPubKeyForRemoveOperation) { + this(prefixedSealedAndSignedMessage, new X509EncodedKeySpec(senderPubKeyForAddOperation.getEncoded()).getEncoded(), + new X509EncodedKeySpec(receiverPubKeyForRemoveOperation.getEncoded()).getEncoded()); + } + + public MailboxStoragePayload(PrefixedSealedAndSignedMessage prefixedSealedAndSignedMessage, byte[] senderPubKeyForAddOperationBytes, byte[] receiverPubKeyForRemoveOperationBytes) { + this.prefixedSealedAndSignedMessage = prefixedSealedAndSignedMessage; + this.senderPubKeyForAddOperationBytes = senderPubKeyForAddOperationBytes; + this.receiverPubKeyForRemoveOperationBytes = receiverPubKeyForRemoveOperationBytes; + init(); + } + + private void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException { + try { + in.defaultReadObject(); + init(); + } catch (Throwable t) { + log.warn("Exception at readObject: " + t.getMessage() + "\nThis= " + this.toString()); + } + } + + private void init() { + try { + senderPubKeyForAddOperation = KeyFactory.getInstance(Sig.KEY_ALGO, "BC").generatePublic(new X509EncodedKeySpec(senderPubKeyForAddOperationBytes)); + receiverPubKeyForRemoveOperation = KeyFactory.getInstance(Sig.KEY_ALGO, "BC").generatePublic(new X509EncodedKeySpec(receiverPubKeyForRemoveOperationBytes)); + } catch (InvalidKeySpecException | NoSuchAlgorithmException | NoSuchProviderException e) { + log.error("Couldn't create the public keys", e); + } + } + + @Override + public long getTTL() { + return TTL; + } + + @Override + public PublicKey getOwnerPubKey() { + return receiverPubKeyForRemoveOperation; + } + + @Override + public Messages.StoragePayload toProtoBuf() { + return Messages.StoragePayload.newBuilder().setMailboxStoragePayload(Messages.MailboxStoragePayload.newBuilder() + .setTTL(TTL) + .setPrefixedSealedAndSignedMessage(prefixedSealedAndSignedMessage.toProtoBuf().getPrefixedSealedAndSignedMessage()) + .setSenderPubKeyForAddOperationBytes(ByteString.copyFrom(senderPubKeyForAddOperationBytes)) + .setReceiverPubKeyForRemoveOperationBytes(ByteString.copyFrom(receiverPubKeyForRemoveOperationBytes))).build(); + } + + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (!(o instanceof MailboxStoragePayload)) return false; + + MailboxStoragePayload that = (MailboxStoragePayload) o; + + return !(prefixedSealedAndSignedMessage != null ? !prefixedSealedAndSignedMessage.equals(that.prefixedSealedAndSignedMessage) : that.prefixedSealedAndSignedMessage != null); + + } + + @Override + public int hashCode() { + return prefixedSealedAndSignedMessage != null ? prefixedSealedAndSignedMessage.hashCode() : 0; + } + + @Override + public String toString() { + return "MailboxStoragePayload{" + + "prefixedSealedAndSignedMessage=" + prefixedSealedAndSignedMessage + + ", senderPubKeyForAddOperation.hashCode()=" + (senderPubKeyForAddOperation != null ? senderPubKeyForAddOperation.hashCode() : "null") + + ", receiverPubKeyForRemoveOperation.hashCode()=" + (receiverPubKeyForRemoveOperation != null ? receiverPubKeyForRemoveOperation.hashCode() : "null") + + '}'; + } +} diff --git a/network/src/main/java/io/bisq/locale/CountryUtil.java b/network/src/main/java/io/bisq/locale/CountryUtil.java new file mode 100644 index 0000000000..e4398ccd91 --- /dev/null +++ b/network/src/main/java/io/bisq/locale/CountryUtil.java @@ -0,0 +1,220 @@ +/* + * This file is part of bisq. + * + * bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with bisq. If not, see . + */ + +package io.bisq.locale; + +import com.google.common.collect.Collections2; +import com.google.common.collect.Lists; +import io.bisq.user.Preferences; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.util.*; +import java.util.stream.Collectors; + +public class CountryUtil { + private static final Logger log = LoggerFactory.getLogger(CountryUtil.class); + + public static List getAllSepaEuroCountries(Locale locale) { + List list = new ArrayList<>(); + String[] codes = {"AT", "BE", "CY", "DE", "EE", "FI", "FR", "GR", "IE", + "IT", "LV", "LT", "LU", "MC", "MT", "NL", "PT", "SK", "SI", "ES"}; + populateCountryListByCodes(list, codes, locale); + list.sort((a, b) -> a.name.compareTo(b.name)); + + return list; + } + + private static void populateCountryListByCodes(List list, String[] codes) { + + } + + private static void populateCountryListByCodes(List list, String[] codes, Locale defaultLocale) { + for (String code : codes) { + Locale locale = new Locale(LanguageUtil.getDefaultLanguage(defaultLocale), code, ""); + String regionCode = getRegionCode(locale.getCountry()); + final Region region = new Region(regionCode, getRegionName(regionCode)); + final Country country = new Country(locale.getCountry(), locale.getDisplayCountry(), region); + list.add(country); + } + } + + public static boolean containsAllSepaEuroCountries(List countryCodesToCompare, Locale locale) { + countryCodesToCompare.sort(String::compareTo); + List countryCodesBase = getAllSepaEuroCountries(locale).stream().map(c -> c.code).collect(Collectors.toList()); + return countryCodesToCompare.toString().equals(countryCodesBase.toString()); + } + + public static List getAllSepaNonEuroCountries(Locale locale) { + List list = new ArrayList<>(); + String[] codes = {"BG", "HR", "CZ", "DK", "GB", "HU", "PL", "RO", + "SE", "IS", "NO", "LI", "CH"}; + populateCountryListByCodes(list, codes, locale); + list.sort((a, b) -> a.name.compareTo(b.name)); + return list; + } + + public static List getAllSepaCountries(Locale locale) { + List list = new ArrayList<>(); + list.addAll(getAllSepaEuroCountries(locale)); + list.addAll(getAllSepaNonEuroCountries(locale)); + return list; + } + + public static Country getDefaultCountry(final Locale locale) { + String regionCode = getRegionCode(locale.getCountry()); + final Region region = new Region(regionCode, getRegionName(regionCode)); + return new Country(locale.getCountry(), locale.getDisplayCountry(), region); + } + + public static String getNameByCode(String countryCode) { + return getNameByCode(countryCode, Preferences.getDefaultLocale()); + } + + public static String getNameByCode(String countryCode, Locale locale) { + return new Locale(LanguageUtil.getDefaultLanguage(locale), countryCode).getDisplayCountry(); + } + + public static String getNameAndCode(String countryCode) { + return getNameByCode(countryCode, Preferences.getDefaultLocale()); + } + + public static String getNameAndCode(String countryCode, Locale locale) { + return getNameByCode(countryCode, locale) + " (" + countryCode + ")"; + } + + public static String getCodesString(List countryCodes) { + return countryCodes.stream().collect(Collectors.joining(", ")); + } + + public static String getNamesByCodesString(List countryCodes, Locale locale) { + return getNamesByCodes(countryCodes, locale).stream().collect(Collectors.joining(",\n")); + } + + public static List getAllRegions() { + final List allRegions = new ArrayList<>(); + + String regionCode = "NA"; + Region region = new Region(regionCode, getRegionName(regionCode)); + allRegions.add(region); + + regionCode = "SA"; + region = new Region(regionCode, getRegionName(regionCode)); + allRegions.add(region); + + regionCode = "AF"; + region = new Region(regionCode, getRegionName(regionCode)); + allRegions.add(region); + + regionCode = "EU"; + region = new Region(regionCode, getRegionName(regionCode)); + allRegions.add(region); + + regionCode = "AS"; + region = new Region(regionCode, getRegionName(regionCode)); + allRegions.add(region); + + regionCode = "OC"; + region = new Region(regionCode, getRegionName(regionCode)); + allRegions.add(region); + + return allRegions; + } + + public static List getAllCountriesForRegion(Region selectedRegion) { + return Lists.newArrayList(Collections2.filter(getAllCountries(), country -> + selectedRegion != null && country != null && selectedRegion.equals(country.region))); + } + + public static List getAllCountries() { + final Set allCountries = new HashSet<>(); + for (final Locale locale : getAllCountryLocales()) { + String regionCode = getRegionCode(locale.getCountry()); + final Region region = new Region(regionCode, getRegionName(regionCode)); + final Country country = new Country(locale.getCountry(), locale.getDisplayCountry(), region); + allCountries.add(country); + } + + allCountries.add(new Country("GE", "Georgia", new Region("AS", getRegionName("AS")))); + allCountries.add(new Country("BW", "Botswana", new Region("AF", getRegionName("AF")))); + + final List allCountriesList = new ArrayList<>(allCountries); + allCountriesList.sort((locale1, locale2) -> locale1.name.compareTo(locale2.name)); + return allCountriesList; + } + + private static List getAllCountryLocales() { + List allLocales = LocaleUtil.getAllLocales(); + + // Filter duplicate locale entries + Set allLocalesAsSet = allLocales.stream().filter(locale -> !locale.getCountry().isEmpty()) + .collect(Collectors.toSet()); + + List allCountryLocales = new ArrayList<>(); + allCountryLocales.addAll(allLocalesAsSet); + allCountryLocales.sort((locale1, locale2) -> locale1.getDisplayCountry().compareTo(locale2.getDisplayCountry())); + return allCountryLocales; + } + + private static List getNamesByCodes(List countryCodes, Locale locale) { + return countryCodes.stream().map(s -> CountryUtil.getNameByCode(s, locale)).collect(Collectors.toList()); + } + + // other source of countries: https://developers.braintreepayments.com/reference/general/countries/java + private static final String[] countryCodes = new String[]{"AE", "AL", "AR", "AT", "AU", "BA", "BE", "BG", "BH", + "BO", "BR", "BW", "BY", "CA", "CH", "CL", "CN", "CO", "CR", "CS", "CU", "CY", "CZ", "DE", "DK", "DO", "DZ", + "EC", "EE", "EG", "ES", "FI", "FR", "GE", "GB", "GR", "GT", "HK", "HN", "HR", "HU", "ID", "IE", "IL", "IN", + "IQ", "IS", "IT", "JO", "JP", "KE", "KH", "KR", "KW", "KZ", "LB", "LT", "LU", "LV", "LY", "MA", "MD", "ME", "MK", "MT", "MX", + "MY", "NI", "NL", "NO", "NZ", "OM", "PA", "PE", "PH", "PL", "PR", "PT", "PY", "QA", "RO", "RS", "RU", + "SA", "SD", "SE", "SG", "SI", "SK", "SV", "SY", "TH", "TN", "TR", "TW", "UA", "US", "UY", "VE", "VN", + "YE", "ZA"}; + + private static final List countryCodeList = Arrays.asList(countryCodes); + private static final String[] regionCodes = new String[]{"AS", "EU", "SA", "EU", "OC", "EU", "EU", "EU", "AS", + "SA", "SA", "AF", "EU", "NA", "EU", "SA", "AS", "SA", "NA", "EU", "NA", "EU", "EU", "EU", "EU", "NA", "AF", + "SA", "EU", "AF", "EU", "EU", "EU", "AS", "EU", "EU", "NA", "AS", "NA", "EU", "EU", "AS", "EU", "AS", "AS", + "AS", "EU", "EU", "AS", "AS", "AF", "AS", "AS", "AS", "AS", "AS", "EU", "EU", "EU", "AF", "AF", "EU", "EU", "EU", "EU", "NA", + "AS", "NA", "EU", "EU", "OC", "AS", "NA", "SA", "AS", "EU", "NA", "EU", "SA", "AS", "EU", "EU", "EU", + "AS", "AF", "EU", "AS", "EU", "EU", "NA", "AS", "AS", "AF", "AS", "AS", "EU", "NA", "SA", "SA", "AS", + "AS", "AF"}; + private static final List regionCodeList = Arrays.asList(regionCodes); + private static final String[][] regionCodeToName = new String[][]{ + {"NA", "North America"}, {"SA", "South America"}, {"AF", "Africa"}, {"EU", "Europe"}, {"AS", "Asia"}, + {"OC", "Oceania"}}; + + private static String getRegionName(final String regionCode) { + for (final String[] regionName : regionCodeToName) { + if (regionName[0].equals(regionCode)) { + return regionName[1]; + } + } + return regionCode; + } + + private static String getRegionCode(String countryCode) { + if (!countryCode.isEmpty() && countryCodeList.contains(countryCode)) { + return regionCodeList.get(countryCodeList.indexOf(countryCode)); + } else { + return "Undefined"; + } + } + + public static String getDefaultCountryCode(Locale locale) { + // might be set later in pref or config, so not use Preferences.getDefaultLocale() anywhere in the code + return locale.getCountry(); + } +} diff --git a/network/src/main/java/io/bisq/locale/CryptoCurrency.java b/network/src/main/java/io/bisq/locale/CryptoCurrency.java new file mode 100644 index 0000000000..329b91778d --- /dev/null +++ b/network/src/main/java/io/bisq/locale/CryptoCurrency.java @@ -0,0 +1,52 @@ +/* + * This file is part of bisq. + * + * bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with bisq. If not, see . + */ + +package io.bisq.locale; + +import io.bisq.app.Version; + +public final class CryptoCurrency extends TradeCurrency { + // That object is saved to disc. We need to take care of changes to not break deserialization. + private static final long serialVersionUID = Version.LOCAL_DB_VERSION; + + // http://boschista.deviantart.com/journal/Cool-ASCII-Symbols-214218618 + private final static String PREFIX = "✦ "; + + private boolean isAsset; + + public CryptoCurrency(String currencyCode, String name) { + this(currencyCode, name, false); + } + + public CryptoCurrency(String currencyCode, String name, boolean isAsset) { + super(currencyCode, name); + this.isAsset = isAsset; + } + + public CryptoCurrency(String currencyCode, String name, String symbol) { + super(currencyCode, name, symbol); + } + + public boolean isAsset() { + return isAsset; + } + + @Override + public String getDisplayPrefix() { + return PREFIX; + } +} diff --git a/network/src/main/java/io/bisq/locale/CurrencyTuple.java b/network/src/main/java/io/bisq/locale/CurrencyTuple.java new file mode 100644 index 0000000000..f9700e9927 --- /dev/null +++ b/network/src/main/java/io/bisq/locale/CurrencyTuple.java @@ -0,0 +1,40 @@ +/* + * This file is part of bisq. + * + * bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with bisq. If not, see . + */ + +package io.bisq.locale; + +import java.io.Serializable; + +public class CurrencyTuple implements Serializable { + // That object is used for serializing to a Json file. + + public final String code; + public final String name; + public final int precision; // precision 4 is 1/10000 -> 0.0001 is smallest unit + + public CurrencyTuple(String code, String name) { + // We use Fiat class and there precision is 4 + // In future we might add custom precision per currency + this(code, name, 4); + } + + public CurrencyTuple(String code, String name, int precision) { + this.code = code; + this.name = name; + this.precision = precision; + } +} diff --git a/network/src/main/java/io/bisq/locale/CurrencyUtil.java b/network/src/main/java/io/bisq/locale/CurrencyUtil.java new file mode 100644 index 0000000000..85fd80a62b --- /dev/null +++ b/network/src/main/java/io/bisq/locale/CurrencyUtil.java @@ -0,0 +1,360 @@ +/* + * This file is part of bisq. + * + * bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with bisq. If not, see . + */ + +package io.bisq.locale; + +import io.bisq.user.Preferences; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.util.*; +import java.util.stream.Collectors; + +public class CurrencyUtil { + private static final Logger log = LoggerFactory.getLogger(CurrencyUtil.class); + + private static List allSortedFiatCurrencies; + + private static List createAllSortedFiatCurrenciesList() { + return createAllSortedFiatCurrenciesList(Preferences.getDefaultLocale()); + } + + private static List createAllSortedFiatCurrenciesList(Locale locale) { + Set set = CountryUtil.getAllCountries().stream() + .map(country -> getCurrencyByCountryCode(country.code, locale)) + .collect(Collectors.toSet()); + List list = new ArrayList<>(set); + list.sort(TradeCurrency::compareTo); + return list; + } + + public static List getAllSortedFiatCurrencies() { + return getAllSortedFiatCurrencies(Preferences.getDefaultLocale()); + } + + public static List getAllSortedFiatCurrencies(Locale locale) { + if(Objects.isNull(allSortedCryptoCurrencies)) { + allSortedFiatCurrencies = createAllSortedFiatCurrenciesList(locale); + } + return allSortedFiatCurrencies; + } + + public static List getAllMainFiatCurrencies() { + return getAllMainFiatCurrencies(Preferences.getDefaultLocale(), Preferences.getDefaultTradeCurrency()); + } + + public static List getAllMainFiatCurrencies(Locale locale, TradeCurrency defaultTradeCurrency) { + List list = new ArrayList<>(); + // Top traded currencies + list.add(new FiatCurrency("USD", locale)); + list.add(new FiatCurrency("EUR", locale)); + list.add(new FiatCurrency("GBP", locale)); + list.add(new FiatCurrency("CAD", locale)); + list.add(new FiatCurrency("AUD", locale)); + list.add(new FiatCurrency("RUB", locale)); + list.add(new FiatCurrency("INR", locale)); + + list.sort(TradeCurrency::compareTo); + + FiatCurrency defaultFiatCurrency = defaultTradeCurrency instanceof FiatCurrency ? (FiatCurrency) defaultTradeCurrency : null; + if (defaultFiatCurrency != null && list.contains(defaultFiatCurrency)) { + list.remove(defaultTradeCurrency); + list.add(0, defaultFiatCurrency); + } + return list; + } + + private static final List allSortedCryptoCurrencies = createAllSortedCryptoCurrenciesList(); + + public static List getAllSortedCryptoCurrencies() { + return allSortedCryptoCurrencies; + } + + // Don't make a PR for adding a coin but follow the steps described here: + // https://forum.bisq.io/t/how-to-add-your-favorite-altcoin/ + public static List createAllSortedCryptoCurrenciesList() { + final List result = new ArrayList<>(); + + result.add(new CryptoCurrency("AIB", "Advanced Internet Blocks")); + result.add(new CryptoCurrency("ANC", "Anoncoin")); + result.add(new CryptoCurrency("ANTI", "Anti")); + result.add(new CryptoCurrency("ARCO", "AquariusCoin")); + result.add(new CryptoCurrency("ARG", "Argentum")); + result.add(new CryptoCurrency("REP", "Augur", true)); + result.add(new CryptoCurrency("BATL", "Battlestars")); + result.add(new CryptoCurrency("BIGUP", "BigUp")); + result.add(new CryptoCurrency("BSQ", "bisq Token")); + result.add(new CryptoCurrency("BITAUD", "BitAUD", true)); + result.add(new CryptoCurrency("BITCHF", "BitCHF", true)); + result.add(new CryptoCurrency("BITCNY", "BitCNY", true)); + result.add(new CryptoCurrency("BITEUR", "BitEUR", true)); + result.add(new CryptoCurrency("BITGBP", "BitGBP", true)); + result.add(new CryptoCurrency("BITHKD", "BitHKD", true)); + result.add(new CryptoCurrency("BITNZD", "BitNZD", true)); + result.add(new CryptoCurrency("BITSEK", "BitSEK", true)); + result.add(new CryptoCurrency("BITSGD", "BitSGD", true)); + result.add(new CryptoCurrency("SYNQ", "BitSYNQ")); + result.add(new CryptoCurrency("BTS", "BitShares")); + result.add(new CryptoCurrency("BITUSD", "BitUSD", true)); + result.add(new CryptoCurrency("BLK", "Blackcoin")); + result.add(new CryptoCurrency("BURST", "Burstcoin")); + result.add(new CryptoCurrency("GBYTE", "Byte")); + result.add(new CryptoCurrency("CLAM", "Clams")); + result.add(new CryptoCurrency("CLOAK", "CloakCoin")); + result.add(new CryptoCurrency("CMT", "Comet")); + result.add(new CryptoCurrency("XCP", "Counterparty")); + result.add(new CryptoCurrency("CRBIT", "Creditbit")); + result.add(new CryptoCurrency("CRW", "Crown")); + result.add(new CryptoCurrency("CBX", "Crypto Bullion")); + result.add(new CryptoCurrency("DNET", "DarkNet")); + result.add(new CryptoCurrency("DIBC", "DIBCOIN")); + result.add(new CryptoCurrency("DASH", "Dash")); + result.add(new CryptoCurrency("DCR", "Decred")); + result.add(new CryptoCurrency("DGB", "Digibyte")); + result.add(new CryptoCurrency("DRS", "Digital Rupees")); + result.add(new CryptoCurrency("DGD", "DigixDAO Tokens", true)); + result.add(new CryptoCurrency("DOGE", "Dogecoin")); + result.add(new CryptoCurrency("DMC", "DynamicCoin")); + result.add(new CryptoCurrency("EMC", "Emercoin")); + result.add(new CryptoCurrency("EURT", "EUR Tether")); + result.add(new CryptoCurrency("ESP", "Espers")); + result.add(new CryptoCurrency("ENT", "Eternity")); + result.add(new CryptoCurrency("ETH", "Ether")); + result.add(new CryptoCurrency("ETC", "Ether Classic")); + result.add(new CryptoCurrency("ERC", "Europecoin")); + result.add(new CryptoCurrency("EGC", "EverGreenCoin")); + result.add(new CryptoCurrency("FCT", "Factom")); + result.add(new CryptoCurrency("FAIR", "FairCoin")); + result.add(new CryptoCurrency("FLO", "FlorinCoin")); + result.add(new CryptoCurrency("GAME", "GameCredits")); + result.add(new CryptoCurrency("GEMZ", "Gemz")); + result.add(new CryptoCurrency("GRC", "Gridcoin")); + result.add(new CryptoCurrency("GRS", "Groestlcoin")); + result.add(new CryptoCurrency("NLG", "Gulden")); + result.add(new CryptoCurrency("HODL", "HOdlcoin")); + result.add(new CryptoCurrency("HNC", "HunCoin")); + result.add(new CryptoCurrency("IOC", "I/O Coin")); + result.add(new CryptoCurrency("IOP", "Fermat")); + result.add(new CryptoCurrency("JPYT", "JPY Tether")); + result.add(new CryptoCurrency("JBS", "Jumbucks")); + result.add(new CryptoCurrency("LBC", "LBRY Credits")); + result.add(new CryptoCurrency("LTBC", "LTBcoin")); + result.add(new CryptoCurrency("LSK", "Lisk")); + result.add(new CryptoCurrency("LTC", "Litecoin")); + result.add(new CryptoCurrency("MAID", "MaidSafeCoin")); + result.add(new CryptoCurrency("MKR", "Maker", true)); + result.add(new CryptoCurrency("MXT", "MarteXcoin")); + result.add(new CryptoCurrency("MOIN", "Moin")); + result.add(new CryptoCurrency("XMR", "Monero")); + result.add(new CryptoCurrency("MT", "Mycelium Token", true)); + result.add(new CryptoCurrency("XMY", "Myriadcoin")); + result.add(new CryptoCurrency("NAV", "Nav Coin")); + result.add(new CryptoCurrency("XEM", "NEM")); + result.add(new CryptoCurrency("NEVA", "Nevacoin")); + result.add(new CryptoCurrency("NMC", "Namecoin")); + result.add(new CryptoCurrency("NBT", "NuBits")); + result.add(new CryptoCurrency("NSR", "NuShares")); + result.add(new CryptoCurrency("NXT", "Nxt")); + result.add(new CryptoCurrency("OK", "OKCash")); + result.add(new CryptoCurrency("OMNI", "Omni")); + result.add(new CryptoCurrency("OPAL", "Opal")); + result.add(new CryptoCurrency("PASC", "Pascal Coin")); + result.add(new CryptoCurrency("PPC", "Peercoin")); + result.add(new CryptoCurrency("PINK", "Pinkcoin")); + result.add(new CryptoCurrency("PIVX", "PIVX")); + result.add(new CryptoCurrency("XPTX", "PlatinumBar")); + result.add(new CryptoCurrency("PLU", "Plutons", true)); + result.add(new CryptoCurrency("POST", "PostCoin")); + result.add(new CryptoCurrency("POT", "PotCoin")); + result.add(new CryptoCurrency("XPM", "Primecoin")); + result.add(new CryptoCurrency("RADS", "Radium")); + result.add(new CryptoCurrency("REALEST", "RealEst. Coin")); + result.add(new CryptoCurrency("RDD", "ReddCoin")); + result.add(new CryptoCurrency("XRP", "Ripple")); + result.add(new CryptoCurrency("SFSC", "Safe FileSystem Coin")); + result.add(new CryptoCurrency("SDC", "ShadowCash")); + result.add(new CryptoCurrency("SHIFT", "Shift")); + result.add(new CryptoCurrency("SC", "Siacoin")); + result.add(new CryptoCurrency("SF", "Siafund")); + result.add(new CryptoCurrency("SIB", "Sibcoin")); + result.add(new CryptoCurrency("SMLY", "Smileycoin")); + result.add(new CryptoCurrency("SLR", "SolarCoin")); + result.add(new CryptoCurrency("STEEM", "STEEM")); + result.add(new CryptoCurrency("STEEMUSD", "Steem Dollars", true)); + result.add(new CryptoCurrency("XLM", "Stellar Lumens")); + result.add(new CryptoCurrency("SJCX", "StorjcoinX")); + result.add(new CryptoCurrency("STRAT", "Stratis")); + result.add(new CryptoCurrency("SWT", "Swarm City Token", true)); + result.add(new CryptoCurrency("SYNX", "Syndicate")); + result.add(new CryptoCurrency("AMP", "Synereo", true)); + result.add(new CryptoCurrency("TRI", "Triangles")); + result.add(new CryptoCurrency("USDT", "USD Tether")); + result.add(new CryptoCurrency("UNO", "Unobtanium")); + result.add(new CryptoCurrency("VCN", "VCoin")); + result.add(new CryptoCurrency("VPN", "VPNCoin")); + result.add(new CryptoCurrency("XVG", "Verge")); + result.add(new CryptoCurrency("VRC", "VeriCoin")); + result.add(new CryptoCurrency("WDC", "Worldcoin")); + result.add(new CryptoCurrency("WAVES", "Waves")); + result.add(new CryptoCurrency("XAUR", "Xaurum")); + result.add(new CryptoCurrency("YACC", "YACCoin")); + result.add(new CryptoCurrency("YBC", "YbCoin")); + result.add(new CryptoCurrency("ZEC", "Zcash")); + result.add(new CryptoCurrency("XZC", "Zcoin")); + + result.sort(TradeCurrency::compareTo); + + // Util for printing all altcoins for adding to FAQ page + StringBuilder sb = new StringBuilder(); + result.stream().forEach(e -> sb.append("

  • \"") + .append(e.getCode()) + .append("\", \"") + .append(e.getName()) + .append("\"
  • ") + .append("\n")); + //log.info(sb.toString()); + + return result; + } + + public static List getMainCryptoCurrencies() { + final List result = new ArrayList<>(); + result.add(new CryptoCurrency("BSQ", "bisq Token")); + result.add(new CryptoCurrency("XMR", "Monero")); + result.add(new CryptoCurrency("ZEC", "Zcash")); + result.add(new CryptoCurrency("NMC", "Namecoin")); + result.add(new CryptoCurrency("SC", "Siacoin")); + result.add(new CryptoCurrency("ETH", "Ether")); + result.add(new CryptoCurrency("ETC", "Ether Classic")); + result.add(new CryptoCurrency("STEEM", "STEEM")); + result.add(new CryptoCurrency("MT", "Mycelium Token", true)); + result.add(new CryptoCurrency("REP", "Augur", true)); + result.add(new CryptoCurrency("LTC", "Litecoin")); + result.add(new CryptoCurrency("DASH", "Dash")); + result.add(new CryptoCurrency("DOGE", "Dogecoin")); + + result.sort(TradeCurrency::compareTo); + return result; + } + + + /** + * @return Sorted list of SEPA currencies with EUR as first item + */ + private static Set getSortedSEPACurrencyCodes(Locale locale) { + return CountryUtil.getAllSepaCountries(locale).stream() + .map(country -> getCurrencyByCountryCode(country.code, locale)) + .collect(Collectors.toSet()); + } + + // At OKPay you can exchange internally those currencies + public static List getAllOKPayCurrencies(Locale locale) { + ArrayList currencies = new ArrayList<>(Arrays.asList( + new FiatCurrency("EUR", locale), + new FiatCurrency("USD", locale), + new FiatCurrency("GBP", locale), + new FiatCurrency("CHF", locale), + new FiatCurrency("RUB", locale), + new FiatCurrency("PLN", locale), + new FiatCurrency("JPY", locale), + new FiatCurrency("CAD", locale), + new FiatCurrency("AUD", locale), + new FiatCurrency("CZK", locale), + new FiatCurrency("NOK", locale), + new FiatCurrency("SEK", locale), + new FiatCurrency("DKK", locale), + new FiatCurrency("HRK", locale), + new FiatCurrency("HUF", locale), + new FiatCurrency("NZD", locale), + new FiatCurrency("RON", locale), + new FiatCurrency("TRY", locale), + new FiatCurrency("ZAR", locale), + new FiatCurrency("HKD", locale), + new FiatCurrency("CNY", locale) + )); + currencies.sort(TradeCurrency::compareTo); + return currencies; + } + + public static boolean isFiatCurrency(String currencyCode) { + try { + return currencyCode != null && !currencyCode.isEmpty() && !isCryptoCurrency(currencyCode) && Currency.getInstance(currencyCode) != null; + } catch (Throwable t) { + return false; + } + } + + public static Optional getFiatCurrency(String currencyCode) { + return allSortedFiatCurrencies.stream().filter(e -> e.getCode().equals(currencyCode)).findAny(); + } + + @SuppressWarnings("WeakerAccess") + public static boolean isCryptoCurrency(String currencyCode) { + return getCryptoCurrency(currencyCode).isPresent(); + } + + public static Optional getCryptoCurrency(String currencyCode) { + return getAllSortedCryptoCurrencies().stream().filter(e -> e.getCode().equals(currencyCode)).findAny(); + } + + public static Optional getTradeCurrency(String currencyCode) { + Optional fiatCurrencyOptional = getFiatCurrency(currencyCode); + if (isFiatCurrency(currencyCode) && fiatCurrencyOptional.isPresent()) { + return Optional.of(fiatCurrencyOptional.get()); + } else { + Optional cryptoCurrencyOptional = getCryptoCurrency(currencyCode); + if (isCryptoCurrency(currencyCode) && cryptoCurrencyOptional.isPresent()) { + return Optional.of(cryptoCurrencyOptional.get()); + } else { + return Optional.empty(); + } + } + } + + public static FiatCurrency getCurrencyByCountryCode(String countryCode) { + return getCurrencyByCountryCode(countryCode, Preferences.getDefaultLocale()); + } + + public static FiatCurrency getCurrencyByCountryCode(String countryCode, Locale locale) { + return new FiatCurrency(Currency.getInstance(new Locale(LanguageUtil.getDefaultLanguage(locale), countryCode)).getCurrencyCode(), locale); + } + + + public static String getNameByCode(String currencyCode) { + return getNameAndCode(currencyCode, Preferences.getDefaultLocale()); + } + + public static String getNameByCode(String currencyCode, Locale locale) { + if (isCryptoCurrency(currencyCode)) + return getCryptoCurrency(currencyCode).get().getName(); + else + try { + return Currency.getInstance(currencyCode).getDisplayName(locale); + } catch (Throwable t) { + log.debug("No currency name available " + t.getMessage()); + return currencyCode; + } + } + + public static String getNameAndCode(String currencyCode) { + return getNameAndCode(currencyCode, Preferences.getDefaultLocale()); + } + + public static String getNameAndCode(String currencyCode, Locale locale) { + return getNameByCode(currencyCode, locale) + " (" + currencyCode + ")"; + } +} diff --git a/network/src/main/java/io/bisq/locale/FiatCurrency.java b/network/src/main/java/io/bisq/locale/FiatCurrency.java new file mode 100644 index 0000000000..bb47c7d912 --- /dev/null +++ b/network/src/main/java/io/bisq/locale/FiatCurrency.java @@ -0,0 +1,72 @@ +/* + * This file is part of bisq. + * + * bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with bisq. If not, see . + */ + +package io.bisq.locale; + +import io.bisq.app.Version; +import io.bisq.user.Preferences; + +import java.util.Currency; +import java.util.Locale; + +public final class FiatCurrency extends TradeCurrency { + // That object is saved to disc. We need to take care of changes to not break deserialization. + private static final long serialVersionUID = Version.LOCAL_DB_VERSION; + + // http://boschista.deviantart.com/journal/Cool-ASCII-Symbols-214218618 + private final static String PREFIX = "★ "; + + private final Currency currency; + + public FiatCurrency(String currencyCode) { + this(currencyCode, Preferences.getDefaultLocale()); + } + + public FiatCurrency(String currencyCode, Locale locale) { + this(Currency.getInstance(currencyCode), locale); + } + + @SuppressWarnings("WeakerAccess") + public FiatCurrency(Currency currency) { + this(currency, Preferences.getDefaultLocale()); + } + + @SuppressWarnings("WeakerAccess") + public FiatCurrency(Currency currency, Locale locale) { + super(currency.getCurrencyCode(), currency.getDisplayName(locale), currency.getSymbol()); + this.currency = currency; + } + + public Currency getCurrency() { + return currency; + } + + @Override + public String getDisplayPrefix() { + return PREFIX; + } + + @Override + public String toString() { + return "FiatCurrency{" + + "currency=" + currency + + ", code='" + code + '\'' + + ", name='" + name + '\'' + + ", symbol='" + symbol + '\'' + + '}'; + } +} diff --git a/network/src/main/java/io/bisq/locale/LanguageUtil.java b/network/src/main/java/io/bisq/locale/LanguageUtil.java new file mode 100644 index 0000000000..c10b0ad35f --- /dev/null +++ b/network/src/main/java/io/bisq/locale/LanguageUtil.java @@ -0,0 +1,124 @@ +/* + * This file is part of bisq. + * + * bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with bisq. If not, see . + */ + +package io.bisq.locale; + +import io.bisq.user.Preferences; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.util.*; +import java.util.stream.Collectors; + +public class LanguageUtil { + private static final Logger log = LoggerFactory.getLogger(LanguageUtil.class); + + private static List userLanguageCodes = Arrays.asList( + "en", // English + "de" // German + + /* + // not translated yet + "es", // Spanish + "zh", // Chinese + "pt", // Portuguese + "it", // Italian + "el", // Greek + "fr", // French + "sr", // Serbian + "ja", // Japanese + "iw", // Hebrew + "hi", // Hindi + "ru", // Russian + "ko", // Korean + "pl", // Polish + "sv", // Swedish + "no", // Norwegian + "nl", // Dutch + "be", // Belarusian + "fi", // Finnish + "bg", // Bulgarian + "lt", // Lithuanian + "lv", // Latvian + "hr", // Croatian + "hu", // Hungarian + "uk", // Ukrainian + "sk", // Slovak + "sl", // Slovenian + "ga", // Irish + "sq", // Albanian + "ca", // Catalan + "mk", // Macedonian + "kk", // Kazakh + "km", // Khmer + "sw", // Swahili + "in", // Indonesian + "ms", // Malay + "is", // Icelandic + "et", // Estonian + "cs", // Czech + "ar", // Arabic + "vi", // Vietnamese + "th", // Thai + "da", // Danish + "ro", // Romanian + "tr", // Turkish + "mt" // Maltese + */ + ); + + public static List getAllLanguageCodes() { + List allLocales = LocaleUtil.getAllLocales(); + + // Filter duplicate locale entries + Set allLocalesAsSet = allLocales.stream().filter(locale -> !locale.getLanguage().isEmpty() && + !locale.getDisplayLanguage().isEmpty()) + .map(Locale::getLanguage) + .collect(Collectors.toSet()); + + List allLanguageCodes = new ArrayList<>(); + allLanguageCodes.addAll(allLocalesAsSet); + allLanguageCodes.sort((o1, o2) -> getDisplayName(o1).compareTo(getDisplayName(o2))); + return allLanguageCodes; + } + + public static String getDefaultLanguage(Locale locale) { + // might be set later in pref or config, so not use Preferences.getDefaultLocale() anywhere in the code + return locale.getLanguage(); + } + + public static String getDefaultLanguageLocaleAsCode() { + return getDefaultLanguageLocaleAsCode(Preferences.getDefaultLocale()); + } + + public static String getDefaultLanguageLocaleAsCode(Locale locale) { + return new Locale(LanguageUtil.getDefaultLanguage(locale), "").getLanguage(); + } + + public static String getEnglishLanguageLocaleCode() { + return new Locale(Locale.ENGLISH.getLanguage(), "").getLanguage(); + } + + public static String getDisplayName(String code) { + Locale locale = new Locale(code.toUpperCase()); + return locale.getDisplayName(locale); + } + + public static List getUserLanguageCodes() { + return userLanguageCodes; + } +} diff --git a/network/src/main/java/io/bisq/locale/LocaleUtil.java b/network/src/main/java/io/bisq/locale/LocaleUtil.java new file mode 100644 index 0000000000..ad9dca8280 --- /dev/null +++ b/network/src/main/java/io/bisq/locale/LocaleUtil.java @@ -0,0 +1,201 @@ +/* + * This file is part of bisq. + * + * bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with bisq. If not, see . + */ + +package io.bisq.locale; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.util.ArrayList; +import java.util.List; +import java.util.Locale; + +public class LocaleUtil { + private static final Logger log = LoggerFactory.getLogger(LocaleUtil.class); + + public static List getAllLocales() { + + // derived form Locale.getAvailableLocales() and added some missing locales + List allLocales = new ArrayList<>(); + + allLocales.add(new Locale("bg", "", "")); + allLocales.add(new Locale("it", "", "")); + allLocales.add(new Locale("ko", "", "")); + allLocales.add(new Locale("uk", "", "")); + allLocales.add(new Locale("lv", "", "")); + allLocales.add(new Locale("pt", "", "")); + allLocales.add(new Locale("sk", "", "")); + allLocales.add(new Locale("ga", "", "")); + allLocales.add(new Locale("et", "", "")); + allLocales.add(new Locale("sv", "", "")); + allLocales.add(new Locale("cs", "", "")); + allLocales.add(new Locale("el", "", "")); + allLocales.add(new Locale("hu", "", "")); + allLocales.add(new Locale("in", "", "")); + allLocales.add(new Locale("be", "", "")); + allLocales.add(new Locale("es", "", "")); + allLocales.add(new Locale("tr", "", "")); + allLocales.add(new Locale("hr", "", "")); + allLocales.add(new Locale("lt", "", "")); + allLocales.add(new Locale("sq", "", "")); + allLocales.add(new Locale("fr", "", "")); + allLocales.add(new Locale("ja", "", "")); + allLocales.add(new Locale("is", "", "")); + allLocales.add(new Locale("de", "", "")); + allLocales.add(new Locale("en", "", "")); + allLocales.add(new Locale("ca", "", "")); + allLocales.add(new Locale("sl", "", "")); + allLocales.add(new Locale("fi", "", "")); + allLocales.add(new Locale("mk", "", "")); + allLocales.add(new Locale("sr", "", "")); + allLocales.add(new Locale("th", "", "")); + allLocales.add(new Locale("ar", "", "")); + allLocales.add(new Locale("ru", "", "")); + allLocales.add(new Locale("ms", "", "")); + allLocales.add(new Locale("hi", "", "")); + allLocales.add(new Locale("nl", "", "")); + allLocales.add(new Locale("vi", "", "")); + allLocales.add(new Locale("sr", "", "")); + allLocales.add(new Locale("mt", "", "")); + allLocales.add(new Locale("da", "", "")); + allLocales.add(new Locale("ro", "", "")); + allLocales.add(new Locale("no", "", "")); + allLocales.add(new Locale("pl", "", "")); + allLocales.add(new Locale("iw", "", "")); + allLocales.add(new Locale("zh", "", "")); + allLocales.add(new Locale("ar", "AE", "")); + allLocales.add(new Locale("sq", "AL", "")); + allLocales.add(new Locale("es", "AR", "")); + allLocales.add(new Locale("de", "AT", "")); + allLocales.add(new Locale("en", "AU", "")); + allLocales.add(new Locale("sr", "BA", "")); + allLocales.add(new Locale("sr", "BA", "")); + allLocales.add(new Locale("fr", "BE", "")); + allLocales.add(new Locale("nl", "BE", "")); + allLocales.add(new Locale("bg", "BG", "")); + allLocales.add(new Locale("ar", "BH", "")); + allLocales.add(new Locale("es", "BO", "")); + allLocales.add(new Locale("pt", "BR", "")); + allLocales.add(new Locale("be", "BY", "")); + allLocales.add(new Locale("fr", "CA", "")); + allLocales.add(new Locale("en", "CA", "")); + allLocales.add(new Locale("fr", "CH", "")); + allLocales.add(new Locale("de", "CH", "")); + allLocales.add(new Locale("it", "CH", "")); + allLocales.add(new Locale("es", "CL", "")); + allLocales.add(new Locale("zh", "CN", "")); + allLocales.add(new Locale("es", "CO", "")); + allLocales.add(new Locale("es", "CR", "")); + allLocales.add(new Locale("sr", "CS", "")); + allLocales.add(new Locale("es", "CU", "")); + allLocales.add(new Locale("el", "CY", "")); + allLocales.add(new Locale("cs", "CZ", "")); + allLocales.add(new Locale("de", "DE", "")); + allLocales.add(new Locale("da", "DK", "")); + allLocales.add(new Locale("es", "DO", "")); + allLocales.add(new Locale("ar", "DZ", "")); + allLocales.add(new Locale("es", "EC", "")); + allLocales.add(new Locale("et", "EE", "")); + allLocales.add(new Locale("ar", "EG", "")); + allLocales.add(new Locale("ca", "ES", "")); + allLocales.add(new Locale("es", "ES", "")); + allLocales.add(new Locale("fi", "FI", "")); + allLocales.add(new Locale("fr", "FR", "")); + allLocales.add(new Locale("en", "GB", "")); + allLocales.add(new Locale("el", "GR", "")); + allLocales.add(new Locale("de", "GR", "")); + allLocales.add(new Locale("es", "GT", "")); + allLocales.add(new Locale("zh", "HK", "")); + allLocales.add(new Locale("es", "HN", "")); + allLocales.add(new Locale("hr", "HR", "")); + allLocales.add(new Locale("hu", "HU", "")); + allLocales.add(new Locale("in", "ID", "")); + allLocales.add(new Locale("ga", "IE", "")); + allLocales.add(new Locale("en", "IE", "")); + allLocales.add(new Locale("iw", "IL", "")); + allLocales.add(new Locale("hi", "IN", "")); + allLocales.add(new Locale("en", "IN", "")); + allLocales.add(new Locale("ar", "IQ", "")); + allLocales.add(new Locale("is", "IS", "")); + allLocales.add(new Locale("it", "IT", "")); + allLocales.add(new Locale("ar", "JO", "")); + allLocales.add(new Locale("ja", "JP", "")); + allLocales.add(new Locale("ja", "JP", "")); + allLocales.add(new Locale("sw", "KE", "")); + allLocales.add(new Locale("km", "KH", "")); + allLocales.add(new Locale("ko", "KR", "")); + allLocales.add(new Locale("ar", "KW", "")); + allLocales.add(new Locale("kk", "KZ", "")); + allLocales.add(new Locale("ar", "LB", "")); + allLocales.add(new Locale("lt", "LT", "")); + allLocales.add(new Locale("fr", "LU", "")); + allLocales.add(new Locale("de", "LU", "")); + allLocales.add(new Locale("lv", "LV", "")); + allLocales.add(new Locale("ar", "LY", "")); + allLocales.add(new Locale("ar", "MA", "")); + allLocales.add(new Locale("ro", "MD", "")); + allLocales.add(new Locale("sr", "ME", "")); + allLocales.add(new Locale("sr", "ME", "")); + allLocales.add(new Locale("mk", "MK", "")); + allLocales.add(new Locale("mt", "MT", "")); + allLocales.add(new Locale("en", "MT", "")); + allLocales.add(new Locale("es", "MX", "")); + allLocales.add(new Locale("ms", "MY", "")); + allLocales.add(new Locale("es", "NI", "")); + allLocales.add(new Locale("nl", "NL", "")); + allLocales.add(new Locale("no", "NO", "")); + allLocales.add(new Locale("no", "NO", "")); + allLocales.add(new Locale("en", "NZ", "")); + allLocales.add(new Locale("ar", "OM", "")); + allLocales.add(new Locale("es", "PA", "")); + allLocales.add(new Locale("es", "PE", "")); + allLocales.add(new Locale("en", "PH", "")); + allLocales.add(new Locale("pl", "PL", "")); + allLocales.add(new Locale("es", "PR", "")); + allLocales.add(new Locale("pt", "PT", "")); + allLocales.add(new Locale("es", "PY", "")); + allLocales.add(new Locale("ar", "QA", "")); + allLocales.add(new Locale("ro", "RO", "")); + allLocales.add(new Locale("sr", "RS", "")); + allLocales.add(new Locale("sr", "RS", "")); + allLocales.add(new Locale("ru", "RU", "")); + allLocales.add(new Locale("ar", "SA", "")); + allLocales.add(new Locale("ar", "SD", "")); + allLocales.add(new Locale("sv", "SE", "")); + allLocales.add(new Locale("en", "SG", "")); + allLocales.add(new Locale("zh", "SG", "")); + allLocales.add(new Locale("sl", "SI", "")); + allLocales.add(new Locale("sk", "SK", "")); + allLocales.add(new Locale("es", "SV", "")); + allLocales.add(new Locale("ar", "SY", "")); + allLocales.add(new Locale("th", "TH", "")); + allLocales.add(new Locale("th", "TH", "")); + allLocales.add(new Locale("ar", "TN", "")); + allLocales.add(new Locale("tr", "TR", "")); + allLocales.add(new Locale("zh", "TW", "")); + allLocales.add(new Locale("uk", "UA", "")); + allLocales.add(new Locale("en", "US", "")); + allLocales.add(new Locale("es", "US", "")); + allLocales.add(new Locale("es", "UY", "")); + allLocales.add(new Locale("es", "VE", "")); + allLocales.add(new Locale("vi", "VN", "")); + allLocales.add(new Locale("ar", "YE", "")); + allLocales.add(new Locale("en", "ZA", "")); + + return allLocales; + } +} diff --git a/network/src/main/java/io/bisq/locale/TradeCurrency.java b/network/src/main/java/io/bisq/locale/TradeCurrency.java new file mode 100644 index 0000000000..0b180469cd --- /dev/null +++ b/network/src/main/java/io/bisq/locale/TradeCurrency.java @@ -0,0 +1,96 @@ +/* + * This file is part of bisq. + * + * bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with bisq. If not, see . + */ + +package io.bisq.locale; + +import io.bisq.app.Version; +import io.bisq.common.persistance.Persistable; +import org.jetbrains.annotations.NotNull; + +public abstract class TradeCurrency implements Persistable, Comparable { + // That object is saved to disc. We need to take care of changes to not break deserialization. + private static final long serialVersionUID = Version.LOCAL_DB_VERSION; + + protected final String code; + protected final String name; + protected String symbol; + + protected TradeCurrency(String code, String name) { + this.code = code; + this.name = name; + } + + public TradeCurrency(String code, String name, String symbol) { + this.code = code; + this.name = name; + this.symbol = symbol; + } + + public String getCode() { + return code; + } + + public String getName() { + return name; + } + + public String getSymbol() { + return symbol; + } + + public String getDisplayPrefix() { + return ""; + } + + public String getNameAndCode() { + return name + " (" + code + ")"; + } + + public String getCodeAndName() { + return code + " (" + name + ")"; + } + + @Override + public int compareTo(@NotNull TradeCurrency other) { + return this.getName().compareTo(other.getName()); + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (!(o instanceof TradeCurrency)) return false; + + TradeCurrency that = (TradeCurrency) o; + + return !(getCode() != null ? !getCode().equals(that.getCode()) : that.getCode() != null); + + } + + @Override + public int hashCode() { + return getCode() != null ? getCode().hashCode() : 0; + } + + @Override + public String toString() { + return "TradeCurrency{" + + "code='" + code + '\'' + + ", name='" + name + '\'' + + ", symbol='" + symbol + '\'' + + '}'; + } +} diff --git a/network/src/main/java/io/bisq/p2p/protocol/availability/OfferAvailabilityModel.java b/network/src/main/java/io/bisq/p2p/protocol/availability/OfferAvailabilityModel.java new file mode 100644 index 0000000000..8d987d0f30 --- /dev/null +++ b/network/src/main/java/io/bisq/p2p/protocol/availability/OfferAvailabilityModel.java @@ -0,0 +1,73 @@ +/* + * This file is part of bisq. + * + * bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with bisq. If not, see . + */ + +package io.bisq.p2p.protocol.availability; + +import io.bisq.common.taskrunner.Model; +import io.bisq.messages.NodeAddress; +import io.bisq.messages.availability.OfferAvailabilityResponse; +import io.bisq.messages.crypto.PubKeyRing; +import io.bisq.p2p.storage.P2PService; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class OfferAvailabilityModel implements Model { + private static final Logger log = LoggerFactory.getLogger(OfferAvailabilityModel.class); + + public final Offer offer; + public final PubKeyRing pubKeyRing; + public final P2PService p2PService; + + private NodeAddress peerNodeAddress; + private OfferAvailabilityResponse message; + + public OfferAvailabilityModel(Offer offer, + PubKeyRing pubKeyRing, + P2PService p2PService) { + this.offer = offer; + this.pubKeyRing = pubKeyRing; + this.p2PService = p2PService; + } + + public NodeAddress getPeerNodeAddress() { + return peerNodeAddress; + } + + public void setPeerNodeAddress(NodeAddress peerNodeAddress) { + this.peerNodeAddress = peerNodeAddress; + } + + public void setMessage(OfferAvailabilityResponse message) { + this.message = message; + } + + public OfferAvailabilityResponse getMessage() { + return message; + } + + public long getTakersTradePrice() { + return offer.getPrice() != null ? offer.getPrice().value : 0; + } + + @Override + public void persist() { + } + + @Override + public void onComplete() { + } +} diff --git a/network/src/main/java/io/bisq/p2p/protocol/availability/OfferAvailabilityProtocol.java b/network/src/main/java/io/bisq/p2p/protocol/availability/OfferAvailabilityProtocol.java new file mode 100644 index 0000000000..2d14707807 --- /dev/null +++ b/network/src/main/java/io/bisq/p2p/protocol/availability/OfferAvailabilityProtocol.java @@ -0,0 +1,152 @@ +/* + * This file is part of bisq. + * + * bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with bisq. If not, see . + */ + +package io.bisq.p2p.protocol.availability; + +import io.bisq.common.Timer; +import io.bisq.common.UserThread; +import io.bisq.common.handlers.ErrorMessageHandler; +import io.bisq.common.handlers.ResultHandler; +import io.bisq.common.taskrunner.TaskRunner; +import io.bisq.messages.DecryptedDirectMessageListener; +import io.bisq.messages.Message; +import io.bisq.messages.availability.OfferAvailabilityResponse; +import io.bisq.messages.availability.OfferMessage; +import io.bisq.messages.trade.offer.payload.OfferPayload; +import io.bisq.messages.util.Validator; +import io.bisq.protocol.availability.tasks.ProcessOfferAvailabilityResponse; +import io.bisq.protocol.availability.tasks.SendOfferAvailabilityRequest; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class OfferAvailabilityProtocol { + private static final Logger log = LoggerFactory.getLogger(OfferAvailabilityProtocol.class); + + private static final long TIMEOUT_SEC = 60; + + private final OfferAvailabilityModel model; + private final ResultHandler resultHandler; + private final ErrorMessageHandler errorMessageHandler; + private final DecryptedDirectMessageListener decryptedDirectMessageListener; + + private TaskRunner taskRunner; + private Timer timeoutTimer; + + + /////////////////////////////////////////////////////////////////////////////////////////// + // Constructor + /////////////////////////////////////////////////////////////////////////////////////////// + + public OfferAvailabilityProtocol(OfferAvailabilityModel model, ResultHandler resultHandler, ErrorMessageHandler errorMessageHandler) { + this.model = model; + this.resultHandler = resultHandler; + this.errorMessageHandler = errorMessageHandler; + + decryptedDirectMessageListener = (decryptedMessageWithPubKey, peersNodeAddress) -> { + Message message = decryptedMessageWithPubKey.message; + if (message instanceof OfferMessage) { + OfferMessage offerMessage = (OfferMessage) message; + Validator.nonEmptyStringOf(offerMessage.offerId); + if (message instanceof OfferAvailabilityResponse + && model.offer.getId().equals(offerMessage.offerId)) { + log.trace("handle OfferAvailabilityResponse = " + message.getClass().getSimpleName() + " from " + peersNodeAddress); + handle((OfferAvailabilityResponse) message); + } + } + }; + } + + private void cleanup() { + stopTimeout(); + model.p2PService.removeDecryptedDirectMessageListener(decryptedDirectMessageListener); + } + + + /////////////////////////////////////////////////////////////////////////////////////////// + // Called from UI + /////////////////////////////////////////////////////////////////////////////////////////// + + public void sendOfferAvailabilityRequest() { + // reset + model.offer.setState(OfferPayload.State.UNDEFINED); + + model.p2PService.addDecryptedDirectMessageListener(decryptedDirectMessageListener); + model.setPeerNodeAddress(model.offer.getOffererNodeAddress()); + + taskRunner = new TaskRunner<>(model, + () -> log.debug("sequence at sendOfferAvailabilityRequest completed"), + (errorMessage) -> { + log.error(errorMessage); + stopTimeout(); + errorMessageHandler.handleErrorMessage(errorMessage); + } + ); + taskRunner.addTasks(SendOfferAvailabilityRequest.class); + startTimeout(); + taskRunner.run(); + } + + public void cancel() { + taskRunner.cancel(); + cleanup(); + } + + + /////////////////////////////////////////////////////////////////////////////////////////// + // Incoming message handling + /////////////////////////////////////////////////////////////////////////////////////////// + + private void handle(OfferAvailabilityResponse message) { + stopTimeout(); + startTimeout(); + model.setMessage(message); + + taskRunner = new TaskRunner<>(model, + () -> { + log.debug("sequence at handle OfferAvailabilityResponse completed"); + stopTimeout(); + resultHandler.handleResult(); + }, + (errorMessage) -> { + log.error(errorMessage); + stopTimeout(); + errorMessageHandler.handleErrorMessage(errorMessage); + } + ); + taskRunner.addTasks(ProcessOfferAvailabilityResponse.class); + taskRunner.run(); + } + + private void startTimeout() { + if (timeoutTimer == null) { + timeoutTimer = UserThread.runAfter(() -> { + log.debug("Timeout reached at " + this); + model.offer.setState(OfferPayload.State.OFFERER_OFFLINE); + errorMessageHandler.handleErrorMessage("Timeout reached: Peer has not responded."); + }, TIMEOUT_SEC); + } else { + log.warn("timeoutTimer already created. That must not happen."); + } + } + + private void stopTimeout() { + if (timeoutTimer != null) { + timeoutTimer.stop(); + timeoutTimer = null; + } + } +} diff --git a/network/src/main/java/io/bisq/protocol/availability/tasks/ProcessOfferAvailabilityResponse.java b/network/src/main/java/io/bisq/protocol/availability/tasks/ProcessOfferAvailabilityResponse.java new file mode 100644 index 0000000000..bc0e327ae8 --- /dev/null +++ b/network/src/main/java/io/bisq/protocol/availability/tasks/ProcessOfferAvailabilityResponse.java @@ -0,0 +1,61 @@ +/* + * This file is part of bisq. + * + * bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with bisq. If not, see . + */ + +package io.bisq.protocol.availability.tasks; + +import io.bisq.common.taskrunner.Task; +import io.bisq.common.taskrunner.TaskRunner; +import io.bisq.messages.availability.AvailabilityResult; +import io.bisq.messages.availability.OfferAvailabilityResponse; +import io.bisq.messages.trade.offer.payload.OfferPayload; +import io.bisq.p2p.protocol.availability.OfferAvailabilityModel; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class ProcessOfferAvailabilityResponse extends Task { + private static final Logger log = LoggerFactory.getLogger(ProcessOfferAvailabilityResponse.class); + + public ProcessOfferAvailabilityResponse(TaskRunner taskHandler, OfferAvailabilityModel model) { + super(taskHandler, model); + } + + @Override + protected void run() { + try { + runInterceptHook(); + OfferAvailabilityResponse offerAvailabilityResponse = model.getMessage(); + + if (model.offer.getState() != OfferPayload.State.REMOVED) { + // TODO: isAvailable is kept for backward compatibility. Can be removed once everyone is on v0.4.9 + if (offerAvailabilityResponse.isAvailable || offerAvailabilityResponse.availabilityResult == AvailabilityResult.AVAILABLE) { + model.offer.setState(OfferPayload.State.AVAILABLE); + } else { + model.offer.setState(OfferPayload.State.NOT_AVAILABLE); + failed("Take offer attempt rejected because of: " + offerAvailabilityResponse.availabilityResult); + } + } + + complete(); + } catch (Throwable t) { + model.offer.setErrorMessage("An error occurred.\n" + + "Error message:\n" + + t.getMessage()); + + failed(t); + } + } +} diff --git a/network/src/main/java/io/bisq/protocol/availability/tasks/SendOfferAvailabilityRequest.java b/network/src/main/java/io/bisq/protocol/availability/tasks/SendOfferAvailabilityRequest.java new file mode 100644 index 0000000000..066d01c0af --- /dev/null +++ b/network/src/main/java/io/bisq/protocol/availability/tasks/SendOfferAvailabilityRequest.java @@ -0,0 +1,65 @@ +/* + * This file is part of bisq. + * + * bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with bisq. If not, see . + */ + +package io.bisq.protocol.availability.tasks; + +import io.bisq.common.taskrunner.Task; +import io.bisq.common.taskrunner.TaskRunner; +import io.bisq.messages.availability.OfferAvailabilityRequest; +import io.bisq.messages.p2p.messaging.SendDirectMessageListener; +import io.bisq.messages.trade.offer.payload.OfferPayload; +import io.bisq.p2p.protocol.availability.OfferAvailabilityModel; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class SendOfferAvailabilityRequest extends Task { + private static final Logger log = LoggerFactory.getLogger(SendOfferAvailabilityRequest.class); + + public SendOfferAvailabilityRequest(TaskRunner taskHandler, OfferAvailabilityModel model) { + super(taskHandler, model); + } + + @Override + protected void run() { + try { + runInterceptHook(); + + model.p2PService.sendEncryptedDirectMessage(model.getPeerNodeAddress(), + model.offer.getPubKeyRing(), + new OfferAvailabilityRequest(model.offer.getId(), model.pubKeyRing, model.getTakersTradePrice()), + new SendDirectMessageListener() { + @Override + public void onArrived() { + complete(); + } + + @Override + public void onFault() { + model.offer.setState(OfferPayload.State.OFFERER_OFFLINE); + } + } + ); + } catch (Throwable t) { + model.offer.setErrorMessage("An error occurred.\n" + + "Error message:\n" + + t.getMessage()); + + failed(t); + } + } +} + diff --git a/network/src/main/java/io/bisq/provider/HttpClientProvider.java b/network/src/main/java/io/bisq/provider/HttpClientProvider.java new file mode 100644 index 0000000000..5f233b6a7e --- /dev/null +++ b/network/src/main/java/io/bisq/provider/HttpClientProvider.java @@ -0,0 +1,21 @@ +package io.bisq.provider; + +import io.bisq.http.HttpClient; + +import java.io.Serializable; + +public abstract class HttpClientProvider implements Serializable { + protected final HttpClient httpClient; + + public HttpClientProvider(HttpClient httpClient, String baseUrl) { + this(httpClient, baseUrl, false); + } + + public HttpClientProvider(HttpClient httpClient, String baseUrl, boolean ignoreSocks5Proxy) { + this.httpClient = httpClient; + + httpClient.setBaseUrl(baseUrl); + + httpClient.setIgnoreSocks5Proxy(ignoreSocks5Proxy); + } +} diff --git a/network/src/main/java/io/bisq/provider/ProvidersRepository.java b/network/src/main/java/io/bisq/provider/ProvidersRepository.java new file mode 100644 index 0000000000..289908aa38 --- /dev/null +++ b/network/src/main/java/io/bisq/provider/ProvidersRepository.java @@ -0,0 +1,62 @@ +package io.bisq.provider; + +import com.google.inject.Inject; +import io.bisq.app.AppOptionKeys; +import io.bisq.network.NetworkOptionKeys; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import javax.inject.Named; +import java.util.Random; + +public class ProvidersRepository { + private static final Logger log = LoggerFactory.getLogger(ProvidersRepository.class); + + private final String[] providerArray; + private String baseUrl; + + + /////////////////////////////////////////////////////////////////////////////////////////// + // Constructor + /////////////////////////////////////////////////////////////////////////////////////////// + + @Inject + public ProvidersRepository(@Named(AppOptionKeys.PROVIDERS) String providers, + @Named(NetworkOptionKeys.USE_LOCALHOST) boolean useLocalhost) { + if (providers.isEmpty()) { + if (useLocalhost) { + // If we run in localhost mode we don't have the tor node running, so we need a clearnet host + // providers = "http://95.85.11.205:8080/"; + + // Use localhost for using a locally running priceprovider + providers = "http://localhost:8080/, http://95.85.11.205:8080/"; + //providers = "http://localhost:8080/"; + } else { + providers = "http://t4wlzy7l6k4hnolg.onion/, http://g27szt7aw2vrtowe.onion/"; + } + } + providerArray = providers.replace(" ", "").split(","); + int index = new Random().nextInt(providerArray.length); + baseUrl = providerArray[index]; + log.info("baseUrl for PriceFeedService: " + baseUrl); + } + + public String getBaseUrl() { + return baseUrl; + } + + public boolean hasMoreProviders() { + return providerArray.length > 1; + } + + public void setNewRandomBaseUrl() { + String newBaseUrl; + do { + int index = new Random().nextInt(providerArray.length); + newBaseUrl = providerArray[index]; + } + while (baseUrl.equals(newBaseUrl)); + baseUrl = newBaseUrl; + log.info("Try new baseUrl after error: " + baseUrl); + } +} diff --git a/network/src/main/java/io/bisq/provider/fee/FeeData.java b/network/src/main/java/io/bisq/provider/fee/FeeData.java new file mode 100644 index 0000000000..c77c33cd13 --- /dev/null +++ b/network/src/main/java/io/bisq/provider/fee/FeeData.java @@ -0,0 +1,14 @@ +package io.bisq.provider.fee; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class FeeData { + private static final Logger log = LoggerFactory.getLogger(FeeData.class); + + public final long txFeePerByte; + + public FeeData(long txFeePerByte) { + this.txFeePerByte = txFeePerByte; + } +} diff --git a/network/src/main/java/io/bisq/provider/fee/FeeProvider.java b/network/src/main/java/io/bisq/provider/fee/FeeProvider.java new file mode 100644 index 0000000000..99799cd667 --- /dev/null +++ b/network/src/main/java/io/bisq/provider/fee/FeeProvider.java @@ -0,0 +1,40 @@ +package io.bisq.provider.fee; + +import com.google.gson.Gson; +import com.google.gson.internal.LinkedTreeMap; +import io.bisq.app.Version; +import io.bisq.common.util.Tuple2; +import io.bisq.http.HttpClient; +import io.bisq.http.HttpException; +import io.bisq.provider.HttpClientProvider; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.IOException; +import java.util.HashMap; +import java.util.Map; + +//TODO use protobuffer instead of json +public class FeeProvider extends HttpClientProvider { + private static final Logger log = LoggerFactory.getLogger(FeeProvider.class); + + public FeeProvider(HttpClient httpClient, String baseUrl) { + super(httpClient, baseUrl, false); + } + + public Tuple2, FeeData> getFees() throws IOException, HttpException { + String json = httpClient.requestWithGET("getFees", "User-Agent", "bisq/" + Version.VERSION + ", uid:" + httpClient.getUid()); + LinkedTreeMap linkedTreeMap = new Gson().fromJson(json, LinkedTreeMap.class); + Map tsMap = new HashMap<>(); + tsMap.put("bitcoinFeesTs", ((Double) linkedTreeMap.get("bitcoinFeesTs")).longValue()); + + LinkedTreeMap dataMap = (LinkedTreeMap) linkedTreeMap.get("data"); + FeeData feeData = new FeeData(dataMap.get("txFee").longValue()); + return new Tuple2<>(tsMap, feeData); + } + + @Override + public String toString() { + return "FeeProvider"; + } +} diff --git a/network/src/main/java/io/bisq/provider/fee/FeeRequest.java b/network/src/main/java/io/bisq/provider/fee/FeeRequest.java new file mode 100644 index 0000000000..86b25a427f --- /dev/null +++ b/network/src/main/java/io/bisq/provider/fee/FeeRequest.java @@ -0,0 +1,40 @@ +package io.bisq.provider.fee; + +import com.google.common.util.concurrent.*; +import io.bisq.common.util.Tuple2; +import io.bisq.common.util.Utilities; +import org.jetbrains.annotations.NotNull; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.util.Map; + +public class FeeRequest { + private static final Logger log = LoggerFactory.getLogger(FeeRequest.class); + + private static final ListeningExecutorService executorService = Utilities.getListeningExecutorService("FeeRequest", 3, 5, 10 * 60); + + public FeeRequest() { + } + + public SettableFuture, FeeData>> getFees(FeeProvider provider) { + final SettableFuture, FeeData>> resultFuture = SettableFuture.create(); + ListenableFuture, FeeData>> future = executorService.submit(() -> { + Thread.currentThread().setName("FeeRequest-" + provider.toString()); + return provider.getFees(); + }); + + Futures.addCallback(future, new FutureCallback, FeeData>>() { + public void onSuccess(Tuple2, FeeData> feeData) { + log.debug("Received feeData of {}\nfrom provider {}", feeData, provider); + resultFuture.set(feeData); + } + + public void onFailure(@NotNull Throwable throwable) { + resultFuture.setException(throwable); + } + }); + + return resultFuture; + } +} diff --git a/network/src/main/java/io/bisq/provider/fee/FeeService.java b/network/src/main/java/io/bisq/provider/fee/FeeService.java new file mode 100644 index 0000000000..55332d5fbf --- /dev/null +++ b/network/src/main/java/io/bisq/provider/fee/FeeService.java @@ -0,0 +1,155 @@ +/* + * This file is part of bisq. + * + * bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with bisq. If not, see . + */ + +package io.bisq.provider.fee; + +import com.google.common.util.concurrent.FutureCallback; +import com.google.common.util.concurrent.Futures; +import com.google.common.util.concurrent.SettableFuture; +import com.google.inject.Inject; +import io.bisq.common.UserThread; +import io.bisq.common.handlers.FaultHandler; +import io.bisq.common.util.Tuple2; +import io.bisq.http.HttpClient; +import io.bisq.provider.ProvidersRepository; +import org.bitcoinj.core.Coin; +import org.jetbrains.annotations.NotNull; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import javax.annotation.Nullable; +import java.time.Instant; +import java.util.Map; + +import static com.google.common.base.Preconditions.checkNotNull; + +public class FeeService { + private static final Logger log = LoggerFactory.getLogger(FeeService.class); + + public static final long MIN_TX_FEE = 60; // satoshi/byte + public static final long MAX_TX_FEE = 300; + public static final long DEFAULT_TX_FEE = 150; + + public static final long MIN_CREATE_OFFER_FEE_IN_BTC = 10_000; + public static final long MAX_CREATE_OFFER_FEE_IN_BTC = 500_000; + public static final long DEFAULT_CREATE_OFFER_FEE_IN_BTC_PER_BTC = 30_000; // excluded mining fee + + public static final long MIN_TAKE_OFFER_FEE_IN_BTC = 10_000; + public static final long MAX_TAKE_OFFER_FEE_IN_BTC = 1000_000; + public static final long DEFAULT_TAKE_OFFER_FEE_IN_BTC_PER_BTC = 40_000; // excluded mining fee + + // 0.00216 btc is for 3 x tx fee for taker -> about 2 EUR! + + public static final long MIN_PAUSE_BETWEEN_REQUESTS_IN_MIN = 10; + + private final FeeProvider feeProvider; + @Nullable + private FeeData feeData; + private Map timeStampMap; + private long epochInSecondAtLastRequest; + private long lastRequest; + + /////////////////////////////////////////////////////////////////////////////////////////// + // Constructor + /////////////////////////////////////////////////////////////////////////////////////////// + + @Inject + public FeeService(HttpClient httpClient, + ProvidersRepository providersRepository) { + this.feeProvider = new FeeProvider(httpClient, providersRepository.getBaseUrl()); + } + + public void onAllServicesInitialized() { + requestFees(null, null); + } + + public void requestFees(@Nullable Runnable resultHandler, @Nullable FaultHandler faultHandler) { + long now = Instant.now().getEpochSecond(); + if (feeData == null || now - lastRequest > MIN_PAUSE_BETWEEN_REQUESTS_IN_MIN * 60) { + lastRequest = now; + FeeRequest feeRequest = new FeeRequest(); + SettableFuture, FeeData>> future = feeRequest.getFees(feeProvider); + Futures.addCallback(future, new FutureCallback, FeeData>>() { + @Override + public void onSuccess(@Nullable Tuple2, FeeData> result) { + UserThread.execute(() -> { + checkNotNull(result, "Result must not be null at getFees"); + timeStampMap = result.first; + epochInSecondAtLastRequest = timeStampMap.get("bitcoinFeesTs"); + feeData = result.second; + log.info("Tx fee: txFeePerByte=" + feeData.txFeePerByte); + if (resultHandler != null) + resultHandler.run(); + }); + } + + @Override + public void onFailure(@NotNull Throwable throwable) { + log.warn("Could not load fees. " + throwable.toString()); + if (faultHandler != null) + UserThread.execute(() -> faultHandler.handleFault("Could not load fees", throwable)); + } + }); + } else { + log.debug("We got a requestFees called again before min pause of {} minutes has passed.", MIN_PAUSE_BETWEEN_REQUESTS_IN_MIN); + UserThread.execute(() -> { + if (resultHandler != null) + resultHandler.run(); + }); + } + } + + public Coin getTxFee(int sizeInBytes) { + return getTxFeePerByte().multiply(sizeInBytes); + } + + public Coin getTxFeePerByte() { + if (feeData != null) + return Coin.valueOf(feeData.txFeePerByte); + else + return Coin.valueOf(DEFAULT_TX_FEE); + } + + // TODO we will get that from the DAO voting + public Coin getCreateOfferFeeInBtcPerBtc() { + return Coin.valueOf(DEFAULT_CREATE_OFFER_FEE_IN_BTC_PER_BTC); + } + + public Coin getMinCreateOfferFeeInBtc() { + return Coin.valueOf(MIN_CREATE_OFFER_FEE_IN_BTC); + } + + public Coin getMinTakeOfferFeeInBtc() { + return Coin.valueOf(MIN_TAKE_OFFER_FEE_IN_BTC); + } + + // TODO we will get that from the DAO voting + public Coin getTakeOfferFeeInBtcPerBtc() { + return Coin.valueOf(DEFAULT_TAKE_OFFER_FEE_IN_BTC_PER_BTC); + } + + public Coin getCreateCompensationRequestFee() { + //TODO + return Coin.valueOf(1000); + } + + public Coin getVotingTxFee() { + //TODO + return Coin.valueOf(999); + } + +} diff --git a/network/src/main/java/io/bisq/provider/price/MarketPrice.java b/network/src/main/java/io/bisq/provider/price/MarketPrice.java new file mode 100644 index 0000000000..2fffc53232 --- /dev/null +++ b/network/src/main/java/io/bisq/provider/price/MarketPrice.java @@ -0,0 +1,69 @@ +package io.bisq.provider.price; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class MarketPrice { + private static final Logger log = LoggerFactory.getLogger(MarketPrice.class); + public final String currencyCode; + public final double ask; + public final double bid; + public final double last; + + public MarketPrice(String currencyCode, double ask, double bid, double last) { + this.currencyCode = currencyCode; + this.ask = ask; + this.bid = bid; + this.last = last; + } + + public double getPrice(PriceFeedService.Type type) { + switch (type) { + case ASK: + return ask; + case BID: + return (bid); + case LAST: + return last; + } + return 0; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (!(o instanceof MarketPrice)) return false; + + MarketPrice that = (MarketPrice) o; + + if (Double.compare(that.ask, ask) != 0) return false; + if (Double.compare(that.bid, bid) != 0) return false; + if (Double.compare(that.last, last) != 0) return false; + return !(currencyCode != null ? !currencyCode.equals(that.currencyCode) : that.currencyCode != null); + + } + + @Override + public int hashCode() { + int result; + long temp; + result = currencyCode != null ? currencyCode.hashCode() : 0; + temp = Double.doubleToLongBits(ask); + result = 31 * result + (int) (temp ^ (temp >>> 32)); + temp = Double.doubleToLongBits(bid); + result = 31 * result + (int) (temp ^ (temp >>> 32)); + temp = Double.doubleToLongBits(last); + result = 31 * result + (int) (temp ^ (temp >>> 32)); + return result; + } + + @Override + public String toString() { + return "MarketPrice{" + + "currencyCode='" + currencyCode + '\'' + + ", ask='" + ask + '\'' + + ", bid='" + bid + '\'' + + ", last='" + last + '\'' + + '}'; + } +} diff --git a/network/src/main/java/io/bisq/provider/price/PriceFeedService.java b/network/src/main/java/io/bisq/provider/price/PriceFeedService.java new file mode 100644 index 0000000000..d05c7264a7 --- /dev/null +++ b/network/src/main/java/io/bisq/provider/price/PriceFeedService.java @@ -0,0 +1,234 @@ +package io.bisq.provider.price; + +import com.google.common.util.concurrent.FutureCallback; +import com.google.common.util.concurrent.Futures; +import com.google.common.util.concurrent.SettableFuture; +import com.google.inject.Inject; +import io.bisq.app.Log; +import io.bisq.common.UserThread; +import io.bisq.common.handlers.FaultHandler; +import io.bisq.common.util.Tuple2; +import io.bisq.http.HttpClient; +import io.bisq.locale.Res; +import io.bisq.provider.ProvidersRepository; +import javafx.beans.property.*; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import javax.annotation.Nullable; +import java.time.Instant; +import java.util.Date; +import java.util.HashMap; +import java.util.Map; +import java.util.Random; +import java.util.function.Consumer; + +import static com.google.common.base.Preconditions.checkNotNull; + +public class PriceFeedService { + private static final Logger log = LoggerFactory.getLogger(PriceFeedService.class); + + private final HttpClient httpClient; + private final ProvidersRepository providersRepository; + + + /////////////////////////////////////////////////////////////////////////////////////////// + // Enum + /////////////////////////////////////////////////////////////////////////////////////////// + + public enum Type { + ASK(Res.get("marketPrice.ask")), + BID(Res.get("marketPrice.bid")), + LAST(Res.get("marketPrice.last")); + + public final String name; + + Type(String name) { + this.name = name; + } + } + + private static final long PERIOD_SEC = 60; + + private final Map cache = new HashMap<>(); + private PriceProvider priceProvider; + private Consumer priceConsumer; + private FaultHandler faultHandler; + private Type type; + private String currencyCode; + private final StringProperty currencyCodeProperty = new SimpleStringProperty(); + private final ObjectProperty typeProperty = new SimpleObjectProperty<>(); + private final IntegerProperty currenciesUpdateFlag = new SimpleIntegerProperty(0); + private long epochInSecondAtLastRequest; + private Map timeStampMap = new HashMap<>(); + private int retryCounter = 0; + private int retryDelay = 1; + + + /////////////////////////////////////////////////////////////////////////////////////////// + // Constructor + /////////////////////////////////////////////////////////////////////////////////////////// + + @Inject + public PriceFeedService(HttpClient httpClient, ProvidersRepository providersRepository) { + this.httpClient = httpClient; + this.providersRepository = providersRepository; + this.priceProvider = new PriceProvider(httpClient, providersRepository.getBaseUrl()); + } + + + /////////////////////////////////////////////////////////////////////////////////////////// + // API + /////////////////////////////////////////////////////////////////////////////////////////// + + public void init(Consumer resultHandler, FaultHandler faultHandler) { + this.priceConsumer = resultHandler; + this.faultHandler = faultHandler; + + request(); + } + + + private void request() { + requestAllPrices(priceProvider, () -> { + applyPriceToConsumer(); + // after first response we know the providers timestamp and want to request quickly after next expected update + long delay = Math.max(40, Math.min(90, PERIOD_SEC - (Instant.now().getEpochSecond() - epochInSecondAtLastRequest) + 2 + new Random().nextInt(5))); + UserThread.runAfter(this::request, delay); + retryDelay = 1; + }, (errorMessage, throwable) -> { + // Try other provider if more then 1 is available + if (providersRepository.hasMoreProviders()) { + providersRepository.setNewRandomBaseUrl(); + priceProvider = new PriceProvider(httpClient, providersRepository.getBaseUrl()); + } + UserThread.runAfter(() -> { + retryCounter++; + retryDelay *= retryCounter; + request(); + }, retryDelay); + + this.faultHandler.handleFault(errorMessage, throwable); + }); + } + + @Nullable + public MarketPrice getMarketPrice(String currencyCode) { + if (cache.containsKey(currencyCode)) + return cache.get(currencyCode); + else + return null; + } + + /////////////////////////////////////////////////////////////////////////////////////////// + // Setter + /////////////////////////////////////////////////////////////////////////////////////////// + + public void setType(Type type) { + this.type = type; + typeProperty.set(type); + applyPriceToConsumer(); + } + + public void setCurrencyCode(String currencyCode) { + if (this.currencyCode == null || !this.currencyCode.equals(currencyCode)) { + this.currencyCode = currencyCode; + currencyCodeProperty.set(currencyCode); + applyPriceToConsumer(); + } + } + + + /////////////////////////////////////////////////////////////////////////////////////////// + // Getter + /////////////////////////////////////////////////////////////////////////////////////////// + + public Type getType() { + return type; + } + + public String getCurrencyCode() { + return currencyCode; + } + + public StringProperty currencyCodeProperty() { + return currencyCodeProperty; + } + + public ObjectProperty typeProperty() { + return typeProperty; + } + + public IntegerProperty currenciesUpdateFlagProperty() { + return currenciesUpdateFlag; + } + + public Date getLastRequestTimeStampBtcAverage() { + return new Date(epochInSecondAtLastRequest * 1000); + } + + public Date getLastRequestTimeStampPoloniex() { + Long ts = timeStampMap.get("btcAverageTs"); + if (ts != null) { + Date date = new Date(ts * 1000); + return date; + } else + return new Date(); + } + + public Date getLastRequestTimeStampCoinmarketcap() { + Long ts = timeStampMap.get("coinmarketcapTs"); + if (ts != null) { + Date date = new Date(ts * 1000); + return date; + } else + return new Date(); + } + + + /////////////////////////////////////////////////////////////////////////////////////////// + // Private + /////////////////////////////////////////////////////////////////////////////////////////// + + private void applyPriceToConsumer() { + if (priceConsumer != null && currencyCode != null && type != null) { + if (cache.containsKey(currencyCode)) { + try { + MarketPrice marketPrice = cache.get(currencyCode); + priceConsumer.accept(marketPrice.getPrice(type)); + } catch (Throwable t) { + log.warn("Error at applyPriceToConsumer " + t.getMessage()); + } + + } else { + String errorMessage = "We don't have a price for " + currencyCode; + log.debug(errorMessage); + faultHandler.handleFault(errorMessage, new PriceRequestException(errorMessage)); + } + } + currenciesUpdateFlag.setValue(currenciesUpdateFlag.get() + 1); + } + + private void requestAllPrices(PriceProvider provider, Runnable resultHandler, FaultHandler faultHandler) { + Log.traceCall(); + PriceRequest priceRequest = new PriceRequest(); + SettableFuture, Map>> future = priceRequest.requestAllPrices(provider); + Futures.addCallback(future, new FutureCallback, Map>>() { + @Override + public void onSuccess(@Nullable Tuple2, Map> result) { + UserThread.execute(() -> { + checkNotNull(result, "Result must not be null at requestAllPrices"); + timeStampMap = result.first; + epochInSecondAtLastRequest = timeStampMap.get("btcAverageTs"); + cache.putAll(result.second); + resultHandler.run(); + }); + } + + @Override + public void onFailure(Throwable throwable) { + UserThread.execute(() -> faultHandler.handleFault("Could not load marketPrices", throwable)); + } + }); + } +} diff --git a/network/src/main/java/io/bisq/provider/price/PriceProvider.java b/network/src/main/java/io/bisq/provider/price/PriceProvider.java new file mode 100644 index 0000000000..062216c603 --- /dev/null +++ b/network/src/main/java/io/bisq/provider/price/PriceProvider.java @@ -0,0 +1,47 @@ +package io.bisq.provider.price; + +import com.google.gson.Gson; +import com.google.gson.internal.LinkedTreeMap; +import io.bisq.app.Version; +import io.bisq.common.util.Tuple2; +import io.bisq.http.HttpClient; +import io.bisq.http.HttpException; +import io.bisq.provider.HttpClientProvider; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class PriceProvider extends HttpClientProvider { + private static final Logger log = LoggerFactory.getLogger(PriceProvider.class); + + public PriceProvider(HttpClient httpClient, String baseUrl) { + super(httpClient, baseUrl, false); + } + + public Tuple2, Map> getAll() throws IOException, HttpException { + Map marketPriceMap = new HashMap<>(); + String json = httpClient.requestWithGET("getAllMarketPrices", "User-Agent", "bisq/" + Version.VERSION + ", uid:" + httpClient.getUid()); + LinkedTreeMap map = new Gson().fromJson(json, LinkedTreeMap.class); + Map tsMap = new HashMap<>(); + tsMap.put("btcAverageTs", ((Double) map.get("btcAverageTs")).longValue()); + tsMap.put("poloniexTs", ((Double) map.get("poloniexTs")).longValue()); + tsMap.put("coinmarketcapTs", ((Double) map.get("coinmarketcapTs")).longValue()); + + List> list = (ArrayList>) map.get("data"); + list.stream().forEach(treeMap -> { + marketPriceMap.put((String) treeMap.get("c"), + new MarketPrice((String) treeMap.get("c"), (double) treeMap.get("a"), (double) treeMap.get("b"), (double) treeMap.get("l"))); + }); + return new Tuple2<>(tsMap, marketPriceMap); + } + + @Override + public String toString() { + return "PriceProvider"; + } +} diff --git a/network/src/main/java/io/bisq/provider/price/PriceRequest.java b/network/src/main/java/io/bisq/provider/price/PriceRequest.java new file mode 100644 index 0000000000..a00288d50c --- /dev/null +++ b/network/src/main/java/io/bisq/provider/price/PriceRequest.java @@ -0,0 +1,40 @@ +package io.bisq.provider.price; + +import com.google.common.util.concurrent.*; +import io.bisq.common.util.Tuple2; +import io.bisq.common.util.Utilities; +import org.jetbrains.annotations.NotNull; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.util.Map; + +public class PriceRequest { + private static final Logger log = LoggerFactory.getLogger(PriceRequest.class); + + private static final ListeningExecutorService executorService = Utilities.getListeningExecutorService("PriceRequest", 3, 5, 10 * 60); + + public PriceRequest() { + } + + public SettableFuture, Map>> requestAllPrices(PriceProvider provider) { + final SettableFuture, Map>> resultFuture = SettableFuture.create(); + ListenableFuture, Map>> future = executorService.submit(() -> { + Thread.currentThread().setName("PriceRequest-" + provider.toString()); + return provider.getAll(); + }); + + Futures.addCallback(future, new FutureCallback, Map>>() { + public void onSuccess(Tuple2, Map> marketPriceTuple) { + log.debug("Received marketPriceTuple of {}\nfrom provider {}", marketPriceTuple, provider); + resultFuture.set(marketPriceTuple); + } + + public void onFailure(@NotNull Throwable throwable) { + resultFuture.setException(throwable); + } + }); + + return resultFuture; + } +} diff --git a/network/src/main/java/io/bisq/provider/price/PriceRequestException.java b/network/src/main/java/io/bisq/provider/price/PriceRequestException.java new file mode 100644 index 0000000000..4248e2c5cb --- /dev/null +++ b/network/src/main/java/io/bisq/provider/price/PriceRequestException.java @@ -0,0 +1,7 @@ +package io.bisq.provider.price; + +public class PriceRequestException extends Exception { + public PriceRequestException(String message) { + super(message); + } +} diff --git a/network/src/main/java/io/bisq/user/BlockChainExplorer.java b/network/src/main/java/io/bisq/user/BlockChainExplorer.java new file mode 100644 index 0000000000..c06b13baf1 --- /dev/null +++ b/network/src/main/java/io/bisq/user/BlockChainExplorer.java @@ -0,0 +1,40 @@ +/* + * This file is part of bisq. + * + * bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with bisq. If not, see . + */ + +package io.bisq.user; + +import io.bisq.app.Version; +import io.bisq.common.persistance.Persistable; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public final class BlockChainExplorer implements Persistable { + // That object is saved to disc. We need to take care of changes to not break deserialization. + private static final long serialVersionUID = Version.LOCAL_DB_VERSION; + + private static final Logger log = LoggerFactory.getLogger(BlockChainExplorer.class); + + public final String name; + public final String txUrl; + public final String addressUrl; + + public BlockChainExplorer(String name, String txUrl, String addressUrl) { + this.name = name; + this.txUrl = txUrl; + this.addressUrl = addressUrl; + } +} diff --git a/network/src/main/java/io/bisq/user/Preferences.java b/network/src/main/java/io/bisq/user/Preferences.java new file mode 100644 index 0000000000..8d1ab0425a --- /dev/null +++ b/network/src/main/java/io/bisq/user/Preferences.java @@ -0,0 +1,715 @@ +/* + * This file is part of bisq. + * + * bisq is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * bisq is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with bisq. If not, see . + */ + +package io.bisq.user; + +import io.bisq.app.BisqEnvironment; +import io.bisq.app.DevEnv; +import io.bisq.app.Version; +import io.bisq.common.persistance.Persistable; +import io.bisq.common.util.Utilities; +import io.bisq.locale.*; +import io.bisq.messages.btc.BitcoinNetwork; +import io.bisq.messages.btc.BtcOptionKeys; +import io.bisq.messages.btc.Restrictions; +import io.bisq.provider.fee.FeeService; +import io.bisq.storage.Storage; +import javafx.beans.property.*; +import javafx.collections.FXCollections; +import javafx.collections.ListChangeListener; +import javafx.collections.ObservableList; +import org.bitcoinj.core.Coin; +import org.bitcoinj.utils.MonetaryFormat; +import org.jetbrains.annotations.NotNull; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import javax.inject.Inject; +import javax.inject.Named; +import java.util.*; + +public final class Preferences implements Persistable { + // That object is saved to disc. We need to take care of changes to not break deserialization. + private static final long serialVersionUID = Version.LOCAL_DB_VERSION; + + private static final Logger log = LoggerFactory.getLogger(Preferences.class); + + public static Preferences INSTANCE; + + + static { + defaultLocale = Locale.getDefault(); + Res.applyLocaleToResourceBundle(getDefaultLocale()); + } + + + // Deactivate mBit for now as most screens are not supporting it yet + private static final List BTC_DENOMINATIONS = Arrays.asList(MonetaryFormat.CODE_BTC/*, MonetaryFormat.CODE_MBTC*/); + + transient static final private ArrayList blockChainExplorersTestNet = new ArrayList<>(Arrays.asList( + new BlockChainExplorer("Blocktrail", "https://www.blocktrail.com/tBTC/tx/", "https://www.blocktrail.com/tBTC/address/"), + new BlockChainExplorer("Blockexplorer", "https://blockexplorer.com/testnet/tx/", "https://blockexplorer.com/testnet/address/"), + new BlockChainExplorer("Blockr.io", "https://tbtc.blockr.io/tx/info/", "https://tbtc.blockr.io/address/info/"), + new BlockChainExplorer("Biteasy", "https://www.biteasy.com/testnet/transactions/", "https://www.biteasy.com/testnet/addresses/"), + new BlockChainExplorer("Smartbit", "https://testnet.smartbit.com.au/tx/", "https://testnet.smartbit.com.au/address/"), + new BlockChainExplorer("SoChain. Wow.", "https://chain.so/tx/BTCTEST/", "https://chain.so/address/BTCTEST/") + )); + + transient static final private ArrayList blockChainExplorersMainNet = new ArrayList<>(Arrays.asList( + new BlockChainExplorer("Tradeblock.com", "https://tradeblock.com/bitcoin/tx/", "https://tradeblock.com/bitcoin/address/"), + new BlockChainExplorer("Blocktrail", "https://www.blocktrail.com/BTC/tx/", "https://www.blocktrail.com/BTC/address/"), + new BlockChainExplorer("Insight", "https://insight.bitpay.com/tx/", "https://insight.bitpay.com/address/"), + new BlockChainExplorer("Blockchain.info", "https://blockchain.info/tx/", "https://blockchain.info/address/"), + new BlockChainExplorer("Blockexplorer", "https://blockexplorer.com/tx/", "https://blockexplorer.com/address/"), + new BlockChainExplorer("Blockr.io", "https://btc.blockr.io/tx/info/", "https://btc.blockr.io/address/info/"), + new BlockChainExplorer("Biteasy", "https://www.biteasy.com/transactions/", "https://www.biteasy.com/addresses/"), + new BlockChainExplorer("Blockonomics", "https://www.blockonomics.co/api/tx?txid=", "https://www.blockonomics.co/#/search?q="), + new BlockChainExplorer("Chainflyer", "http://chainflyer.bitflyer.jp/Transaction/", "http://chainflyer.bitflyer.jp/Address/"), + new BlockChainExplorer("Smartbit", "https://www.smartbit.com.au/tx/", "https://www.smartbit.com.au/address/"), + new BlockChainExplorer("SoChain. Wow.", "https://chain.so/tx/BTC/", "https://chain.so/address/BTC/"), + new BlockChainExplorer("Bitaps", "https://bitaps.com/", "https://bitaps.com/") + )); + + public static List getBtcDenominations() { + return BTC_DENOMINATIONS; + } + + private static Locale defaultLocale; + + public static Locale getDefaultLocale() { + return defaultLocale; + } + + private static TradeCurrency defaultTradeCurrency = CurrencyUtil.getCurrencyByCountryCode(CountryUtil.getDefaultCountryCode(defaultLocale), defaultLocale); + + public static TradeCurrency getDefaultTradeCurrency() { + return defaultTradeCurrency; + } + + private static boolean staticUseAnimations = true; + + transient private final Storage storage; + transient private final BisqEnvironment bisqEnvironment; + + transient private BitcoinNetwork bitcoinNetwork; + + // Persisted fields + private String userLanguage = LanguageUtil.getDefaultLanguage(Preferences.getDefaultLocale()); + private Country userCountry = CountryUtil.getDefaultCountry(Preferences.getDefaultLocale()); + private String btcDenomination = MonetaryFormat.CODE_BTC; + private boolean useAnimations = DevEnv.STRESS_TEST_MODE ? false : true; + private final ArrayList fiatCurrencies; + private final ArrayList cryptoCurrencies; + private BlockChainExplorer blockChainExplorerMainNet; + private BlockChainExplorer blockChainExplorerTestNet; + private String backupDirectory; + private boolean autoSelectArbitrators = true; + private final Map dontShowAgainMap; + private boolean tacAccepted; + private boolean useTorForBitcoinJ = true; + + private boolean showOwnOffersInOfferBook = true; + private Locale preferredLocale; + private TradeCurrency preferredTradeCurrency; + private long withdrawalTxFeeInBytes = 100; + private boolean useCustomWithdrawalTxFee = false; + + private double maxPriceDistanceInPercent; + private String offerBookChartScreenCurrencyCode = Preferences.getDefaultTradeCurrency().getCode(); + private String tradeChartsScreenCurrencyCode = Preferences.getDefaultTradeCurrency().getCode(); + + private String buyScreenCurrencyCode = Preferences.getDefaultTradeCurrency().getCode(); + private String sellScreenCurrencyCode = Preferences.getDefaultTradeCurrency().getCode(); + private int tradeStatisticsTickUnitIndex = 3; + + private boolean useStickyMarketPrice = false; + private boolean sortMarketCurrenciesNumerically = true; + private boolean usePercentageBasedPrice = true; + private Map peerTagMap = new HashMap<>(); + private String bitcoinNodes = ""; + + private List ignoreTradersList = new ArrayList<>(); + private String directoryChooserPath; + private long securityDepositAsLong = Restrictions.DEFAULT_SECURITY_DEPOSIT.value; + + // Observable wrappers + transient private final StringProperty btcDenominationProperty = new SimpleStringProperty(btcDenomination); + transient private final BooleanProperty useAnimationsProperty = new SimpleBooleanProperty(useAnimations); + transient private final BooleanProperty useCustomWithdrawalTxFeeProperty = new SimpleBooleanProperty(useCustomWithdrawalTxFee); + transient private final LongProperty withdrawalTxFeeInBytesProperty = new SimpleLongProperty(withdrawalTxFeeInBytes); + transient private final ObservableList fiatCurrenciesAsObservable = FXCollections.observableArrayList(); + transient private final ObservableList cryptoCurrenciesAsObservable = FXCollections.observableArrayList(); + transient private final ObservableList tradeCurrenciesAsObservable = FXCollections.observableArrayList(); + + + /////////////////////////////////////////////////////////////////////////////////////////// + // Constructor + /////////////////////////////////////////////////////////////////////////////////////////// + + @SuppressWarnings("WeakerAccess") + @Inject + public Preferences(Storage storage, BisqEnvironment bisqEnvironment, + FeeService feeService, + @Named(BtcOptionKeys.BTC_NODES) String btcNodesFromOptions, + @Named(BtcOptionKeys.USE_TOR_FOR_BTC) String useTorFlagFromOptions) { + INSTANCE = this; + this.storage = storage; + this.bisqEnvironment = bisqEnvironment; + + directoryChooserPath = Utilities.getSystemHomeDirectory(); + + fiatCurrencies = new ArrayList<>(fiatCurrenciesAsObservable); + cryptoCurrencies = new ArrayList<>(cryptoCurrenciesAsObservable); + + btcDenominationProperty.addListener((ov) -> { + btcDenomination = btcDenominationProperty.get(); + storage.queueUpForSave(); + }); + useAnimationsProperty.addListener((ov) -> { + useAnimations = useAnimationsProperty.get(); + staticUseAnimations = useAnimations; + storage.queueUpForSave(); + }); + fiatCurrenciesAsObservable.addListener((javafx.beans.Observable ov) -> { + fiatCurrencies.clear(); + fiatCurrencies.addAll(fiatCurrenciesAsObservable); + fiatCurrencies.sort(TradeCurrency::compareTo); + storage.queueUpForSave(); + }); + cryptoCurrenciesAsObservable.addListener((javafx.beans.Observable ov) -> { + cryptoCurrencies.clear(); + cryptoCurrencies.addAll(cryptoCurrenciesAsObservable); + cryptoCurrencies.sort(TradeCurrency::compareTo); + storage.queueUpForSave(); + }); + + useCustomWithdrawalTxFeeProperty.addListener((ov) -> { + useCustomWithdrawalTxFee = useCustomWithdrawalTxFeeProperty.get(); + storage.queueUpForSave(); + }); + + withdrawalTxFeeInBytesProperty.addListener((ov) -> { + withdrawalTxFeeInBytes = withdrawalTxFeeInBytesProperty.get(); + storage.queueUpForSave(); + }); + + Preferences persisted = storage.initAndGetPersisted(this); + if (persisted != null) { + setBtcDenomination(persisted.btcDenomination); + setUseAnimations(persisted.useAnimations); + + setFiatCurrencies(persisted.fiatCurrencies); + setCryptoCurrencies(persisted.cryptoCurrencies); + + setBlockChainExplorerTestNet(persisted.getBlockChainExplorerTestNet()); + setBlockChainExplorerMainNet(persisted.getBlockChainExplorerMainNet()); + + setUseCustomWithdrawalTxFee(persisted.useCustomWithdrawalTxFee); + setWithdrawalTxFeeInBytes(persisted.withdrawalTxFeeInBytes); + + // In case of an older version without that data we set it to defaults + if (blockChainExplorerTestNet == null) + setBlockChainExplorerTestNet(blockChainExplorersTestNet.get(0)); + if (blockChainExplorerMainNet == null) + setBlockChainExplorerTestNet(blockChainExplorersMainNet.get(0)); + + backupDirectory = persisted.getBackupDirectory(); + autoSelectArbitrators = persisted.getAutoSelectArbitrators(); + dontShowAgainMap = persisted.getDontShowAgainMap(); + tacAccepted = persisted.getTacAccepted(); + + userLanguage = persisted.getUserLanguage(); + if (userLanguage == null) + userLanguage = LanguageUtil.getDefaultLanguage(Preferences.getDefaultLocale()); + userCountry = persisted.getUserCountry(); + if (userCountry == null) + userCountry = CountryUtil.getDefaultCountry(Preferences.getDefaultLocale()); + updateDefaultLocale(); + preferredTradeCurrency = persisted.getPreferredTradeCurrency(); + defaultTradeCurrency = preferredTradeCurrency; + useTorForBitcoinJ = persisted.getUseTorForBitcoinJ(); + + useStickyMarketPrice = persisted.getUseStickyMarketPrice(); + sortMarketCurrenciesNumerically = persisted.getSortMarketCurrenciesNumerically(); + + usePercentageBasedPrice = persisted.getUsePercentageBasedPrice(); + showOwnOffersInOfferBook = persisted.getShowOwnOffersInOfferBook(); + maxPriceDistanceInPercent = persisted.getMaxPriceDistanceInPercent(); + + bitcoinNodes = persisted.getBitcoinNodes(); + if (bitcoinNodes == null) + bitcoinNodes = ""; + + if (persisted.getPeerTagMap() != null) + peerTagMap = persisted.getPeerTagMap(); + + offerBookChartScreenCurrencyCode = persisted.getOfferBookChartScreenCurrencyCode(); + buyScreenCurrencyCode = persisted.getBuyScreenCurrencyCode(); + sellScreenCurrencyCode = persisted.getSellScreenCurrencyCode(); + tradeChartsScreenCurrencyCode = persisted.getTradeChartsScreenCurrencyCode(); + tradeStatisticsTickUnitIndex = persisted.getTradeStatisticsTickUnitIndex(); + + if (persisted.getIgnoreTradersList() != null) + ignoreTradersList = persisted.getIgnoreTradersList(); + + if (persisted.getDirectoryChooserPath() != null) + directoryChooserPath = persisted.getDirectoryChooserPath(); + + securityDepositAsLong = persisted.getSecurityDepositAsLong(); + } else { + setFiatCurrencies(CurrencyUtil.getAllMainFiatCurrencies(Preferences.getDefaultLocale(), Preferences.getDefaultTradeCurrency())); + setCryptoCurrencies(CurrencyUtil.getMainCryptoCurrencies()); + + setBlockChainExplorerTestNet(blockChainExplorersTestNet.get(0)); + setBlockChainExplorerMainNet(blockChainExplorersMainNet.get(0)); + + dontShowAgainMap = new HashMap<>(); + preferredLocale = getDefaultLocale(); + preferredTradeCurrency = getDefaultTradeCurrency(); + maxPriceDistanceInPercent = 0.1; + + storage.queueUpForSave(); + } + + this.bitcoinNetwork = bisqEnvironment.getBitcoinNetwork(); + + fiatCurrenciesAsObservable.addListener(this::updateTradeCurrencies); + cryptoCurrenciesAsObservable.addListener(this::updateTradeCurrencies); + tradeCurrenciesAsObservable.addAll(fiatCurrencies); + tradeCurrenciesAsObservable.addAll(cryptoCurrencies); + + // Override settings with options if set + if (useTorFlagFromOptions != null && !useTorFlagFromOptions.isEmpty()) { + if (useTorFlagFromOptions.equals("false")) + setUseTorForBitcoinJ(false); + else if (useTorFlagFromOptions.equals("true")) + setUseTorForBitcoinJ(true); + } + + if (btcNodesFromOptions != null && !btcNodesFromOptions.isEmpty()) + setBitcoinNodes(btcNodesFromOptions); + + if (bitcoinNodes.equals("127.0.0.1") || bitcoinNodes.equals("localhost")) + setUseTorForBitcoinJ(false); + } + + public void dontShowAgain(String key, boolean dontShowAgain) { + dontShowAgainMap.put(key, dontShowAgain); + storage.queueUpForSave(); + } + + public void resetDontShowAgainForType() { + dontShowAgainMap.clear(); + storage.queueUpForSave(); + } + + + /////////////////////////////////////////////////////////////////////////////////////////// + // Setter + /////////////////////////////////////////////////////////////////////////////////////////// + + public void setBtcDenomination(String btcDenomination) { + this.btcDenominationProperty.set(btcDenomination); + } + + public void setUseAnimations(boolean useAnimations) { + this.useAnimationsProperty.set(useAnimations); + } + + public void setBitcoinNetwork(BitcoinNetwork bitcoinNetwork) { + if (this.bitcoinNetwork != bitcoinNetwork) + bisqEnvironment.saveBitcoinNetwork(bitcoinNetwork); + + this.bitcoinNetwork = bitcoinNetwork; + + // We don't store the bitcoinNetwork locally as BitcoinNetwork is not serializable! + } + + public void addFiatCurrency(FiatCurrency tradeCurrency) { + if (!fiatCurrenciesAsObservable.contains(tradeCurrency)) + fiatCurrenciesAsObservable.add(tradeCurrency); + } + + public void removeFiatCurrency(FiatCurrency tradeCurrency) { + if (tradeCurrenciesAsObservable.size() > 1) { + if (fiatCurrenciesAsObservable.contains(tradeCurrency)) + fiatCurrenciesAsObservable.remove(tradeCurrency); + + if (preferredTradeCurrency.equals(tradeCurrency)) + setPreferredTradeCurrency(tradeCurrenciesAsObservable.get(0)); + } else { + log.error("you cannot remove the last currency"); + } + } + + public void addCryptoCurrency(CryptoCurrency tradeCurrency) { + if (!cryptoCurrenciesAsObservable.contains(tradeCurrency)) + cryptoCurrenciesAsObservable.add(tradeCurrency); + } + + public void removeCryptoCurrency(CryptoCurrency tradeCurrency) { + if (tradeCurrenciesAsObservable.size() > 1) { + if (cryptoCurrenciesAsObservable.contains(tradeCurrency)) + cryptoCurrenciesAsObservable.remove(tradeCurrency); + + if (preferredTradeCurrency.equals(tradeCurrency)) + setPreferredTradeCurrency(tradeCurrenciesAsObservable.get(0)); + } else { + log.error("you cannot remove the last currency"); + } + } + + public void setBlockChainExplorer(BlockChainExplorer blockChainExplorer) { + if (bitcoinNetwork == BitcoinNetwork.MAINNET) + setBlockChainExplorerMainNet(blockChainExplorer); + else + setBlockChainExplorerTestNet(blockChainExplorer); + } + + public void setTacAccepted(boolean tacAccepted) { + this.tacAccepted = tacAccepted; + storage.queueUpForSave(); + } + + public void setUserLanguage(@NotNull String userLanguageCode) { + this.userLanguage = userLanguageCode; + updateDefaultLocale(); + storage.queueUpForSave(); + } + + public void setUserCountry(@NotNull Country userCountry) { + this.userCountry = userCountry; + updateDefaultLocale(); + storage.queueUpForSave(); + } + + public void setPreferredTradeCurrency(TradeCurrency preferredTradeCurrency) { + if (preferredTradeCurrency != null) { + this.preferredTradeCurrency = preferredTradeCurrency; + defaultTradeCurrency = preferredTradeCurrency; + storage.queueUpForSave(); + } + } + + public void setUseTorForBitcoinJ(boolean useTorForBitcoinJ) { + this.useTorForBitcoinJ = useTorForBitcoinJ; + storage.queueUpForSave(); + } + + public void setShowOwnOffersInOfferBook(boolean showOwnOffersInOfferBook) { + this.showOwnOffersInOfferBook = showOwnOffersInOfferBook; + storage.queueUpForSave(); + } + + public void setMaxPriceDistanceInPercent(double maxPriceDistanceInPercent) { + this.maxPriceDistanceInPercent = maxPriceDistanceInPercent; + storage.queueUpForSave(); + } + + public void setBackupDirectory(String backupDirectory) { + this.backupDirectory = backupDirectory; + storage.queueUpForSave(); + } + + public void setAutoSelectArbitrators(boolean autoSelectArbitrators) { + this.autoSelectArbitrators = autoSelectArbitrators; + storage.queueUpForSave(); + } + + public void setUsePercentageBasedPrice(boolean usePercentageBasedPrice) { + this.usePercentageBasedPrice = usePercentageBasedPrice; + storage.queueUpForSave(); + } + + public void setTagForPeer(String hostName, String tag) { + peerTagMap.put(hostName, tag); + storage.queueUpForSave(); + } + + public void setOfferBookChartScreenCurrencyCode(String offerBookChartScreenCurrencyCode) { + this.offerBookChartScreenCurrencyCode = offerBookChartScreenCurrencyCode; + storage.queueUpForSave(); + } + + public void setBuyScreenCurrencyCode(String buyScreenCurrencyCode) { + this.buyScreenCurrencyCode = buyScreenCurrencyCode; + storage.queueUpForSave(); + } + + public void setSellScreenCurrencyCode(String sellScreenCurrencyCode) { + this.sellScreenCurrencyCode = sellScreenCurrencyCode; + storage.queueUpForSave(); + } + + public void setIgnoreTradersList(List ignoreTradersList) { + this.ignoreTradersList = ignoreTradersList; + storage.queueUpForSave(); + } + + public void setDirectoryChooserPath(String directoryChooserPath) { + this.directoryChooserPath = directoryChooserPath; + storage.queueUpForSave(); + } + + public void setTradeChartsScreenCurrencyCode(String tradeChartsScreenCurrencyCode) { + this.tradeChartsScreenCurrencyCode = tradeChartsScreenCurrencyCode; + storage.queueUpForSave(); + } + + public void setTradeStatisticsTickUnitIndex(int tradeStatisticsTickUnitIndex) { + this.tradeStatisticsTickUnitIndex = tradeStatisticsTickUnitIndex; + storage.queueUpForSave(); + } + + public void setSortMarketCurrenciesNumerically(boolean sortMarketCurrenciesNumerically) { + this.sortMarketCurrenciesNumerically = sortMarketCurrenciesNumerically; + storage.queueUpForSave(); + } + + public void setBitcoinNodes(String bitcoinNodes) { + this.bitcoinNodes = bitcoinNodes; + storage.queueUpForSave(50); + } + + public void setUseCustomWithdrawalTxFee(boolean useCustomWithdrawalTxFee) { + useCustomWithdrawalTxFeeProperty.set(useCustomWithdrawalTxFee); + } + + public void setWithdrawalTxFeeInBytes(long withdrawalTxFeeInBytes) { + withdrawalTxFeeInBytesProperty.set(withdrawalTxFeeInBytes); + } + + public void setSecurityDepositAsLong(long securityDepositAsLong) { + this.securityDepositAsLong = securityDepositAsLong; + storage.queueUpForSave(); + } + + + /////////////////////////////////////////////////////////////////////////////////////////// + // Getter + /////////////////////////////////////////////////////////////////////////////////////////// + + public String getBtcDenomination() { + return btcDenominationProperty.get(); + } + + public StringProperty btcDenominationProperty() { + return btcDenominationProperty; + } + + public boolean getUseAnimations() { + return useAnimationsProperty.get(); + } + + public BooleanProperty useAnimationsProperty() { + return useAnimationsProperty; + } + + public static boolean useAnimations() { + return staticUseAnimations; + } + + public BitcoinNetwork getBitcoinNetwork() { + return bitcoinNetwork; + } + + public ObservableList getFiatCurrenciesAsObservable() { + return fiatCurrenciesAsObservable; + } + + public ObservableList getCryptoCurrenciesAsObservable() { + return cryptoCurrenciesAsObservable; + } + + public ObservableList getTradeCurrenciesAsObservable() { + return tradeCurrenciesAsObservable; + } + + public BlockChainExplorer getBlockChainExplorerTestNet() { + return blockChainExplorerTestNet; + } + + public BlockChainExplorer getBlockChainExplorerMainNet() { + return blockChainExplorerMainNet; + } + + public BlockChainExplorer getBlockChainExplorer() { + if (bitcoinNetwork == BitcoinNetwork.MAINNET) + return blockChainExplorerMainNet; + else + return blockChainExplorerTestNet; + } + + public ArrayList getBlockChainExplorers() { + if (bitcoinNetwork == BitcoinNetwork.MAINNET) + return blockChainExplorersMainNet; + else + return blockChainExplorersTestNet; + } + + public String getBackupDirectory() { + return backupDirectory; + } + + public boolean getAutoSelectArbitrators() { + return autoSelectArbitrators; + } + + public Map getDontShowAgainMap() { + return dontShowAgainMap; + } + + public boolean showAgain(String key) { + return !dontShowAgainMap.containsKey(key) || !dontShowAgainMap.get(key); + } + + public boolean getTacAccepted() { + return tacAccepted; + } + + public String getUserLanguage() { + return userLanguage; + } + + public TradeCurrency getPreferredTradeCurrency() { + return preferredTradeCurrency; + } + + public boolean getUseTorForBitcoinJ() { + return useTorForBitcoinJ; + } + + public boolean getShowOwnOffersInOfferBook() { + return showOwnOffersInOfferBook; + } + + public double getMaxPriceDistanceInPercent() { + return maxPriceDistanceInPercent; + } + + public boolean getUseStickyMarketPrice() { + return useStickyMarketPrice; + } + + public boolean getUsePercentageBasedPrice() { + return usePercentageBasedPrice; + } + + public Map getPeerTagMap() { + return peerTagMap; + } + + public String getOfferBookChartScreenCurrencyCode() { + return offerBookChartScreenCurrencyCode; + } + + public String getBuyScreenCurrencyCode() { + return buyScreenCurrencyCode; + } + + public String getSellScreenCurrencyCode() { + return sellScreenCurrencyCode; + } + + public List getIgnoreTradersList() { + return ignoreTradersList; + } + + public String getDirectoryChooserPath() { + return directoryChooserPath; + } + + public String getTradeChartsScreenCurrencyCode() { + return tradeChartsScreenCurrencyCode; + } + + public int getTradeStatisticsTickUnitIndex() { + return tradeStatisticsTickUnitIndex; + } + + public boolean getSortMarketCurrenciesNumerically() { + return sortMarketCurrenciesNumerically; + } + + public String getBitcoinNodes() { + return bitcoinNodes; + } + + public boolean getUseCustomWithdrawalTxFee() { + return useCustomWithdrawalTxFeeProperty.get(); + } + + public BooleanProperty useCustomWithdrawalTxFeeProperty() { + return useCustomWithdrawalTxFeeProperty; + } + + public LongProperty withdrawalTxFeeInBytesProperty() { + return withdrawalTxFeeInBytesProperty; + } + + public long getWithdrawalTxFeeInBytes() { + return withdrawalTxFeeInBytesProperty.get(); + } + + public long getSecurityDepositAsLong() { + return securityDepositAsLong; + } + + public Coin getSecurityDepositAsCoin() { + return Coin.valueOf(securityDepositAsLong); + } + + public Country getUserCountry() { + return userCountry; + } + + + /////////////////////////////////////////////////////////////////////////////////////////// + // Private + /////////////////////////////////////////////////////////////////////////////////////////// + + private void updateTradeCurrencies(ListChangeListener.Change change) { + change.next(); + if (change.wasAdded() && change.getAddedSize() == 1) + tradeCurrenciesAsObservable.add(change.getAddedSubList().get(0)); + else if (change.wasRemoved() && change.getRemovedSize() == 1) + tradeCurrenciesAsObservable.remove(change.getRemoved().get(0)); + } + + private void setFiatCurrencies(List currencies) { + fiatCurrenciesAsObservable.setAll(currencies); + } + + private void setCryptoCurrencies(List currencies) { + cryptoCurrenciesAsObservable.setAll(currencies); + } + + private void setBlockChainExplorerTestNet(BlockChainExplorer blockChainExplorerTestNet) { + this.blockChainExplorerTestNet = blockChainExplorerTestNet; + storage.queueUpForSave(); + } + + private void setBlockChainExplorerMainNet(BlockChainExplorer blockChainExplorerMainNet) { + this.blockChainExplorerMainNet = blockChainExplorerMainNet; + storage.queueUpForSave(); + } + + private void updateDefaultLocale() { + defaultLocale = new Locale(userLanguage, userCountry.code); + Res.applyLocaleToResourceBundle(defaultLocale); + } +} From e0151df520076338903d1697de109b51838bc554 Mon Sep 17 00:00:00 2001 From: Mike Rosseel Date: Thu, 16 Mar 2017 15:33:45 +0100 Subject: [PATCH 3/7] fix bugs and replace errors --- LICENSE | 20 +-- .../resources/i18n/displayStrings.properties | 126 +++++++++--------- .../i18n/displayStrings_de.properties | 106 +++++++-------- .../i18n/in_dev/displayStrings_ae.properties | 50 +++---- .../i18n/in_dev/displayStrings_ba.properties | 50 +++---- .../i18n/in_dev/displayStrings_br.properties | 50 +++---- .../i18n/in_dev/displayStrings_cn.properties | 50 +++---- .../i18n/in_dev/displayStrings_cz.properties | 50 +++---- .../i18n/in_dev/displayStrings_dk.properties | 50 +++---- .../i18n/in_dev/displayStrings_en.properties | 50 +++---- .../i18n/in_dev/displayStrings_es.properties | 4 +- .../i18n/in_dev/displayStrings_fi.properties | 50 +++---- .../i18n/in_dev/displayStrings_fr.properties | 50 +++---- .../i18n/in_dev/displayStrings_ge.properties | 50 +++---- .../i18n/in_dev/displayStrings_gr.properties | 50 +++---- .../i18n/in_dev/displayStrings_hr.properties | 4 +- .../i18n/in_dev/displayStrings_hu.properties | 50 +++---- .../i18n/in_dev/displayStrings_id.properties | 50 +++---- .../i18n/in_dev/displayStrings_ie.properties | 50 +++---- .../i18n/in_dev/displayStrings_in.properties | 50 +++---- .../i18n/in_dev/displayStrings_is.properties | 50 +++---- .../i18n/in_dev/displayStrings_it.properties | 4 +- .../i18n/in_dev/displayStrings_jp.properties | 50 +++---- .../i18n/in_dev/displayStrings_kg.properties | 50 +++---- .../i18n/in_dev/displayStrings_kr.properties | 50 +++---- .../i18n/in_dev/displayStrings_kz.properties | 50 +++---- .../i18n/in_dev/displayStrings_lt.properties | 50 +++---- .../i18n/in_dev/displayStrings_my.properties | 50 +++---- .../i18n/in_dev/displayStrings_nl.properties | 50 +++---- .../i18n/in_dev/displayStrings_no.properties | 50 +++---- .../i18n/in_dev/displayStrings_nz.properties | 50 +++---- .../i18n/in_dev/displayStrings_ph.properties | 50 +++---- .../i18n/in_dev/displayStrings_pl.properties | 50 +++---- .../i18n/in_dev/displayStrings_pt.properties | 4 +- .../i18n/in_dev/displayStrings_ro.properties | 50 +++---- .../i18n/in_dev/displayStrings_ru.properties | 50 +++---- .../i18n/in_dev/displayStrings_se.properties | 50 +++---- .../i18n/in_dev/displayStrings_th.properties | 50 +++---- .../i18n/in_dev/displayStrings_ua.properties | 50 +++---- .../i18n/in_dev/displayStrings_uz.properties | 50 +++---- .../i18n/in_dev/displayStrings_vn.properties | 50 +++---- .../io/bisq/trade/offer/OfferBookService.java | 7 +- .../io/bisq/gui/main/offer/BuyOfferView.fxml | 2 +- .../io/bisq/gui/main/offer/SellOfferView.fxml | 2 +- .../createoffer/CreateOfferDataModel.java | 4 +- .../offer/createoffer/CreateOfferView.fxml | 2 +- .../main/offer/offerbook/OfferBookView.fxml | 2 +- .../main/offer/takeoffer/TakeOfferView.fxml | 2 +- .../java/io/bisq/locale/CurrencyUtil.java | 4 +- .../bisq/p2p/protocol/availability/Offer.java | 3 +- .../bisq/p2p/storage/P2PDataStorageTest.java | 2 +- package/linux/LICENSE | 20 +-- 52 files changed, 1012 insertions(+), 1006 deletions(-) diff --git a/LICENSE b/LICENSE index 5aec298772..dba13ed2dd 100644 --- a/LICENSE +++ b/LICENSE @@ -25,7 +25,7 @@ want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. Developers that use our General Public Licenses protect your rights -with two steps: (1) assert copyright on the software, and (2) offerPayload +with two steps: (1) assert copyright on the software, and (2) offer you this License which gives you legal permission to copy, distribute and/or modify the software. @@ -191,7 +191,7 @@ keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, -and you may offerPayload support or warranty protection for a fee. +and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. @@ -244,8 +244,8 @@ in one of these ways: b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a - written offerPayload, valid for at least three years and valid for as - long as you offerPayload spare parts or customer support for that product + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical @@ -255,13 +255,13 @@ in one of these ways: Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the - written offerPayload to provide the Corresponding Source. This + written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offerPayload, in accord + only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offerPayload equivalent access to the + place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to @@ -474,7 +474,7 @@ this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to -make, use, sell, offerPayload for sale, import and otherwise run, modify and +make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express @@ -540,7 +540,7 @@ License would be to refrain entirely from conveying the Program. 13. Remote Network Interaction; Use with the GNU General Public License. Notwithstanding any other provision of this License, if you modify the -Program, your modified version must prominently offerPayload all users +Program, your modified version must prominently offer all users interacting with it remotely through a computer network (if your version supports such interaction) an opportunity to receive the Corresponding Source of your version by providing access to the Corresponding Source @@ -651,7 +651,7 @@ Also add information on how to contact you by electronic and paper mail. network, you should also make sure that it provides a way for users to get its source. For example, if your program is a web application, its interface could display a "Source" link that leads users to an archive -of the code. There are many ways you could offerPayload source, and different +of the code. There are many ways you could offer source, and different solutions will be better for different programs; see section 13 for the specific requirements. diff --git a/common/src/main/resources/i18n/displayStrings.properties b/common/src/main/resources/i18n/displayStrings.properties index 15acf2eed5..8a6b7e1476 100644 --- a/common/src/main/resources/i18n/displayStrings.properties +++ b/common/src/main/resources/i18n/displayStrings.properties @@ -85,8 +85,8 @@ shared.amountMinMax=Amount (min - max) shared.remove=Remove shared.goTo=Go to {0} shared.BTCMinMax=BTC (min - max) -shared.removeOffer=Remove offerPayload -shared.dontRemoveOffer=Don't remove offerPayload +shared.removeOffer=Remove offer +shared.dontRemoveOffer=Don't remove offer shared.openLargeQRWindow=Open large QR-Code window shared.tradingAccount=Trading account shared.faq=Visit FAQ web page @@ -120,7 +120,7 @@ shared.applyAndShutDown=Apply and shut down shared.selectPaymentMethod=Select payment method shared.accountNameAlreadyUsed=That account name is already used in a saved account.\nPlease use another name. shared.askConfirmDeleteAccount=Do you really want to delete the selected account? -shared.cannotDeleteAccount=You cannot delete that account because it is used in an open offerPayload or in a trade. +shared.cannotDeleteAccount=You cannot delete that account because it is used in an open offer or in a trade. shared.noAccountsSetupYet=There are no accounts set up yet shared.manageAccounts=Manage accounts shared.addNewAccount=Add new account @@ -275,8 +275,8 @@ market.trades.tooltip.candle.date=Date: # OfferView #################################################################### -offerbook.createOffer=Create offerPayload -offerbook.takeOffer=Take offerPayload +offerbook.createOffer=Create offer +offerbook.takeOffer=Take offer offerbook.offerersBankId=Maker''s bank ID: {0} offerbook.offerersBankName=Maker''s bank name: {0} offerbook.offerersBankSeat=Maker''s seat of bank country: {0} @@ -288,31 +288,31 @@ offerbook.filterByPaymentMethod=Filter by payment method offerbook.nrOffers=No. of offers: {0} offerbook.volume={0} (min - max) -# e.g: Create new offerPayload to buy BTC - {0} buy or sell, {1} BTC or other currency like ETH -offerbook.createOfferTo=Create new offerPayload to {0} {1} -# postfix to previous. e.g.: Create new offerPayload to buy BTC with ETH or Create new offerPayload to sell BTC for ETH +# e.g: Create new offer to buy BTC - {0} buy or sell, {1} BTC or other currency like ETH +offerbook.createOfferTo=Create new offer to {0} {1} +# postfix to previous. e.g.: Create new offer to buy BTC with ETH or Create new offer to sell BTC for ETH offerbook.buyWithOtherCurrency=with {0} offerbook.sellForOtherCurrency=for {0} offerbook.wantTo=I want to: -offerbook.takeOfferButton.tooltip=Take offerPayload for {0} -offerbook.yesCreateOffer=Yes, create offerPayload +offerbook.takeOfferButton.tooltip=Take offer for {0} +offerbook.yesCreateOffer=Yes, create offer offerbook.setupNewAccount=Set up a new trading account -offerbook.removeOffer.success=Remove offerPayload was successful. -offerbook.removeOffer.failed=Remove offerPayload failed:\n{0} +offerbook.removeOffer.success=Remove offer was successful. +offerbook.removeOffer.failed=Remove offer failed:\n{0} offerbook.withdrawFundsHint=You can withdraw the funds you paid in from the {0} screen. offerbook.warning.noTradingAccountForCurrency.headline=No trading account for selected currency -offerbook.warning.noTradingAccountForCurrency.msg=You don't have a trading account for the selected currency.\nDo you want to create an offerPayload with one of your existing trading accounts? +offerbook.warning.noTradingAccountForCurrency.msg=You don't have a trading account for the selected currency.\nDo you want to create an offer with one of your existing trading accounts? offerbook.warning.noMatchingAccount.headline=No matching trading account. -offerbook.warning.noMatchingAccount.msg=You don't have a trading account with the payment method required for that offerPayload.\nYou need to setup a trading account with that payment method if you want to take this offerPayload.\nDo you want to do this now? -offerbook.warning.wrongTradeProtocol=That offerPayload requires a different protocol version as the one used in your version of the software.\n\nPlease check if you have the latest version installed, otherwise the user who created the offerPayload has used an older version.\n\nUsers cannot trade with an incompatible trade protocol version. +offerbook.warning.noMatchingAccount.msg=You don't have a trading account with the payment method required for that offer.\nYou need to setup a trading account with that payment method if you want to take this offer.\nDo you want to do this now? +offerbook.warning.wrongTradeProtocol=That offer requires a different protocol version as the one used in your version of the software.\n\nPlease check if you have the latest version installed, otherwise the user who created the offer has used an older version.\n\nUsers cannot trade with an incompatible trade protocol version. offerbook.warning.userIgnored=You have added that user's onion address to your ignore list. -offerbook.warning.offerBlocked=That offerPayload was blocked by the bisq developers.\nProbably there is an unhandled bug causing issues when taking that offerPayload. +offerbook.warning.offerBlocked=That offer was blocked by the bisq developers.\nProbably there is an unhandled bug causing issues when taking that offer. offerbook.warning.nodeBlocked=The onion address of that trader was blocked by the bisq developers.\nProbably there is an unhandled bug causing issues when taking offers from that trader. #################################################################### -# Offerbook / Create offerPayload +# Offerbook / Create offer #################################################################### createOffer.amount.prompt=Enter amount in BTC @@ -325,44 +325,44 @@ createOffer.amountPriceBox.sell.volumeDescription=Amount in {0} to receive createOffer.amountPriceBox.minAmountDescription=Minimum amount of BTC createOffer.securityDeposit.prompt=Security deposit in BTC createOffer.securityDepositBox.description=Customize security deposit -createOffer.fundsBox.title=Fund your offerPayload +createOffer.fundsBox.title=Fund your offer createOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above createOffer.fundsBox.offerFee=Maker fee: createOffer.fundsBox.networkFee=Mining fee: createOffer.fundsBox.placeOfferSpinnerInfo=Offer publishing is in progress ... createOffer.fundsBox.paymentLabel=bisq trade with ID {0} -createOffer.success.headline=Your offerPayload has been published +createOffer.success.headline=Your offer has been published createOffer.success.info=You can manage your open offers at \"Portfolio/My open offers\". # new entries -createOffer.placeOfferButton=Review: Place offerPayload to {0} bitcoin -createOffer.alreadyFunded=You had already funded that offerPayload.\nYour funds have been moved to your local bisq wallet and are available for withdrawal in the \"Funds/Available for withdrawal\" screen. -createOffer.createOfferFundWalletInfo.headline=Fund your offerPayload +createOffer.placeOfferButton=Review: Place offer to {0} bitcoin +createOffer.alreadyFunded=You had already funded that offer.\nYour funds have been moved to your local bisq wallet and are available for withdrawal in the \"Funds/Available for withdrawal\" screen. +createOffer.createOfferFundWalletInfo.headline=Fund your offer # suppress inspection "TrailingSpacesInProperty" createOffer.createOfferFundWalletInfo.tradeAmount=- Trade amount: {0} \n -createOffer.createOfferFundWalletInfo.msg=You need to deposit {0} to this offerPayload.\n\nThose funds are reserved in your local wallet and will get locked into the Multisig deposit address once someone takes your offerPayload.\n\nThe amount is the sum of:\n{1}- Security deposit: {2}\n- Trading fee: {3}\n- Mining fee: {4}\n\nYou can choose between two options when funding your trade:\n- Use your bisq wallet (convenient, but transactions may be linkable) OR\n- Transfer from an external wallet (potentially more private)\n\nYou will see all funding options and details after closing this popup. +createOffer.createOfferFundWalletInfo.msg=You need to deposit {0} to this offer.\n\nThose funds are reserved in your local wallet and will get locked into the Multisig deposit address once someone takes your offer.\n\nThe amount is the sum of:\n{1}- Security deposit: {2}\n- Trading fee: {3}\n- Mining fee: {4}\n\nYou can choose between two options when funding your trade:\n- Use your bisq wallet (convenient, but transactions may be linkable) OR\n- Transfer from an external wallet (potentially more private)\n\nYou will see all funding options and details after closing this popup. -# only first part "An error occurred when placing the offerPayload:" has been used before. We added now the rest (need update in existing translations!) -createOffer.amountPriceBox.error.message=An error occurred when placing the offerPayload:\n\n{0}\n\n\ +# only first part "An error occurred when placing the offer:" has been used before. We added now the rest (need update in existing translations!) +createOffer.amountPriceBox.error.message=An error occurred when placing the offer:\n\n{0}\n\n\ No funds have left your wallet yet.\n\ Please restart your application and check your network connection. createOffer.setAmountPrice=Set amount and price -createOffer.warnCancelOffer=You have already funded that offerPayload.\nIf you cancel now, your funds will be moved to your local bisq wallet and are available for withdrawal in the \"Funds/Available for withdrawal\" screen.\nAre you sure you want to cancel? +createOffer.warnCancelOffer=You have already funded that offer.\nIf you cancel now, your funds will be moved to your local bisq wallet and are available for withdrawal in the \"Funds/Available for withdrawal\" screen.\nAre you sure you want to cancel? createOffer.fixed=Fixed createOffer.percentage=Percentage -createOffer.timeoutAtPublishing=A timeout occurred at publishing the offerPayload. +createOffer.timeoutAtPublishing=A timeout occurred at publishing the offer. createOffer.errorInfo=\n\nThe maker fee is already paid. In the worst case you have lost that fee. We are sorry about that but keep in mind it is a very small amount.\nPlease try to restart you application and check your network connection to see if you can resolve the issue. createOffer.tooLowSecDeposit.warning=You have set the security deposit to a lower value than the recommended default value of {0}.\nAre you sure you want to use a lower security deposit?\nIt gives you less protection in case the trading peer does not follow the trade protocol. createOffer.resetToDefault=No, reset to the default value createOffer.useLowerValue=Yes, use my lower value createOffer.priceOutSideOfDeviation=The price you have entered is outside the max. allowed deviation from the market price.\nThe max. allowed deviation is {0} and can be adjusted in the preferences. createOffer.changePrice=Change price -createOffer.tac=With placing that offerPayload I agree to trade with any trader who fulfills the conditions as defined above. +createOffer.tac=With placing that offer I agree to trade with any trader who fulfills the conditions as defined above. #################################################################### -# Offerbook / Take offerPayload +# Offerbook / Take offer #################################################################### takeOffer.amount.prompt=Enter amount in BTC @@ -370,47 +370,47 @@ takeOffer.amountPriceBox.buy.amountDescription=Amount of bitcoin to sell takeOffer.amountPriceBox.sell.amountDescription=Amount of bitcoin to buy takeOffer.amountPriceBox.priceDescription=Price per bitcoin in {0} takeOffer.amountPriceBox.amountRangeDescription=Possible amount range -takeOffer.securityDepositBox.description=Security deposit for offerPayload +takeOffer.securityDepositBox.description=Security deposit for offer takeOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. -takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offerPayload. -takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offerPayload. +takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offer. +takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offer. takeOffer.validation.amountLargerThanOfferAmountMinusFee=That input amount would create dust change for the BTC seller. takeOffer.fundsBox.title=Fund your trade -takeOffer.fundsBox.isOfferAvailable=Check if offerPayload is available ... +takeOffer.fundsBox.isOfferAvailable=Check if offer is available ... takeOffer.fundsBox.tradeAmount=Amount to sell: takeOffer.fundsBox.offerFee=Taker fee: takeOffer.fundsBox.networkFee=Mining fees (3x): -takeOffer.fundsBox.takeOfferSpinnerInfo=Take offerPayload in progress ... +takeOffer.fundsBox.takeOfferSpinnerInfo=Take offer in progress ... takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} -takeOffer.success.headline=You have successfully taken an offerPayload. +takeOffer.success.headline=You have successfully taken an offer. takeOffer.success.info=You can see the status of your trade at \"Portfolio/Open trades\". -takeOffer.error.message=An error occurred when taking the offerPayload.\n\n{0} +takeOffer.error.message=An error occurred when taking the offer.\n\n{0} # new entries -takeOffer.takeOfferButton=Review: Take offerPayload to {0} bitcoin -takeOffer.noPriceFeedAvailable=You cannot take that offerPayload as it uses a percentage price based on the market price but there is no price feed available. -takeOffer.alreadyFunded.movedFunds=You had already funded that offerPayload.\nYour funds have been moved to your local bisq wallet and are available for withdrawal in the \"Funds/Available for withdrawal\" screen. +takeOffer.takeOfferButton=Review: Take offer to {0} bitcoin +takeOffer.noPriceFeedAvailable=You cannot take that offer as it uses a percentage price based on the market price but there is no price feed available. +takeOffer.alreadyFunded.movedFunds=You had already funded that offer.\nYour funds have been moved to your local bisq wallet and are available for withdrawal in the \"Funds/Available for withdrawal\" screen. takeOffer.takeOfferFundWalletInfo.headline=Fund your trade # suppress inspection "TrailingSpacesInProperty" takeOffer.takeOfferFundWalletInfo.tradeAmount=- Trade amount: {0} \n -takeOffer.takeOfferFundWalletInfo.msg=You need to deposit {0} for taking this offerPayload.\n\nThe amount is the sum of:\n{1}- Security deposit: {2}\n- Trading fee: {3}\n- Mining fee (3x): {4}\n\nYou can choose between two options when funding your trade:\n- Use your bisq wallet (convenient, but transactions may be linkable) OR\n- Transfer from an external wallet (potentially more private)\n\nYou will see all funding options and details after closing this popup. +takeOffer.takeOfferFundWalletInfo.msg=You need to deposit {0} for taking this offer.\n\nThe amount is the sum of:\n{1}- Security deposit: {2}\n- Trading fee: {3}\n- Mining fee (3x): {4}\n\nYou can choose between two options when funding your trade:\n- Use your bisq wallet (convenient, but transactions may be linkable) OR\n- Transfer from an external wallet (potentially more private)\n\nYou will see all funding options and details after closing this popup. takeOffer.alreadyPaidInFunds=If you have already paid in funds you can withdraw it in the \"Funds/Available for withdrawal\" screen. takeOffer.paymentInfo=Payment info takeOffer.setAmountPrice=Set amount and price -takeOffer.alreadyFunded.askCancel=You have already funded that offerPayload.\nIf you cancel now, your funds will be moved to your local bisq wallet and are available for withdrawal in the \"Funds/Available for withdrawal\" screen.\nAre you sure you want to cancel? -takeOffer.failed.offerNotAvailable=Take offerPayload request failed because the offerPayload is not available anymore. Maybe another trader has taken the offerPayload in the meantime. -takeOffer.failed.offerTaken=TYou cannot take that offerPayload because the offerPayload was already taken by another trader. -takeOffer.failed.offerRemoved=You cannot take that offerPayload because the offerPayload has been removed in the meantime. -takeOffer.failed.offererNotOnline=Take offerPayload request failed because maker is not online anymore. -takeOffer.failed.offererOffline=You cannot take that offerPayload because the maker is offline. -takeOffer.warning.connectionToPeerLost=You lost connection to the maker.\nHe might have gone offline or has closed the connection to you because of too many open connections.\n\nIf you can still see his offerPayload in the offerbook you can try to take the offerPayload again. +takeOffer.alreadyFunded.askCancel=You have already funded that offer.\nIf you cancel now, your funds will be moved to your local bisq wallet and are available for withdrawal in the \"Funds/Available for withdrawal\" screen.\nAre you sure you want to cancel? +takeOffer.failed.offerNotAvailable=Take offer request failed because the offer is not available anymore. Maybe another trader has taken the offer in the meantime. +takeOffer.failed.offerTaken=TYou cannot take that offer because the offer was already taken by another trader. +takeOffer.failed.offerRemoved=You cannot take that offer because the offer has been removed in the meantime. +takeOffer.failed.offererNotOnline=Take offer request failed because maker is not online anymore. +takeOffer.failed.offererOffline=You cannot take that offer because the maker is offline. +takeOffer.warning.connectionToPeerLost=You lost connection to the maker.\nHe might have gone offline or has closed the connection to you because of too many open connections.\n\nIf you can still see his offer in the offerbook you can try to take the offer again. takeOffer.error.noFundsLost=\n\nNo funds have left your wallet yet.\nPlease try to restart you application and check your network connection to see if you can resolve the issue. takeOffer.error.feePaid=\n\nThe taker fee is already paid. In the worst case you have lost that fee. We are sorry about that but keep in mind it is a very small amount.\nPlease try to restart you application and check your network connection to see if you can resolve the issue. takeOffer.error.depositPublished=\n\nThe deposit transaction is already published.\nPlease try to restart you application and check your network connection to see if you can resolve the issue.\nIf the problem still remains please contact the developers for support. takeOffer.error.payoutPublished=\n\nThe payout transaction is already published.\nPlease try to restart you application and check your network connection to see if you can resolve the issue.\nIf the problem still remains please contact the developers for support. takeOffer.error.disputed=\n\nThe trade is handled already by an arbitrator.\nPlease try to restart you application and check your network connection to see if you can resolve the issue.\nIf the problem still remains please contact the arbitrator or the developers for support. -takeOffer.tac=With taking that offerPayload I agree to the trade conditions as defined above. +takeOffer.tac=With taking that offer I agree to the trade conditions as defined above. #################################################################### @@ -616,7 +616,7 @@ funds.withdrawal.warn.noSourceAddressSelected=You need to select a source addres funds.withdrawal.warn.amountExceeds=Your amount exceeds the available amount for the selected address.\nConsider to select multiple addresses in the table above if you want to withdraw more. funds.reserved.noFunds=No funds are reserved in open offers -funds.reserved.reserved=Reserved in local wallet for offerPayload with ID: {0} +funds.reserved.reserved=Reserved in local wallet for offer with ID: {0} funds.locked.noFunds=No funds are locked in trades funds.locked.locked=Locked in MultiSig for trade with ID: {0} @@ -649,7 +649,7 @@ support.filter=Filter list: support.noTickets=There are no open tickets support.sendingMessage=Sending Message... support.receiverNotOnline=Receiver is not online. Message is saved to his mailbox. -support.wrongVersion=The offerPayload in that dispute has been created with an older version of bisq.\n\ +support.wrongVersion=The offer in that dispute has been created with an older version of bisq.\n\ You cannot close that dispute with your version of the application.\n\n\ Please use an older version with protocol version {0} support.openFile=Open file to attach (max. file size: {0} kb) @@ -732,7 +732,7 @@ setting.preferences.noAltcoins=There are no altcoins selected setting.preferences.addFiat=Add national currency setting.preferences.addAltcoin=Add altcoin setting.preferences.displayOptions=Display options -setting.preferences.showOwnOffers=Show my own offers in offerPayload book: +setting.preferences.showOwnOffers=Show my own offers in offer book: setting.preferences.useAnimations=Use animations: setting.preferences.sortWithNumOffers=Sort market lists with no. of offers/trades: setting.preferences.resetAllFlags=Reset all \"Don't show again\" flags: @@ -1044,8 +1044,8 @@ offerDetailsWindow.acceptedArbitrators=Accepted arbitrators: offerDetailsWindow.commitment=Commitment offerDetailsWindow.agree=I agree: offerDetailsWindow.tac=Terms and conditions: -offerDetailsWindow.confirm.maker=Confirm: Place offerPayload to {0} bitcoin -offerDetailsWindow.confirm.taker=Confirm: Take offerPayload to {0} bitcoin +offerDetailsWindow.confirm.maker=Confirm: Place offer to {0} bitcoin +offerDetailsWindow.confirm.taker=Confirm: Take offer to {0} bitcoin offerDetailsWindow.warn.noArbitrator=You have no arbitrator selected.\nPlease select at least one arbitrator. offerDetailsWindow.creationDate=Creation date: offerDetailsWindow.makersOnion=Maker's onion address: @@ -1145,21 +1145,21 @@ popup.warning.startupFailed.timeout=The application could not startup after 4 mi popup.warning.startupFailed.twoInstances=bisq is already running. You cannot run two instances of bisq. popup.warning.cryptoTestFailed=Seems that you use a self compiled binary and have not following the build instructions in https://github.com/bisq/bisq/blob/master/doc/build.md#7-enable-unlimited-strength-for-cryptographic-keys.\n\nIf that is not the case and you use the official bisq binary, please file a bug report to the Github page.\nError={0} popup.warning.oldOffers.msg=You have open offers which have been created with an older version of bisq.\nPlease remove those offers as they are not valid anymore.\n\nOffers (ID): {0} -popup.warning.oldOffers.buttonText=Remove outdated offerPayload(s) +popup.warning.oldOffers.buttonText=Remove outdated offer(s) popup.warning.tradePeriod.halfReached=Your trade with ID {0} has reached the half of the max. allowed trading period and is still not completed.\n\nThe trade period ends on {1}\n\nPlease check your trade state at \"Portfolio/Open trades\" for further information. popup.warning.tradePeriod.ended=Your trade with ID {0} has reached the max. allowed trading period and is not completed.\n\nThe trade period ended on {1}\n\nPlease check your trade at \"Portfolio/Open trades\" for contacting the arbitrator. popup.warning.noTradingAccountSetup.headline=You have not setup a trading account -popup.warning.noTradingAccountSetup.msg=You need to setup a national currency or altcoin account before you can create an offerPayload.\nDo you want to setup an account? +popup.warning.noTradingAccountSetup.msg=You need to setup a national currency or altcoin account before you can create an offer.\nDo you want to setup an account? popup.warning.noArbitratorSelected.headline=You don't have an arbitrator selected. popup.warning.noArbitratorSelected.msg=You need to setup at least one arbitrator to be able to trade.\nDo you want to do this now? popup.warning.notFullyConnected=You need to wait until you are fully connected to the network.\nThat might take up to about 2 minutes at startup. -popup.warning.removeOffer=Are you sure you want to remove that offerPayload?\nThe maker fee of {0} will be lost if you remove that offerPayload. +popup.warning.removeOffer=Are you sure you want to remove that offer?\nThe maker fee of {0} will be lost if you remove that offer. popup.warning.tooLargePercentageValue=You cannot set a percentage of 100% or larger. popup.warning.examplePercentageValue=Please enter a percentage number like \"5.4\" for 5.4% popup.warning.noPriceFeedAvailable=There is no price feed available for that currency. You cannot use a percent based price.\nPlease select the fixed price. popup.warning.sendMsgFailed=Sending message to your trading partner failed.\nPlease try again and if it continue to fail report a bug. -popup.info.securityDepositInfo=To ensure that both traders follow the trade protocol they need to pay a security deposit.\n\nThe deposit will stay in your local trading wallet until the offerPayload gets accepted by another trader.\nIt will be refunded to you after the trade has successfully completed.\n\nPlease note that you need to keep you application running if you have an open offerPayload.\nWhen another trader wants to take your offerPayload it requires that your application is online and able to react.\nBe sure that you have standby mode deactivated as that would disconnect your client from the network (standby of the monitor is not a problem). +popup.info.securityDepositInfo=To ensure that both traders follow the trade protocol they need to pay a security deposit.\n\nThe deposit will stay in your local trading wallet until the offer gets accepted by another trader.\nIt will be refunded to you after the trade has successfully completed.\n\nPlease note that you need to keep you application running if you have an open offer.\nWhen another trader wants to take your offer it requires that your application is online and able to react.\nBe sure that you have standby mode deactivated as that would disconnect your client from the network (standby of the monitor is not a problem). popup.privateNotification.headline=Important private notification! @@ -1179,7 +1179,7 @@ popup.attention.forTradeWithId=Attention required for trade with ID {0} notification.trade.headline=Notification for trade with ID {0} notification.ticket.headline=Support ticket for trade with ID {0} notification.trade.completed=The trade is now completed and you can withdraw your funds. -notification.trade.accepted=Your offerPayload has been accepted by a BTC {0}. +notification.trade.accepted=Your offer has been accepted by a BTC {0}. notification.trade.confirmed=Your trade has at least one blockchain confirmation.\nYou can start the payment now. notification.trade.paymentStarted=The BTC buyer has started the payment. notification.trade.selectTrade=Select trade @@ -1187,7 +1187,7 @@ notification.trade.peerOpenedDispute=Your trading peer has opened a {0}. notification.trade.disputeClosed=The {0} has been closed. notification.walletUpdate.headline=Trading wallet update notification.walletUpdate.msg=Your trading wallet is sufficiently funded.\nAmount: {0} -notification.takeOffer.walletUpdate.msg=Your trading wallet was already sufficiently funded from an earlier take offerPayload attempt.\nAmount: {0} +notification.takeOffer.walletUpdate.msg=Your trading wallet was already sufficiently funded from an earlier take offer attempt.\nAmount: {0} notification.tradeCompleted.headline=Trade completed notification.tradeCompleted.msg=You can withdraw your funds now to your external Bitcoin wallet or transfer it to the bisq wallet. @@ -1244,8 +1244,8 @@ list.currency.editList=Edit currency list table.placeholder.noItems=Currently there are no {0} available table.placeholder.noData=Currently there is no data available -peerInfoIcon.tooltip.offerPayload.traded=Maker''s onion address: {0}\nYou have already traded {1} times with that maker. -peerInfoIcon.tooltip.offerPayload.notTraded=Maker''s onion address: {0} +peerInfoIcon.tooltip.offer.traded=Maker''s onion address: {0}\nYou have already traded {1} times with that maker. +peerInfoIcon.tooltip.offer.notTraded=Maker''s onion address: {0} peerInfoIcon.tooltip.trade.traded=Trading peer''s onion address: {0}\nYou have already traded {1} times with that peer. peerInfoIcon.tooltip.trade.notTraded=Trading peer''s onion address: {0} @@ -1298,8 +1298,8 @@ formatter.makerTaker=Maker as {0} {1} / Taker as {2} {3} formatter.youAreAsMaker=You are {0} {1} as maker / Taker is {2} {3} formatter.youAreAsTaker=You are {0} {1} as taker / Maker is {2} {3} formatter.youAre=You are {0} {1} ({2} {3}) -formatter.youAreCreatingAnOffer.fiat=You are creating an offerPayload to {0} {1} -formatter.youAreCreatingAnOffer.altcoin=You are creating an offerPayload to {0} {1} ({2} {3}) +formatter.youAreCreatingAnOffer.fiat=You are creating an offer to {0} {1} +formatter.youAreCreatingAnOffer.altcoin=You are creating an offer to {0} {1} ({2} {3}) formatter.asMaker={0} {1} as maker formatter.asTaker={0} {1} as taker diff --git a/common/src/main/resources/i18n/displayStrings_de.properties b/common/src/main/resources/i18n/displayStrings_de.properties index 019ecf3bf5..6389f1c2f0 100644 --- a/common/src/main/resources/i18n/displayStrings_de.properties +++ b/common/src/main/resources/i18n/displayStrings_de.properties @@ -85,8 +85,8 @@ shared.amountMinMax=Amount (min - max) shared.remove=Remove shared.goTo=Go to {0} shared.BTCMinMax=BTC (min - max) -shared.removeOffer=Remove offerPayload -shared.dontRemoveOffer=Don't remove offerPayload +shared.removeOffer=Remove offer +shared.dontRemoveOffer=Don't remove offer shared.openLargeQRWindow=Open large QR-Code window shared.tradingAccount=Trading account shared.faq=Visit FAQ web page @@ -120,7 +120,7 @@ shared.applyAndShutDown=Apply and shut down shared.selectPaymentMethod=Select payment method shared.accountNameAlreadyUsed=That account name is already used in a saved account.\nPlease use another name. shared.askConfirmDeleteAccount=Do you really want to delete the selected account? -shared.cannotDeleteAccount=You cannot delete that account because it is used in an open offerPayload or in a trade. +shared.cannotDeleteAccount=You cannot delete that account because it is used in an open offer or in a trade. shared.noAccountsSetupYet=There are no accounts set up yet shared.manageAccounts=Manage accounts shared.addNewAccount=Add new account @@ -275,8 +275,8 @@ market.trades.tooltip.candle.date=Date: # OfferView #################################################################### -offerbook.createOffer=Create offerPayload -offerbook.takeOffer=Take offerPayload +offerbook.createOffer=Create offer +offerbook.takeOffer=Take offer offerbook.offerersBankId=Maker''s bank ID: {0} offerbook.offerersBankName=Maker''s bank name: {0} offerbook.offerersBankSeat=Maker''s seat of bank country: {0} @@ -288,31 +288,31 @@ offerbook.filterByPaymentMethod=Filter by payment method offerbook.nrOffers=No. of offers: {0} offerbook.volume={0} (min - max) -# e.g: Create new offerPayload to buy BTC - {0} buy or sell, {1} BTC or other currency like ETH -offerbook.createOfferTo=Create new offerPayload to {0} {1} -# postfix to previous. e.g.: Create new offerPayload to buy BTC with ETH or Create new offerPayload to sell BTC for ETH +# e.g: Create new offer to buy BTC - {0} buy or sell, {1} BTC or other currency like ETH +offerbook.createOfferTo=Create new offer to {0} {1} +# postfix to previous. e.g.: Create new offer to buy BTC with ETH or Create new offer to sell BTC for ETH offerbook.buyWithOtherCurrency=with {0} offerbook.sellForOtherCurrency=for {0} offerbook.wantTo=I want to: -offerbook.takeOfferButton.tooltip=Take offerPayload for {0} -offerbook.yesCreateOffer=Yes, create offerPayload +offerbook.takeOfferButton.tooltip=Take offer for {0} +offerbook.yesCreateOffer=Yes, create offer offerbook.setupNewAccount=Set up a new trading account -offerbook.removeOffer.success=Remove offerPayload was successful. -offerbook.removeOffer.failed=Remove offerPayload failed:\n{0} +offerbook.removeOffer.success=Remove offer was successful. +offerbook.removeOffer.failed=Remove offer failed:\n{0} offerbook.withdrawFundsHint=You can withdraw the funds you paid in from the {0} screen. offerbook.warning.noTradingAccountForCurrency.headline=No trading account for selected currency -offerbook.warning.noTradingAccountForCurrency.msg=You don't have a trading account for the selected currency.\nDo you want to create an offerPayload with one of your existing trading accounts? +offerbook.warning.noTradingAccountForCurrency.msg=You don't have a trading account for the selected currency.\nDo you want to create an offer with one of your existing trading accounts? offerbook.warning.noMatchingAccount.headline=No matching trading account. -offerbook.warning.noMatchingAccount.msg=You don't have a trading account with the payment method required for that offerPayload.\nYou need to setup a trading account with that payment method if you want to take this offerPayload.\nDo you want to do this now? -offerbook.warning.wrongTradeProtocol=That offerPayload requires a different protocol version as the one used in your version of the software.\n\nPlease check if you have the latest version installed, otherwise the user who created the offerPayload has used an older version.\n\nUsers cannot trade with an incompatible trade protocol version. +offerbook.warning.noMatchingAccount.msg=You don't have a trading account with the payment method required for that offer.\nYou need to setup a trading account with that payment method if you want to take this offer.\nDo you want to do this now? +offerbook.warning.wrongTradeProtocol=That offer requires a different protocol version as the one used in your version of the software.\n\nPlease check if you have the latest version installed, otherwise the user who created the offer has used an older version.\n\nUsers cannot trade with an incompatible trade protocol version. offerbook.warning.userIgnored=You have added that user's onion address to your ignore list. -offerbook.warning.offerBlocked=That offerPayload was blocked by the bisq developers.\nProbably there is an unhandled bug causing issues when taking that offerPayload. +offerbook.warning.offerBlocked=That offer was blocked by the bisq developers.\nProbably there is an unhandled bug causing issues when taking that offer. offerbook.warning.nodeBlocked=The onion address of that trader was blocked by the bisq developers.\nProbably there is an unhandled bug causing issues when taking offers from that trader. #################################################################### -# Offerbook / Create offerPayload +# Offerbook / Create offer #################################################################### createOffer.amount.prompt=Betrag in BTC eingeben @@ -336,33 +336,33 @@ createOffer.success.info=Sie können Ihre offenen Angebote unter \"Portfolio/Mei # new entries -createOffer.placeOfferButton=Review: Place offerPayload to {0} bitcoin -createOffer.alreadyFunded=You had already funded that offerPayload.\nYour funds have been moved to your local bisq wallet and are available for withdrawal in the \"Funds/Available for withdrawal\" screen. -createOffer.createOfferFundWalletInfo.headline=Fund your offerPayload +createOffer.placeOfferButton=Review: Place offer to {0} bitcoin +createOffer.alreadyFunded=You had already funded that offer.\nYour funds have been moved to your local bisq wallet and are available for withdrawal in the \"Funds/Available for withdrawal\" screen. +createOffer.createOfferFundWalletInfo.headline=Fund your offer # suppress inspection "TrailingSpacesInProperty" createOffer.createOfferFundWalletInfo.tradeAmount=- Trade amount: {0} \n -createOffer.createOfferFundWalletInfo.msg=You need to deposit {0} to this offerPayload.\n\nThose funds are reserved in your local wallet and will get locked into the Multisig deposit address once someone takes your offerPayload.\n\nThe amount is the sum of:\n{1}- Security deposit: {2}\n- Trading fee: {3}\n- Mining fee: {4}\n\nYou can choose between two options when funding your trade:\n- Use your bisq wallet (convenient, but transactions may be linkable) OR\n- Transfer from an external wallet (potentially more private)\n\nYou will see all funding options and details after closing this popup. +createOffer.createOfferFundWalletInfo.msg=You need to deposit {0} to this offer.\n\nThose funds are reserved in your local wallet and will get locked into the Multisig deposit address once someone takes your offer.\n\nThe amount is the sum of:\n{1}- Security deposit: {2}\n- Trading fee: {3}\n- Mining fee: {4}\n\nYou can choose between two options when funding your trade:\n- Use your bisq wallet (convenient, but transactions may be linkable) OR\n- Transfer from an external wallet (potentially more private)\n\nYou will see all funding options and details after closing this popup. -# only first part "An error occurred when placing the offerPayload:" has been used before. We added now the rest (need update in existing translations!) +# only first part "An error occurred when placing the offer:" has been used before. We added now the rest (need update in existing translations!) createOffer.amountPriceBox.error.message=Bei der Angebotsabgabe ist ein Fehler aufgetreten:\n\n{0}\n\n\ Es wurden keine bitcoin aus dem Wallet versandt.\n\ Bitte starten Sie Ihre Anwendung neu und überprüfen Sie ihre Netzwerkverbingung. createOffer.setAmountPrice=Set amount and price -createOffer.warnCancelOffer=You have already funded that offerPayload.\nIf you cancel now, your funds will be moved to your local bisq wallet and are available for withdrawal in the \"Funds/Available for withdrawal\" screen.\nAre you sure you want to cancel? +createOffer.warnCancelOffer=You have already funded that offer.\nIf you cancel now, your funds will be moved to your local bisq wallet and are available for withdrawal in the \"Funds/Available for withdrawal\" screen.\nAre you sure you want to cancel? createOffer.fixed=Fixed createOffer.percentage=Percentage -createOffer.timeoutAtPublishing=A timeout occurred at publishing the offerPayload. +createOffer.timeoutAtPublishing=A timeout occurred at publishing the offer. createOffer.errorInfo=\n\nThe maker fee is already paid. In the worst case you have lost that fee. We are sorry about that but keep in mind it is a very small amount.\nPlease try to restart you application and check your network connection to see if you can resolve the issue. createOffer.tooLowSecDeposit.warning=You have set the security deposit to a lower value than the recommended default value of {0}.\nAre you sure you want to use a lower security deposit?\nIt gives you less protection in case the trading peer does not follow the trade protocol. createOffer.resetToDefault=No, reset to the default value createOffer.useLowerValue=Yes, use my lower value createOffer.priceOutSideOfDeviation=The price you have entered is outside the max. allowed deviation from the market price.\nThe max. allowed deviation is {0} and can be adjusted in the preferences. createOffer.changePrice=Change price -createOffer.tac=With placing that offerPayload I agree to trade with any trader who fulfills the conditions as defined above. +createOffer.tac=With placing that offer I agree to trade with any trader who fulfills the conditions as defined above. #################################################################### -# Offerbook / Take offerPayload +# Offerbook / Take offer #################################################################### takeOffer.amount.prompt=Betrag in BTC eingeben @@ -387,30 +387,30 @@ takeOffer.success.info=Sie können den Status Ihres Handels unter \"Portfolio/Of takeOffer.error.message=Beim Annehmen des Angebots ist ein Fehler aufgetreten.\n\n{0} # new entries -takeOffer.takeOfferButton=Review: Take offerPayload to {0} bitcoin -takeOffer.noPriceFeedAvailable=You cannot take that offerPayload as it uses a percentage price based on the market price but there is no price feed available. -takeOffer.alreadyFunded.movedFunds=You had already funded that offerPayload.\nYour funds have been moved to your local bisq wallet and are available for withdrawal in the \"Funds/Available for withdrawal\" screen. +takeOffer.takeOfferButton=Review: Take offer to {0} bitcoin +takeOffer.noPriceFeedAvailable=You cannot take that offer as it uses a percentage price based on the market price but there is no price feed available. +takeOffer.alreadyFunded.movedFunds=You had already funded that offer.\nYour funds have been moved to your local bisq wallet and are available for withdrawal in the \"Funds/Available for withdrawal\" screen. takeOffer.takeOfferFundWalletInfo.headline=Fund your trade # suppress inspection "TrailingSpacesInProperty" takeOffer.takeOfferFundWalletInfo.tradeAmount=- Trade amount: {0} \n -takeOffer.takeOfferFundWalletInfo.msg=You need to deposit {0} for taking this offerPayload.\n\nThe amount is the sum of:\n{1}- Security deposit: {2}\n- Trading fee: {3}\n- Mining fee (3x): {4}\n\nYou can choose between two options when funding your trade:\n- Use your bisq wallet (convenient, but transactions may be linkable) OR\n- Transfer from an external wallet (potentially more private)\n\nYou will see all funding options and details after closing this popup. +takeOffer.takeOfferFundWalletInfo.msg=You need to deposit {0} for taking this offer.\n\nThe amount is the sum of:\n{1}- Security deposit: {2}\n- Trading fee: {3}\n- Mining fee (3x): {4}\n\nYou can choose between two options when funding your trade:\n- Use your bisq wallet (convenient, but transactions may be linkable) OR\n- Transfer from an external wallet (potentially more private)\n\nYou will see all funding options and details after closing this popup. takeOffer.alreadyPaidInFunds=If you have already paid in funds you can withdraw it in the \"Funds/Available for withdrawal\" screen. takeOffer.paymentInfo=Payment info takeOffer.setAmountPrice=Set amount and price -takeOffer.alreadyFunded.askCancel=You have already funded that offerPayload.\nIf you cancel now, your funds will be moved to your local bisq wallet and are available for withdrawal in the \"Funds/Available for withdrawal\" screen.\nAre you sure you want to cancel? -takeOffer.failed.offerNotAvailable=Take offerPayload request failed because the offerPayload is not available anymore. Maybe another trader has taken the offerPayload in the meantime. -takeOffer.failed.offerTaken=TYou cannot take that offerPayload because the offerPayload was already taken by another trader. -takeOffer.failed.offerRemoved=You cannot take that offerPayload because the offerPayload has been removed in the meantime. -takeOffer.failed.offererNotOnline=Take offerPayload request failed because maker is not online anymore. -takeOffer.failed.offererOffline=You cannot take that offerPayload because the maker is offline. -takeOffer.warning.connectionToPeerLost=You lost connection to the maker.\nHe might have gone offline or has closed the connection to you because of too many open connections.\n\nIf you can still see his offerPayload in the offerbook you can try to take the offerPayload again. +takeOffer.alreadyFunded.askCancel=You have already funded that offer.\nIf you cancel now, your funds will be moved to your local bisq wallet and are available for withdrawal in the \"Funds/Available for withdrawal\" screen.\nAre you sure you want to cancel? +takeOffer.failed.offerNotAvailable=Take offer request failed because the offer is not available anymore. Maybe another trader has taken the offer in the meantime. +takeOffer.failed.offerTaken=TYou cannot take that offer because the offer was already taken by another trader. +takeOffer.failed.offerRemoved=You cannot take that offer because the offer has been removed in the meantime. +takeOffer.failed.offererNotOnline=Take offer request failed because maker is not online anymore. +takeOffer.failed.offererOffline=You cannot take that offer because the maker is offline. +takeOffer.warning.connectionToPeerLost=You lost connection to the maker.\nHe might have gone offline or has closed the connection to you because of too many open connections.\n\nIf you can still see his offer in the offerbook you can try to take the offer again. takeOffer.error.noFundsLost=\n\nNo funds have left your wallet yet.\nPlease try to restart you application and check your network connection to see if you can resolve the issue. takeOffer.error.feePaid=\n\nThe taker fee is already paid. In the worst case you have lost that fee. We are sorry about that but keep in mind it is a very small amount.\nPlease try to restart you application and check your network connection to see if you can resolve the issue. takeOffer.error.depositPublished=\n\nThe deposit transaction is already published.\nPlease try to restart you application and check your network connection to see if you can resolve the issue.\nIf the problem still remains please contact the developers for support. takeOffer.error.payoutPublished=\n\nThe payout transaction is already published.\nPlease try to restart you application and check your network connection to see if you can resolve the issue.\nIf the problem still remains please contact the developers for support. takeOffer.error.disputed=\n\nThe trade is handled already by an arbitrator.\nPlease try to restart you application and check your network connection to see if you can resolve the issue.\nIf the problem still remains please contact the arbitrator or the developers for support. -takeOffer.tac=With taking that offerPayload I agree to the trade conditions as defined above. +takeOffer.tac=With taking that offer I agree to the trade conditions as defined above. #################################################################### @@ -616,7 +616,7 @@ funds.withdrawal.warn.noSourceAddressSelected=You need to select a source addres funds.withdrawal.warn.amountExceeds=Your amount exceeds the available amount for the selected address.\nConsider to select multiple addresses in the table above if you want to withdraw more. funds.reserved.noFunds=No funds are reserved in open offers -funds.reserved.reserved=Reserved in local wallet for offerPayload with ID: {0} +funds.reserved.reserved=Reserved in local wallet for offer with ID: {0} funds.locked.noFunds=No funds are locked in trades funds.locked.locked=Locked in MultiSig for trade with ID: {0} @@ -649,7 +649,7 @@ support.filter=Filter list: support.noTickets=There are no open tickets support.sendingMessage=Sending Message... support.receiverNotOnline=Receiver is not online. Message is saved to his mailbox. -support.wrongVersion=The offerPayload in that dispute has been created with an older version of bisq.\n\ +support.wrongVersion=The offer in that dispute has been created with an older version of bisq.\n\ You cannot close that dispute with your version of the application.\n\n\ Please use an older version with protocol version {0} support.openFile=Open file to attach (max. file size: {0} kb) @@ -732,7 +732,7 @@ setting.preferences.noAltcoins=There are no altcoins selected setting.preferences.addFiat=Add national currency setting.preferences.addAltcoin=Add altcoin setting.preferences.displayOptions=Display options -setting.preferences.showOwnOffers=Show my own offers in offerPayload book: +setting.preferences.showOwnOffers=Show my own offers in offer book: setting.preferences.useAnimations=Use animations: setting.preferences.sortWithNumOffers=Sort market lists with no. of offers/trades: setting.preferences.resetAllFlags=Reset all \"Don't show again\" flags: @@ -1044,8 +1044,8 @@ offerDetailsWindow.acceptedArbitrators=Accepted arbitrators: offerDetailsWindow.commitment=Commitment offerDetailsWindow.agree=I agree: offerDetailsWindow.tac=Terms and conditions: -offerDetailsWindow.confirm.maker=Confirm: Place offerPayload to {0} bitcoin -offerDetailsWindow.confirm.taker=Confirm: Take offerPayload to {0} bitcoin +offerDetailsWindow.confirm.maker=Confirm: Place offer to {0} bitcoin +offerDetailsWindow.confirm.taker=Confirm: Take offer to {0} bitcoin offerDetailsWindow.warn.noArbitrator=You have no arbitrator selected.\nPlease select at least one arbitrator. offerDetailsWindow.creationDate=Creation date: offerDetailsWindow.makersOnion=Maker's onion address: @@ -1145,21 +1145,21 @@ popup.warning.startupFailed.timeout=The application could not startup after 4 mi popup.warning.startupFailed.twoInstances=bisq is already running. You cannot run two instances of bisq. popup.warning.cryptoTestFailed=Seems that you use a self compiled binary and have not following the build instructions in https://github.com/bisq/bisq/blob/master/doc/build.md#7-enable-unlimited-strength-for-cryptographic-keys.\n\nIf that is not the case and you use the official bisq binary, please file a bug report to the Github page.\nError={0} popup.warning.oldOffers.msg=You have open offers which have been created with an older version of bisq.\nPlease remove those offers as they are not valid anymore.\n\nOffers (ID): {0} -popup.warning.oldOffers.buttonText=Remove outdated offerPayload(s) +popup.warning.oldOffers.buttonText=Remove outdated offer(s) popup.warning.tradePeriod.halfReached=Your trade with ID {0} has reached the half of the max. allowed trading period and is still not completed.\n\nThe trade period ends on {1}\n\nPlease check your trade state at \"Portfolio/Open trades\" for further information. popup.warning.tradePeriod.ended=Your trade with ID {0} has reached the max. allowed trading period and is not completed.\n\nThe trade period ended on {1}\n\nPlease check your trade at \"Portfolio/Open trades\" for contacting the arbitrator. popup.warning.noTradingAccountSetup.headline=You have not setup a trading account -popup.warning.noTradingAccountSetup.msg=You need to setup a national currency or altcoin account before you can create an offerPayload.\nDo you want to setup an account? +popup.warning.noTradingAccountSetup.msg=You need to setup a national currency or altcoin account before you can create an offer.\nDo you want to setup an account? popup.warning.noArbitratorSelected.headline=You don't have an arbitrator selected. popup.warning.noArbitratorSelected.msg=You need to setup at least one arbitrator to be able to trade.\nDo you want to do this now? popup.warning.notFullyConnected=You need to wait until you are fully connected to the network.\nThat might take up to about 2 minutes at startup. -popup.warning.removeOffer=Are you sure you want to remove that offerPayload?\nThe maker fee of {0} will be lost if you remove that offerPayload. +popup.warning.removeOffer=Are you sure you want to remove that offer?\nThe maker fee of {0} will be lost if you remove that offer. popup.warning.tooLargePercentageValue=You cannot set a percentage of 100% or larger. popup.warning.examplePercentageValue=Please enter a percentage number like \"5.4\" for 5.4% popup.warning.noPriceFeedAvailable=There is no price feed available for that currency. You cannot use a percent based price.\nPlease select the fixed price. popup.warning.sendMsgFailed=Sending message to your trading partner failed.\nPlease try again and if it continue to fail report a bug. -popup.info.securityDepositInfo=To ensure that both traders follow the trade protocol they need to pay a security deposit.\n\nThe deposit will stay in your local trading wallet until the offerPayload gets accepted by another trader.\nIt will be refunded to you after the trade has successfully completed.\n\nPlease note that you need to keep you application running if you have an open offerPayload.\nWhen another trader wants to take your offerPayload it requires that your application is online and able to react.\nBe sure that you have standby mode deactivated as that would disconnect your client from the network (standby of the monitor is not a problem). +popup.info.securityDepositInfo=To ensure that both traders follow the trade protocol they need to pay a security deposit.\n\nThe deposit will stay in your local trading wallet until the offer gets accepted by another trader.\nIt will be refunded to you after the trade has successfully completed.\n\nPlease note that you need to keep you application running if you have an open offer.\nWhen another trader wants to take your offer it requires that your application is online and able to react.\nBe sure that you have standby mode deactivated as that would disconnect your client from the network (standby of the monitor is not a problem). popup.privateNotification.headline=Important private notification! @@ -1179,7 +1179,7 @@ popup.attention.forTradeWithId=Attention required for trade with ID {0} notification.trade.headline=Notification for trade with ID {0} notification.ticket.headline=Support ticket for trade with ID {0} notification.trade.completed=The trade is now completed and you can withdraw your funds. -notification.trade.accepted=Your offerPayload has been accepted by a BTC {0}. +notification.trade.accepted=Your offer has been accepted by a BTC {0}. notification.trade.confirmed=Your trade has at least one blockchain confirmation.\nYou can start the payment now. notification.trade.paymentStarted=The BTC buyer has started the payment. notification.trade.selectTrade=Select trade @@ -1187,7 +1187,7 @@ notification.trade.peerOpenedDispute=Your trading peer has opened a {0}. notification.trade.disputeClosed=The {0} has been closed. notification.walletUpdate.headline=Trading wallet update notification.walletUpdate.msg=Your trading wallet is sufficiently funded.\nAmount: {0} -notification.takeOffer.walletUpdate.msg=Your trading wallet was already sufficiently funded from an earlier take offerPayload attempt.\nAmount: {0} +notification.takeOffer.walletUpdate.msg=Your trading wallet was already sufficiently funded from an earlier take offer attempt.\nAmount: {0} notification.tradeCompleted.headline=Trade completed notification.tradeCompleted.msg=You can withdraw your funds now to your external Bitcoin wallet or transfer it to the bisq wallet. @@ -1244,8 +1244,8 @@ list.currency.editList=Edit currency list table.placeholder.noItems=Currently there are no {0} available table.placeholder.noData=Currently there is no data available -peerInfoIcon.tooltip.offerPayload.traded=Maker''s onion address: {0}\nYou have already traded {1} times with that maker. -peerInfoIcon.tooltip.offerPayload.notTraded=Maker''s onion address: {0} +peerInfoIcon.tooltip.offer.traded=Maker''s onion address: {0}\nYou have already traded {1} times with that maker. +peerInfoIcon.tooltip.offer.notTraded=Maker''s onion address: {0} peerInfoIcon.tooltip.trade.traded=Trading peer''s onion address: {0}\nYou have already traded {1} times with that peer. peerInfoIcon.tooltip.trade.notTraded=Trading peer''s onion address: {0} @@ -1298,8 +1298,8 @@ formatter.makerTaker=Maker as {0} {1} / Taker as {2} {3} formatter.youAreAsMaker=You are {0} {1} as maker / Taker is {2} {3} formatter.youAreAsTaker=You are {0} {1} as taker / Maker is {2} {3} formatter.youAre=You are {0} {1} ({2} {3}) -formatter.youAreCreatingAnOffer.fiat=You are creating an offerPayload to {0} {1} -formatter.youAreCreatingAnOffer.altcoin=You are creating an offerPayload to {0} {1} ({2} {3}) +formatter.youAreCreatingAnOffer.fiat=You are creating an offer to {0} {1} +formatter.youAreCreatingAnOffer.altcoin=You are creating an offer to {0} {1} ({2} {3}) formatter.asMaker={0} {1} as maker formatter.asTaker={0} {1} as taker diff --git a/common/src/main/resources/i18n/in_dev/displayStrings_ae.properties b/common/src/main/resources/i18n/in_dev/displayStrings_ae.properties index 75d1d988a5..a0550844e5 100644 --- a/common/src/main/resources/i18n/in_dev/displayStrings_ae.properties +++ b/common/src/main/resources/i18n/in_dev/displayStrings_ae.properties @@ -93,42 +93,42 @@ validation.bankIdNumber={0} must consist of {1} numbers. validation.accountNr=Account number must consist of {0} numbers. validation.accountNrChars=Account number must consist of {0} characters. -# Create offerPayload +# Create offer createOffer.amount.prompt=Enter amount in BTC createOffer.price.prompt=Enter price createOffer.volume.prompt=Enter amount in {0} # TODO remove createOffer.minAmount.prompt=Enter min. amount -# TODO remove createOffer.amountPriceBox.title=Create your offerPayload +# TODO remove createOffer.amountPriceBox.title=Create your offer createOffer.amountPriceBox.amountDescription=Amount of bitcoin to {0} createOffer.amountPriceBox.priceDescriptionFiat=Fixed price per {0} createOffer.amountPriceBox.buy.volumeDescription=Amount in {0} to spend createOffer.amountPriceBox.sell.volumeDescription=Amount in {0} to receive createOffer.amountPriceBox.minAmountDescription=Minimum amount of BTC -# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. -# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. +# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. +# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. # TODO remove createOffer.amountPriceBox.next=Next step # TODO remove createOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. # TODO remove createOffer.amountPriceBox.warning.invalidFiatDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted. # TODO remove createOffer.amountPriceBox.warning.adjustedVolume=The total volume you have entered leads to invalid fractional bitcoin amounts. The amount has been adjusted and a new total volume be calculated from it. -createOffer.amountPriceBox.error.message=An error occurred when placing the offerPayload:\n\n{0} +createOffer.amountPriceBox.error.message=An error occurred when placing the offer:\n\n{0} # TODO remove createOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount. # TODO remove createOffer.validation.minAmountLargerThanAmount=Minimum amount cannot be larger than amount. -createOffer.fundsBox.title=Fund your offerPayload +createOffer.fundsBox.title=Fund your offer createOffer.fundsBox.totalsNeeded=Funds needed: createOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above createOffer.fundsBox.address=Trade wallet address: createOffer.fundsBox.balance=Trade wallet balance: -# TODO remove createOffer.fundsBox.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offerPayload gets executed. If you cancel your offerPayload you can withdraw your funds from that trading wallet. The only payment made when placing an offerPayload is the offerPayload fee payment. https://bisq.io/faq/#6 +# TODO remove createOffer.fundsBox.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offer gets executed. If you cancel your offer you can withdraw your funds from that trading wallet. The only payment made when placing an offer is the offer fee payment. https://bisq.io/faq/#6 createOffer.fundsBox.tradeAmount=Trade amount: createOffer.fundsBox.securityDeposit=Security deposit: -createOffer.fundsBox.offerFee=Create offerPayload fee: +createOffer.fundsBox.offerFee=Create offer fee: createOffer.fundsBox.networkFee=Mining fee: createOffer.fundsBox.total=Total: # TODO remove createOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove createOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove createOffer.fundsBox.placeOffer=Place offerPayload +# TODO remove createOffer.fundsBox.placeOffer=Place offer createOffer.fundsBox.placeOfferSpinnerInfo=Offer publishing is in progress ... createOffer.fundsBox.paymentLabel=bisq trade with ID {0} @@ -139,20 +139,20 @@ createOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove createOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove createOffer.advancedBox.county=Payments account country: -# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offerPayload restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). +# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offer restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). -createOffer.success.headline=Your offerPayload has been published +createOffer.success.headline=Your offer has been published createOffer.success.info=You can manage your open offers in the \"Portfolio\" screen under \"My open offers\". -# TODO remove createOffer.error.message=An error occurred when placing the offerPayload.\n\n{0} +# TODO remove createOffer.error.message=An error occurred when placing the offer.\n\n{0} -# Take offerPayload +# Take offer takeOffer.amount.prompt=Enter amount in BTC # TODO remove takeOffer.price.prompt=Enter price # TODO remove takeOffer.volume.prompt=Enter amount in {0} # TODO remove takeOffer.minAmount.prompt=Enter min. amount -# TODO remove takeOffer.amountPriceBox.title=Take offerPayload +# TODO remove takeOffer.amountPriceBox.title=Take offer # TODO remove takeOffer.amountPriceBox.subTitle=Buy bitcoin takeOffer.amountPriceBox.buy.amountDescription=Amount of bitcoin to sell takeOffer.amountPriceBox.sell.amountDescription=Amount of bitcoin to buy @@ -164,30 +164,30 @@ takeOffer.amountPriceBox.amountRangeDescription=Possible amount range # TODO remove takeOffer.amountPriceBox.sell.info=Enter the amount of bitcoin you want to buy. You can choose an amount between the minimum amount and the amount. # TODO remove takeOffer.amountPriceBox.next=Next step takeOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. -takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offerPayload. -takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offerPayload. +takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offer. +takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offer. takeOffer.validation.amountLargerThanOfferAmountMinusFee=That input amount would create dust change for the BTC seller. takeOffer.fundsBox.title=Fund your trade -takeOffer.fundsBox.isOfferAvailable=Check if offerPayload is available ... +takeOffer.fundsBox.isOfferAvailable=Check if offer is available ... takeOffer.fundsBox.totalsNeeded=Funds needed: # TODO remove takeOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above takeOffer.fundsBox.address=Trade wallet address: takeOffer.fundsBox.balance=Trade wallet balance: -# TODO remove takeOffer.fundsBox.buy.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.buy.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid in to a locked deposit address. At the end of a successful trade you will get back your security deposit and the bitcoin amount you sold will be transferred \ to the BTC buyer. -# TODO remove takeOffer.fundsBox.sell.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.sell.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid into a locked deposit address. At the end of a successful trade you will get back your security deposit. takeOffer.fundsBox.tradeAmount=Amount to sell: takeOffer.fundsBox.securityDeposit=Security deposit: -takeOffer.fundsBox.offerFee=Take offerPayload fee: +takeOffer.fundsBox.offerFee=Take offer fee: takeOffer.fundsBox.networkFee=Mining fee: takeOffer.fundsBox.total=Total: # TODO remove takeOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove takeOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove takeOffer.fundsBox.takeOffer=Take offerPayload -takeOffer.fundsBox.takeOfferSpinnerInfo=Take offerPayload in progress ... +# TODO remove takeOffer.fundsBox.takeOffer=Take offer +takeOffer.fundsBox.takeOfferSpinnerInfo=Take offer in progress ... takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.title=Advanced settings @@ -197,12 +197,12 @@ takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove takeOffer.advancedBox.county=Payments account country: -# TODO remove takeOffer.advancedBox.info=These are the offerPayload restrictions your trading partner has defined in his offerPayload. \ +# TODO remove takeOffer.advancedBox.info=These are the offer restrictions your trading partner has defined in his offer. \ Your settings match those constraints and you are able to trade with him. -takeOffer.success.headline=You have successfully taken an offerPayload. +takeOffer.success.headline=You have successfully taken an offer. takeOffer.success.info=You can see the status of your trade at the \"Portfolio\" screen under \"Open trades\". -takeOffer.error.message=An error occurred when taking the offerPayload.\n\n{0} +takeOffer.error.message=An error occurred when taking the offer.\n\n{0} # Payment methods # remove N/A=Not available diff --git a/common/src/main/resources/i18n/in_dev/displayStrings_ba.properties b/common/src/main/resources/i18n/in_dev/displayStrings_ba.properties index cf344c8b17..60dc00dcc1 100644 --- a/common/src/main/resources/i18n/in_dev/displayStrings_ba.properties +++ b/common/src/main/resources/i18n/in_dev/displayStrings_ba.properties @@ -93,42 +93,42 @@ validation.bankIdNumber={0} must consist of {1} numbers. validation.accountNr=Account number must consist of {0} numbers. validation.accountNrChars=Account number must consist of {0} characters. -# Create offerPayload +# Create offer createOffer.amount.prompt=Enter amount in BTC createOffer.price.prompt=Enter price createOffer.volume.prompt=Enter amount in {0} # TODO remove createOffer.minAmount.prompt=Enter min. amount -# TODO remove createOffer.amountPriceBox.title=Create your offerPayload +# TODO remove createOffer.amountPriceBox.title=Create your offer createOffer.amountPriceBox.amountDescription=Amount of bitcoin to {0} createOffer.amountPriceBox.priceDescriptionFiat=Fixed price per {0} createOffer.amountPriceBox.buy.volumeDescription=Amount in {0} to spend createOffer.amountPriceBox.sell.volumeDescription=Amount in {0} to receive createOffer.amountPriceBox.minAmountDescription=Minimum amount of BTC -# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. -# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. +# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. +# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. # TODO remove createOffer.amountPriceBox.next=Next step # TODO remove createOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. # TODO remove createOffer.amountPriceBox.warning.invalidFiatDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted. # TODO remove createOffer.amountPriceBox.warning.adjustedVolume=The total volume you have entered leads to invalid fractional bitcoin amounts. The amount has been adjusted and a new total volume be calculated from it. -createOffer.amountPriceBox.error.message=An error occurred when placing the offerPayload:\n\n{0} +createOffer.amountPriceBox.error.message=An error occurred when placing the offer:\n\n{0} # TODO remove createOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount. # TODO remove createOffer.validation.minAmountLargerThanAmount=Minimum amount cannot be larger than amount. -createOffer.fundsBox.title=Fund your offerPayload +createOffer.fundsBox.title=Fund your offer createOffer.fundsBox.totalsNeeded=Funds needed: createOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above createOffer.fundsBox.address=Trade wallet address: createOffer.fundsBox.balance=Trade wallet balance: -# TODO remove createOffer.fundsBox.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offerPayload gets executed. If you cancel your offerPayload you can withdraw your funds from that trading wallet. The only payment made when placing an offerPayload is the offerPayload fee payment. https://bisq.io/faq/#6 +# TODO remove createOffer.fundsBox.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offer gets executed. If you cancel your offer you can withdraw your funds from that trading wallet. The only payment made when placing an offer is the offer fee payment. https://bisq.io/faq/#6 createOffer.fundsBox.tradeAmount=Trade amount: createOffer.fundsBox.securityDeposit=Security deposit: -createOffer.fundsBox.offerFee=Create offerPayload fee: +createOffer.fundsBox.offerFee=Create offer fee: createOffer.fundsBox.networkFee=Mining fee: createOffer.fundsBox.total=Total: # TODO remove createOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove createOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove createOffer.fundsBox.placeOffer=Place offerPayload +# TODO remove createOffer.fundsBox.placeOffer=Place offer createOffer.fundsBox.placeOfferSpinnerInfo=Offer publishing is in progress ... createOffer.fundsBox.paymentLabel=bisq trade with ID {0} @@ -139,20 +139,20 @@ createOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove createOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove createOffer.advancedBox.county=Payments account country: -# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offerPayload restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). +# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offer restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). -createOffer.success.headline=Your offerPayload has been published +createOffer.success.headline=Your offer has been published createOffer.success.info=You can manage your open offers in the \"Portfolio\" screen under \"My open offers\". -# TODO remove createOffer.error.message=An error occurred when placing the offerPayload.\n\n{0} +# TODO remove createOffer.error.message=An error occurred when placing the offer.\n\n{0} -# Take offerPayload +# Take offer takeOffer.amount.prompt=Enter amount in BTC # TODO remove takeOffer.price.prompt=Enter price # TODO remove takeOffer.volume.prompt=Enter amount in {0} # TODO remove takeOffer.minAmount.prompt=Enter min. amount -# TODO remove takeOffer.amountPriceBox.title=Take offerPayload +# TODO remove takeOffer.amountPriceBox.title=Take offer # TODO remove takeOffer.amountPriceBox.subTitle=Buy bitcoin takeOffer.amountPriceBox.buy.amountDescription=Amount of bitcoin to sell takeOffer.amountPriceBox.sell.amountDescription=Amount of bitcoin to buy @@ -164,30 +164,30 @@ takeOffer.amountPriceBox.amountRangeDescription=Possible amount range # TODO remove takeOffer.amountPriceBox.sell.info=Enter the amount of bitcoin you want to buy. You can choose an amount between the minimum amount and the amount. # TODO remove takeOffer.amountPriceBox.next=Next step takeOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. -takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offerPayload. -takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offerPayload. +takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offer. +takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offer. takeOffer.validation.amountLargerThanOfferAmountMinusFee=That input amount would create dust change for the BTC seller. takeOffer.fundsBox.title=Fund your trade -takeOffer.fundsBox.isOfferAvailable=Check if offerPayload is available ... +takeOffer.fundsBox.isOfferAvailable=Check if offer is available ... takeOffer.fundsBox.totalsNeeded=Funds needed: # TODO remove takeOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above takeOffer.fundsBox.address=Trade wallet address: takeOffer.fundsBox.balance=Trade wallet balance: -# TODO remove takeOffer.fundsBox.buy.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.buy.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid in to a locked deposit address. At the end of a successful trade you will get back your security deposit and the bitcoin amount you sold will be transferred \ to the BTC buyer. -# TODO remove takeOffer.fundsBox.sell.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.sell.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid into a locked deposit address. At the end of a successful trade you will get back your security deposit. takeOffer.fundsBox.tradeAmount=Amount to sell: takeOffer.fundsBox.securityDeposit=Security deposit: -takeOffer.fundsBox.offerFee=Take offerPayload fee: +takeOffer.fundsBox.offerFee=Take offer fee: takeOffer.fundsBox.networkFee=Mining fee: takeOffer.fundsBox.total=Total: # TODO remove takeOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove takeOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove takeOffer.fundsBox.takeOffer=Take offerPayload -takeOffer.fundsBox.takeOfferSpinnerInfo=Take offerPayload in progress ... +# TODO remove takeOffer.fundsBox.takeOffer=Take offer +takeOffer.fundsBox.takeOfferSpinnerInfo=Take offer in progress ... takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.title=Advanced settings @@ -197,12 +197,12 @@ takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove takeOffer.advancedBox.county=Payments account country: -# TODO remove takeOffer.advancedBox.info=These are the offerPayload restrictions your trading partner has defined in his offerPayload. \ +# TODO remove takeOffer.advancedBox.info=These are the offer restrictions your trading partner has defined in his offer. \ Your settings match those constraints and you are able to trade with him. -takeOffer.success.headline=You have successfully taken an offerPayload. +takeOffer.success.headline=You have successfully taken an offer. takeOffer.success.info=You can see the status of your trade at the \"Portfolio\" screen under \"Open trades\". -takeOffer.error.message=An error occurred when taking the offerPayload.\n\n{0} +takeOffer.error.message=An error occurred when taking the offer.\n\n{0} # Payment methods # remove N/A=Not available diff --git a/common/src/main/resources/i18n/in_dev/displayStrings_br.properties b/common/src/main/resources/i18n/in_dev/displayStrings_br.properties index fa174cc907..bbaf1def05 100644 --- a/common/src/main/resources/i18n/in_dev/displayStrings_br.properties +++ b/common/src/main/resources/i18n/in_dev/displayStrings_br.properties @@ -93,42 +93,42 @@ validation.bankIdNumber={0} must consist of {1} numbers. validation.accountNr=Account number must consist of {0} numbers. validation.accountNrChars=Account number must consist of {0} characters. -# Create offerPayload +# Create offer createOffer.amount.prompt=Enter amount in BTC createOffer.price.prompt=Enter price createOffer.volume.prompt=Enter amount in {0} # TODO remove createOffer.minAmount.prompt=Enter min. amount -# TODO remove createOffer.amountPriceBox.title=Create your offerPayload +# TODO remove createOffer.amountPriceBox.title=Create your offer createOffer.amountPriceBox.amountDescription=Amount of bitcoin to {0} createOffer.amountPriceBox.priceDescriptionFiat=Fixed price per {0} createOffer.amountPriceBox.buy.volumeDescription=Amount in {0} to spend createOffer.amountPriceBox.sell.volumeDescription=Amount in {0} to receive createOffer.amountPriceBox.minAmountDescription=Minimum amount of BTC -# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. -# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. +# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. +# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. # TODO remove createOffer.amountPriceBox.next=Next step # TODO remove createOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. # TODO remove createOffer.amountPriceBox.warning.invalidFiatDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted. # TODO remove createOffer.amountPriceBox.warning.adjustedVolume=The total volume you have entered leads to invalid fractional bitcoin amounts. The amount has been adjusted and a new total volume be calculated from it. -createOffer.amountPriceBox.error.message=An error occurred when placing the offerPayload:\n\n{0} +createOffer.amountPriceBox.error.message=An error occurred when placing the offer:\n\n{0} # TODO remove createOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount. # TODO remove createOffer.validation.minAmountLargerThanAmount=Minimum amount cannot be larger than amount. -createOffer.fundsBox.title=Fund your offerPayload +createOffer.fundsBox.title=Fund your offer createOffer.fundsBox.totalsNeeded=Funds needed: createOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above createOffer.fundsBox.address=Trade wallet address: createOffer.fundsBox.balance=Trade wallet balance: -# TODO remove createOffer.fundsBox.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offerPayload gets executed. If you cancel your offerPayload you can withdraw your funds from that trading wallet. The only payment made when placing an offerPayload is the offerPayload fee payment. https://bisq.io/faq/#6 +# TODO remove createOffer.fundsBox.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offer gets executed. If you cancel your offer you can withdraw your funds from that trading wallet. The only payment made when placing an offer is the offer fee payment. https://bisq.io/faq/#6 createOffer.fundsBox.tradeAmount=Trade amount: createOffer.fundsBox.securityDeposit=Security deposit: -createOffer.fundsBox.offerFee=Create offerPayload fee: +createOffer.fundsBox.offerFee=Create offer fee: createOffer.fundsBox.networkFee=Mining fee: createOffer.fundsBox.total=Total: # TODO remove createOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove createOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove createOffer.fundsBox.placeOffer=Place offerPayload +# TODO remove createOffer.fundsBox.placeOffer=Place offer createOffer.fundsBox.placeOfferSpinnerInfo=Offer publishing is in progress ... createOffer.fundsBox.paymentLabel=bisq trade with ID {0} @@ -139,20 +139,20 @@ createOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove createOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove createOffer.advancedBox.county=Payments account country: -# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offerPayload restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). +# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offer restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). -createOffer.success.headline=Your offerPayload has been published +createOffer.success.headline=Your offer has been published createOffer.success.info=You can manage your open offers in the \"Portfolio\" screen under \"My open offers\". -# TODO remove createOffer.error.message=An error occurred when placing the offerPayload.\n\n{0} +# TODO remove createOffer.error.message=An error occurred when placing the offer.\n\n{0} -# Take offerPayload +# Take offer takeOffer.amount.prompt=Enter amount in BTC # TODO remove takeOffer.price.prompt=Enter price # TODO remove takeOffer.volume.prompt=Enter amount in {0} # TODO remove takeOffer.minAmount.prompt=Enter min. amount -# TODO remove takeOffer.amountPriceBox.title=Take offerPayload +# TODO remove takeOffer.amountPriceBox.title=Take offer # TODO remove takeOffer.amountPriceBox.subTitle=Buy bitcoin takeOffer.amountPriceBox.buy.amountDescription=Amount of bitcoin to sell takeOffer.amountPriceBox.sell.amountDescription=Amount of bitcoin to buy @@ -164,30 +164,30 @@ takeOffer.amountPriceBox.amountRangeDescription=Possible amount range # TODO remove takeOffer.amountPriceBox.sell.info=Enter the amount of bitcoin you want to buy. You can choose an amount between the minimum amount and the amount. # TODO remove takeOffer.amountPriceBox.next=Next step takeOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. -takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offerPayload. -takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offerPayload. +takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offer. +takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offer. takeOffer.validation.amountLargerThanOfferAmountMinusFee=That input amount would create dust change for the BTC seller. takeOffer.fundsBox.title=Fund your trade -takeOffer.fundsBox.isOfferAvailable=Check if offerPayload is available ... +takeOffer.fundsBox.isOfferAvailable=Check if offer is available ... takeOffer.fundsBox.totalsNeeded=Funds needed: # TODO remove takeOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above takeOffer.fundsBox.address=Trade wallet address: takeOffer.fundsBox.balance=Trade wallet balance: -# TODO remove takeOffer.fundsBox.buy.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.buy.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid in to a locked deposit address. At the end of a successful trade you will get back your security deposit and the bitcoin amount you sold will be transferred \ to the BTC buyer. -# TODO remove takeOffer.fundsBox.sell.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.sell.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid into a locked deposit address. At the end of a successful trade you will get back your security deposit. takeOffer.fundsBox.tradeAmount=Amount to sell: takeOffer.fundsBox.securityDeposit=Security deposit: -takeOffer.fundsBox.offerFee=Take offerPayload fee: +takeOffer.fundsBox.offerFee=Take offer fee: takeOffer.fundsBox.networkFee=Mining fee: takeOffer.fundsBox.total=Total: # TODO remove takeOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove takeOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove takeOffer.fundsBox.takeOffer=Take offerPayload -takeOffer.fundsBox.takeOfferSpinnerInfo=Take offerPayload in progress ... +# TODO remove takeOffer.fundsBox.takeOffer=Take offer +takeOffer.fundsBox.takeOfferSpinnerInfo=Take offer in progress ... takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.title=Advanced settings @@ -197,12 +197,12 @@ takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove takeOffer.advancedBox.county=Payments account country: -# TODO remove takeOffer.advancedBox.info=These are the offerPayload restrictions your trading partner has defined in his offerPayload. \ +# TODO remove takeOffer.advancedBox.info=These are the offer restrictions your trading partner has defined in his offer. \ Your settings match those constraints and you are able to trade with him. -takeOffer.success.headline=You have successfully taken an offerPayload. +takeOffer.success.headline=You have successfully taken an offer. takeOffer.success.info=You can see the status of your trade at the \"Portfolio\" screen under \"Open trades\". -takeOffer.error.message=An error occurred when taking the offerPayload.\n\n{0} +takeOffer.error.message=An error occurred when taking the offer.\n\n{0} # Payment methods # remove N/A=Not available diff --git a/common/src/main/resources/i18n/in_dev/displayStrings_cn.properties b/common/src/main/resources/i18n/in_dev/displayStrings_cn.properties index 90acfc8153..01c5863cba 100644 --- a/common/src/main/resources/i18n/in_dev/displayStrings_cn.properties +++ b/common/src/main/resources/i18n/in_dev/displayStrings_cn.properties @@ -93,42 +93,42 @@ validation.bankIdNumber={0} must consist of {1} numbers. validation.accountNr=Account number must consist of {0} numbers. validation.accountNrChars=Account number must consist of {0} characters. -# Create offerPayload +# Create offer createOffer.amount.prompt=Enter amount in BTC createOffer.price.prompt=Enter price createOffer.volume.prompt=Enter amount in {0} # TODO remove createOffer.minAmount.prompt=Enter min. amount -# TODO remove createOffer.amountPriceBox.title=Create your offerPayload +# TODO remove createOffer.amountPriceBox.title=Create your offer createOffer.amountPriceBox.amountDescription=Amount of bitcoin to {0} createOffer.amountPriceBox.priceDescriptionFiat=Fixed price per {0} createOffer.amountPriceBox.buy.volumeDescription=Amount in {0} to spend createOffer.amountPriceBox.sell.volumeDescription=Amount in {0} to receive createOffer.amountPriceBox.minAmountDescription=Minimum amount of BTC -# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. -# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. +# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. +# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. # TODO remove createOffer.amountPriceBox.next=Next step # TODO remove createOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. # TODO remove createOffer.amountPriceBox.warning.invalidFiatDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted. # TODO remove createOffer.amountPriceBox.warning.adjustedVolume=The total volume you have entered leads to invalid fractional bitcoin amounts. The amount has been adjusted and a new total volume be calculated from it. -createOffer.amountPriceBox.error.message=An error occurred when placing the offerPayload:\n\n{0} +createOffer.amountPriceBox.error.message=An error occurred when placing the offer:\n\n{0} # TODO remove createOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount. # TODO remove createOffer.validation.minAmountLargerThanAmount=Minimum amount cannot be larger than amount. -createOffer.fundsBox.title=Fund your offerPayload +createOffer.fundsBox.title=Fund your offer createOffer.fundsBox.totalsNeeded=Funds needed: createOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above createOffer.fundsBox.address=Trade wallet address: createOffer.fundsBox.balance=Trade wallet balance: -# TODO remove createOffer.fundsBox.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offerPayload gets executed. If you cancel your offerPayload you can withdraw your funds from that trading wallet. The only payment made when placing an offerPayload is the offerPayload fee payment. https://bisq.io/faq/#6 +# TODO remove createOffer.fundsBox.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offer gets executed. If you cancel your offer you can withdraw your funds from that trading wallet. The only payment made when placing an offer is the offer fee payment. https://bisq.io/faq/#6 createOffer.fundsBox.tradeAmount=Trade amount: createOffer.fundsBox.securityDeposit=Security deposit: -createOffer.fundsBox.offerFee=Create offerPayload fee: +createOffer.fundsBox.offerFee=Create offer fee: createOffer.fundsBox.networkFee=Mining fee: createOffer.fundsBox.total=Total: # TODO remove createOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove createOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove createOffer.fundsBox.placeOffer=Place offerPayload +# TODO remove createOffer.fundsBox.placeOffer=Place offer createOffer.fundsBox.placeOfferSpinnerInfo=Offer publishing is in progress ... createOffer.fundsBox.paymentLabel=bisq trade with ID {0} @@ -139,20 +139,20 @@ createOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove createOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove createOffer.advancedBox.county=Payments account country: -# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offerPayload restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). +# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offer restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). -createOffer.success.headline=Your offerPayload has been published +createOffer.success.headline=Your offer has been published createOffer.success.info=You can manage your open offers in the \"Portfolio\" screen under \"My open offers\". -# TODO remove createOffer.error.message=An error occurred when placing the offerPayload.\n\n{0} +# TODO remove createOffer.error.message=An error occurred when placing the offer.\n\n{0} -# Take offerPayload +# Take offer takeOffer.amount.prompt=Enter amount in BTC # TODO remove takeOffer.price.prompt=Enter price # TODO remove takeOffer.volume.prompt=Enter amount in {0} # TODO remove takeOffer.minAmount.prompt=Enter min. amount -# TODO remove takeOffer.amountPriceBox.title=Take offerPayload +# TODO remove takeOffer.amountPriceBox.title=Take offer # TODO remove takeOffer.amountPriceBox.subTitle=Buy bitcoin takeOffer.amountPriceBox.buy.amountDescription=Amount of bitcoin to sell takeOffer.amountPriceBox.sell.amountDescription=Amount of bitcoin to buy @@ -164,30 +164,30 @@ takeOffer.amountPriceBox.amountRangeDescription=Possible amount range # TODO remove takeOffer.amountPriceBox.sell.info=Enter the amount of bitcoin you want to buy. You can choose an amount between the minimum amount and the amount. # TODO remove takeOffer.amountPriceBox.next=Next step takeOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. -takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offerPayload. -takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offerPayload. +takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offer. +takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offer. takeOffer.validation.amountLargerThanOfferAmountMinusFee=That input amount would create dust change for the BTC seller. takeOffer.fundsBox.title=Fund your trade -takeOffer.fundsBox.isOfferAvailable=Check if offerPayload is available ... +takeOffer.fundsBox.isOfferAvailable=Check if offer is available ... takeOffer.fundsBox.totalsNeeded=Funds needed: # TODO remove takeOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above takeOffer.fundsBox.address=Trade wallet address: takeOffer.fundsBox.balance=Trade wallet balance: -# TODO remove takeOffer.fundsBox.buy.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.buy.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid in to a locked deposit address. At the end of a successful trade you will get back your security deposit and the bitcoin amount you sold will be transferred \ to the BTC buyer. -# TODO remove takeOffer.fundsBox.sell.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.sell.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid into a locked deposit address. At the end of a successful trade you will get back your security deposit. takeOffer.fundsBox.tradeAmount=Amount to sell: takeOffer.fundsBox.securityDeposit=Security deposit: -takeOffer.fundsBox.offerFee=Take offerPayload fee: +takeOffer.fundsBox.offerFee=Take offer fee: takeOffer.fundsBox.networkFee=Mining fee: takeOffer.fundsBox.total=Total: # TODO remove takeOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove takeOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove takeOffer.fundsBox.takeOffer=Take offerPayload -takeOffer.fundsBox.takeOfferSpinnerInfo=Take offerPayload in progress ... +# TODO remove takeOffer.fundsBox.takeOffer=Take offer +takeOffer.fundsBox.takeOfferSpinnerInfo=Take offer in progress ... takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.title=Advanced settings @@ -197,12 +197,12 @@ takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove takeOffer.advancedBox.county=Payments account country: -# TODO remove takeOffer.advancedBox.info=These are the offerPayload restrictions your trading partner has defined in his offerPayload. \ +# TODO remove takeOffer.advancedBox.info=These are the offer restrictions your trading partner has defined in his offer. \ Your settings match those constraints and you are able to trade with him. -takeOffer.success.headline=You have successfully taken an offerPayload. +takeOffer.success.headline=You have successfully taken an offer. takeOffer.success.info=You can see the status of your trade at the \"Portfolio\" screen under \"Open trades\". -takeOffer.error.message=An error occurred when taking the offerPayload.\n\n{0} +takeOffer.error.message=An error occurred when taking the offer.\n\n{0} # Payment methods # remove N/A=Not available diff --git a/common/src/main/resources/i18n/in_dev/displayStrings_cz.properties b/common/src/main/resources/i18n/in_dev/displayStrings_cz.properties index 9e8bc93ffa..99ddafddeb 100644 --- a/common/src/main/resources/i18n/in_dev/displayStrings_cz.properties +++ b/common/src/main/resources/i18n/in_dev/displayStrings_cz.properties @@ -93,42 +93,42 @@ validation.bankIdNumber={0} must consist of {1} numbers. validation.accountNr=Account number must consist of {0} numbers. validation.accountNrChars=Account number must consist of {0} characters. -# Create offerPayload +# Create offer createOffer.amount.prompt=Enter amount in BTC createOffer.price.prompt=Enter price createOffer.volume.prompt=Enter amount in {0} # TODO remove createOffer.minAmount.prompt=Enter min. amount -# TODO remove createOffer.amountPriceBox.title=Create your offerPayload +# TODO remove createOffer.amountPriceBox.title=Create your offer createOffer.amountPriceBox.amountDescription=Amount of bitcoin to {0} createOffer.amountPriceBox.priceDescriptionFiat=Fixed price per {0} createOffer.amountPriceBox.buy.volumeDescription=Amount in {0} to spend createOffer.amountPriceBox.sell.volumeDescription=Amount in {0} to receive createOffer.amountPriceBox.minAmountDescription=Minimum amount of BTC -# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. -# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. +# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. +# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. # TODO remove createOffer.amountPriceBox.next=Next step # TODO remove createOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. # TODO remove createOffer.amountPriceBox.warning.invalidFiatDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted. # TODO remove createOffer.amountPriceBox.warning.adjustedVolume=The total volume you have entered leads to invalid fractional bitcoin amounts. The amount has been adjusted and a new total volume be calculated from it. -createOffer.amountPriceBox.error.message=An error occurred when placing the offerPayload:\n\n{0} +createOffer.amountPriceBox.error.message=An error occurred when placing the offer:\n\n{0} # TODO remove createOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount. # TODO remove createOffer.validation.minAmountLargerThanAmount=Minimum amount cannot be larger than amount. -createOffer.fundsBox.title=Fund your offerPayload +createOffer.fundsBox.title=Fund your offer createOffer.fundsBox.totalsNeeded=Funds needed: createOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above createOffer.fundsBox.address=Trade wallet address: createOffer.fundsBox.balance=Trade wallet balance: -# TODO remove createOffer.fundsBox.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offerPayload gets executed. If you cancel your offerPayload you can withdraw your funds from that trading wallet. The only payment made when placing an offerPayload is the offerPayload fee payment. https://bisq.io/faq/#6 +# TODO remove createOffer.fundsBox.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offer gets executed. If you cancel your offer you can withdraw your funds from that trading wallet. The only payment made when placing an offer is the offer fee payment. https://bisq.io/faq/#6 createOffer.fundsBox.tradeAmount=Trade amount: createOffer.fundsBox.securityDeposit=Security deposit: -createOffer.fundsBox.offerFee=Create offerPayload fee: +createOffer.fundsBox.offerFee=Create offer fee: createOffer.fundsBox.networkFee=Mining fee: createOffer.fundsBox.total=Total: # TODO remove createOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove createOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove createOffer.fundsBox.placeOffer=Place offerPayload +# TODO remove createOffer.fundsBox.placeOffer=Place offer createOffer.fundsBox.placeOfferSpinnerInfo=Offer publishing is in progress ... createOffer.fundsBox.paymentLabel=bisq trade with ID {0} @@ -139,20 +139,20 @@ createOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove createOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove createOffer.advancedBox.county=Payments account country: -# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offerPayload restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). +# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offer restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). -createOffer.success.headline=Your offerPayload has been published +createOffer.success.headline=Your offer has been published createOffer.success.info=You can manage your open offers in the \"Portfolio\" screen under \"My open offers\". -# TODO remove createOffer.error.message=An error occurred when placing the offerPayload.\n\n{0} +# TODO remove createOffer.error.message=An error occurred when placing the offer.\n\n{0} -# Take offerPayload +# Take offer takeOffer.amount.prompt=Enter amount in BTC # TODO remove takeOffer.price.prompt=Enter price # TODO remove takeOffer.volume.prompt=Enter amount in {0} # TODO remove takeOffer.minAmount.prompt=Enter min. amount -# TODO remove takeOffer.amountPriceBox.title=Take offerPayload +# TODO remove takeOffer.amountPriceBox.title=Take offer # TODO remove takeOffer.amountPriceBox.subTitle=Buy bitcoin takeOffer.amountPriceBox.buy.amountDescription=Amount of bitcoin to sell takeOffer.amountPriceBox.sell.amountDescription=Amount of bitcoin to buy @@ -164,30 +164,30 @@ takeOffer.amountPriceBox.amountRangeDescription=Possible amount range # TODO remove takeOffer.amountPriceBox.sell.info=Enter the amount of bitcoin you want to buy. You can choose an amount between the minimum amount and the amount. # TODO remove takeOffer.amountPriceBox.next=Next step takeOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. -takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offerPayload. -takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offerPayload. +takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offer. +takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offer. takeOffer.validation.amountLargerThanOfferAmountMinusFee=That input amount would create dust change for the BTC seller. takeOffer.fundsBox.title=Fund your trade -takeOffer.fundsBox.isOfferAvailable=Check if offerPayload is available ... +takeOffer.fundsBox.isOfferAvailable=Check if offer is available ... takeOffer.fundsBox.totalsNeeded=Funds needed: # TODO remove takeOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above takeOffer.fundsBox.address=Trade wallet address: takeOffer.fundsBox.balance=Trade wallet balance: -# TODO remove takeOffer.fundsBox.buy.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.buy.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid in to a locked deposit address. At the end of a successful trade you will get back your security deposit and the bitcoin amount you sold will be transferred \ to the BTC buyer. -# TODO remove takeOffer.fundsBox.sell.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.sell.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid into a locked deposit address. At the end of a successful trade you will get back your security deposit. takeOffer.fundsBox.tradeAmount=Amount to sell: takeOffer.fundsBox.securityDeposit=Security deposit: -takeOffer.fundsBox.offerFee=Take offerPayload fee: +takeOffer.fundsBox.offerFee=Take offer fee: takeOffer.fundsBox.networkFee=Mining fee: takeOffer.fundsBox.total=Total: # TODO remove takeOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove takeOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove takeOffer.fundsBox.takeOffer=Take offerPayload -takeOffer.fundsBox.takeOfferSpinnerInfo=Take offerPayload in progress ... +# TODO remove takeOffer.fundsBox.takeOffer=Take offer +takeOffer.fundsBox.takeOfferSpinnerInfo=Take offer in progress ... takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.title=Advanced settings @@ -197,12 +197,12 @@ takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove takeOffer.advancedBox.county=Payments account country: -# TODO remove takeOffer.advancedBox.info=These are the offerPayload restrictions your trading partner has defined in his offerPayload. \ +# TODO remove takeOffer.advancedBox.info=These are the offer restrictions your trading partner has defined in his offer. \ Your settings match those constraints and you are able to trade with him. -takeOffer.success.headline=You have successfully taken an offerPayload. +takeOffer.success.headline=You have successfully taken an offer. takeOffer.success.info=You can see the status of your trade at the \"Portfolio\" screen under \"Open trades\". -takeOffer.error.message=An error occurred when taking the offerPayload.\n\n{0} +takeOffer.error.message=An error occurred when taking the offer.\n\n{0} # Payment methods # remove N/A=Not available diff --git a/common/src/main/resources/i18n/in_dev/displayStrings_dk.properties b/common/src/main/resources/i18n/in_dev/displayStrings_dk.properties index d4887f0589..667d211f9d 100644 --- a/common/src/main/resources/i18n/in_dev/displayStrings_dk.properties +++ b/common/src/main/resources/i18n/in_dev/displayStrings_dk.properties @@ -93,42 +93,42 @@ validation.bankIdNumber={0} must consist of {1} numbers. validation.accountNr=Account number must consist of {0} numbers. validation.accountNrChars=Account number must consist of {0} characters. -# Create offerPayload +# Create offer createOffer.amount.prompt=Enter amount in BTC createOffer.price.prompt=Enter price createOffer.volume.prompt=Enter amount in {0} # TODO remove createOffer.minAmount.prompt=Enter min. amount -# TODO remove createOffer.amountPriceBox.title=Create your offerPayload +# TODO remove createOffer.amountPriceBox.title=Create your offer createOffer.amountPriceBox.amountDescription=Amount of bitcoin to {0} createOffer.amountPriceBox.priceDescriptionFiat=Fixed price per {0} createOffer.amountPriceBox.buy.volumeDescription=Amount in {0} to spend createOffer.amountPriceBox.sell.volumeDescription=Amount in {0} to receive createOffer.amountPriceBox.minAmountDescription=Minimum amount of BTC -# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. -# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. +# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. +# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. # TODO remove createOffer.amountPriceBox.next=Next step # TODO remove createOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. # TODO remove createOffer.amountPriceBox.warning.invalidFiatDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted. # TODO remove createOffer.amountPriceBox.warning.adjustedVolume=The total volume you have entered leads to invalid fractional bitcoin amounts. The amount has been adjusted and a new total volume be calculated from it. -createOffer.amountPriceBox.error.message=An error occurred when placing the offerPayload:\n\n{0} +createOffer.amountPriceBox.error.message=An error occurred when placing the offer:\n\n{0} # TODO remove createOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount. # TODO remove createOffer.validation.minAmountLargerThanAmount=Minimum amount cannot be larger than amount. -createOffer.fundsBox.title=Fund your offerPayload +createOffer.fundsBox.title=Fund your offer createOffer.fundsBox.totalsNeeded=Funds needed: createOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above createOffer.fundsBox.address=Trade wallet address: createOffer.fundsBox.balance=Trade wallet balance: -# TODO remove createOffer.fundsBox.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offerPayload gets executed. If you cancel your offerPayload you can withdraw your funds from that trading wallet. The only payment made when placing an offerPayload is the offerPayload fee payment. https://bisq.io/faq/#6 +# TODO remove createOffer.fundsBox.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offer gets executed. If you cancel your offer you can withdraw your funds from that trading wallet. The only payment made when placing an offer is the offer fee payment. https://bisq.io/faq/#6 createOffer.fundsBox.tradeAmount=Trade amount: createOffer.fundsBox.securityDeposit=Security deposit: -createOffer.fundsBox.offerFee=Create offerPayload fee: +createOffer.fundsBox.offerFee=Create offer fee: createOffer.fundsBox.networkFee=Mining fee: createOffer.fundsBox.total=Total: # TODO remove createOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove createOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove createOffer.fundsBox.placeOffer=Place offerPayload +# TODO remove createOffer.fundsBox.placeOffer=Place offer createOffer.fundsBox.placeOfferSpinnerInfo=Offer publishing is in progress ... createOffer.fundsBox.paymentLabel=bisq trade with ID {0} @@ -139,20 +139,20 @@ createOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove createOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove createOffer.advancedBox.county=Payments account country: -# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offerPayload restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). +# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offer restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). -createOffer.success.headline=Your offerPayload has been published +createOffer.success.headline=Your offer has been published createOffer.success.info=You can manage your open offers in the \"Portfolio\" screen under \"My open offers\". -# TODO remove createOffer.error.message=An error occurred when placing the offerPayload.\n\n{0} +# TODO remove createOffer.error.message=An error occurred when placing the offer.\n\n{0} -# Take offerPayload +# Take offer takeOffer.amount.prompt=Enter amount in BTC # TODO remove takeOffer.price.prompt=Enter price # TODO remove takeOffer.volume.prompt=Enter amount in {0} # TODO remove takeOffer.minAmount.prompt=Enter min. amount -# TODO remove takeOffer.amountPriceBox.title=Take offerPayload +# TODO remove takeOffer.amountPriceBox.title=Take offer # TODO remove takeOffer.amountPriceBox.subTitle=Buy bitcoin takeOffer.amountPriceBox.buy.amountDescription=Amount of bitcoin to sell takeOffer.amountPriceBox.sell.amountDescription=Amount of bitcoin to buy @@ -164,30 +164,30 @@ takeOffer.amountPriceBox.amountRangeDescription=Possible amount range # TODO remove takeOffer.amountPriceBox.sell.info=Enter the amount of bitcoin you want to buy. You can choose an amount between the minimum amount and the amount. # TODO remove takeOffer.amountPriceBox.next=Next step takeOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. -takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offerPayload. -takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offerPayload. +takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offer. +takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offer. takeOffer.validation.amountLargerThanOfferAmountMinusFee=That input amount would create dust change for the BTC seller. takeOffer.fundsBox.title=Fund your trade -takeOffer.fundsBox.isOfferAvailable=Check if offerPayload is available ... +takeOffer.fundsBox.isOfferAvailable=Check if offer is available ... takeOffer.fundsBox.totalsNeeded=Funds needed: # TODO remove takeOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above takeOffer.fundsBox.address=Trade wallet address: takeOffer.fundsBox.balance=Trade wallet balance: -# TODO remove takeOffer.fundsBox.buy.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.buy.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid in to a locked deposit address. At the end of a successful trade you will get back your security deposit and the bitcoin amount you sold will be transferred \ to the BTC buyer. -# TODO remove takeOffer.fundsBox.sell.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.sell.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid into a locked deposit address. At the end of a successful trade you will get back your security deposit. takeOffer.fundsBox.tradeAmount=Amount to sell: takeOffer.fundsBox.securityDeposit=Security deposit: -takeOffer.fundsBox.offerFee=Take offerPayload fee: +takeOffer.fundsBox.offerFee=Take offer fee: takeOffer.fundsBox.networkFee=Mining fee: takeOffer.fundsBox.total=Total: # TODO remove takeOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove takeOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove takeOffer.fundsBox.takeOffer=Take offerPayload -takeOffer.fundsBox.takeOfferSpinnerInfo=Take offerPayload in progress ... +# TODO remove takeOffer.fundsBox.takeOffer=Take offer +takeOffer.fundsBox.takeOfferSpinnerInfo=Take offer in progress ... takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.title=Advanced settings @@ -197,12 +197,12 @@ takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove takeOffer.advancedBox.county=Payments account country: -# TODO remove takeOffer.advancedBox.info=These are the offerPayload restrictions your trading partner has defined in his offerPayload. \ +# TODO remove takeOffer.advancedBox.info=These are the offer restrictions your trading partner has defined in his offer. \ Your settings match those constraints and you are able to trade with him. -takeOffer.success.headline=You have successfully taken an offerPayload. +takeOffer.success.headline=You have successfully taken an offer. takeOffer.success.info=You can see the status of your trade at the \"Portfolio\" screen under \"Open trades\". -takeOffer.error.message=An error occurred when taking the offerPayload.\n\n{0} +takeOffer.error.message=An error occurred when taking the offer.\n\n{0} # Payment methods # remove N/A=Not available diff --git a/common/src/main/resources/i18n/in_dev/displayStrings_en.properties b/common/src/main/resources/i18n/in_dev/displayStrings_en.properties index 3ab43fc256..c241a59ac9 100644 --- a/common/src/main/resources/i18n/in_dev/displayStrings_en.properties +++ b/common/src/main/resources/i18n/in_dev/displayStrings_en.properties @@ -93,42 +93,42 @@ validation.bankIdNumber={0} must consist of {1} numbers. validation.accountNr=Account number must consist of {0} numbers. validation.accountNrChars=Account number must consist of {0} characters. -# Create offerPayload +# Create offer createOffer.amount.prompt=Enter amount in BTC createOffer.price.prompt=Enter price createOffer.volume.prompt=Enter amount in {0} # TODO remove createOffer.minAmount.prompt=Enter min. amount -# TODO remove createOffer.amountPriceBox.title=Create your offerPayload +# TODO remove createOffer.amountPriceBox.title=Create your offer createOffer.amountPriceBox.amountDescription=Amount of bitcoin to {0} createOffer.amountPriceBox.priceDescriptionFiat=Fixed price per {0} createOffer.amountPriceBox.buy.volumeDescription=Amount in {0} to spend createOffer.amountPriceBox.sell.volumeDescription=Amount in {0} to receive createOffer.amountPriceBox.minAmountDescription=Minimum amount of BTC -# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. -# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. +# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. +# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. # TODO remove createOffer.amountPriceBox.next=Next step # TODO remove createOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. # TODO remove createOffer.amountPriceBox.warning.invalidFiatDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted. # TODO remove createOffer.amountPriceBox.warning.adjustedVolume=The total volume you have entered leads to invalid fractional bitcoin amounts. The amount has been adjusted and a new total volume be calculated from it. -createOffer.amountPriceBox.error.message=An error occurred when placing the offerPayload:\n\n{0} +createOffer.amountPriceBox.error.message=An error occurred when placing the offer:\n\n{0} # TODO remove createOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount. # TODO remove createOffer.validation.minAmountLargerThanAmount=Minimum amount cannot be larger than amount. -createOffer.fundsBox.title=Fund your offerPayload +createOffer.fundsBox.title=Fund your offer createOffer.fundsBox.totalsNeeded=Funds needed: createOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above createOffer.fundsBox.address=Trade wallet address: createOffer.fundsBox.balance=Trade wallet balance: -# TODO remove createOffer.fundsBox.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offerPayload gets executed. If you cancel your offerPayload you can withdraw your funds from that trading wallet. The only payment made when placing an offerPayload is the offerPayload fee payment. https://bisq.io/faq/#6 +# TODO remove createOffer.fundsBox.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offer gets executed. If you cancel your offer you can withdraw your funds from that trading wallet. The only payment made when placing an offer is the offer fee payment. https://bisq.io/faq/#6 createOffer.fundsBox.tradeAmount=Trade amount: createOffer.fundsBox.securityDeposit=Security deposit: -createOffer.fundsBox.offerFee=Create offerPayload fee: +createOffer.fundsBox.offerFee=Create offer fee: createOffer.fundsBox.networkFee=Mining fee: createOffer.fundsBox.total=Total: # TODO remove createOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove createOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove createOffer.fundsBox.placeOffer=Place offerPayload +# TODO remove createOffer.fundsBox.placeOffer=Place offer createOffer.fundsBox.placeOfferSpinnerInfo=Offer publishing is in progress ... createOffer.fundsBox.paymentLabel=bisq trade with ID {0} @@ -139,20 +139,20 @@ createOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove createOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove createOffer.advancedBox.county=Payments account country: -# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offerPayload restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). +# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offer restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). -createOffer.success.headline=Your offerPayload has been published +createOffer.success.headline=Your offer has been published createOffer.success.info=You can manage your open offers in the \"Portfolio\" screen under \"My open offers\". -# TODO remove createOffer.error.message=An error occurred when placing the offerPayload.\n\n{0} +# TODO remove createOffer.error.message=An error occurred when placing the offer.\n\n{0} -# Take offerPayload +# Take offer takeOffer.amount.prompt=Enter amount in BTC # TODO remove takeOffer.price.prompt=Enter price # TODO remove takeOffer.volume.prompt=Enter amount in {0} # TODO remove takeOffer.minAmount.prompt=Enter min. amount -# TODO remove takeOffer.amountPriceBox.title=Take offerPayload +# TODO remove takeOffer.amountPriceBox.title=Take offer # TODO remove takeOffer.amountPriceBox.subTitle=Buy bitcoin takeOffer.amountPriceBox.buy.amountDescription=Amount of bitcoin to sell takeOffer.amountPriceBox.sell.amountDescription=Amount of bitcoin to buy @@ -164,30 +164,30 @@ takeOffer.amountPriceBox.amountRangeDescription=Possible amount range # TODO remove takeOffer.amountPriceBox.sell.info=Enter the amount of bitcoin you want to buy. You can choose an amount between the minimum amount and the amount. # TODO remove takeOffer.amountPriceBox.next=Next step takeOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. -takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offerPayload. -takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offerPayload. +takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offer. +takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offer. takeOffer.validation.amountLargerThanOfferAmountMinusFee=That input amount would create dust change for the BTC seller. takeOffer.fundsBox.title=Fund your trade -takeOffer.fundsBox.isOfferAvailable=Check if offerPayload is available ... +takeOffer.fundsBox.isOfferAvailable=Check if offer is available ... takeOffer.fundsBox.totalsNeeded=Funds needed: # TODO remove takeOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above takeOffer.fundsBox.address=Trade wallet address: takeOffer.fundsBox.balance=Trade wallet balance: -# TODO remove takeOffer.fundsBox.buy.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.buy.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid in to a locked deposit address. At the end of a successful trade you will get back your security deposit and the bitcoin amount you sold will be transferred \ to the BTC buyer. -# TODO remove takeOffer.fundsBox.sell.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.sell.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid into a locked deposit address. At the end of a successful trade you will get back your security deposit. takeOffer.fundsBox.tradeAmount=Amount to sell: takeOffer.fundsBox.securityDeposit=Security deposit: -takeOffer.fundsBox.offerFee=Take offerPayload fee: +takeOffer.fundsBox.offerFee=Take offer fee: takeOffer.fundsBox.networkFee=Mining fee: takeOffer.fundsBox.total=Total: # TODO remove takeOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove takeOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove takeOffer.fundsBox.takeOffer=Take offerPayload -takeOffer.fundsBox.takeOfferSpinnerInfo=Take offerPayload in progress ... +# TODO remove takeOffer.fundsBox.takeOffer=Take offer +takeOffer.fundsBox.takeOfferSpinnerInfo=Take offer in progress ... takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.title=Advanced settings @@ -197,12 +197,12 @@ takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove takeOffer.advancedBox.county=Payments account country: -# TODO remove takeOffer.advancedBox.info=These are the offerPayload restrictions your trading partner has defined in his offerPayload. \ +# TODO remove takeOffer.advancedBox.info=These are the offer restrictions your trading partner has defined in his offer. \ Your settings match those constraints and you are able to trade with him. -takeOffer.success.headline=You have successfully taken an offerPayload. +takeOffer.success.headline=You have successfully taken an offer. takeOffer.success.info=You can see the status of your trade at the \"Portfolio\" screen under \"Open trades\". -takeOffer.error.message=An error occurred when taking the offerPayload.\n\n{0} +takeOffer.error.message=An error occurred when taking the offer.\n\n{0} # Payment methods # remove N/A=Not available diff --git a/common/src/main/resources/i18n/in_dev/displayStrings_es.properties b/common/src/main/resources/i18n/in_dev/displayStrings_es.properties index 3c85cfae11..297899a4c5 100644 --- a/common/src/main/resources/i18n/in_dev/displayStrings_es.properties +++ b/common/src/main/resources/i18n/in_dev/displayStrings_es.properties @@ -91,7 +91,7 @@ validation.bankIdNumber={0} debe consistir en {1} números. validation.accountNr=El número de cuenta debe consistir en {0} números. validation.accountNrChars=El número de cuenta debe consistir en {0} caracteres. -# Create offerPayload +# Create offer createOffer.amount.prompt=Introducir cantidad en BTC createOffer.price.prompt=Introducir precio createOffer.volume.prompt=Introducir cantidad en {0} @@ -145,7 +145,7 @@ createOffer.success.info=Puede establecer sus ofertas abiertas la ventana \"Port # TODO remove createOffer.error.message=Ocurrió un error al publicar la orden.\n\n{0} -# Take offerPayload +# Take offer takeOffer.amount.prompt=Introducir cantidad en BTC # TODO remove takeOffer.price.prompt=Introducir precio # TODO remove takeOffer.volume.prompt=Introducir cantidad en {0} diff --git a/common/src/main/resources/i18n/in_dev/displayStrings_fi.properties b/common/src/main/resources/i18n/in_dev/displayStrings_fi.properties index 3e0b43b09b..ccd7c4eb2b 100644 --- a/common/src/main/resources/i18n/in_dev/displayStrings_fi.properties +++ b/common/src/main/resources/i18n/in_dev/displayStrings_fi.properties @@ -93,42 +93,42 @@ validation.bankIdNumber={0} must consist of {1} numbers. validation.accountNr=Account number must consist of {0} numbers. validation.accountNrChars=Account number must consist of {0} characters. -# Create offerPayload +# Create offer createOffer.amount.prompt=Enter amount in BTC createOffer.price.prompt=Enter price createOffer.volume.prompt=Enter amount in {0} # TODO remove createOffer.minAmount.prompt=Enter min. amount -# TODO remove createOffer.amountPriceBox.title=Create your offerPayload +# TODO remove createOffer.amountPriceBox.title=Create your offer createOffer.amountPriceBox.amountDescription=Amount of bitcoin to {0} createOffer.amountPriceBox.priceDescriptionFiat=Fixed price per {0} createOffer.amountPriceBox.buy.volumeDescription=Amount in {0} to spend createOffer.amountPriceBox.sell.volumeDescription=Amount in {0} to receive createOffer.amountPriceBox.minAmountDescription=Minimum amount of BTC -# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. -# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. +# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. +# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. # TODO remove createOffer.amountPriceBox.next=Next step # TODO remove createOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. # TODO remove createOffer.amountPriceBox.warning.invalidFiatDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted. # TODO remove createOffer.amountPriceBox.warning.adjustedVolume=The total volume you have entered leads to invalid fractional bitcoin amounts. The amount has been adjusted and a new total volume be calculated from it. -createOffer.amountPriceBox.error.message=An error occurred when placing the offerPayload:\n\n{0} +createOffer.amountPriceBox.error.message=An error occurred when placing the offer:\n\n{0} # TODO remove createOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount. # TODO remove createOffer.validation.minAmountLargerThanAmount=Minimum amount cannot be larger than amount. -createOffer.fundsBox.title=Fund your offerPayload +createOffer.fundsBox.title=Fund your offer createOffer.fundsBox.totalsNeeded=Funds needed: createOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above createOffer.fundsBox.address=Trade wallet address: createOffer.fundsBox.balance=Trade wallet balance: -# TODO remove createOffer.fundsBox.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offerPayload gets executed. If you cancel your offerPayload you can withdraw your funds from that trading wallet. The only payment made when placing an offerPayload is the offerPayload fee payment. https://bisq.io/faq/#6 +# TODO remove createOffer.fundsBox.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offer gets executed. If you cancel your offer you can withdraw your funds from that trading wallet. The only payment made when placing an offer is the offer fee payment. https://bisq.io/faq/#6 createOffer.fundsBox.tradeAmount=Trade amount: createOffer.fundsBox.securityDeposit=Security deposit: -createOffer.fundsBox.offerFee=Create offerPayload fee: +createOffer.fundsBox.offerFee=Create offer fee: createOffer.fundsBox.networkFee=Mining fee: createOffer.fundsBox.total=Total: # TODO remove createOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove createOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove createOffer.fundsBox.placeOffer=Place offerPayload +# TODO remove createOffer.fundsBox.placeOffer=Place offer createOffer.fundsBox.placeOfferSpinnerInfo=Offer publishing is in progress ... createOffer.fundsBox.paymentLabel=bisq trade with ID {0} @@ -139,20 +139,20 @@ createOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove createOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove createOffer.advancedBox.county=Payments account country: -# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offerPayload restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). +# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offer restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). -createOffer.success.headline=Your offerPayload has been published +createOffer.success.headline=Your offer has been published createOffer.success.info=You can manage your open offers in the \"Portfolio\" screen under \"My open offers\". -# TODO remove createOffer.error.message=An error occurred when placing the offerPayload.\n\n{0} +# TODO remove createOffer.error.message=An error occurred when placing the offer.\n\n{0} -# Take offerPayload +# Take offer takeOffer.amount.prompt=Enter amount in BTC # TODO remove takeOffer.price.prompt=Enter price # TODO remove takeOffer.volume.prompt=Enter amount in {0} # TODO remove takeOffer.minAmount.prompt=Enter min. amount -# TODO remove takeOffer.amountPriceBox.title=Take offerPayload +# TODO remove takeOffer.amountPriceBox.title=Take offer # TODO remove takeOffer.amountPriceBox.subTitle=Buy bitcoin takeOffer.amountPriceBox.buy.amountDescription=Amount of bitcoin to sell takeOffer.amountPriceBox.sell.amountDescription=Amount of bitcoin to buy @@ -164,30 +164,30 @@ takeOffer.amountPriceBox.amountRangeDescription=Possible amount range # TODO remove takeOffer.amountPriceBox.sell.info=Enter the amount of bitcoin you want to buy. You can choose an amount between the minimum amount and the amount. # TODO remove takeOffer.amountPriceBox.next=Next step takeOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. -takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offerPayload. -takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offerPayload. +takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offer. +takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offer. takeOffer.validation.amountLargerThanOfferAmountMinusFee=That input amount would create dust change for the BTC seller. takeOffer.fundsBox.title=Fund your trade -takeOffer.fundsBox.isOfferAvailable=Check if offerPayload is available ... +takeOffer.fundsBox.isOfferAvailable=Check if offer is available ... takeOffer.fundsBox.totalsNeeded=Funds needed: # TODO remove takeOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above takeOffer.fundsBox.address=Trade wallet address: takeOffer.fundsBox.balance=Trade wallet balance: -# TODO remove takeOffer.fundsBox.buy.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.buy.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid in to a locked deposit address. At the end of a successful trade you will get back your security deposit and the bitcoin amount you sold will be transferred \ to the BTC buyer. -# TODO remove takeOffer.fundsBox.sell.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.sell.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid into a locked deposit address. At the end of a successful trade you will get back your security deposit. takeOffer.fundsBox.tradeAmount=Amount to sell: takeOffer.fundsBox.securityDeposit=Security deposit: -takeOffer.fundsBox.offerFee=Take offerPayload fee: +takeOffer.fundsBox.offerFee=Take offer fee: takeOffer.fundsBox.networkFee=Mining fee: takeOffer.fundsBox.total=Total: # TODO remove takeOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove takeOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove takeOffer.fundsBox.takeOffer=Take offerPayload -takeOffer.fundsBox.takeOfferSpinnerInfo=Take offerPayload in progress ... +# TODO remove takeOffer.fundsBox.takeOffer=Take offer +takeOffer.fundsBox.takeOfferSpinnerInfo=Take offer in progress ... takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.title=Advanced settings @@ -197,12 +197,12 @@ takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove takeOffer.advancedBox.county=Payments account country: -# TODO remove takeOffer.advancedBox.info=These are the offerPayload restrictions your trading partner has defined in his offerPayload. \ +# TODO remove takeOffer.advancedBox.info=These are the offer restrictions your trading partner has defined in his offer. \ Your settings match those constraints and you are able to trade with him. -takeOffer.success.headline=You have successfully taken an offerPayload. +takeOffer.success.headline=You have successfully taken an offer. takeOffer.success.info=You can see the status of your trade at the \"Portfolio\" screen under \"Open trades\". -takeOffer.error.message=An error occurred when taking the offerPayload.\n\n{0} +takeOffer.error.message=An error occurred when taking the offer.\n\n{0} # Payment methods # remove N/A=Not available diff --git a/common/src/main/resources/i18n/in_dev/displayStrings_fr.properties b/common/src/main/resources/i18n/in_dev/displayStrings_fr.properties index bd238723e4..f01a7457c1 100644 --- a/common/src/main/resources/i18n/in_dev/displayStrings_fr.properties +++ b/common/src/main/resources/i18n/in_dev/displayStrings_fr.properties @@ -93,42 +93,42 @@ validation.bankIdNumber={0} must consist of {1} numbers. validation.accountNr=Account number must consist of {0} numbers. validation.accountNrChars=Account number must consist of {0} characters. -# Create offerPayload +# Create offer createOffer.amount.prompt=Enter amount in BTC createOffer.price.prompt=Enter price createOffer.volume.prompt=Enter amount in {0} # TODO remove createOffer.minAmount.prompt=Enter min. amount -# TODO remove createOffer.amountPriceBox.title=Create your offerPayload +# TODO remove createOffer.amountPriceBox.title=Create your offer createOffer.amountPriceBox.amountDescription=Amount of bitcoin to {0} createOffer.amountPriceBox.priceDescriptionFiat=Fixed price per {0} createOffer.amountPriceBox.buy.volumeDescription=Amount in {0} to spend createOffer.amountPriceBox.sell.volumeDescription=Amount in {0} to receive createOffer.amountPriceBox.minAmountDescription=Minimum amount of BTC -# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. -# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. +# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. +# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. # TODO remove createOffer.amountPriceBox.next=Next step # TODO remove createOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. # TODO remove createOffer.amountPriceBox.warning.invalidFiatDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted. # TODO remove createOffer.amountPriceBox.warning.adjustedVolume=The total volume you have entered leads to invalid fractional bitcoin amounts. The amount has been adjusted and a new total volume be calculated from it. -createOffer.amountPriceBox.error.message=An error occurred when placing the offerPayload:\n\n{0} +createOffer.amountPriceBox.error.message=An error occurred when placing the offer:\n\n{0} # TODO remove createOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount. # TODO remove createOffer.validation.minAmountLargerThanAmount=Minimum amount cannot be larger than amount. -createOffer.fundsBox.title=Fund your offerPayload +createOffer.fundsBox.title=Fund your offer createOffer.fundsBox.totalsNeeded=Funds needed: createOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above createOffer.fundsBox.address=Trade wallet address: createOffer.fundsBox.balance=Trade wallet balance: -# TODO remove createOffer.fundsBox.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offerPayload gets executed. If you cancel your offerPayload you can withdraw your funds from that trading wallet. The only payment made when placing an offerPayload is the offerPayload fee payment. https://bisq.io/faq/#6 +# TODO remove createOffer.fundsBox.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offer gets executed. If you cancel your offer you can withdraw your funds from that trading wallet. The only payment made when placing an offer is the offer fee payment. https://bisq.io/faq/#6 createOffer.fundsBox.tradeAmount=Trade amount: createOffer.fundsBox.securityDeposit=Security deposit: -createOffer.fundsBox.offerFee=Create offerPayload fee: +createOffer.fundsBox.offerFee=Create offer fee: createOffer.fundsBox.networkFee=Mining fee: createOffer.fundsBox.total=Total: # TODO remove createOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove createOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove createOffer.fundsBox.placeOffer=Place offerPayload +# TODO remove createOffer.fundsBox.placeOffer=Place offer createOffer.fundsBox.placeOfferSpinnerInfo=Offer publishing is in progress ... createOffer.fundsBox.paymentLabel=bisq trade with ID {0} @@ -139,20 +139,20 @@ createOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove createOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove createOffer.advancedBox.county=Payments account country: -# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offerPayload restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). +# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offer restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). -createOffer.success.headline=Your offerPayload has been published +createOffer.success.headline=Your offer has been published createOffer.success.info=You can manage your open offers in the \"Portfolio\" screen under \"My open offers\". -# TODO remove createOffer.error.message=An error occurred when placing the offerPayload.\n\n{0} +# TODO remove createOffer.error.message=An error occurred when placing the offer.\n\n{0} -# Take offerPayload +# Take offer takeOffer.amount.prompt=Enter amount in BTC # TODO remove takeOffer.price.prompt=Enter price # TODO remove takeOffer.volume.prompt=Enter amount in {0} # TODO remove takeOffer.minAmount.prompt=Enter min. amount -# TODO remove takeOffer.amountPriceBox.title=Take offerPayload +# TODO remove takeOffer.amountPriceBox.title=Take offer # TODO remove takeOffer.amountPriceBox.subTitle=Buy bitcoin takeOffer.amountPriceBox.buy.amountDescription=Amount of bitcoin to sell takeOffer.amountPriceBox.sell.amountDescription=Amount of bitcoin to buy @@ -164,30 +164,30 @@ takeOffer.amountPriceBox.amountRangeDescription=Possible amount range # TODO remove takeOffer.amountPriceBox.sell.info=Enter the amount of bitcoin you want to buy. You can choose an amount between the minimum amount and the amount. # TODO remove takeOffer.amountPriceBox.next=Next step takeOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. -takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offerPayload. -takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offerPayload. +takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offer. +takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offer. takeOffer.validation.amountLargerThanOfferAmountMinusFee=That input amount would create dust change for the BTC seller. takeOffer.fundsBox.title=Fund your trade -takeOffer.fundsBox.isOfferAvailable=Check if offerPayload is available ... +takeOffer.fundsBox.isOfferAvailable=Check if offer is available ... takeOffer.fundsBox.totalsNeeded=Funds needed: # TODO remove takeOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above takeOffer.fundsBox.address=Trade wallet address: takeOffer.fundsBox.balance=Trade wallet balance: -# TODO remove takeOffer.fundsBox.buy.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.buy.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid in to a locked deposit address. At the end of a successful trade you will get back your security deposit and the bitcoin amount you sold will be transferred \ to the BTC buyer. -# TODO remove takeOffer.fundsBox.sell.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.sell.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid into a locked deposit address. At the end of a successful trade you will get back your security deposit. takeOffer.fundsBox.tradeAmount=Amount to sell: takeOffer.fundsBox.securityDeposit=Security deposit: -takeOffer.fundsBox.offerFee=Take offerPayload fee: +takeOffer.fundsBox.offerFee=Take offer fee: takeOffer.fundsBox.networkFee=Mining fee: takeOffer.fundsBox.total=Total: # TODO remove takeOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove takeOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove takeOffer.fundsBox.takeOffer=Take offerPayload -takeOffer.fundsBox.takeOfferSpinnerInfo=Take offerPayload in progress ... +# TODO remove takeOffer.fundsBox.takeOffer=Take offer +takeOffer.fundsBox.takeOfferSpinnerInfo=Take offer in progress ... takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.title=Advanced settings @@ -197,12 +197,12 @@ takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove takeOffer.advancedBox.county=Payments account country: -# TODO remove takeOffer.advancedBox.info=These are the offerPayload restrictions your trading partner has defined in his offerPayload. \ +# TODO remove takeOffer.advancedBox.info=These are the offer restrictions your trading partner has defined in his offer. \ Your settings match those constraints and you are able to trade with him. -takeOffer.success.headline=You have successfully taken an offerPayload. +takeOffer.success.headline=You have successfully taken an offer. takeOffer.success.info=You can see the status of your trade at the \"Portfolio\" screen under \"Open trades\". -takeOffer.error.message=An error occurred when taking the offerPayload.\n\n{0} +takeOffer.error.message=An error occurred when taking the offer.\n\n{0} # Payment methods # remove N/A=Not available diff --git a/common/src/main/resources/i18n/in_dev/displayStrings_ge.properties b/common/src/main/resources/i18n/in_dev/displayStrings_ge.properties index de5b3cc208..526253e0a8 100644 --- a/common/src/main/resources/i18n/in_dev/displayStrings_ge.properties +++ b/common/src/main/resources/i18n/in_dev/displayStrings_ge.properties @@ -93,42 +93,42 @@ validation.bankIdNumber={0} must consist of {1} numbers. validation.accountNr=Account number must consist of {0} numbers. validation.accountNrChars=Account number must consist of {0} characters. -# Create offerPayload +# Create offer createOffer.amount.prompt=Enter amount in BTC createOffer.price.prompt=Enter price createOffer.volume.prompt=Enter amount in {0} # TODO remove createOffer.minAmount.prompt=Enter min. amount -# TODO remove createOffer.amountPriceBox.title=Create your offerPayload +# TODO remove createOffer.amountPriceBox.title=Create your offer createOffer.amountPriceBox.amountDescription=Amount of bitcoin to {0} createOffer.amountPriceBox.priceDescriptionFiat=Fixed price per {0} createOffer.amountPriceBox.buy.volumeDescription=Amount in {0} to spend createOffer.amountPriceBox.sell.volumeDescription=Amount in {0} to receive createOffer.amountPriceBox.minAmountDescription=Minimum amount of BTC -# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. -# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. +# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. +# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. # TODO remove createOffer.amountPriceBox.next=Next step # TODO remove createOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. # TODO remove createOffer.amountPriceBox.warning.invalidFiatDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted. # TODO remove createOffer.amountPriceBox.warning.adjustedVolume=The total volume you have entered leads to invalid fractional bitcoin amounts. The amount has been adjusted and a new total volume be calculated from it. -createOffer.amountPriceBox.error.message=An error occurred when placing the offerPayload:\n\n{0} +createOffer.amountPriceBox.error.message=An error occurred when placing the offer:\n\n{0} # TODO remove createOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount. # TODO remove createOffer.validation.minAmountLargerThanAmount=Minimum amount cannot be larger than amount. -createOffer.fundsBox.title=Fund your offerPayload +createOffer.fundsBox.title=Fund your offer createOffer.fundsBox.totalsNeeded=Funds needed: createOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above createOffer.fundsBox.address=Trade wallet address: createOffer.fundsBox.balance=Trade wallet balance: -# TODO remove createOffer.fundsBox.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offerPayload gets executed. If you cancel your offerPayload you can withdraw your funds from that trading wallet. The only payment made when placing an offerPayload is the offerPayload fee payment. https://bisq.io/faq/#6 +# TODO remove createOffer.fundsBox.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offer gets executed. If you cancel your offer you can withdraw your funds from that trading wallet. The only payment made when placing an offer is the offer fee payment. https://bisq.io/faq/#6 createOffer.fundsBox.tradeAmount=Trade amount: createOffer.fundsBox.securityDeposit=Security deposit: -createOffer.fundsBox.offerFee=Create offerPayload fee: +createOffer.fundsBox.offerFee=Create offer fee: createOffer.fundsBox.networkFee=Mining fee: createOffer.fundsBox.total=Total: # TODO remove createOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove createOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove createOffer.fundsBox.placeOffer=Place offerPayload +# TODO remove createOffer.fundsBox.placeOffer=Place offer createOffer.fundsBox.placeOfferSpinnerInfo=Offer publishing is in progress ... createOffer.fundsBox.paymentLabel=bisq trade with ID {0} @@ -139,20 +139,20 @@ createOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove createOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove createOffer.advancedBox.county=Payments account country: -# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offerPayload restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). +# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offer restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). -createOffer.success.headline=Your offerPayload has been published +createOffer.success.headline=Your offer has been published createOffer.success.info=You can manage your open offers in the \"Portfolio\" screen under \"My open offers\". -# TODO remove createOffer.error.message=An error occurred when placing the offerPayload.\n\n{0} +# TODO remove createOffer.error.message=An error occurred when placing the offer.\n\n{0} -# Take offerPayload +# Take offer takeOffer.amount.prompt=Enter amount in BTC # TODO remove takeOffer.price.prompt=Enter price # TODO remove takeOffer.volume.prompt=Enter amount in {0} # TODO remove takeOffer.minAmount.prompt=Enter min. amount -# TODO remove takeOffer.amountPriceBox.title=Take offerPayload +# TODO remove takeOffer.amountPriceBox.title=Take offer # TODO remove takeOffer.amountPriceBox.subTitle=Buy bitcoin takeOffer.amountPriceBox.buy.amountDescription=Amount of bitcoin to sell takeOffer.amountPriceBox.sell.amountDescription=Amount of bitcoin to buy @@ -164,30 +164,30 @@ takeOffer.amountPriceBox.amountRangeDescription=Possible amount range # TODO remove takeOffer.amountPriceBox.sell.info=Enter the amount of bitcoin you want to buy. You can choose an amount between the minimum amount and the amount. # TODO remove takeOffer.amountPriceBox.next=Next step takeOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. -takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offerPayload. -takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offerPayload. +takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offer. +takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offer. takeOffer.validation.amountLargerThanOfferAmountMinusFee=That input amount would create dust change for the BTC seller. takeOffer.fundsBox.title=Fund your trade -takeOffer.fundsBox.isOfferAvailable=Check if offerPayload is available ... +takeOffer.fundsBox.isOfferAvailable=Check if offer is available ... takeOffer.fundsBox.totalsNeeded=Funds needed: # TODO remove takeOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above takeOffer.fundsBox.address=Trade wallet address: takeOffer.fundsBox.balance=Trade wallet balance: -# TODO remove takeOffer.fundsBox.buy.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.buy.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid in to a locked deposit address. At the end of a successful trade you will get back your security deposit and the bitcoin amount you sold will be transferred \ to the BTC buyer. -# TODO remove takeOffer.fundsBox.sell.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.sell.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid into a locked deposit address. At the end of a successful trade you will get back your security deposit. takeOffer.fundsBox.tradeAmount=Amount to sell: takeOffer.fundsBox.securityDeposit=Security deposit: -takeOffer.fundsBox.offerFee=Take offerPayload fee: +takeOffer.fundsBox.offerFee=Take offer fee: takeOffer.fundsBox.networkFee=Mining fee: takeOffer.fundsBox.total=Total: # TODO remove takeOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove takeOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove takeOffer.fundsBox.takeOffer=Take offerPayload -takeOffer.fundsBox.takeOfferSpinnerInfo=Take offerPayload in progress ... +# TODO remove takeOffer.fundsBox.takeOffer=Take offer +takeOffer.fundsBox.takeOfferSpinnerInfo=Take offer in progress ... takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.title=Advanced settings @@ -197,12 +197,12 @@ takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove takeOffer.advancedBox.county=Payments account country: -# TODO remove takeOffer.advancedBox.info=These are the offerPayload restrictions your trading partner has defined in his offerPayload. \ +# TODO remove takeOffer.advancedBox.info=These are the offer restrictions your trading partner has defined in his offer. \ Your settings match those constraints and you are able to trade with him. -takeOffer.success.headline=You have successfully taken an offerPayload. +takeOffer.success.headline=You have successfully taken an offer. takeOffer.success.info=You can see the status of your trade at the \"Portfolio\" screen under \"Open trades\". -takeOffer.error.message=An error occurred when taking the offerPayload.\n\n{0} +takeOffer.error.message=An error occurred when taking the offer.\n\n{0} # Payment methods # remove N/A=Not available diff --git a/common/src/main/resources/i18n/in_dev/displayStrings_gr.properties b/common/src/main/resources/i18n/in_dev/displayStrings_gr.properties index d316e560c1..e48f14fbe8 100644 --- a/common/src/main/resources/i18n/in_dev/displayStrings_gr.properties +++ b/common/src/main/resources/i18n/in_dev/displayStrings_gr.properties @@ -93,42 +93,42 @@ validation.bankIdNumber={0} must consist of {1} numbers. validation.accountNr=Account number must consist of {0} numbers. validation.accountNrChars=Account number must consist of {0} characters. -# Create offerPayload +# Create offer createOffer.amount.prompt=Enter amount in BTC createOffer.price.prompt=Enter price createOffer.volume.prompt=Enter amount in {0} # TODO remove createOffer.minAmount.prompt=Enter min. amount -# TODO remove createOffer.amountPriceBox.title=Create your offerPayload +# TODO remove createOffer.amountPriceBox.title=Create your offer createOffer.amountPriceBox.amountDescription=Amount of bitcoin to {0} createOffer.amountPriceBox.priceDescriptionFiat=Fixed price per {0} createOffer.amountPriceBox.buy.volumeDescription=Amount in {0} to spend createOffer.amountPriceBox.sell.volumeDescription=Amount in {0} to receive createOffer.amountPriceBox.minAmountDescription=Minimum amount of BTC -# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. -# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. +# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. +# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. # TODO remove createOffer.amountPriceBox.next=Next step # TODO remove createOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. # TODO remove createOffer.amountPriceBox.warning.invalidFiatDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted. # TODO remove createOffer.amountPriceBox.warning.adjustedVolume=The total volume you have entered leads to invalid fractional bitcoin amounts. The amount has been adjusted and a new total volume be calculated from it. -createOffer.amountPriceBox.error.message=An error occurred when placing the offerPayload:\n\n{0} +createOffer.amountPriceBox.error.message=An error occurred when placing the offer:\n\n{0} # TODO remove createOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount. # TODO remove createOffer.validation.minAmountLargerThanAmount=Minimum amount cannot be larger than amount. -createOffer.fundsBox.title=Fund your offerPayload +createOffer.fundsBox.title=Fund your offer createOffer.fundsBox.totalsNeeded=Funds needed: createOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above createOffer.fundsBox.address=Trade wallet address: createOffer.fundsBox.balance=Trade wallet balance: -# TODO remove createOffer.fundsBox.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offerPayload gets executed. If you cancel your offerPayload you can withdraw your funds from that trading wallet. The only payment made when placing an offerPayload is the offerPayload fee payment. https://bisq.io/faq/#6 +# TODO remove createOffer.fundsBox.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offer gets executed. If you cancel your offer you can withdraw your funds from that trading wallet. The only payment made when placing an offer is the offer fee payment. https://bisq.io/faq/#6 createOffer.fundsBox.tradeAmount=Trade amount: createOffer.fundsBox.securityDeposit=Security deposit: -createOffer.fundsBox.offerFee=Create offerPayload fee: +createOffer.fundsBox.offerFee=Create offer fee: createOffer.fundsBox.networkFee=Mining fee: createOffer.fundsBox.total=Total: # TODO remove createOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove createOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove createOffer.fundsBox.placeOffer=Place offerPayload +# TODO remove createOffer.fundsBox.placeOffer=Place offer createOffer.fundsBox.placeOfferSpinnerInfo=Offer publishing is in progress ... createOffer.fundsBox.paymentLabel=bisq trade with ID {0} @@ -139,20 +139,20 @@ createOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove createOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove createOffer.advancedBox.county=Payments account country: -# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offerPayload restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). +# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offer restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). -createOffer.success.headline=Your offerPayload has been published +createOffer.success.headline=Your offer has been published createOffer.success.info=You can manage your open offers in the \"Portfolio\" screen under \"My open offers\". -# TODO remove createOffer.error.message=An error occurred when placing the offerPayload.\n\n{0} +# TODO remove createOffer.error.message=An error occurred when placing the offer.\n\n{0} -# Take offerPayload +# Take offer takeOffer.amount.prompt=Enter amount in BTC # TODO remove takeOffer.price.prompt=Enter price # TODO remove takeOffer.volume.prompt=Enter amount in {0} # TODO remove takeOffer.minAmount.prompt=Enter min. amount -# TODO remove takeOffer.amountPriceBox.title=Take offerPayload +# TODO remove takeOffer.amountPriceBox.title=Take offer # TODO remove takeOffer.amountPriceBox.subTitle=Buy bitcoin takeOffer.amountPriceBox.buy.amountDescription=Amount of bitcoin to sell takeOffer.amountPriceBox.sell.amountDescription=Amount of bitcoin to buy @@ -164,30 +164,30 @@ takeOffer.amountPriceBox.amountRangeDescription=Possible amount range # TODO remove takeOffer.amountPriceBox.sell.info=Enter the amount of bitcoin you want to buy. You can choose an amount between the minimum amount and the amount. # TODO remove takeOffer.amountPriceBox.next=Next step takeOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. -takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offerPayload. -takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offerPayload. +takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offer. +takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offer. takeOffer.validation.amountLargerThanOfferAmountMinusFee=That input amount would create dust change for the BTC seller. takeOffer.fundsBox.title=Fund your trade -takeOffer.fundsBox.isOfferAvailable=Check if offerPayload is available ... +takeOffer.fundsBox.isOfferAvailable=Check if offer is available ... takeOffer.fundsBox.totalsNeeded=Funds needed: # TODO remove takeOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above takeOffer.fundsBox.address=Trade wallet address: takeOffer.fundsBox.balance=Trade wallet balance: -# TODO remove takeOffer.fundsBox.buy.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.buy.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid in to a locked deposit address. At the end of a successful trade you will get back your security deposit and the bitcoin amount you sold will be transferred \ to the BTC buyer. -# TODO remove takeOffer.fundsBox.sell.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.sell.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid into a locked deposit address. At the end of a successful trade you will get back your security deposit. takeOffer.fundsBox.tradeAmount=Amount to sell: takeOffer.fundsBox.securityDeposit=Security deposit: -takeOffer.fundsBox.offerFee=Take offerPayload fee: +takeOffer.fundsBox.offerFee=Take offer fee: takeOffer.fundsBox.networkFee=Mining fee: takeOffer.fundsBox.total=Total: # TODO remove takeOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove takeOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove takeOffer.fundsBox.takeOffer=Take offerPayload -takeOffer.fundsBox.takeOfferSpinnerInfo=Take offerPayload in progress ... +# TODO remove takeOffer.fundsBox.takeOffer=Take offer +takeOffer.fundsBox.takeOfferSpinnerInfo=Take offer in progress ... takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.title=Advanced settings @@ -197,12 +197,12 @@ takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove takeOffer.advancedBox.county=Payments account country: -# TODO remove takeOffer.advancedBox.info=These are the offerPayload restrictions your trading partner has defined in his offerPayload. \ +# TODO remove takeOffer.advancedBox.info=These are the offer restrictions your trading partner has defined in his offer. \ Your settings match those constraints and you are able to trade with him. -takeOffer.success.headline=You have successfully taken an offerPayload. +takeOffer.success.headline=You have successfully taken an offer. takeOffer.success.info=You can see the status of your trade at the \"Portfolio\" screen under \"Open trades\". -takeOffer.error.message=An error occurred when taking the offerPayload.\n\n{0} +takeOffer.error.message=An error occurred when taking the offer.\n\n{0} # Payment methods # remove N/A=Not available diff --git a/common/src/main/resources/i18n/in_dev/displayStrings_hr.properties b/common/src/main/resources/i18n/in_dev/displayStrings_hr.properties index 6a9435078b..df285e9706 100644 --- a/common/src/main/resources/i18n/in_dev/displayStrings_hr.properties +++ b/common/src/main/resources/i18n/in_dev/displayStrings_hr.properties @@ -91,7 +91,7 @@ validation.bankIdNumber={0} se mora sastojati od {1} brojeva validation.accountNr=Broj računa se mora sastojati od {0} brojeva validation.accountNrChars=Broj računa se mora sastojati od {0} znakova -# Create offerPayload +# Create offer createOffer.amount.prompt=Unesite iznos BTC-a createOffer.price.prompt=Unesite cijenu createOffer.volume.prompt=Unesite iznos u {0} @@ -145,7 +145,7 @@ createOffer.success.info=Možete upravljati otvorenim ponudama u \"Portfelj\" ek # TODO remove createOffer.error.message=Dogodila se greška prilikom objave ponude.\n\n{0} -# Take offerPayload +# Take offer takeOffer.amount.prompt=Unesite cijenu u BTC # TODO remove takeOffer.price.prompt=Unesite cijenu # TODO remove takeOffer.volume.prompt=Unesite iznos u {0} diff --git a/common/src/main/resources/i18n/in_dev/displayStrings_hu.properties b/common/src/main/resources/i18n/in_dev/displayStrings_hu.properties index 46192625f8..1814e123e2 100644 --- a/common/src/main/resources/i18n/in_dev/displayStrings_hu.properties +++ b/common/src/main/resources/i18n/in_dev/displayStrings_hu.properties @@ -93,42 +93,42 @@ validation.bankIdNumber={0} must consist of {1} numbers. validation.accountNr=Account number must consist of {0} numbers. validation.accountNrChars=Account number must consist of {0} characters. -# Create offerPayload +# Create offer createOffer.amount.prompt=Enter amount in BTC createOffer.price.prompt=Enter price createOffer.volume.prompt=Enter amount in {0} # TODO remove createOffer.minAmount.prompt=Enter min. amount -# TODO remove createOffer.amountPriceBox.title=Create your offerPayload +# TODO remove createOffer.amountPriceBox.title=Create your offer createOffer.amountPriceBox.amountDescription=Amount of bitcoin to {0} createOffer.amountPriceBox.priceDescriptionFiat=Fixed price per {0} createOffer.amountPriceBox.buy.volumeDescription=Amount in {0} to spend createOffer.amountPriceBox.sell.volumeDescription=Amount in {0} to receive createOffer.amountPriceBox.minAmountDescription=Minimum amount of BTC -# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. -# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. +# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. +# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. # TODO remove createOffer.amountPriceBox.next=Next step # TODO remove createOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. # TODO remove createOffer.amountPriceBox.warning.invalidFiatDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted. # TODO remove createOffer.amountPriceBox.warning.adjustedVolume=The total volume you have entered leads to invalid fractional bitcoin amounts. The amount has been adjusted and a new total volume be calculated from it. -createOffer.amountPriceBox.error.message=An error occurred when placing the offerPayload:\n\n{0} +createOffer.amountPriceBox.error.message=An error occurred when placing the offer:\n\n{0} # TODO remove createOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount. # TODO remove createOffer.validation.minAmountLargerThanAmount=Minimum amount cannot be larger than amount. -createOffer.fundsBox.title=Fund your offerPayload +createOffer.fundsBox.title=Fund your offer createOffer.fundsBox.totalsNeeded=Funds needed: createOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above createOffer.fundsBox.address=Trade wallet address: createOffer.fundsBox.balance=Trade wallet balance: -# TODO remove createOffer.fundsBox.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offerPayload gets executed. If you cancel your offerPayload you can withdraw your funds from that trading wallet. The only payment made when placing an offerPayload is the offerPayload fee payment. https://bisq.io/faq/#6 +# TODO remove createOffer.fundsBox.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offer gets executed. If you cancel your offer you can withdraw your funds from that trading wallet. The only payment made when placing an offer is the offer fee payment. https://bisq.io/faq/#6 createOffer.fundsBox.tradeAmount=Trade amount: createOffer.fundsBox.securityDeposit=Security deposit: -createOffer.fundsBox.offerFee=Create offerPayload fee: +createOffer.fundsBox.offerFee=Create offer fee: createOffer.fundsBox.networkFee=Mining fee: createOffer.fundsBox.total=Total: # TODO remove createOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove createOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove createOffer.fundsBox.placeOffer=Place offerPayload +# TODO remove createOffer.fundsBox.placeOffer=Place offer createOffer.fundsBox.placeOfferSpinnerInfo=Offer publishing is in progress ... createOffer.fundsBox.paymentLabel=bisq trade with ID {0} @@ -139,20 +139,20 @@ createOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove createOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove createOffer.advancedBox.county=Payments account country: -# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offerPayload restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). +# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offer restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). -createOffer.success.headline=Your offerPayload has been published +createOffer.success.headline=Your offer has been published createOffer.success.info=You can manage your open offers in the \"Portfolio\" screen under \"My open offers\". -# TODO remove createOffer.error.message=An error occurred when placing the offerPayload.\n\n{0} +# TODO remove createOffer.error.message=An error occurred when placing the offer.\n\n{0} -# Take offerPayload +# Take offer takeOffer.amount.prompt=Enter amount in BTC # TODO remove takeOffer.price.prompt=Enter price # TODO remove takeOffer.volume.prompt=Enter amount in {0} # TODO remove takeOffer.minAmount.prompt=Enter min. amount -# TODO remove takeOffer.amountPriceBox.title=Take offerPayload +# TODO remove takeOffer.amountPriceBox.title=Take offer # TODO remove takeOffer.amountPriceBox.subTitle=Buy bitcoin takeOffer.amountPriceBox.buy.amountDescription=Amount of bitcoin to sell takeOffer.amountPriceBox.sell.amountDescription=Amount of bitcoin to buy @@ -164,30 +164,30 @@ takeOffer.amountPriceBox.amountRangeDescription=Possible amount range # TODO remove takeOffer.amountPriceBox.sell.info=Enter the amount of bitcoin you want to buy. You can choose an amount between the minimum amount and the amount. # TODO remove takeOffer.amountPriceBox.next=Next step takeOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. -takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offerPayload. -takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offerPayload. +takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offer. +takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offer. takeOffer.validation.amountLargerThanOfferAmountMinusFee=That input amount would create dust change for the BTC seller. takeOffer.fundsBox.title=Fund your trade -takeOffer.fundsBox.isOfferAvailable=Check if offerPayload is available ... +takeOffer.fundsBox.isOfferAvailable=Check if offer is available ... takeOffer.fundsBox.totalsNeeded=Funds needed: # TODO remove takeOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above takeOffer.fundsBox.address=Trade wallet address: takeOffer.fundsBox.balance=Trade wallet balance: -# TODO remove takeOffer.fundsBox.buy.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.buy.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid in to a locked deposit address. At the end of a successful trade you will get back your security deposit and the bitcoin amount you sold will be transferred \ to the BTC buyer. -# TODO remove takeOffer.fundsBox.sell.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.sell.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid into a locked deposit address. At the end of a successful trade you will get back your security deposit. takeOffer.fundsBox.tradeAmount=Amount to sell: takeOffer.fundsBox.securityDeposit=Security deposit: -takeOffer.fundsBox.offerFee=Take offerPayload fee: +takeOffer.fundsBox.offerFee=Take offer fee: takeOffer.fundsBox.networkFee=Mining fee: takeOffer.fundsBox.total=Total: # TODO remove takeOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove takeOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove takeOffer.fundsBox.takeOffer=Take offerPayload -takeOffer.fundsBox.takeOfferSpinnerInfo=Take offerPayload in progress ... +# TODO remove takeOffer.fundsBox.takeOffer=Take offer +takeOffer.fundsBox.takeOfferSpinnerInfo=Take offer in progress ... takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.title=Advanced settings @@ -197,12 +197,12 @@ takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove takeOffer.advancedBox.county=Payments account country: -# TODO remove takeOffer.advancedBox.info=These are the offerPayload restrictions your trading partner has defined in his offerPayload. \ +# TODO remove takeOffer.advancedBox.info=These are the offer restrictions your trading partner has defined in his offer. \ Your settings match those constraints and you are able to trade with him. -takeOffer.success.headline=You have successfully taken an offerPayload. +takeOffer.success.headline=You have successfully taken an offer. takeOffer.success.info=You can see the status of your trade at the \"Portfolio\" screen under \"Open trades\". -takeOffer.error.message=An error occurred when taking the offerPayload.\n\n{0} +takeOffer.error.message=An error occurred when taking the offer.\n\n{0} # Payment methods # remove N/A=Not available diff --git a/common/src/main/resources/i18n/in_dev/displayStrings_id.properties b/common/src/main/resources/i18n/in_dev/displayStrings_id.properties index fdefcf7452..3ddff4e623 100644 --- a/common/src/main/resources/i18n/in_dev/displayStrings_id.properties +++ b/common/src/main/resources/i18n/in_dev/displayStrings_id.properties @@ -93,42 +93,42 @@ validation.bankIdNumber={0} must consist of {1} numbers. validation.accountNr=Account number must consist of {0} numbers. validation.accountNrChars=Account number must consist of {0} characters. -# Create offerPayload +# Create offer createOffer.amount.prompt=Enter amount in BTC createOffer.price.prompt=Enter price createOffer.volume.prompt=Enter amount in {0} # TODO remove createOffer.minAmount.prompt=Enter min. amount -# TODO remove createOffer.amountPriceBox.title=Create your offerPayload +# TODO remove createOffer.amountPriceBox.title=Create your offer createOffer.amountPriceBox.amountDescription=Amount of bitcoin to {0} createOffer.amountPriceBox.priceDescriptionFiat=Fixed price per {0} createOffer.amountPriceBox.buy.volumeDescription=Amount in {0} to spend createOffer.amountPriceBox.sell.volumeDescription=Amount in {0} to receive createOffer.amountPriceBox.minAmountDescription=Minimum amount of BTC -# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. -# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. +# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. +# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. # TODO remove createOffer.amountPriceBox.next=Next step # TODO remove createOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. # TODO remove createOffer.amountPriceBox.warning.invalidFiatDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted. # TODO remove createOffer.amountPriceBox.warning.adjustedVolume=The total volume you have entered leads to invalid fractional bitcoin amounts. The amount has been adjusted and a new total volume be calculated from it. -createOffer.amountPriceBox.error.message=An error occurred when placing the offerPayload:\n\n{0} +createOffer.amountPriceBox.error.message=An error occurred when placing the offer:\n\n{0} # TODO remove createOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount. # TODO remove createOffer.validation.minAmountLargerThanAmount=Minimum amount cannot be larger than amount. -createOffer.fundsBox.title=Fund your offerPayload +createOffer.fundsBox.title=Fund your offer createOffer.fundsBox.totalsNeeded=Funds needed: createOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above createOffer.fundsBox.address=Trade wallet address: createOffer.fundsBox.balance=Trade wallet balance: -# TODO remove createOffer.fundsBox.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offerPayload gets executed. If you cancel your offerPayload you can withdraw your funds from that trading wallet. The only payment made when placing an offerPayload is the offerPayload fee payment. https://bisq.io/faq/#6 +# TODO remove createOffer.fundsBox.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offer gets executed. If you cancel your offer you can withdraw your funds from that trading wallet. The only payment made when placing an offer is the offer fee payment. https://bisq.io/faq/#6 createOffer.fundsBox.tradeAmount=Trade amount: createOffer.fundsBox.securityDeposit=Security deposit: -createOffer.fundsBox.offerFee=Create offerPayload fee: +createOffer.fundsBox.offerFee=Create offer fee: createOffer.fundsBox.networkFee=Mining fee: createOffer.fundsBox.total=Total: # TODO remove createOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove createOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove createOffer.fundsBox.placeOffer=Place offerPayload +# TODO remove createOffer.fundsBox.placeOffer=Place offer createOffer.fundsBox.placeOfferSpinnerInfo=Offer publishing is in progress ... createOffer.fundsBox.paymentLabel=bisq trade with ID {0} @@ -139,20 +139,20 @@ createOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove createOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove createOffer.advancedBox.county=Payments account country: -# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offerPayload restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). +# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offer restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). -createOffer.success.headline=Your offerPayload has been published +createOffer.success.headline=Your offer has been published createOffer.success.info=You can manage your open offers in the \"Portfolio\" screen under \"My open offers\". -# TODO remove createOffer.error.message=An error occurred when placing the offerPayload.\n\n{0} +# TODO remove createOffer.error.message=An error occurred when placing the offer.\n\n{0} -# Take offerPayload +# Take offer takeOffer.amount.prompt=Enter amount in BTC # TODO remove takeOffer.price.prompt=Enter price # TODO remove takeOffer.volume.prompt=Enter amount in {0} # TODO remove takeOffer.minAmount.prompt=Enter min. amount -# TODO remove takeOffer.amountPriceBox.title=Take offerPayload +# TODO remove takeOffer.amountPriceBox.title=Take offer # TODO remove takeOffer.amountPriceBox.subTitle=Buy bitcoin takeOffer.amountPriceBox.buy.amountDescription=Amount of bitcoin to sell takeOffer.amountPriceBox.sell.amountDescription=Amount of bitcoin to buy @@ -164,30 +164,30 @@ takeOffer.amountPriceBox.amountRangeDescription=Possible amount range # TODO remove takeOffer.amountPriceBox.sell.info=Enter the amount of bitcoin you want to buy. You can choose an amount between the minimum amount and the amount. # TODO remove takeOffer.amountPriceBox.next=Next step takeOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. -takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offerPayload. -takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offerPayload. +takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offer. +takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offer. takeOffer.validation.amountLargerThanOfferAmountMinusFee=That input amount would create dust change for the BTC seller. takeOffer.fundsBox.title=Fund your trade -takeOffer.fundsBox.isOfferAvailable=Check if offerPayload is available ... +takeOffer.fundsBox.isOfferAvailable=Check if offer is available ... takeOffer.fundsBox.totalsNeeded=Funds needed: # TODO remove takeOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above takeOffer.fundsBox.address=Trade wallet address: takeOffer.fundsBox.balance=Trade wallet balance: -# TODO remove takeOffer.fundsBox.buy.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.buy.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid in to a locked deposit address. At the end of a successful trade you will get back your security deposit and the bitcoin amount you sold will be transferred \ to the BTC buyer. -# TODO remove takeOffer.fundsBox.sell.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.sell.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid into a locked deposit address. At the end of a successful trade you will get back your security deposit. takeOffer.fundsBox.tradeAmount=Amount to sell: takeOffer.fundsBox.securityDeposit=Security deposit: -takeOffer.fundsBox.offerFee=Take offerPayload fee: +takeOffer.fundsBox.offerFee=Take offer fee: takeOffer.fundsBox.networkFee=Mining fee: takeOffer.fundsBox.total=Total: # TODO remove takeOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove takeOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove takeOffer.fundsBox.takeOffer=Take offerPayload -takeOffer.fundsBox.takeOfferSpinnerInfo=Take offerPayload in progress ... +# TODO remove takeOffer.fundsBox.takeOffer=Take offer +takeOffer.fundsBox.takeOfferSpinnerInfo=Take offer in progress ... takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.title=Advanced settings @@ -197,12 +197,12 @@ takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove takeOffer.advancedBox.county=Payments account country: -# TODO remove takeOffer.advancedBox.info=These are the offerPayload restrictions your trading partner has defined in his offerPayload. \ +# TODO remove takeOffer.advancedBox.info=These are the offer restrictions your trading partner has defined in his offer. \ Your settings match those constraints and you are able to trade with him. -takeOffer.success.headline=You have successfully taken an offerPayload. +takeOffer.success.headline=You have successfully taken an offer. takeOffer.success.info=You can see the status of your trade at the \"Portfolio\" screen under \"Open trades\". -takeOffer.error.message=An error occurred when taking the offerPayload.\n\n{0} +takeOffer.error.message=An error occurred when taking the offer.\n\n{0} # Payment methods # remove N/A=Not available diff --git a/common/src/main/resources/i18n/in_dev/displayStrings_ie.properties b/common/src/main/resources/i18n/in_dev/displayStrings_ie.properties index d8d0c57d5a..94d9040917 100644 --- a/common/src/main/resources/i18n/in_dev/displayStrings_ie.properties +++ b/common/src/main/resources/i18n/in_dev/displayStrings_ie.properties @@ -93,42 +93,42 @@ validation.bankIdNumber={0} must consist of {1} numbers. validation.accountNr=Account number must consist of {0} numbers. validation.accountNrChars=Account number must consist of {0} characters. -# Create offerPayload +# Create offer createOffer.amount.prompt=Enter amount in BTC createOffer.price.prompt=Enter price createOffer.volume.prompt=Enter amount in {0} # TODO remove createOffer.minAmount.prompt=Enter min. amount -# TODO remove createOffer.amountPriceBox.title=Create your offerPayload +# TODO remove createOffer.amountPriceBox.title=Create your offer createOffer.amountPriceBox.amountDescription=Amount of bitcoin to {0} createOffer.amountPriceBox.priceDescriptionFiat=Fixed price per {0} createOffer.amountPriceBox.buy.volumeDescription=Amount in {0} to spend createOffer.amountPriceBox.sell.volumeDescription=Amount in {0} to receive createOffer.amountPriceBox.minAmountDescription=Minimum amount of BTC -# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. -# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. +# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. +# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. # TODO remove createOffer.amountPriceBox.next=Next step # TODO remove createOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. # TODO remove createOffer.amountPriceBox.warning.invalidFiatDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted. # TODO remove createOffer.amountPriceBox.warning.adjustedVolume=The total volume you have entered leads to invalid fractional bitcoin amounts. The amount has been adjusted and a new total volume be calculated from it. -createOffer.amountPriceBox.error.message=An error occurred when placing the offerPayload:\n\n{0} +createOffer.amountPriceBox.error.message=An error occurred when placing the offer:\n\n{0} # TODO remove createOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount. # TODO remove createOffer.validation.minAmountLargerThanAmount=Minimum amount cannot be larger than amount. -createOffer.fundsBox.title=Fund your offerPayload +createOffer.fundsBox.title=Fund your offer createOffer.fundsBox.totalsNeeded=Funds needed: createOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above createOffer.fundsBox.address=Trade wallet address: createOffer.fundsBox.balance=Trade wallet balance: -# TODO remove createOffer.fundsBox.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offerPayload gets executed. If you cancel your offerPayload you can withdraw your funds from that trading wallet. The only payment made when placing an offerPayload is the offerPayload fee payment. https://bisq.io/faq/#6 +# TODO remove createOffer.fundsBox.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offer gets executed. If you cancel your offer you can withdraw your funds from that trading wallet. The only payment made when placing an offer is the offer fee payment. https://bisq.io/faq/#6 createOffer.fundsBox.tradeAmount=Trade amount: createOffer.fundsBox.securityDeposit=Security deposit: -createOffer.fundsBox.offerFee=Create offerPayload fee: +createOffer.fundsBox.offerFee=Create offer fee: createOffer.fundsBox.networkFee=Mining fee: createOffer.fundsBox.total=Total: # TODO remove createOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove createOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove createOffer.fundsBox.placeOffer=Place offerPayload +# TODO remove createOffer.fundsBox.placeOffer=Place offer createOffer.fundsBox.placeOfferSpinnerInfo=Offer publishing is in progress ... createOffer.fundsBox.paymentLabel=bisq trade with ID {0} @@ -139,20 +139,20 @@ createOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove createOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove createOffer.advancedBox.county=Payments account country: -# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offerPayload restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). +# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offer restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). -createOffer.success.headline=Your offerPayload has been published +createOffer.success.headline=Your offer has been published createOffer.success.info=You can manage your open offers in the \"Portfolio\" screen under \"My open offers\". -# TODO remove createOffer.error.message=An error occurred when placing the offerPayload.\n\n{0} +# TODO remove createOffer.error.message=An error occurred when placing the offer.\n\n{0} -# Take offerPayload +# Take offer takeOffer.amount.prompt=Enter amount in BTC # TODO remove takeOffer.price.prompt=Enter price # TODO remove takeOffer.volume.prompt=Enter amount in {0} # TODO remove takeOffer.minAmount.prompt=Enter min. amount -# TODO remove takeOffer.amountPriceBox.title=Take offerPayload +# TODO remove takeOffer.amountPriceBox.title=Take offer # TODO remove takeOffer.amountPriceBox.subTitle=Buy bitcoin takeOffer.amountPriceBox.buy.amountDescription=Amount of bitcoin to sell takeOffer.amountPriceBox.sell.amountDescription=Amount of bitcoin to buy @@ -164,30 +164,30 @@ takeOffer.amountPriceBox.amountRangeDescription=Possible amount range # TODO remove takeOffer.amountPriceBox.sell.info=Enter the amount of bitcoin you want to buy. You can choose an amount between the minimum amount and the amount. # TODO remove takeOffer.amountPriceBox.next=Next step takeOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. -takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offerPayload. -takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offerPayload. +takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offer. +takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offer. takeOffer.validation.amountLargerThanOfferAmountMinusFee=That input amount would create dust change for the BTC seller. takeOffer.fundsBox.title=Fund your trade -takeOffer.fundsBox.isOfferAvailable=Check if offerPayload is available ... +takeOffer.fundsBox.isOfferAvailable=Check if offer is available ... takeOffer.fundsBox.totalsNeeded=Funds needed: # TODO remove takeOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above takeOffer.fundsBox.address=Trade wallet address: takeOffer.fundsBox.balance=Trade wallet balance: -# TODO remove takeOffer.fundsBox.buy.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.buy.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid in to a locked deposit address. At the end of a successful trade you will get back your security deposit and the bitcoin amount you sold will be transferred \ to the BTC buyer. -# TODO remove takeOffer.fundsBox.sell.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.sell.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid into a locked deposit address. At the end of a successful trade you will get back your security deposit. takeOffer.fundsBox.tradeAmount=Amount to sell: takeOffer.fundsBox.securityDeposit=Security deposit: -takeOffer.fundsBox.offerFee=Take offerPayload fee: +takeOffer.fundsBox.offerFee=Take offer fee: takeOffer.fundsBox.networkFee=Mining fee: takeOffer.fundsBox.total=Total: # TODO remove takeOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove takeOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove takeOffer.fundsBox.takeOffer=Take offerPayload -takeOffer.fundsBox.takeOfferSpinnerInfo=Take offerPayload in progress ... +# TODO remove takeOffer.fundsBox.takeOffer=Take offer +takeOffer.fundsBox.takeOfferSpinnerInfo=Take offer in progress ... takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.title=Advanced settings @@ -197,12 +197,12 @@ takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove takeOffer.advancedBox.county=Payments account country: -# TODO remove takeOffer.advancedBox.info=These are the offerPayload restrictions your trading partner has defined in his offerPayload. \ +# TODO remove takeOffer.advancedBox.info=These are the offer restrictions your trading partner has defined in his offer. \ Your settings match those constraints and you are able to trade with him. -takeOffer.success.headline=You have successfully taken an offerPayload. +takeOffer.success.headline=You have successfully taken an offer. takeOffer.success.info=You can see the status of your trade at the \"Portfolio\" screen under \"Open trades\". -takeOffer.error.message=An error occurred when taking the offerPayload.\n\n{0} +takeOffer.error.message=An error occurred when taking the offer.\n\n{0} # Payment methods # remove N/A=Not available diff --git a/common/src/main/resources/i18n/in_dev/displayStrings_in.properties b/common/src/main/resources/i18n/in_dev/displayStrings_in.properties index 4f2fdfcb7b..1977f94ce0 100644 --- a/common/src/main/resources/i18n/in_dev/displayStrings_in.properties +++ b/common/src/main/resources/i18n/in_dev/displayStrings_in.properties @@ -93,42 +93,42 @@ validation.bankIdNumber={0} must consist of {1} numbers. validation.accountNr=Account number must consist of {0} numbers. validation.accountNrChars=Account number must consist of {0} characters. -# Create offerPayload +# Create offer createOffer.amount.prompt=Enter amount in BTC createOffer.price.prompt=Enter price createOffer.volume.prompt=Enter amount in {0} # TODO remove createOffer.minAmount.prompt=Enter min. amount -# TODO remove createOffer.amountPriceBox.title=Create your offerPayload +# TODO remove createOffer.amountPriceBox.title=Create your offer createOffer.amountPriceBox.amountDescription=Amount of bitcoin to {0} createOffer.amountPriceBox.priceDescriptionFiat=Fixed price per {0} createOffer.amountPriceBox.buy.volumeDescription=Amount in {0} to spend createOffer.amountPriceBox.sell.volumeDescription=Amount in {0} to receive createOffer.amountPriceBox.minAmountDescription=Minimum amount of BTC -# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. -# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. +# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. +# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. # TODO remove createOffer.amountPriceBox.next=Next step # TODO remove createOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. # TODO remove createOffer.amountPriceBox.warning.invalidFiatDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted. # TODO remove createOffer.amountPriceBox.warning.adjustedVolume=The total volume you have entered leads to invalid fractional bitcoin amounts. The amount has been adjusted and a new total volume be calculated from it. -createOffer.amountPriceBox.error.message=An error occurred when placing the offerPayload:\n\n{0} +createOffer.amountPriceBox.error.message=An error occurred when placing the offer:\n\n{0} # TODO remove createOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount. # TODO remove createOffer.validation.minAmountLargerThanAmount=Minimum amount cannot be larger than amount. -createOffer.fundsBox.title=Fund your offerPayload +createOffer.fundsBox.title=Fund your offer createOffer.fundsBox.totalsNeeded=Funds needed: createOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above createOffer.fundsBox.address=Trade wallet address: createOffer.fundsBox.balance=Trade wallet balance: -# TODO remove createOffer.fundsBox.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offerPayload gets executed. If you cancel your offerPayload you can withdraw your funds from that trading wallet. The only payment made when placing an offerPayload is the offerPayload fee payment. https://bisq.io/faq/#6 +# TODO remove createOffer.fundsBox.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offer gets executed. If you cancel your offer you can withdraw your funds from that trading wallet. The only payment made when placing an offer is the offer fee payment. https://bisq.io/faq/#6 createOffer.fundsBox.tradeAmount=Trade amount: createOffer.fundsBox.securityDeposit=Security deposit: -createOffer.fundsBox.offerFee=Create offerPayload fee: +createOffer.fundsBox.offerFee=Create offer fee: createOffer.fundsBox.networkFee=Mining fee: createOffer.fundsBox.total=Total: # TODO remove createOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove createOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove createOffer.fundsBox.placeOffer=Place offerPayload +# TODO remove createOffer.fundsBox.placeOffer=Place offer createOffer.fundsBox.placeOfferSpinnerInfo=Offer publishing is in progress ... createOffer.fundsBox.paymentLabel=bisq trade with ID {0} @@ -139,20 +139,20 @@ createOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove createOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove createOffer.advancedBox.county=Payments account country: -# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offerPayload restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). +# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offer restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). -createOffer.success.headline=Your offerPayload has been published +createOffer.success.headline=Your offer has been published createOffer.success.info=You can manage your open offers in the \"Portfolio\" screen under \"My open offers\". -# TODO remove createOffer.error.message=An error occurred when placing the offerPayload.\n\n{0} +# TODO remove createOffer.error.message=An error occurred when placing the offer.\n\n{0} -# Take offerPayload +# Take offer takeOffer.amount.prompt=Enter amount in BTC # TODO remove takeOffer.price.prompt=Enter price # TODO remove takeOffer.volume.prompt=Enter amount in {0} # TODO remove takeOffer.minAmount.prompt=Enter min. amount -# TODO remove takeOffer.amountPriceBox.title=Take offerPayload +# TODO remove takeOffer.amountPriceBox.title=Take offer # TODO remove takeOffer.amountPriceBox.subTitle=Buy bitcoin takeOffer.amountPriceBox.buy.amountDescription=Amount of bitcoin to sell takeOffer.amountPriceBox.sell.amountDescription=Amount of bitcoin to buy @@ -164,30 +164,30 @@ takeOffer.amountPriceBox.amountRangeDescription=Possible amount range # TODO remove takeOffer.amountPriceBox.sell.info=Enter the amount of bitcoin you want to buy. You can choose an amount between the minimum amount and the amount. # TODO remove takeOffer.amountPriceBox.next=Next step takeOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. -takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offerPayload. -takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offerPayload. +takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offer. +takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offer. takeOffer.validation.amountLargerThanOfferAmountMinusFee=That input amount would create dust change for the BTC seller. takeOffer.fundsBox.title=Fund your trade -takeOffer.fundsBox.isOfferAvailable=Check if offerPayload is available ... +takeOffer.fundsBox.isOfferAvailable=Check if offer is available ... takeOffer.fundsBox.totalsNeeded=Funds needed: # TODO remove takeOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above takeOffer.fundsBox.address=Trade wallet address: takeOffer.fundsBox.balance=Trade wallet balance: -# TODO remove takeOffer.fundsBox.buy.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.buy.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid in to a locked deposit address. At the end of a successful trade you will get back your security deposit and the bitcoin amount you sold will be transferred \ to the BTC buyer. -# TODO remove takeOffer.fundsBox.sell.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.sell.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid into a locked deposit address. At the end of a successful trade you will get back your security deposit. takeOffer.fundsBox.tradeAmount=Amount to sell: takeOffer.fundsBox.securityDeposit=Security deposit: -takeOffer.fundsBox.offerFee=Take offerPayload fee: +takeOffer.fundsBox.offerFee=Take offer fee: takeOffer.fundsBox.networkFee=Mining fee: takeOffer.fundsBox.total=Total: # TODO remove takeOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove takeOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove takeOffer.fundsBox.takeOffer=Take offerPayload -takeOffer.fundsBox.takeOfferSpinnerInfo=Take offerPayload in progress ... +# TODO remove takeOffer.fundsBox.takeOffer=Take offer +takeOffer.fundsBox.takeOfferSpinnerInfo=Take offer in progress ... takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.title=Advanced settings @@ -197,12 +197,12 @@ takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove takeOffer.advancedBox.county=Payments account country: -# TODO remove takeOffer.advancedBox.info=These are the offerPayload restrictions your trading partner has defined in his offerPayload. \ +# TODO remove takeOffer.advancedBox.info=These are the offer restrictions your trading partner has defined in his offer. \ Your settings match those constraints and you are able to trade with him. -takeOffer.success.headline=You have successfully taken an offerPayload. +takeOffer.success.headline=You have successfully taken an offer. takeOffer.success.info=You can see the status of your trade at the \"Portfolio\" screen under \"Open trades\". -takeOffer.error.message=An error occurred when taking the offerPayload.\n\n{0} +takeOffer.error.message=An error occurred when taking the offer.\n\n{0} # Payment methods # remove N/A=Not available diff --git a/common/src/main/resources/i18n/in_dev/displayStrings_is.properties b/common/src/main/resources/i18n/in_dev/displayStrings_is.properties index f9cef4f879..9bfa0a013f 100644 --- a/common/src/main/resources/i18n/in_dev/displayStrings_is.properties +++ b/common/src/main/resources/i18n/in_dev/displayStrings_is.properties @@ -93,42 +93,42 @@ validation.bankIdNumber={0} must consist of {1} numbers. validation.accountNr=Account number must consist of {0} numbers. validation.accountNrChars=Account number must consist of {0} characters. -# Create offerPayload +# Create offer createOffer.amount.prompt=Enter amount in BTC createOffer.price.prompt=Enter price createOffer.volume.prompt=Enter amount in {0} # TODO remove createOffer.minAmount.prompt=Enter min. amount -# TODO remove createOffer.amountPriceBox.title=Create your offerPayload +# TODO remove createOffer.amountPriceBox.title=Create your offer createOffer.amountPriceBox.amountDescription=Amount of bitcoin to {0} createOffer.amountPriceBox.priceDescriptionFiat=Fixed price per {0} createOffer.amountPriceBox.buy.volumeDescription=Amount in {0} to spend createOffer.amountPriceBox.sell.volumeDescription=Amount in {0} to receive createOffer.amountPriceBox.minAmountDescription=Minimum amount of BTC -# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. -# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. +# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. +# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. # TODO remove createOffer.amountPriceBox.next=Next step # TODO remove createOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. # TODO remove createOffer.amountPriceBox.warning.invalidFiatDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted. # TODO remove createOffer.amountPriceBox.warning.adjustedVolume=The total volume you have entered leads to invalid fractional bitcoin amounts. The amount has been adjusted and a new total volume be calculated from it. -createOffer.amountPriceBox.error.message=An error occurred when placing the offerPayload:\n\n{0} +createOffer.amountPriceBox.error.message=An error occurred when placing the offer:\n\n{0} # TODO remove createOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount. # TODO remove createOffer.validation.minAmountLargerThanAmount=Minimum amount cannot be larger than amount. -createOffer.fundsBox.title=Fund your offerPayload +createOffer.fundsBox.title=Fund your offer createOffer.fundsBox.totalsNeeded=Funds needed: createOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above createOffer.fundsBox.address=Trade wallet address: createOffer.fundsBox.balance=Trade wallet balance: -# TODO remove createOffer.fundsBox.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offerPayload gets executed. If you cancel your offerPayload you can withdraw your funds from that trading wallet. The only payment made when placing an offerPayload is the offerPayload fee payment. https://bisq.io/faq/#6 +# TODO remove createOffer.fundsBox.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offer gets executed. If you cancel your offer you can withdraw your funds from that trading wallet. The only payment made when placing an offer is the offer fee payment. https://bisq.io/faq/#6 createOffer.fundsBox.tradeAmount=Trade amount: createOffer.fundsBox.securityDeposit=Security deposit: -createOffer.fundsBox.offerFee=Create offerPayload fee: +createOffer.fundsBox.offerFee=Create offer fee: createOffer.fundsBox.networkFee=Mining fee: createOffer.fundsBox.total=Total: # TODO remove createOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove createOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove createOffer.fundsBox.placeOffer=Place offerPayload +# TODO remove createOffer.fundsBox.placeOffer=Place offer createOffer.fundsBox.placeOfferSpinnerInfo=Offer publishing is in progress ... createOffer.fundsBox.paymentLabel=bisq trade with ID {0} @@ -139,20 +139,20 @@ createOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove createOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove createOffer.advancedBox.county=Payments account country: -# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offerPayload restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). +# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offer restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). -createOffer.success.headline=Your offerPayload has been published +createOffer.success.headline=Your offer has been published createOffer.success.info=You can manage your open offers in the \"Portfolio\" screen under \"My open offers\". -# TODO remove createOffer.error.message=An error occurred when placing the offerPayload.\n\n{0} +# TODO remove createOffer.error.message=An error occurred when placing the offer.\n\n{0} -# Take offerPayload +# Take offer takeOffer.amount.prompt=Enter amount in BTC # TODO remove takeOffer.price.prompt=Enter price # TODO remove takeOffer.volume.prompt=Enter amount in {0} # TODO remove takeOffer.minAmount.prompt=Enter min. amount -# TODO remove takeOffer.amountPriceBox.title=Take offerPayload +# TODO remove takeOffer.amountPriceBox.title=Take offer # TODO remove takeOffer.amountPriceBox.subTitle=Buy bitcoin takeOffer.amountPriceBox.buy.amountDescription=Amount of bitcoin to sell takeOffer.amountPriceBox.sell.amountDescription=Amount of bitcoin to buy @@ -164,30 +164,30 @@ takeOffer.amountPriceBox.amountRangeDescription=Possible amount range # TODO remove takeOffer.amountPriceBox.sell.info=Enter the amount of bitcoin you want to buy. You can choose an amount between the minimum amount and the amount. # TODO remove takeOffer.amountPriceBox.next=Next step takeOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. -takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offerPayload. -takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offerPayload. +takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offer. +takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offer. takeOffer.validation.amountLargerThanOfferAmountMinusFee=That input amount would create dust change for the BTC seller. takeOffer.fundsBox.title=Fund your trade -takeOffer.fundsBox.isOfferAvailable=Check if offerPayload is available ... +takeOffer.fundsBox.isOfferAvailable=Check if offer is available ... takeOffer.fundsBox.totalsNeeded=Funds needed: # TODO remove takeOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above takeOffer.fundsBox.address=Trade wallet address: takeOffer.fundsBox.balance=Trade wallet balance: -# TODO remove takeOffer.fundsBox.buy.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.buy.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid in to a locked deposit address. At the end of a successful trade you will get back your security deposit and the bitcoin amount you sold will be transferred \ to the BTC buyer. -# TODO remove takeOffer.fundsBox.sell.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.sell.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid into a locked deposit address. At the end of a successful trade you will get back your security deposit. takeOffer.fundsBox.tradeAmount=Amount to sell: takeOffer.fundsBox.securityDeposit=Security deposit: -takeOffer.fundsBox.offerFee=Take offerPayload fee: +takeOffer.fundsBox.offerFee=Take offer fee: takeOffer.fundsBox.networkFee=Mining fee: takeOffer.fundsBox.total=Total: # TODO remove takeOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove takeOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove takeOffer.fundsBox.takeOffer=Take offerPayload -takeOffer.fundsBox.takeOfferSpinnerInfo=Take offerPayload in progress ... +# TODO remove takeOffer.fundsBox.takeOffer=Take offer +takeOffer.fundsBox.takeOfferSpinnerInfo=Take offer in progress ... takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.title=Advanced settings @@ -197,12 +197,12 @@ takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove takeOffer.advancedBox.county=Payments account country: -# TODO remove takeOffer.advancedBox.info=These are the offerPayload restrictions your trading partner has defined in his offerPayload. \ +# TODO remove takeOffer.advancedBox.info=These are the offer restrictions your trading partner has defined in his offer. \ Your settings match those constraints and you are able to trade with him. -takeOffer.success.headline=You have successfully taken an offerPayload. +takeOffer.success.headline=You have successfully taken an offer. takeOffer.success.info=You can see the status of your trade at the \"Portfolio\" screen under \"Open trades\". -takeOffer.error.message=An error occurred when taking the offerPayload.\n\n{0} +takeOffer.error.message=An error occurred when taking the offer.\n\n{0} # Payment methods # remove N/A=Not available diff --git a/common/src/main/resources/i18n/in_dev/displayStrings_it.properties b/common/src/main/resources/i18n/in_dev/displayStrings_it.properties index 6981e5559e..27850e7890 100644 --- a/common/src/main/resources/i18n/in_dev/displayStrings_it.properties +++ b/common/src/main/resources/i18n/in_dev/displayStrings_it.properties @@ -93,7 +93,7 @@ validation.bankIdNumber={0} deve consistere in {1} numeri. validation.accountNr=Il numero dell'account deve consistere in {0} numeri. validation.accountNrChars=Il numero dell'account deve consistere in {0} caratteri. -# Create offerPayload +# Create offer createOffer.amount.prompt=Inserire l'importo in BTC createOffer.price.prompt=Inserire prezzo createOffer.volume.prompt=Inserire prezzo in {0} @@ -146,7 +146,7 @@ createOffer.success.info=Puoi gestire le tue offerte perte nella schermata \"Por # TODO remove createOffer.error.message=Si è verificato un errore durante l'immissione dell'offerta.\n\n{0} -# Take offerPayload +# Take offer takeOffer.amount.prompt=Inserire importo in BTC # TODO remove takeOffer.price.prompt=Inserire prezzo # TODO remove takeOffer.volume.prompt=Inserire importo in {0} diff --git a/common/src/main/resources/i18n/in_dev/displayStrings_jp.properties b/common/src/main/resources/i18n/in_dev/displayStrings_jp.properties index f6d79ce45c..2d6c0deffe 100644 --- a/common/src/main/resources/i18n/in_dev/displayStrings_jp.properties +++ b/common/src/main/resources/i18n/in_dev/displayStrings_jp.properties @@ -93,42 +93,42 @@ validation.bankIdNumber={0} must consist of {1} numbers. validation.accountNr=Account number must consist of {0} numbers. validation.accountNrChars=Account number must consist of {0} characters. -# Create offerPayload +# Create offer createOffer.amount.prompt=Enter amount in BTC createOffer.price.prompt=Enter price createOffer.volume.prompt=Enter amount in {0} # TODO remove createOffer.minAmount.prompt=Enter min. amount -# TODO remove createOffer.amountPriceBox.title=Create your offerPayload +# TODO remove createOffer.amountPriceBox.title=Create your offer createOffer.amountPriceBox.amountDescription=Amount of bitcoin to {0} createOffer.amountPriceBox.priceDescriptionFiat=Fixed price per {0} createOffer.amountPriceBox.buy.volumeDescription=Amount in {0} to spend createOffer.amountPriceBox.sell.volumeDescription=Amount in {0} to receive createOffer.amountPriceBox.minAmountDescription=Minimum amount of BTC -# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. -# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. +# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. +# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. # TODO remove createOffer.amountPriceBox.next=Next step # TODO remove createOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. # TODO remove createOffer.amountPriceBox.warning.invalidFiatDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted. # TODO remove createOffer.amountPriceBox.warning.adjustedVolume=The total volume you have entered leads to invalid fractional bitcoin amounts. The amount has been adjusted and a new total volume be calculated from it. -createOffer.amountPriceBox.error.message=An error occurred when placing the offerPayload:\n\n{0} +createOffer.amountPriceBox.error.message=An error occurred when placing the offer:\n\n{0} # TODO remove createOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount. # TODO remove createOffer.validation.minAmountLargerThanAmount=Minimum amount cannot be larger than amount. -createOffer.fundsBox.title=Fund your offerPayload +createOffer.fundsBox.title=Fund your offer createOffer.fundsBox.totalsNeeded=Funds needed: createOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above createOffer.fundsBox.address=Trade wallet address: createOffer.fundsBox.balance=Trade wallet balance: -# TODO remove createOffer.fundsBox.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offerPayload gets executed. If you cancel your offerPayload you can withdraw your funds from that trading wallet. The only payment made when placing an offerPayload is the offerPayload fee payment. https://bisq.io/faq/#6 +# TODO remove createOffer.fundsBox.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offer gets executed. If you cancel your offer you can withdraw your funds from that trading wallet. The only payment made when placing an offer is the offer fee payment. https://bisq.io/faq/#6 createOffer.fundsBox.tradeAmount=Trade amount: createOffer.fundsBox.securityDeposit=Security deposit: -createOffer.fundsBox.offerFee=Create offerPayload fee: +createOffer.fundsBox.offerFee=Create offer fee: createOffer.fundsBox.networkFee=Mining fee: createOffer.fundsBox.total=Total: # TODO remove createOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove createOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove createOffer.fundsBox.placeOffer=Place offerPayload +# TODO remove createOffer.fundsBox.placeOffer=Place offer createOffer.fundsBox.placeOfferSpinnerInfo=Offer publishing is in progress ... createOffer.fundsBox.paymentLabel=bisq trade with ID {0} @@ -139,20 +139,20 @@ createOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove createOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove createOffer.advancedBox.county=Payments account country: -# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offerPayload restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). +# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offer restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). -createOffer.success.headline=Your offerPayload has been published +createOffer.success.headline=Your offer has been published createOffer.success.info=You can manage your open offers in the \"Portfolio\" screen under \"My open offers\". -# TODO remove createOffer.error.message=An error occurred when placing the offerPayload.\n\n{0} +# TODO remove createOffer.error.message=An error occurred when placing the offer.\n\n{0} -# Take offerPayload +# Take offer takeOffer.amount.prompt=Enter amount in BTC # TODO remove takeOffer.price.prompt=Enter price # TODO remove takeOffer.volume.prompt=Enter amount in {0} # TODO remove takeOffer.minAmount.prompt=Enter min. amount -# TODO remove takeOffer.amountPriceBox.title=Take offerPayload +# TODO remove takeOffer.amountPriceBox.title=Take offer # TODO remove takeOffer.amountPriceBox.subTitle=Buy bitcoin takeOffer.amountPriceBox.buy.amountDescription=Amount of bitcoin to sell takeOffer.amountPriceBox.sell.amountDescription=Amount of bitcoin to buy @@ -164,30 +164,30 @@ takeOffer.amountPriceBox.amountRangeDescription=Possible amount range # TODO remove takeOffer.amountPriceBox.sell.info=Enter the amount of bitcoin you want to buy. You can choose an amount between the minimum amount and the amount. # TODO remove takeOffer.amountPriceBox.next=Next step takeOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. -takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offerPayload. -takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offerPayload. +takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offer. +takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offer. takeOffer.validation.amountLargerThanOfferAmountMinusFee=That input amount would create dust change for the BTC seller. takeOffer.fundsBox.title=Fund your trade -takeOffer.fundsBox.isOfferAvailable=Check if offerPayload is available ... +takeOffer.fundsBox.isOfferAvailable=Check if offer is available ... takeOffer.fundsBox.totalsNeeded=Funds needed: # TODO remove takeOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above takeOffer.fundsBox.address=Trade wallet address: takeOffer.fundsBox.balance=Trade wallet balance: -# TODO remove takeOffer.fundsBox.buy.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.buy.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid in to a locked deposit address. At the end of a successful trade you will get back your security deposit and the bitcoin amount you sold will be transferred \ to the BTC buyer. -# TODO remove takeOffer.fundsBox.sell.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.sell.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid into a locked deposit address. At the end of a successful trade you will get back your security deposit. takeOffer.fundsBox.tradeAmount=Amount to sell: takeOffer.fundsBox.securityDeposit=Security deposit: -takeOffer.fundsBox.offerFee=Take offerPayload fee: +takeOffer.fundsBox.offerFee=Take offer fee: takeOffer.fundsBox.networkFee=Mining fee: takeOffer.fundsBox.total=Total: # TODO remove takeOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove takeOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove takeOffer.fundsBox.takeOffer=Take offerPayload -takeOffer.fundsBox.takeOfferSpinnerInfo=Take offerPayload in progress ... +# TODO remove takeOffer.fundsBox.takeOffer=Take offer +takeOffer.fundsBox.takeOfferSpinnerInfo=Take offer in progress ... takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.title=Advanced settings @@ -197,12 +197,12 @@ takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove takeOffer.advancedBox.county=Payments account country: -# TODO remove takeOffer.advancedBox.info=These are the offerPayload restrictions your trading partner has defined in his offerPayload. \ +# TODO remove takeOffer.advancedBox.info=These are the offer restrictions your trading partner has defined in his offer. \ Your settings match those constraints and you are able to trade with him. -takeOffer.success.headline=You have successfully taken an offerPayload. +takeOffer.success.headline=You have successfully taken an offer. takeOffer.success.info=You can see the status of your trade at the \"Portfolio\" screen under \"Open trades\". -takeOffer.error.message=An error occurred when taking the offerPayload.\n\n{0} +takeOffer.error.message=An error occurred when taking the offer.\n\n{0} # Payment methods # remove N/A=Not available diff --git a/common/src/main/resources/i18n/in_dev/displayStrings_kg.properties b/common/src/main/resources/i18n/in_dev/displayStrings_kg.properties index 1e62f995ee..a226039ddb 100644 --- a/common/src/main/resources/i18n/in_dev/displayStrings_kg.properties +++ b/common/src/main/resources/i18n/in_dev/displayStrings_kg.properties @@ -93,42 +93,42 @@ validation.bankIdNumber={0} must consist of {1} numbers. validation.accountNr=Account number must consist of {0} numbers. validation.accountNrChars=Account number must consist of {0} characters. -# Create offerPayload +# Create offer createOffer.amount.prompt=Enter amount in BTC createOffer.price.prompt=Enter price createOffer.volume.prompt=Enter amount in {0} # TODO remove createOffer.minAmount.prompt=Enter min. amount -# TODO remove createOffer.amountPriceBox.title=Create your offerPayload +# TODO remove createOffer.amountPriceBox.title=Create your offer createOffer.amountPriceBox.amountDescription=Amount of bitcoin to {0} createOffer.amountPriceBox.priceDescriptionFiat=Fixed price per {0} createOffer.amountPriceBox.buy.volumeDescription=Amount in {0} to spend createOffer.amountPriceBox.sell.volumeDescription=Amount in {0} to receive createOffer.amountPriceBox.minAmountDescription=Minimum amount of BTC -# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. -# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. +# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. +# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. # TODO remove createOffer.amountPriceBox.next=Next step # TODO remove createOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. # TODO remove createOffer.amountPriceBox.warning.invalidFiatDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted. # TODO remove createOffer.amountPriceBox.warning.adjustedVolume=The total volume you have entered leads to invalid fractional bitcoin amounts. The amount has been adjusted and a new total volume be calculated from it. -createOffer.amountPriceBox.error.message=An error occurred when placing the offerPayload:\n\n{0} +createOffer.amountPriceBox.error.message=An error occurred when placing the offer:\n\n{0} # TODO remove createOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount. # TODO remove createOffer.validation.minAmountLargerThanAmount=Minimum amount cannot be larger than amount. -createOffer.fundsBox.title=Fund your offerPayload +createOffer.fundsBox.title=Fund your offer createOffer.fundsBox.totalsNeeded=Funds needed: createOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above createOffer.fundsBox.address=Trade wallet address: createOffer.fundsBox.balance=Trade wallet balance: -# TODO remove createOffer.fundsBox.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offerPayload gets executed. If you cancel your offerPayload you can withdraw your funds from that trading wallet. The only payment made when placing an offerPayload is the offerPayload fee payment. https://bisq.io/faq/#6 +# TODO remove createOffer.fundsBox.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offer gets executed. If you cancel your offer you can withdraw your funds from that trading wallet. The only payment made when placing an offer is the offer fee payment. https://bisq.io/faq/#6 createOffer.fundsBox.tradeAmount=Trade amount: createOffer.fundsBox.securityDeposit=Security deposit: -createOffer.fundsBox.offerFee=Create offerPayload fee: +createOffer.fundsBox.offerFee=Create offer fee: createOffer.fundsBox.networkFee=Mining fee: createOffer.fundsBox.total=Total: # TODO remove createOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove createOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove createOffer.fundsBox.placeOffer=Place offerPayload +# TODO remove createOffer.fundsBox.placeOffer=Place offer createOffer.fundsBox.placeOfferSpinnerInfo=Offer publishing is in progress ... createOffer.fundsBox.paymentLabel=bisq trade with ID {0} @@ -139,20 +139,20 @@ createOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove createOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove createOffer.advancedBox.county=Payments account country: -# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offerPayload restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). +# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offer restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). -createOffer.success.headline=Your offerPayload has been published +createOffer.success.headline=Your offer has been published createOffer.success.info=You can manage your open offers in the \"Portfolio\" screen under \"My open offers\". -# TODO remove createOffer.error.message=An error occurred when placing the offerPayload.\n\n{0} +# TODO remove createOffer.error.message=An error occurred when placing the offer.\n\n{0} -# Take offerPayload +# Take offer takeOffer.amount.prompt=Enter amount in BTC # TODO remove takeOffer.price.prompt=Enter price # TODO remove takeOffer.volume.prompt=Enter amount in {0} # TODO remove takeOffer.minAmount.prompt=Enter min. amount -# TODO remove takeOffer.amountPriceBox.title=Take offerPayload +# TODO remove takeOffer.amountPriceBox.title=Take offer # TODO remove takeOffer.amountPriceBox.subTitle=Buy bitcoin takeOffer.amountPriceBox.buy.amountDescription=Amount of bitcoin to sell takeOffer.amountPriceBox.sell.amountDescription=Amount of bitcoin to buy @@ -164,30 +164,30 @@ takeOffer.amountPriceBox.amountRangeDescription=Possible amount range # TODO remove takeOffer.amountPriceBox.sell.info=Enter the amount of bitcoin you want to buy. You can choose an amount between the minimum amount and the amount. # TODO remove takeOffer.amountPriceBox.next=Next step takeOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. -takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offerPayload. -takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offerPayload. +takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offer. +takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offer. takeOffer.validation.amountLargerThanOfferAmountMinusFee=That input amount would create dust change for the BTC seller. takeOffer.fundsBox.title=Fund your trade -takeOffer.fundsBox.isOfferAvailable=Check if offerPayload is available ... +takeOffer.fundsBox.isOfferAvailable=Check if offer is available ... takeOffer.fundsBox.totalsNeeded=Funds needed: # TODO remove takeOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above takeOffer.fundsBox.address=Trade wallet address: takeOffer.fundsBox.balance=Trade wallet balance: -# TODO remove takeOffer.fundsBox.buy.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.buy.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid in to a locked deposit address. At the end of a successful trade you will get back your security deposit and the bitcoin amount you sold will be transferred \ to the BTC buyer. -# TODO remove takeOffer.fundsBox.sell.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.sell.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid into a locked deposit address. At the end of a successful trade you will get back your security deposit. takeOffer.fundsBox.tradeAmount=Amount to sell: takeOffer.fundsBox.securityDeposit=Security deposit: -takeOffer.fundsBox.offerFee=Take offerPayload fee: +takeOffer.fundsBox.offerFee=Take offer fee: takeOffer.fundsBox.networkFee=Mining fee: takeOffer.fundsBox.total=Total: # TODO remove takeOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove takeOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove takeOffer.fundsBox.takeOffer=Take offerPayload -takeOffer.fundsBox.takeOfferSpinnerInfo=Take offerPayload in progress ... +# TODO remove takeOffer.fundsBox.takeOffer=Take offer +takeOffer.fundsBox.takeOfferSpinnerInfo=Take offer in progress ... takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.title=Advanced settings @@ -197,12 +197,12 @@ takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove takeOffer.advancedBox.county=Payments account country: -# TODO remove takeOffer.advancedBox.info=These are the offerPayload restrictions your trading partner has defined in his offerPayload. \ +# TODO remove takeOffer.advancedBox.info=These are the offer restrictions your trading partner has defined in his offer. \ Your settings match those constraints and you are able to trade with him. -takeOffer.success.headline=You have successfully taken an offerPayload. +takeOffer.success.headline=You have successfully taken an offer. takeOffer.success.info=You can see the status of your trade at the \"Portfolio\" screen under \"Open trades\". -takeOffer.error.message=An error occurred when taking the offerPayload.\n\n{0} +takeOffer.error.message=An error occurred when taking the offer.\n\n{0} # Payment methods # remove N/A=Not available diff --git a/common/src/main/resources/i18n/in_dev/displayStrings_kr.properties b/common/src/main/resources/i18n/in_dev/displayStrings_kr.properties index 753c534c11..a27e329c5c 100644 --- a/common/src/main/resources/i18n/in_dev/displayStrings_kr.properties +++ b/common/src/main/resources/i18n/in_dev/displayStrings_kr.properties @@ -93,42 +93,42 @@ validation.bankIdNumber={0} must consist of {1} numbers. validation.accountNr=Account number must consist of {0} numbers. validation.accountNrChars=Account number must consist of {0} characters. -# Create offerPayload +# Create offer createOffer.amount.prompt=Enter amount in BTC createOffer.price.prompt=Enter price createOffer.volume.prompt=Enter amount in {0} # TODO remove createOffer.minAmount.prompt=Enter min. amount -# TODO remove createOffer.amountPriceBox.title=Create your offerPayload +# TODO remove createOffer.amountPriceBox.title=Create your offer createOffer.amountPriceBox.amountDescription=Amount of bitcoin to {0} createOffer.amountPriceBox.priceDescriptionFiat=Fixed price per {0} createOffer.amountPriceBox.buy.volumeDescription=Amount in {0} to spend createOffer.amountPriceBox.sell.volumeDescription=Amount in {0} to receive createOffer.amountPriceBox.minAmountDescription=Minimum amount of BTC -# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. -# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. +# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. +# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. # TODO remove createOffer.amountPriceBox.next=Next step # TODO remove createOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. # TODO remove createOffer.amountPriceBox.warning.invalidFiatDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted. # TODO remove createOffer.amountPriceBox.warning.adjustedVolume=The total volume you have entered leads to invalid fractional bitcoin amounts. The amount has been adjusted and a new total volume be calculated from it. -createOffer.amountPriceBox.error.message=An error occurred when placing the offerPayload:\n\n{0} +createOffer.amountPriceBox.error.message=An error occurred when placing the offer:\n\n{0} # TODO remove createOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount. # TODO remove createOffer.validation.minAmountLargerThanAmount=Minimum amount cannot be larger than amount. -createOffer.fundsBox.title=Fund your offerPayload +createOffer.fundsBox.title=Fund your offer createOffer.fundsBox.totalsNeeded=Funds needed: createOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above createOffer.fundsBox.address=Trade wallet address: createOffer.fundsBox.balance=Trade wallet balance: -# TODO remove createOffer.fundsBox.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offerPayload gets executed. If you cancel your offerPayload you can withdraw your funds from that trading wallet. The only payment made when placing an offerPayload is the offerPayload fee payment. https://bisq.io/faq/#6 +# TODO remove createOffer.fundsBox.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offer gets executed. If you cancel your offer you can withdraw your funds from that trading wallet. The only payment made when placing an offer is the offer fee payment. https://bisq.io/faq/#6 createOffer.fundsBox.tradeAmount=Trade amount: createOffer.fundsBox.securityDeposit=Security deposit: -createOffer.fundsBox.offerFee=Create offerPayload fee: +createOffer.fundsBox.offerFee=Create offer fee: createOffer.fundsBox.networkFee=Mining fee: createOffer.fundsBox.total=Total: # TODO remove createOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove createOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove createOffer.fundsBox.placeOffer=Place offerPayload +# TODO remove createOffer.fundsBox.placeOffer=Place offer createOffer.fundsBox.placeOfferSpinnerInfo=Offer publishing is in progress ... createOffer.fundsBox.paymentLabel=bisq trade with ID {0} @@ -139,20 +139,20 @@ createOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove createOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove createOffer.advancedBox.county=Payments account country: -# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offerPayload restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). +# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offer restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). -createOffer.success.headline=Your offerPayload has been published +createOffer.success.headline=Your offer has been published createOffer.success.info=You can manage your open offers in the \"Portfolio\" screen under \"My open offers\". -# TODO remove createOffer.error.message=An error occurred when placing the offerPayload.\n\n{0} +# TODO remove createOffer.error.message=An error occurred when placing the offer.\n\n{0} -# Take offerPayload +# Take offer takeOffer.amount.prompt=Enter amount in BTC # TODO remove takeOffer.price.prompt=Enter price # TODO remove takeOffer.volume.prompt=Enter amount in {0} # TODO remove takeOffer.minAmount.prompt=Enter min. amount -# TODO remove takeOffer.amountPriceBox.title=Take offerPayload +# TODO remove takeOffer.amountPriceBox.title=Take offer # TODO remove takeOffer.amountPriceBox.subTitle=Buy bitcoin takeOffer.amountPriceBox.buy.amountDescription=Amount of bitcoin to sell takeOffer.amountPriceBox.sell.amountDescription=Amount of bitcoin to buy @@ -164,30 +164,30 @@ takeOffer.amountPriceBox.amountRangeDescription=Possible amount range # TODO remove takeOffer.amountPriceBox.sell.info=Enter the amount of bitcoin you want to buy. You can choose an amount between the minimum amount and the amount. # TODO remove takeOffer.amountPriceBox.next=Next step takeOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. -takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offerPayload. -takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offerPayload. +takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offer. +takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offer. takeOffer.validation.amountLargerThanOfferAmountMinusFee=That input amount would create dust change for the BTC seller. takeOffer.fundsBox.title=Fund your trade -takeOffer.fundsBox.isOfferAvailable=Check if offerPayload is available ... +takeOffer.fundsBox.isOfferAvailable=Check if offer is available ... takeOffer.fundsBox.totalsNeeded=Funds needed: # TODO remove takeOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above takeOffer.fundsBox.address=Trade wallet address: takeOffer.fundsBox.balance=Trade wallet balance: -# TODO remove takeOffer.fundsBox.buy.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.buy.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid in to a locked deposit address. At the end of a successful trade you will get back your security deposit and the bitcoin amount you sold will be transferred \ to the BTC buyer. -# TODO remove takeOffer.fundsBox.sell.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.sell.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid into a locked deposit address. At the end of a successful trade you will get back your security deposit. takeOffer.fundsBox.tradeAmount=Amount to sell: takeOffer.fundsBox.securityDeposit=Security deposit: -takeOffer.fundsBox.offerFee=Take offerPayload fee: +takeOffer.fundsBox.offerFee=Take offer fee: takeOffer.fundsBox.networkFee=Mining fee: takeOffer.fundsBox.total=Total: # TODO remove takeOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove takeOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove takeOffer.fundsBox.takeOffer=Take offerPayload -takeOffer.fundsBox.takeOfferSpinnerInfo=Take offerPayload in progress ... +# TODO remove takeOffer.fundsBox.takeOffer=Take offer +takeOffer.fundsBox.takeOfferSpinnerInfo=Take offer in progress ... takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.title=Advanced settings @@ -197,12 +197,12 @@ takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove takeOffer.advancedBox.county=Payments account country: -# TODO remove takeOffer.advancedBox.info=These are the offerPayload restrictions your trading partner has defined in his offerPayload. \ +# TODO remove takeOffer.advancedBox.info=These are the offer restrictions your trading partner has defined in his offer. \ Your settings match those constraints and you are able to trade with him. -takeOffer.success.headline=You have successfully taken an offerPayload. +takeOffer.success.headline=You have successfully taken an offer. takeOffer.success.info=You can see the status of your trade at the \"Portfolio\" screen under \"Open trades\". -takeOffer.error.message=An error occurred when taking the offerPayload.\n\n{0} +takeOffer.error.message=An error occurred when taking the offer.\n\n{0} # Payment methods # remove N/A=Not available diff --git a/common/src/main/resources/i18n/in_dev/displayStrings_kz.properties b/common/src/main/resources/i18n/in_dev/displayStrings_kz.properties index c4517feead..8aa09d32b6 100644 --- a/common/src/main/resources/i18n/in_dev/displayStrings_kz.properties +++ b/common/src/main/resources/i18n/in_dev/displayStrings_kz.properties @@ -93,42 +93,42 @@ validation.bankIdNumber={0} must consist of {1} numbers. validation.accountNr=Account number must consist of {0} numbers. validation.accountNrChars=Account number must consist of {0} characters. -# Create offerPayload +# Create offer createOffer.amount.prompt=Enter amount in BTC createOffer.price.prompt=Enter price createOffer.volume.prompt=Enter amount in {0} # TODO remove createOffer.minAmount.prompt=Enter min. amount -# TODO remove createOffer.amountPriceBox.title=Create your offerPayload +# TODO remove createOffer.amountPriceBox.title=Create your offer createOffer.amountPriceBox.amountDescription=Amount of bitcoin to {0} createOffer.amountPriceBox.priceDescriptionFiat=Fixed price per {0} createOffer.amountPriceBox.buy.volumeDescription=Amount in {0} to spend createOffer.amountPriceBox.sell.volumeDescription=Amount in {0} to receive createOffer.amountPriceBox.minAmountDescription=Minimum amount of BTC -# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. -# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. +# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. +# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. # TODO remove createOffer.amountPriceBox.next=Next step # TODO remove createOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. # TODO remove createOffer.amountPriceBox.warning.invalidFiatDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted. # TODO remove createOffer.amountPriceBox.warning.adjustedVolume=The total volume you have entered leads to invalid fractional bitcoin amounts. The amount has been adjusted and a new total volume be calculated from it. -createOffer.amountPriceBox.error.message=An error occurred when placing the offerPayload:\n\n{0} +createOffer.amountPriceBox.error.message=An error occurred when placing the offer:\n\n{0} # TODO remove createOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount. # TODO remove createOffer.validation.minAmountLargerThanAmount=Minimum amount cannot be larger than amount. -createOffer.fundsBox.title=Fund your offerPayload +createOffer.fundsBox.title=Fund your offer createOffer.fundsBox.totalsNeeded=Funds needed: createOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above createOffer.fundsBox.address=Trade wallet address: createOffer.fundsBox.balance=Trade wallet balance: -# TODO remove createOffer.fundsBox.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offerPayload gets executed. If you cancel your offerPayload you can withdraw your funds from that trading wallet. The only payment made when placing an offerPayload is the offerPayload fee payment. https://bisq.io/faq/#6 +# TODO remove createOffer.fundsBox.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offer gets executed. If you cancel your offer you can withdraw your funds from that trading wallet. The only payment made when placing an offer is the offer fee payment. https://bisq.io/faq/#6 createOffer.fundsBox.tradeAmount=Trade amount: createOffer.fundsBox.securityDeposit=Security deposit: -createOffer.fundsBox.offerFee=Create offerPayload fee: +createOffer.fundsBox.offerFee=Create offer fee: createOffer.fundsBox.networkFee=Mining fee: createOffer.fundsBox.total=Total: # TODO remove createOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove createOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove createOffer.fundsBox.placeOffer=Place offerPayload +# TODO remove createOffer.fundsBox.placeOffer=Place offer createOffer.fundsBox.placeOfferSpinnerInfo=Offer publishing is in progress ... createOffer.fundsBox.paymentLabel=bisq trade with ID {0} @@ -139,20 +139,20 @@ createOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove createOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove createOffer.advancedBox.county=Payments account country: -# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offerPayload restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). +# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offer restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). -createOffer.success.headline=Your offerPayload has been published +createOffer.success.headline=Your offer has been published createOffer.success.info=You can manage your open offers in the \"Portfolio\" screen under \"My open offers\". -# TODO remove createOffer.error.message=An error occurred when placing the offerPayload.\n\n{0} +# TODO remove createOffer.error.message=An error occurred when placing the offer.\n\n{0} -# Take offerPayload +# Take offer takeOffer.amount.prompt=Enter amount in BTC # TODO remove takeOffer.price.prompt=Enter price # TODO remove takeOffer.volume.prompt=Enter amount in {0} # TODO remove takeOffer.minAmount.prompt=Enter min. amount -# TODO remove takeOffer.amountPriceBox.title=Take offerPayload +# TODO remove takeOffer.amountPriceBox.title=Take offer # TODO remove takeOffer.amountPriceBox.subTitle=Buy bitcoin takeOffer.amountPriceBox.buy.amountDescription=Amount of bitcoin to sell takeOffer.amountPriceBox.sell.amountDescription=Amount of bitcoin to buy @@ -164,30 +164,30 @@ takeOffer.amountPriceBox.amountRangeDescription=Possible amount range # TODO remove takeOffer.amountPriceBox.sell.info=Enter the amount of bitcoin you want to buy. You can choose an amount between the minimum amount and the amount. # TODO remove takeOffer.amountPriceBox.next=Next step takeOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. -takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offerPayload. -takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offerPayload. +takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offer. +takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offer. takeOffer.validation.amountLargerThanOfferAmountMinusFee=That input amount would create dust change for the BTC seller. takeOffer.fundsBox.title=Fund your trade -takeOffer.fundsBox.isOfferAvailable=Check if offerPayload is available ... +takeOffer.fundsBox.isOfferAvailable=Check if offer is available ... takeOffer.fundsBox.totalsNeeded=Funds needed: # TODO remove takeOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above takeOffer.fundsBox.address=Trade wallet address: takeOffer.fundsBox.balance=Trade wallet balance: -# TODO remove takeOffer.fundsBox.buy.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.buy.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid in to a locked deposit address. At the end of a successful trade you will get back your security deposit and the bitcoin amount you sold will be transferred \ to the BTC buyer. -# TODO remove takeOffer.fundsBox.sell.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.sell.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid into a locked deposit address. At the end of a successful trade you will get back your security deposit. takeOffer.fundsBox.tradeAmount=Amount to sell: takeOffer.fundsBox.securityDeposit=Security deposit: -takeOffer.fundsBox.offerFee=Take offerPayload fee: +takeOffer.fundsBox.offerFee=Take offer fee: takeOffer.fundsBox.networkFee=Mining fee: takeOffer.fundsBox.total=Total: # TODO remove takeOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove takeOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove takeOffer.fundsBox.takeOffer=Take offerPayload -takeOffer.fundsBox.takeOfferSpinnerInfo=Take offerPayload in progress ... +# TODO remove takeOffer.fundsBox.takeOffer=Take offer +takeOffer.fundsBox.takeOfferSpinnerInfo=Take offer in progress ... takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.title=Advanced settings @@ -197,12 +197,12 @@ takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove takeOffer.advancedBox.county=Payments account country: -# TODO remove takeOffer.advancedBox.info=These are the offerPayload restrictions your trading partner has defined in his offerPayload. \ +# TODO remove takeOffer.advancedBox.info=These are the offer restrictions your trading partner has defined in his offer. \ Your settings match those constraints and you are able to trade with him. -takeOffer.success.headline=You have successfully taken an offerPayload. +takeOffer.success.headline=You have successfully taken an offer. takeOffer.success.info=You can see the status of your trade at the \"Portfolio\" screen under \"Open trades\". -takeOffer.error.message=An error occurred when taking the offerPayload.\n\n{0} +takeOffer.error.message=An error occurred when taking the offer.\n\n{0} # Payment methods # remove N/A=Not available diff --git a/common/src/main/resources/i18n/in_dev/displayStrings_lt.properties b/common/src/main/resources/i18n/in_dev/displayStrings_lt.properties index 84c1b69bfa..821448b580 100644 --- a/common/src/main/resources/i18n/in_dev/displayStrings_lt.properties +++ b/common/src/main/resources/i18n/in_dev/displayStrings_lt.properties @@ -93,42 +93,42 @@ validation.bankIdNumber={0} must consist of {1} numbers. validation.accountNr=Account number must consist of {0} numbers. validation.accountNrChars=Account number must consist of {0} characters. -# Create offerPayload +# Create offer createOffer.amount.prompt=Enter amount in BTC createOffer.price.prompt=Enter price createOffer.volume.prompt=Enter amount in {0} # TODO remove createOffer.minAmount.prompt=Enter min. amount -# TODO remove createOffer.amountPriceBox.title=Create your offerPayload +# TODO remove createOffer.amountPriceBox.title=Create your offer createOffer.amountPriceBox.amountDescription=Amount of bitcoin to {0} createOffer.amountPriceBox.priceDescriptionFiat=Fixed price per {0} createOffer.amountPriceBox.buy.volumeDescription=Amount in {0} to spend createOffer.amountPriceBox.sell.volumeDescription=Amount in {0} to receive createOffer.amountPriceBox.minAmountDescription=Minimum amount of BTC -# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. -# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. +# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. +# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. # TODO remove createOffer.amountPriceBox.next=Next step # TODO remove createOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. # TODO remove createOffer.amountPriceBox.warning.invalidFiatDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted. # TODO remove createOffer.amountPriceBox.warning.adjustedVolume=The total volume you have entered leads to invalid fractional bitcoin amounts. The amount has been adjusted and a new total volume be calculated from it. -createOffer.amountPriceBox.error.message=An error occurred when placing the offerPayload:\n\n{0} +createOffer.amountPriceBox.error.message=An error occurred when placing the offer:\n\n{0} # TODO remove createOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount. # TODO remove createOffer.validation.minAmountLargerThanAmount=Minimum amount cannot be larger than amount. -createOffer.fundsBox.title=Fund your offerPayload +createOffer.fundsBox.title=Fund your offer createOffer.fundsBox.totalsNeeded=Funds needed: createOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above createOffer.fundsBox.address=Trade wallet address: createOffer.fundsBox.balance=Trade wallet balance: -# TODO remove createOffer.fundsBox.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offerPayload gets executed. If you cancel your offerPayload you can withdraw your funds from that trading wallet. The only payment made when placing an offerPayload is the offerPayload fee payment. https://bisq.io/faq/#6 +# TODO remove createOffer.fundsBox.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offer gets executed. If you cancel your offer you can withdraw your funds from that trading wallet. The only payment made when placing an offer is the offer fee payment. https://bisq.io/faq/#6 createOffer.fundsBox.tradeAmount=Trade amount: createOffer.fundsBox.securityDeposit=Security deposit: -createOffer.fundsBox.offerFee=Create offerPayload fee: +createOffer.fundsBox.offerFee=Create offer fee: createOffer.fundsBox.networkFee=Mining fee: createOffer.fundsBox.total=Total: # TODO remove createOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove createOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove createOffer.fundsBox.placeOffer=Place offerPayload +# TODO remove createOffer.fundsBox.placeOffer=Place offer createOffer.fundsBox.placeOfferSpinnerInfo=Offer publishing is in progress ... createOffer.fundsBox.paymentLabel=bisq trade with ID {0} @@ -139,20 +139,20 @@ createOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove createOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove createOffer.advancedBox.county=Payments account country: -# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offerPayload restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). +# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offer restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). -createOffer.success.headline=Your offerPayload has been published +createOffer.success.headline=Your offer has been published createOffer.success.info=You can manage your open offers in the \"Portfolio\" screen under \"My open offers\". -# TODO remove createOffer.error.message=An error occurred when placing the offerPayload.\n\n{0} +# TODO remove createOffer.error.message=An error occurred when placing the offer.\n\n{0} -# Take offerPayload +# Take offer takeOffer.amount.prompt=Enter amount in BTC # TODO remove takeOffer.price.prompt=Enter price # TODO remove takeOffer.volume.prompt=Enter amount in {0} # TODO remove takeOffer.minAmount.prompt=Enter min. amount -# TODO remove takeOffer.amountPriceBox.title=Take offerPayload +# TODO remove takeOffer.amountPriceBox.title=Take offer # TODO remove takeOffer.amountPriceBox.subTitle=Buy bitcoin takeOffer.amountPriceBox.buy.amountDescription=Amount of bitcoin to sell takeOffer.amountPriceBox.sell.amountDescription=Amount of bitcoin to buy @@ -164,30 +164,30 @@ takeOffer.amountPriceBox.amountRangeDescription=Possible amount range # TODO remove takeOffer.amountPriceBox.sell.info=Enter the amount of bitcoin you want to buy. You can choose an amount between the minimum amount and the amount. # TODO remove takeOffer.amountPriceBox.next=Next step takeOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. -takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offerPayload. -takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offerPayload. +takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offer. +takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offer. takeOffer.validation.amountLargerThanOfferAmountMinusFee=That input amount would create dust change for the BTC seller. takeOffer.fundsBox.title=Fund your trade -takeOffer.fundsBox.isOfferAvailable=Check if offerPayload is available ... +takeOffer.fundsBox.isOfferAvailable=Check if offer is available ... takeOffer.fundsBox.totalsNeeded=Funds needed: # TODO remove takeOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above takeOffer.fundsBox.address=Trade wallet address: takeOffer.fundsBox.balance=Trade wallet balance: -# TODO remove takeOffer.fundsBox.buy.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.buy.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid in to a locked deposit address. At the end of a successful trade you will get back your security deposit and the bitcoin amount you sold will be transferred \ to the BTC buyer. -# TODO remove takeOffer.fundsBox.sell.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.sell.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid into a locked deposit address. At the end of a successful trade you will get back your security deposit. takeOffer.fundsBox.tradeAmount=Amount to sell: takeOffer.fundsBox.securityDeposit=Security deposit: -takeOffer.fundsBox.offerFee=Take offerPayload fee: +takeOffer.fundsBox.offerFee=Take offer fee: takeOffer.fundsBox.networkFee=Mining fee: takeOffer.fundsBox.total=Total: # TODO remove takeOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove takeOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove takeOffer.fundsBox.takeOffer=Take offerPayload -takeOffer.fundsBox.takeOfferSpinnerInfo=Take offerPayload in progress ... +# TODO remove takeOffer.fundsBox.takeOffer=Take offer +takeOffer.fundsBox.takeOfferSpinnerInfo=Take offer in progress ... takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.title=Advanced settings @@ -197,12 +197,12 @@ takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove takeOffer.advancedBox.county=Payments account country: -# TODO remove takeOffer.advancedBox.info=These are the offerPayload restrictions your trading partner has defined in his offerPayload. \ +# TODO remove takeOffer.advancedBox.info=These are the offer restrictions your trading partner has defined in his offer. \ Your settings match those constraints and you are able to trade with him. -takeOffer.success.headline=You have successfully taken an offerPayload. +takeOffer.success.headline=You have successfully taken an offer. takeOffer.success.info=You can see the status of your trade at the \"Portfolio\" screen under \"Open trades\". -takeOffer.error.message=An error occurred when taking the offerPayload.\n\n{0} +takeOffer.error.message=An error occurred when taking the offer.\n\n{0} # Payment methods # remove N/A=Not available diff --git a/common/src/main/resources/i18n/in_dev/displayStrings_my.properties b/common/src/main/resources/i18n/in_dev/displayStrings_my.properties index 2010453865..53d53b57eb 100644 --- a/common/src/main/resources/i18n/in_dev/displayStrings_my.properties +++ b/common/src/main/resources/i18n/in_dev/displayStrings_my.properties @@ -93,42 +93,42 @@ validation.bankIdNumber={0} must consist of {1} numbers. validation.accountNr=Account number must consist of {0} numbers. validation.accountNrChars=Account number must consist of {0} characters. -# Create offerPayload +# Create offer createOffer.amount.prompt=Enter amount in BTC createOffer.price.prompt=Enter price createOffer.volume.prompt=Enter amount in {0} # TODO remove createOffer.minAmount.prompt=Enter min. amount -# TODO remove createOffer.amountPriceBox.title=Create your offerPayload +# TODO remove createOffer.amountPriceBox.title=Create your offer createOffer.amountPriceBox.amountDescription=Amount of bitcoin to {0} createOffer.amountPriceBox.priceDescriptionFiat=Fixed price per {0} createOffer.amountPriceBox.buy.volumeDescription=Amount in {0} to spend createOffer.amountPriceBox.sell.volumeDescription=Amount in {0} to receive createOffer.amountPriceBox.minAmountDescription=Minimum amount of BTC -# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. -# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. +# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. +# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. # TODO remove createOffer.amountPriceBox.next=Next step # TODO remove createOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. # TODO remove createOffer.amountPriceBox.warning.invalidFiatDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted. # TODO remove createOffer.amountPriceBox.warning.adjustedVolume=The total volume you have entered leads to invalid fractional bitcoin amounts. The amount has been adjusted and a new total volume be calculated from it. -createOffer.amountPriceBox.error.message=An error occurred when placing the offerPayload:\n\n{0} +createOffer.amountPriceBox.error.message=An error occurred when placing the offer:\n\n{0} # TODO remove createOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount. # TODO remove createOffer.validation.minAmountLargerThanAmount=Minimum amount cannot be larger than amount. -createOffer.fundsBox.title=Fund your offerPayload +createOffer.fundsBox.title=Fund your offer createOffer.fundsBox.totalsNeeded=Funds needed: createOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above createOffer.fundsBox.address=Trade wallet address: createOffer.fundsBox.balance=Trade wallet balance: -# TODO remove createOffer.fundsBox.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offerPayload gets executed. If you cancel your offerPayload you can withdraw your funds from that trading wallet. The only payment made when placing an offerPayload is the offerPayload fee payment. https://bisq.io/faq/#6 +# TODO remove createOffer.fundsBox.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offer gets executed. If you cancel your offer you can withdraw your funds from that trading wallet. The only payment made when placing an offer is the offer fee payment. https://bisq.io/faq/#6 createOffer.fundsBox.tradeAmount=Trade amount: createOffer.fundsBox.securityDeposit=Security deposit: -createOffer.fundsBox.offerFee=Create offerPayload fee: +createOffer.fundsBox.offerFee=Create offer fee: createOffer.fundsBox.networkFee=Mining fee: createOffer.fundsBox.total=Total: # TODO remove createOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove createOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove createOffer.fundsBox.placeOffer=Place offerPayload +# TODO remove createOffer.fundsBox.placeOffer=Place offer createOffer.fundsBox.placeOfferSpinnerInfo=Offer publishing is in progress ... createOffer.fundsBox.paymentLabel=bisq trade with ID {0} @@ -139,20 +139,20 @@ createOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove createOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove createOffer.advancedBox.county=Payments account country: -# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offerPayload restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). +# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offer restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). -createOffer.success.headline=Your offerPayload has been published +createOffer.success.headline=Your offer has been published createOffer.success.info=You can manage your open offers in the \"Portfolio\" screen under \"My open offers\". -# TODO remove createOffer.error.message=An error occurred when placing the offerPayload.\n\n{0} +# TODO remove createOffer.error.message=An error occurred when placing the offer.\n\n{0} -# Take offerPayload +# Take offer takeOffer.amount.prompt=Enter amount in BTC # TODO remove takeOffer.price.prompt=Enter price # TODO remove takeOffer.volume.prompt=Enter amount in {0} # TODO remove takeOffer.minAmount.prompt=Enter min. amount -# TODO remove takeOffer.amountPriceBox.title=Take offerPayload +# TODO remove takeOffer.amountPriceBox.title=Take offer # TODO remove takeOffer.amountPriceBox.subTitle=Buy bitcoin takeOffer.amountPriceBox.buy.amountDescription=Amount of bitcoin to sell takeOffer.amountPriceBox.sell.amountDescription=Amount of bitcoin to buy @@ -164,30 +164,30 @@ takeOffer.amountPriceBox.amountRangeDescription=Possible amount range # TODO remove takeOffer.amountPriceBox.sell.info=Enter the amount of bitcoin you want to buy. You can choose an amount between the minimum amount and the amount. # TODO remove takeOffer.amountPriceBox.next=Next step takeOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. -takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offerPayload. -takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offerPayload. +takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offer. +takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offer. takeOffer.validation.amountLargerThanOfferAmountMinusFee=That input amount would create dust change for the BTC seller. takeOffer.fundsBox.title=Fund your trade -takeOffer.fundsBox.isOfferAvailable=Check if offerPayload is available ... +takeOffer.fundsBox.isOfferAvailable=Check if offer is available ... takeOffer.fundsBox.totalsNeeded=Funds needed: # TODO remove takeOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above takeOffer.fundsBox.address=Trade wallet address: takeOffer.fundsBox.balance=Trade wallet balance: -# TODO remove takeOffer.fundsBox.buy.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.buy.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid in to a locked deposit address. At the end of a successful trade you will get back your security deposit and the bitcoin amount you sold will be transferred \ to the BTC buyer. -# TODO remove takeOffer.fundsBox.sell.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.sell.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid into a locked deposit address. At the end of a successful trade you will get back your security deposit. takeOffer.fundsBox.tradeAmount=Amount to sell: takeOffer.fundsBox.securityDeposit=Security deposit: -takeOffer.fundsBox.offerFee=Take offerPayload fee: +takeOffer.fundsBox.offerFee=Take offer fee: takeOffer.fundsBox.networkFee=Mining fee: takeOffer.fundsBox.total=Total: # TODO remove takeOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove takeOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove takeOffer.fundsBox.takeOffer=Take offerPayload -takeOffer.fundsBox.takeOfferSpinnerInfo=Take offerPayload in progress ... +# TODO remove takeOffer.fundsBox.takeOffer=Take offer +takeOffer.fundsBox.takeOfferSpinnerInfo=Take offer in progress ... takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.title=Advanced settings @@ -197,12 +197,12 @@ takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove takeOffer.advancedBox.county=Payments account country: -# TODO remove takeOffer.advancedBox.info=These are the offerPayload restrictions your trading partner has defined in his offerPayload. \ +# TODO remove takeOffer.advancedBox.info=These are the offer restrictions your trading partner has defined in his offer. \ Your settings match those constraints and you are able to trade with him. -takeOffer.success.headline=You have successfully taken an offerPayload. +takeOffer.success.headline=You have successfully taken an offer. takeOffer.success.info=You can see the status of your trade at the \"Portfolio\" screen under \"Open trades\". -takeOffer.error.message=An error occurred when taking the offerPayload.\n\n{0} +takeOffer.error.message=An error occurred when taking the offer.\n\n{0} # Payment methods # remove N/A=Not available diff --git a/common/src/main/resources/i18n/in_dev/displayStrings_nl.properties b/common/src/main/resources/i18n/in_dev/displayStrings_nl.properties index 4e9128bbfa..0fa004e4bb 100644 --- a/common/src/main/resources/i18n/in_dev/displayStrings_nl.properties +++ b/common/src/main/resources/i18n/in_dev/displayStrings_nl.properties @@ -93,42 +93,42 @@ validation.bankIdNumber={0} must consist of {1} numbers. validation.accountNr=Account number must consist of {0} numbers. validation.accountNrChars=Account number must consist of {0} characters. -# Create offerPayload +# Create offer createOffer.amount.prompt=Enter amount in BTC createOffer.price.prompt=Enter price createOffer.volume.prompt=Enter amount in {0} # TODO remove createOffer.minAmount.prompt=Enter min. amount -# TODO remove createOffer.amountPriceBox.title=Create your offerPayload +# TODO remove createOffer.amountPriceBox.title=Create your offer createOffer.amountPriceBox.amountDescription=Amount of bitcoin to {0} createOffer.amountPriceBox.priceDescriptionFiat=Fixed price per {0} createOffer.amountPriceBox.buy.volumeDescription=Amount in {0} to spend createOffer.amountPriceBox.sell.volumeDescription=Amount in {0} to receive createOffer.amountPriceBox.minAmountDescription=Minimum amount of BTC -# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. -# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. +# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. +# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. # TODO remove createOffer.amountPriceBox.next=Next step # TODO remove createOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. # TODO remove createOffer.amountPriceBox.warning.invalidFiatDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted. # TODO remove createOffer.amountPriceBox.warning.adjustedVolume=The total volume you have entered leads to invalid fractional bitcoin amounts. The amount has been adjusted and a new total volume be calculated from it. -createOffer.amountPriceBox.error.message=An error occurred when placing the offerPayload:\n\n{0} +createOffer.amountPriceBox.error.message=An error occurred when placing the offer:\n\n{0} # TODO remove createOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount. # TODO remove createOffer.validation.minAmountLargerThanAmount=Minimum amount cannot be larger than amount. -createOffer.fundsBox.title=Fund your offerPayload +createOffer.fundsBox.title=Fund your offer createOffer.fundsBox.totalsNeeded=Funds needed: createOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above createOffer.fundsBox.address=Trade wallet address: createOffer.fundsBox.balance=Trade wallet balance: -# TODO remove createOffer.fundsBox.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offerPayload gets executed. If you cancel your offerPayload you can withdraw your funds from that trading wallet. The only payment made when placing an offerPayload is the offerPayload fee payment. https://bisq.io/faq/#6 +# TODO remove createOffer.fundsBox.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offer gets executed. If you cancel your offer you can withdraw your funds from that trading wallet. The only payment made when placing an offer is the offer fee payment. https://bisq.io/faq/#6 createOffer.fundsBox.tradeAmount=Trade amount: createOffer.fundsBox.securityDeposit=Security deposit: -createOffer.fundsBox.offerFee=Create offerPayload fee: +createOffer.fundsBox.offerFee=Create offer fee: createOffer.fundsBox.networkFee=Mining fee: createOffer.fundsBox.total=Total: # TODO remove createOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove createOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove createOffer.fundsBox.placeOffer=Place offerPayload +# TODO remove createOffer.fundsBox.placeOffer=Place offer createOffer.fundsBox.placeOfferSpinnerInfo=Offer publishing is in progress ... createOffer.fundsBox.paymentLabel=bisq trade with ID {0} @@ -139,20 +139,20 @@ createOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove createOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove createOffer.advancedBox.county=Payments account country: -# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offerPayload restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). +# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offer restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). -createOffer.success.headline=Your offerPayload has been published +createOffer.success.headline=Your offer has been published createOffer.success.info=You can manage your open offers in the \"Portfolio\" screen under \"My open offers\". -# TODO remove createOffer.error.message=An error occurred when placing the offerPayload.\n\n{0} +# TODO remove createOffer.error.message=An error occurred when placing the offer.\n\n{0} -# Take offerPayload +# Take offer takeOffer.amount.prompt=Enter amount in BTC # TODO remove takeOffer.price.prompt=Enter price # TODO remove takeOffer.volume.prompt=Enter amount in {0} # TODO remove takeOffer.minAmount.prompt=Enter min. amount -# TODO remove takeOffer.amountPriceBox.title=Take offerPayload +# TODO remove takeOffer.amountPriceBox.title=Take offer # TODO remove takeOffer.amountPriceBox.subTitle=Buy bitcoin takeOffer.amountPriceBox.buy.amountDescription=Amount of bitcoin to sell takeOffer.amountPriceBox.sell.amountDescription=Amount of bitcoin to buy @@ -164,30 +164,30 @@ takeOffer.amountPriceBox.amountRangeDescription=Possible amount range # TODO remove takeOffer.amountPriceBox.sell.info=Enter the amount of bitcoin you want to buy. You can choose an amount between the minimum amount and the amount. # TODO remove takeOffer.amountPriceBox.next=Next step takeOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. -takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offerPayload. -takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offerPayload. +takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offer. +takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offer. takeOffer.validation.amountLargerThanOfferAmountMinusFee=That input amount would create dust change for the BTC seller. takeOffer.fundsBox.title=Fund your trade -takeOffer.fundsBox.isOfferAvailable=Check if offerPayload is available ... +takeOffer.fundsBox.isOfferAvailable=Check if offer is available ... takeOffer.fundsBox.totalsNeeded=Funds needed: # TODO remove takeOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above takeOffer.fundsBox.address=Trade wallet address: takeOffer.fundsBox.balance=Trade wallet balance: -# TODO remove takeOffer.fundsBox.buy.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.buy.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid in to a locked deposit address. At the end of a successful trade you will get back your security deposit and the bitcoin amount you sold will be transferred \ to the BTC buyer. -# TODO remove takeOffer.fundsBox.sell.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.sell.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid into a locked deposit address. At the end of a successful trade you will get back your security deposit. takeOffer.fundsBox.tradeAmount=Amount to sell: takeOffer.fundsBox.securityDeposit=Security deposit: -takeOffer.fundsBox.offerFee=Take offerPayload fee: +takeOffer.fundsBox.offerFee=Take offer fee: takeOffer.fundsBox.networkFee=Mining fee: takeOffer.fundsBox.total=Total: # TODO remove takeOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove takeOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove takeOffer.fundsBox.takeOffer=Take offerPayload -takeOffer.fundsBox.takeOfferSpinnerInfo=Take offerPayload in progress ... +# TODO remove takeOffer.fundsBox.takeOffer=Take offer +takeOffer.fundsBox.takeOfferSpinnerInfo=Take offer in progress ... takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.title=Advanced settings @@ -197,12 +197,12 @@ takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove takeOffer.advancedBox.county=Payments account country: -# TODO remove takeOffer.advancedBox.info=These are the offerPayload restrictions your trading partner has defined in his offerPayload. \ +# TODO remove takeOffer.advancedBox.info=These are the offer restrictions your trading partner has defined in his offer. \ Your settings match those constraints and you are able to trade with him. -takeOffer.success.headline=You have successfully taken an offerPayload. +takeOffer.success.headline=You have successfully taken an offer. takeOffer.success.info=You can see the status of your trade at the \"Portfolio\" screen under \"Open trades\". -takeOffer.error.message=An error occurred when taking the offerPayload.\n\n{0} +takeOffer.error.message=An error occurred when taking the offer.\n\n{0} # Payment methods # remove N/A=Not available diff --git a/common/src/main/resources/i18n/in_dev/displayStrings_no.properties b/common/src/main/resources/i18n/in_dev/displayStrings_no.properties index 6110293af5..1f53facc13 100644 --- a/common/src/main/resources/i18n/in_dev/displayStrings_no.properties +++ b/common/src/main/resources/i18n/in_dev/displayStrings_no.properties @@ -93,42 +93,42 @@ validation.bankIdNumber={0} must consist of {1} numbers. validation.accountNr=Account number must consist of {0} numbers. validation.accountNrChars=Account number must consist of {0} characters. -# Create offerPayload +# Create offer createOffer.amount.prompt=Enter amount in BTC createOffer.price.prompt=Enter price createOffer.volume.prompt=Enter amount in {0} # TODO remove createOffer.minAmount.prompt=Enter min. amount -# TODO remove createOffer.amountPriceBox.title=Create your offerPayload +# TODO remove createOffer.amountPriceBox.title=Create your offer createOffer.amountPriceBox.amountDescription=Amount of bitcoin to {0} createOffer.amountPriceBox.priceDescriptionFiat=Fixed price per {0} createOffer.amountPriceBox.buy.volumeDescription=Amount in {0} to spend createOffer.amountPriceBox.sell.volumeDescription=Amount in {0} to receive createOffer.amountPriceBox.minAmountDescription=Minimum amount of BTC -# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. -# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. +# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. +# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. # TODO remove createOffer.amountPriceBox.next=Next step # TODO remove createOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. # TODO remove createOffer.amountPriceBox.warning.invalidFiatDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted. # TODO remove createOffer.amountPriceBox.warning.adjustedVolume=The total volume you have entered leads to invalid fractional bitcoin amounts. The amount has been adjusted and a new total volume be calculated from it. -createOffer.amountPriceBox.error.message=An error occurred when placing the offerPayload:\n\n{0} +createOffer.amountPriceBox.error.message=An error occurred when placing the offer:\n\n{0} # TODO remove createOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount. # TODO remove createOffer.validation.minAmountLargerThanAmount=Minimum amount cannot be larger than amount. -createOffer.fundsBox.title=Fund your offerPayload +createOffer.fundsBox.title=Fund your offer createOffer.fundsBox.totalsNeeded=Funds needed: createOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above createOffer.fundsBox.address=Trade wallet address: createOffer.fundsBox.balance=Trade wallet balance: -# TODO remove createOffer.fundsBox.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offerPayload gets executed. If you cancel your offerPayload you can withdraw your funds from that trading wallet. The only payment made when placing an offerPayload is the offerPayload fee payment. https://bisq.io/faq/#6 +# TODO remove createOffer.fundsBox.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offer gets executed. If you cancel your offer you can withdraw your funds from that trading wallet. The only payment made when placing an offer is the offer fee payment. https://bisq.io/faq/#6 createOffer.fundsBox.tradeAmount=Trade amount: createOffer.fundsBox.securityDeposit=Security deposit: -createOffer.fundsBox.offerFee=Create offerPayload fee: +createOffer.fundsBox.offerFee=Create offer fee: createOffer.fundsBox.networkFee=Mining fee: createOffer.fundsBox.total=Total: # TODO remove createOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove createOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove createOffer.fundsBox.placeOffer=Place offerPayload +# TODO remove createOffer.fundsBox.placeOffer=Place offer createOffer.fundsBox.placeOfferSpinnerInfo=Offer publishing is in progress ... createOffer.fundsBox.paymentLabel=bisq trade with ID {0} @@ -139,20 +139,20 @@ createOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove createOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove createOffer.advancedBox.county=Payments account country: -# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offerPayload restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). +# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offer restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). -createOffer.success.headline=Your offerPayload has been published +createOffer.success.headline=Your offer has been published createOffer.success.info=You can manage your open offers in the \"Portfolio\" screen under \"My open offers\". -# TODO remove createOffer.error.message=An error occurred when placing the offerPayload.\n\n{0} +# TODO remove createOffer.error.message=An error occurred when placing the offer.\n\n{0} -# Take offerPayload +# Take offer takeOffer.amount.prompt=Enter amount in BTC # TODO remove takeOffer.price.prompt=Enter price # TODO remove takeOffer.volume.prompt=Enter amount in {0} # TODO remove takeOffer.minAmount.prompt=Enter min. amount -# TODO remove takeOffer.amountPriceBox.title=Take offerPayload +# TODO remove takeOffer.amountPriceBox.title=Take offer # TODO remove takeOffer.amountPriceBox.subTitle=Buy bitcoin takeOffer.amountPriceBox.buy.amountDescription=Amount of bitcoin to sell takeOffer.amountPriceBox.sell.amountDescription=Amount of bitcoin to buy @@ -164,30 +164,30 @@ takeOffer.amountPriceBox.amountRangeDescription=Possible amount range # TODO remove takeOffer.amountPriceBox.sell.info=Enter the amount of bitcoin you want to buy. You can choose an amount between the minimum amount and the amount. # TODO remove takeOffer.amountPriceBox.next=Next step takeOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. -takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offerPayload. -takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offerPayload. +takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offer. +takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offer. takeOffer.validation.amountLargerThanOfferAmountMinusFee=That input amount would create dust change for the BTC seller. takeOffer.fundsBox.title=Fund your trade -takeOffer.fundsBox.isOfferAvailable=Check if offerPayload is available ... +takeOffer.fundsBox.isOfferAvailable=Check if offer is available ... takeOffer.fundsBox.totalsNeeded=Funds needed: # TODO remove takeOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above takeOffer.fundsBox.address=Trade wallet address: takeOffer.fundsBox.balance=Trade wallet balance: -# TODO remove takeOffer.fundsBox.buy.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.buy.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid in to a locked deposit address. At the end of a successful trade you will get back your security deposit and the bitcoin amount you sold will be transferred \ to the BTC buyer. -# TODO remove takeOffer.fundsBox.sell.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.sell.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid into a locked deposit address. At the end of a successful trade you will get back your security deposit. takeOffer.fundsBox.tradeAmount=Amount to sell: takeOffer.fundsBox.securityDeposit=Security deposit: -takeOffer.fundsBox.offerFee=Take offerPayload fee: +takeOffer.fundsBox.offerFee=Take offer fee: takeOffer.fundsBox.networkFee=Mining fee: takeOffer.fundsBox.total=Total: # TODO remove takeOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove takeOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove takeOffer.fundsBox.takeOffer=Take offerPayload -takeOffer.fundsBox.takeOfferSpinnerInfo=Take offerPayload in progress ... +# TODO remove takeOffer.fundsBox.takeOffer=Take offer +takeOffer.fundsBox.takeOfferSpinnerInfo=Take offer in progress ... takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.title=Advanced settings @@ -197,12 +197,12 @@ takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove takeOffer.advancedBox.county=Payments account country: -# TODO remove takeOffer.advancedBox.info=These are the offerPayload restrictions your trading partner has defined in his offerPayload. \ +# TODO remove takeOffer.advancedBox.info=These are the offer restrictions your trading partner has defined in his offer. \ Your settings match those constraints and you are able to trade with him. -takeOffer.success.headline=You have successfully taken an offerPayload. +takeOffer.success.headline=You have successfully taken an offer. takeOffer.success.info=You can see the status of your trade at the \"Portfolio\" screen under \"Open trades\". -takeOffer.error.message=An error occurred when taking the offerPayload.\n\n{0} +takeOffer.error.message=An error occurred when taking the offer.\n\n{0} # Payment methods # remove N/A=Not available diff --git a/common/src/main/resources/i18n/in_dev/displayStrings_nz.properties b/common/src/main/resources/i18n/in_dev/displayStrings_nz.properties index 8da7c919ed..fa5a3b8272 100644 --- a/common/src/main/resources/i18n/in_dev/displayStrings_nz.properties +++ b/common/src/main/resources/i18n/in_dev/displayStrings_nz.properties @@ -93,42 +93,42 @@ validation.bankIdNumber={0} must consist of {1} numbers. validation.accountNr=Account number must consist of {0} numbers. validation.accountNrChars=Account number must consist of {0} characters. -# Create offerPayload +# Create offer createOffer.amount.prompt=Enter amount in BTC createOffer.price.prompt=Enter price createOffer.volume.prompt=Enter amount in {0} # TODO remove createOffer.minAmount.prompt=Enter min. amount -# TODO remove createOffer.amountPriceBox.title=Create your offerPayload +# TODO remove createOffer.amountPriceBox.title=Create your offer createOffer.amountPriceBox.amountDescription=Amount of bitcoin to {0} createOffer.amountPriceBox.priceDescriptionFiat=Fixed price per {0} createOffer.amountPriceBox.buy.volumeDescription=Amount in {0} to spend createOffer.amountPriceBox.sell.volumeDescription=Amount in {0} to receive createOffer.amountPriceBox.minAmountDescription=Minimum amount of BTC -# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. -# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. +# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. +# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. # TODO remove createOffer.amountPriceBox.next=Next step # TODO remove createOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. # TODO remove createOffer.amountPriceBox.warning.invalidFiatDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted. # TODO remove createOffer.amountPriceBox.warning.adjustedVolume=The total volume you have entered leads to invalid fractional bitcoin amounts. The amount has been adjusted and a new total volume be calculated from it. -createOffer.amountPriceBox.error.message=An error occurred when placing the offerPayload:\n\n{0} +createOffer.amountPriceBox.error.message=An error occurred when placing the offer:\n\n{0} # TODO remove createOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount. # TODO remove createOffer.validation.minAmountLargerThanAmount=Minimum amount cannot be larger than amount. -createOffer.fundsBox.title=Fund your offerPayload +createOffer.fundsBox.title=Fund your offer createOffer.fundsBox.totalsNeeded=Funds needed: createOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above createOffer.fundsBox.address=Trade wallet address: createOffer.fundsBox.balance=Trade wallet balance: -# TODO remove createOffer.fundsBox.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offerPayload gets executed. If you cancel your offerPayload you can withdraw your funds from that trading wallet. The only payment made when placing an offerPayload is the offerPayload fee payment. https://bisq.io/faq/#6 +# TODO remove createOffer.fundsBox.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offer gets executed. If you cancel your offer you can withdraw your funds from that trading wallet. The only payment made when placing an offer is the offer fee payment. https://bisq.io/faq/#6 createOffer.fundsBox.tradeAmount=Trade amount: createOffer.fundsBox.securityDeposit=Security deposit: -createOffer.fundsBox.offerFee=Create offerPayload fee: +createOffer.fundsBox.offerFee=Create offer fee: createOffer.fundsBox.networkFee=Mining fee: createOffer.fundsBox.total=Total: # TODO remove createOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove createOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove createOffer.fundsBox.placeOffer=Place offerPayload +# TODO remove createOffer.fundsBox.placeOffer=Place offer createOffer.fundsBox.placeOfferSpinnerInfo=Offer publishing is in progress ... createOffer.fundsBox.paymentLabel=bisq trade with ID {0} @@ -139,20 +139,20 @@ createOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove createOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove createOffer.advancedBox.county=Payments account country: -# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offerPayload restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). +# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offer restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). -createOffer.success.headline=Your offerPayload has been published +createOffer.success.headline=Your offer has been published createOffer.success.info=You can manage your open offers in the \"Portfolio\" screen under \"My open offers\". -# TODO remove createOffer.error.message=An error occurred when placing the offerPayload.\n\n{0} +# TODO remove createOffer.error.message=An error occurred when placing the offer.\n\n{0} -# Take offerPayload +# Take offer takeOffer.amount.prompt=Enter amount in BTC # TODO remove takeOffer.price.prompt=Enter price # TODO remove takeOffer.volume.prompt=Enter amount in {0} # TODO remove takeOffer.minAmount.prompt=Enter min. amount -# TODO remove takeOffer.amountPriceBox.title=Take offerPayload +# TODO remove takeOffer.amountPriceBox.title=Take offer # TODO remove takeOffer.amountPriceBox.subTitle=Buy bitcoin takeOffer.amountPriceBox.buy.amountDescription=Amount of bitcoin to sell takeOffer.amountPriceBox.sell.amountDescription=Amount of bitcoin to buy @@ -164,30 +164,30 @@ takeOffer.amountPriceBox.amountRangeDescription=Possible amount range # TODO remove takeOffer.amountPriceBox.sell.info=Enter the amount of bitcoin you want to buy. You can choose an amount between the minimum amount and the amount. # TODO remove takeOffer.amountPriceBox.next=Next step takeOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. -takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offerPayload. -takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offerPayload. +takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offer. +takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offer. takeOffer.validation.amountLargerThanOfferAmountMinusFee=That input amount would create dust change for the BTC seller. takeOffer.fundsBox.title=Fund your trade -takeOffer.fundsBox.isOfferAvailable=Check if offerPayload is available ... +takeOffer.fundsBox.isOfferAvailable=Check if offer is available ... takeOffer.fundsBox.totalsNeeded=Funds needed: # TODO remove takeOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above takeOffer.fundsBox.address=Trade wallet address: takeOffer.fundsBox.balance=Trade wallet balance: -# TODO remove takeOffer.fundsBox.buy.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.buy.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid in to a locked deposit address. At the end of a successful trade you will get back your security deposit and the bitcoin amount you sold will be transferred \ to the BTC buyer. -# TODO remove takeOffer.fundsBox.sell.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.sell.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid into a locked deposit address. At the end of a successful trade you will get back your security deposit. takeOffer.fundsBox.tradeAmount=Amount to sell: takeOffer.fundsBox.securityDeposit=Security deposit: -takeOffer.fundsBox.offerFee=Take offerPayload fee: +takeOffer.fundsBox.offerFee=Take offer fee: takeOffer.fundsBox.networkFee=Mining fee: takeOffer.fundsBox.total=Total: # TODO remove takeOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove takeOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove takeOffer.fundsBox.takeOffer=Take offerPayload -takeOffer.fundsBox.takeOfferSpinnerInfo=Take offerPayload in progress ... +# TODO remove takeOffer.fundsBox.takeOffer=Take offer +takeOffer.fundsBox.takeOfferSpinnerInfo=Take offer in progress ... takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.title=Advanced settings @@ -197,12 +197,12 @@ takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove takeOffer.advancedBox.county=Payments account country: -# TODO remove takeOffer.advancedBox.info=These are the offerPayload restrictions your trading partner has defined in his offerPayload. \ +# TODO remove takeOffer.advancedBox.info=These are the offer restrictions your trading partner has defined in his offer. \ Your settings match those constraints and you are able to trade with him. -takeOffer.success.headline=You have successfully taken an offerPayload. +takeOffer.success.headline=You have successfully taken an offer. takeOffer.success.info=You can see the status of your trade at the \"Portfolio\" screen under \"Open trades\". -takeOffer.error.message=An error occurred when taking the offerPayload.\n\n{0} +takeOffer.error.message=An error occurred when taking the offer.\n\n{0} # Payment methods # remove N/A=Not available diff --git a/common/src/main/resources/i18n/in_dev/displayStrings_ph.properties b/common/src/main/resources/i18n/in_dev/displayStrings_ph.properties index 9e44b29621..8eb5c1cee1 100644 --- a/common/src/main/resources/i18n/in_dev/displayStrings_ph.properties +++ b/common/src/main/resources/i18n/in_dev/displayStrings_ph.properties @@ -93,42 +93,42 @@ validation.bankIdNumber={0} must consist of {1} numbers. validation.accountNr=Account number must consist of {0} numbers. validation.accountNrChars=Account number must consist of {0} characters. -# Create offerPayload +# Create offer createOffer.amount.prompt=Enter amount in BTC createOffer.price.prompt=Enter price createOffer.volume.prompt=Enter amount in {0} # TODO remove createOffer.minAmount.prompt=Enter min. amount -# TODO remove createOffer.amountPriceBox.title=Create your offerPayload +# TODO remove createOffer.amountPriceBox.title=Create your offer createOffer.amountPriceBox.amountDescription=Amount of bitcoin to {0} createOffer.amountPriceBox.priceDescriptionFiat=Fixed price per {0} createOffer.amountPriceBox.buy.volumeDescription=Amount in {0} to spend createOffer.amountPriceBox.sell.volumeDescription=Amount in {0} to receive createOffer.amountPriceBox.minAmountDescription=Minimum amount of BTC -# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. -# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. +# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. +# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. # TODO remove createOffer.amountPriceBox.next=Next step # TODO remove createOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. # TODO remove createOffer.amountPriceBox.warning.invalidFiatDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted. # TODO remove createOffer.amountPriceBox.warning.adjustedVolume=The total volume you have entered leads to invalid fractional bitcoin amounts. The amount has been adjusted and a new total volume be calculated from it. -createOffer.amountPriceBox.error.message=An error occurred when placing the offerPayload:\n\n{0} +createOffer.amountPriceBox.error.message=An error occurred when placing the offer:\n\n{0} # TODO remove createOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount. # TODO remove createOffer.validation.minAmountLargerThanAmount=Minimum amount cannot be larger than amount. -createOffer.fundsBox.title=Fund your offerPayload +createOffer.fundsBox.title=Fund your offer createOffer.fundsBox.totalsNeeded=Funds needed: createOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above createOffer.fundsBox.address=Trade wallet address: createOffer.fundsBox.balance=Trade wallet balance: -# TODO remove createOffer.fundsBox.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offerPayload gets executed. If you cancel your offerPayload you can withdraw your funds from that trading wallet. The only payment made when placing an offerPayload is the offerPayload fee payment. https://bisq.io/faq/#6 +# TODO remove createOffer.fundsBox.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offer gets executed. If you cancel your offer you can withdraw your funds from that trading wallet. The only payment made when placing an offer is the offer fee payment. https://bisq.io/faq/#6 createOffer.fundsBox.tradeAmount=Trade amount: createOffer.fundsBox.securityDeposit=Security deposit: -createOffer.fundsBox.offerFee=Create offerPayload fee: +createOffer.fundsBox.offerFee=Create offer fee: createOffer.fundsBox.networkFee=Mining fee: createOffer.fundsBox.total=Total: # TODO remove createOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove createOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove createOffer.fundsBox.placeOffer=Place offerPayload +# TODO remove createOffer.fundsBox.placeOffer=Place offer createOffer.fundsBox.placeOfferSpinnerInfo=Offer publishing is in progress ... createOffer.fundsBox.paymentLabel=bisq trade with ID {0} @@ -139,20 +139,20 @@ createOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove createOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove createOffer.advancedBox.county=Payments account country: -# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offerPayload restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). +# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offer restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). -createOffer.success.headline=Your offerPayload has been published +createOffer.success.headline=Your offer has been published createOffer.success.info=You can manage your open offers in the \"Portfolio\" screen under \"My open offers\". -# TODO remove createOffer.error.message=An error occurred when placing the offerPayload.\n\n{0} +# TODO remove createOffer.error.message=An error occurred when placing the offer.\n\n{0} -# Take offerPayload +# Take offer takeOffer.amount.prompt=Enter amount in BTC # TODO remove takeOffer.price.prompt=Enter price # TODO remove takeOffer.volume.prompt=Enter amount in {0} # TODO remove takeOffer.minAmount.prompt=Enter min. amount -# TODO remove takeOffer.amountPriceBox.title=Take offerPayload +# TODO remove takeOffer.amountPriceBox.title=Take offer # TODO remove takeOffer.amountPriceBox.subTitle=Buy bitcoin takeOffer.amountPriceBox.buy.amountDescription=Amount of bitcoin to sell takeOffer.amountPriceBox.sell.amountDescription=Amount of bitcoin to buy @@ -164,30 +164,30 @@ takeOffer.amountPriceBox.amountRangeDescription=Possible amount range # TODO remove takeOffer.amountPriceBox.sell.info=Enter the amount of bitcoin you want to buy. You can choose an amount between the minimum amount and the amount. # TODO remove takeOffer.amountPriceBox.next=Next step takeOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. -takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offerPayload. -takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offerPayload. +takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offer. +takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offer. takeOffer.validation.amountLargerThanOfferAmountMinusFee=That input amount would create dust change for the BTC seller. takeOffer.fundsBox.title=Fund your trade -takeOffer.fundsBox.isOfferAvailable=Check if offerPayload is available ... +takeOffer.fundsBox.isOfferAvailable=Check if offer is available ... takeOffer.fundsBox.totalsNeeded=Funds needed: # TODO remove takeOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above takeOffer.fundsBox.address=Trade wallet address: takeOffer.fundsBox.balance=Trade wallet balance: -# TODO remove takeOffer.fundsBox.buy.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.buy.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid in to a locked deposit address. At the end of a successful trade you will get back your security deposit and the bitcoin amount you sold will be transferred \ to the BTC buyer. -# TODO remove takeOffer.fundsBox.sell.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.sell.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid into a locked deposit address. At the end of a successful trade you will get back your security deposit. takeOffer.fundsBox.tradeAmount=Amount to sell: takeOffer.fundsBox.securityDeposit=Security deposit: -takeOffer.fundsBox.offerFee=Take offerPayload fee: +takeOffer.fundsBox.offerFee=Take offer fee: takeOffer.fundsBox.networkFee=Mining fee: takeOffer.fundsBox.total=Total: # TODO remove takeOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove takeOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove takeOffer.fundsBox.takeOffer=Take offerPayload -takeOffer.fundsBox.takeOfferSpinnerInfo=Take offerPayload in progress ... +# TODO remove takeOffer.fundsBox.takeOffer=Take offer +takeOffer.fundsBox.takeOfferSpinnerInfo=Take offer in progress ... takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.title=Advanced settings @@ -197,12 +197,12 @@ takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove takeOffer.advancedBox.county=Payments account country: -# TODO remove takeOffer.advancedBox.info=These are the offerPayload restrictions your trading partner has defined in his offerPayload. \ +# TODO remove takeOffer.advancedBox.info=These are the offer restrictions your trading partner has defined in his offer. \ Your settings match those constraints and you are able to trade with him. -takeOffer.success.headline=You have successfully taken an offerPayload. +takeOffer.success.headline=You have successfully taken an offer. takeOffer.success.info=You can see the status of your trade at the \"Portfolio\" screen under \"Open trades\". -takeOffer.error.message=An error occurred when taking the offerPayload.\n\n{0} +takeOffer.error.message=An error occurred when taking the offer.\n\n{0} # Payment methods # remove N/A=Not available diff --git a/common/src/main/resources/i18n/in_dev/displayStrings_pl.properties b/common/src/main/resources/i18n/in_dev/displayStrings_pl.properties index a88585f701..0916944218 100644 --- a/common/src/main/resources/i18n/in_dev/displayStrings_pl.properties +++ b/common/src/main/resources/i18n/in_dev/displayStrings_pl.properties @@ -93,42 +93,42 @@ validation.bankIdNumber={0} must consist of {1} numbers. validation.accountNr=Account number must consist of {0} numbers. validation.accountNrChars=Account number must consist of {0} characters. -# Create offerPayload +# Create offer createOffer.amount.prompt=Enter amount in BTC createOffer.price.prompt=Enter price createOffer.volume.prompt=Enter amount in {0} # TODO remove createOffer.minAmount.prompt=Enter min. amount -# TODO remove createOffer.amountPriceBox.title=Create your offerPayload +# TODO remove createOffer.amountPriceBox.title=Create your offer createOffer.amountPriceBox.amountDescription=Amount of bitcoin to {0} createOffer.amountPriceBox.priceDescriptionFiat=Fixed price per {0} createOffer.amountPriceBox.buy.volumeDescription=Amount in {0} to spend createOffer.amountPriceBox.sell.volumeDescription=Amount in {0} to receive createOffer.amountPriceBox.minAmountDescription=Minimum amount of BTC -# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. -# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. +# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. +# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. # TODO remove createOffer.amountPriceBox.next=Next step # TODO remove createOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. # TODO remove createOffer.amountPriceBox.warning.invalidFiatDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted. # TODO remove createOffer.amountPriceBox.warning.adjustedVolume=The total volume you have entered leads to invalid fractional bitcoin amounts. The amount has been adjusted and a new total volume be calculated from it. -createOffer.amountPriceBox.error.message=An error occurred when placing the offerPayload:\n\n{0} +createOffer.amountPriceBox.error.message=An error occurred when placing the offer:\n\n{0} # TODO remove createOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount. # TODO remove createOffer.validation.minAmountLargerThanAmount=Minimum amount cannot be larger than amount. -createOffer.fundsBox.title=Fund your offerPayload +createOffer.fundsBox.title=Fund your offer createOffer.fundsBox.totalsNeeded=Funds needed: createOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above createOffer.fundsBox.address=Trade wallet address: createOffer.fundsBox.balance=Trade wallet balance: -# TODO remove createOffer.fundsBox.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offerPayload gets executed. If you cancel your offerPayload you can withdraw your funds from that trading wallet. The only payment made when placing an offerPayload is the offerPayload fee payment. https://bisq.io/faq/#6 +# TODO remove createOffer.fundsBox.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offer gets executed. If you cancel your offer you can withdraw your funds from that trading wallet. The only payment made when placing an offer is the offer fee payment. https://bisq.io/faq/#6 createOffer.fundsBox.tradeAmount=Trade amount: createOffer.fundsBox.securityDeposit=Security deposit: -createOffer.fundsBox.offerFee=Create offerPayload fee: +createOffer.fundsBox.offerFee=Create offer fee: createOffer.fundsBox.networkFee=Mining fee: createOffer.fundsBox.total=Total: # TODO remove createOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove createOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove createOffer.fundsBox.placeOffer=Place offerPayload +# TODO remove createOffer.fundsBox.placeOffer=Place offer createOffer.fundsBox.placeOfferSpinnerInfo=Offer publishing is in progress ... createOffer.fundsBox.paymentLabel=bisq trade with ID {0} @@ -139,20 +139,20 @@ createOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove createOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove createOffer.advancedBox.county=Payments account country: -# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offerPayload restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). +# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offer restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). -createOffer.success.headline=Your offerPayload has been published +createOffer.success.headline=Your offer has been published createOffer.success.info=You can manage your open offers in the \"Portfolio\" screen under \"My open offers\". -# TODO remove createOffer.error.message=An error occurred when placing the offerPayload.\n\n{0} +# TODO remove createOffer.error.message=An error occurred when placing the offer.\n\n{0} -# Take offerPayload +# Take offer takeOffer.amount.prompt=Enter amount in BTC # TODO remove takeOffer.price.prompt=Enter price # TODO remove takeOffer.volume.prompt=Enter amount in {0} # TODO remove takeOffer.minAmount.prompt=Enter min. amount -# TODO remove takeOffer.amountPriceBox.title=Take offerPayload +# TODO remove takeOffer.amountPriceBox.title=Take offer # TODO remove takeOffer.amountPriceBox.subTitle=Buy bitcoin takeOffer.amountPriceBox.buy.amountDescription=Amount of bitcoin to sell takeOffer.amountPriceBox.sell.amountDescription=Amount of bitcoin to buy @@ -164,30 +164,30 @@ takeOffer.amountPriceBox.amountRangeDescription=Possible amount range # TODO remove takeOffer.amountPriceBox.sell.info=Enter the amount of bitcoin you want to buy. You can choose an amount between the minimum amount and the amount. # TODO remove takeOffer.amountPriceBox.next=Next step takeOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. -takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offerPayload. -takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offerPayload. +takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offer. +takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offer. takeOffer.validation.amountLargerThanOfferAmountMinusFee=That input amount would create dust change for the BTC seller. takeOffer.fundsBox.title=Fund your trade -takeOffer.fundsBox.isOfferAvailable=Check if offerPayload is available ... +takeOffer.fundsBox.isOfferAvailable=Check if offer is available ... takeOffer.fundsBox.totalsNeeded=Funds needed: # TODO remove takeOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above takeOffer.fundsBox.address=Trade wallet address: takeOffer.fundsBox.balance=Trade wallet balance: -# TODO remove takeOffer.fundsBox.buy.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.buy.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid in to a locked deposit address. At the end of a successful trade you will get back your security deposit and the bitcoin amount you sold will be transferred \ to the BTC buyer. -# TODO remove takeOffer.fundsBox.sell.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.sell.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid into a locked deposit address. At the end of a successful trade you will get back your security deposit. takeOffer.fundsBox.tradeAmount=Amount to sell: takeOffer.fundsBox.securityDeposit=Security deposit: -takeOffer.fundsBox.offerFee=Take offerPayload fee: +takeOffer.fundsBox.offerFee=Take offer fee: takeOffer.fundsBox.networkFee=Mining fee: takeOffer.fundsBox.total=Total: # TODO remove takeOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove takeOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove takeOffer.fundsBox.takeOffer=Take offerPayload -takeOffer.fundsBox.takeOfferSpinnerInfo=Take offerPayload in progress ... +# TODO remove takeOffer.fundsBox.takeOffer=Take offer +takeOffer.fundsBox.takeOfferSpinnerInfo=Take offer in progress ... takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.title=Advanced settings @@ -197,12 +197,12 @@ takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove takeOffer.advancedBox.county=Payments account country: -# TODO remove takeOffer.advancedBox.info=These are the offerPayload restrictions your trading partner has defined in his offerPayload. \ +# TODO remove takeOffer.advancedBox.info=These are the offer restrictions your trading partner has defined in his offer. \ Your settings match those constraints and you are able to trade with him. -takeOffer.success.headline=You have successfully taken an offerPayload. +takeOffer.success.headline=You have successfully taken an offer. takeOffer.success.info=You can see the status of your trade at the \"Portfolio\" screen under \"Open trades\". -takeOffer.error.message=An error occurred when taking the offerPayload.\n\n{0} +takeOffer.error.message=An error occurred when taking the offer.\n\n{0} # Payment methods # remove N/A=Not available diff --git a/common/src/main/resources/i18n/in_dev/displayStrings_pt.properties b/common/src/main/resources/i18n/in_dev/displayStrings_pt.properties index bfe532a581..07edfc966c 100644 --- a/common/src/main/resources/i18n/in_dev/displayStrings_pt.properties +++ b/common/src/main/resources/i18n/in_dev/displayStrings_pt.properties @@ -40,7 +40,7 @@ validation.bankIdNumber={0} tem de ser constituído por {1} números validation.accountNr=O número de conta tem de ser constituído por {0} números validation.accountNrChars=O número de conta tem de ser constituído por {0} caractéres -# Create offerPayload +# Create offer createOffer.amount.prompt=Introduza o montante de BTC createOffer.price.prompt=Introduza o preço createOffer.volume.prompt=Introduza o montante em {0} @@ -94,7 +94,7 @@ createOffer.success.info=Você pode gerir as suas ofertas no \"Portfolio\" por b # TODO remove createOffer.error.message=Um erro ocorreu ao criar a oferta.\n\n{0} -# Take offerPayload +# Take offer takeOffer.amount.prompt=Introduza o montante em BTC # TODO remove takeOffer.price.prompt=Introduza o preço # TODO remove takeOffer.volume.prompt=Introduza o montante em {0} diff --git a/common/src/main/resources/i18n/in_dev/displayStrings_ro.properties b/common/src/main/resources/i18n/in_dev/displayStrings_ro.properties index 62a0cb8e56..ea63a819d7 100644 --- a/common/src/main/resources/i18n/in_dev/displayStrings_ro.properties +++ b/common/src/main/resources/i18n/in_dev/displayStrings_ro.properties @@ -93,42 +93,42 @@ validation.bankIdNumber={0} must consist of {1} numbers. validation.accountNr=Account number must consist of {0} numbers. validation.accountNrChars=Account number must consist of {0} characters. -# Create offerPayload +# Create offer createOffer.amount.prompt=Enter amount in BTC createOffer.price.prompt=Enter price createOffer.volume.prompt=Enter amount in {0} # TODO remove createOffer.minAmount.prompt=Enter min. amount -# TODO remove createOffer.amountPriceBox.title=Create your offerPayload +# TODO remove createOffer.amountPriceBox.title=Create your offer createOffer.amountPriceBox.amountDescription=Amount of bitcoin to {0} createOffer.amountPriceBox.priceDescriptionFiat=Fixed price per {0} createOffer.amountPriceBox.buy.volumeDescription=Amount in {0} to spend createOffer.amountPriceBox.sell.volumeDescription=Amount in {0} to receive createOffer.amountPriceBox.minAmountDescription=Minimum amount of BTC -# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. -# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. +# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. +# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. # TODO remove createOffer.amountPriceBox.next=Next step # TODO remove createOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. # TODO remove createOffer.amountPriceBox.warning.invalidFiatDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted. # TODO remove createOffer.amountPriceBox.warning.adjustedVolume=The total volume you have entered leads to invalid fractional bitcoin amounts. The amount has been adjusted and a new total volume be calculated from it. -createOffer.amountPriceBox.error.message=An error occurred when placing the offerPayload:\n\n{0} +createOffer.amountPriceBox.error.message=An error occurred when placing the offer:\n\n{0} # TODO remove createOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount. # TODO remove createOffer.validation.minAmountLargerThanAmount=Minimum amount cannot be larger than amount. -createOffer.fundsBox.title=Fund your offerPayload +createOffer.fundsBox.title=Fund your offer createOffer.fundsBox.totalsNeeded=Funds needed: createOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above createOffer.fundsBox.address=Trade wallet address: createOffer.fundsBox.balance=Trade wallet balance: -# TODO remove createOffer.fundsBox.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offerPayload gets executed. If you cancel your offerPayload you can withdraw your funds from that trading wallet. The only payment made when placing an offerPayload is the offerPayload fee payment. https://bisq.io/faq/#6 +# TODO remove createOffer.fundsBox.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offer gets executed. If you cancel your offer you can withdraw your funds from that trading wallet. The only payment made when placing an offer is the offer fee payment. https://bisq.io/faq/#6 createOffer.fundsBox.tradeAmount=Trade amount: createOffer.fundsBox.securityDeposit=Security deposit: -createOffer.fundsBox.offerFee=Create offerPayload fee: +createOffer.fundsBox.offerFee=Create offer fee: createOffer.fundsBox.networkFee=Mining fee: createOffer.fundsBox.total=Total: # TODO remove createOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove createOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove createOffer.fundsBox.placeOffer=Place offerPayload +# TODO remove createOffer.fundsBox.placeOffer=Place offer createOffer.fundsBox.placeOfferSpinnerInfo=Offer publishing is in progress ... createOffer.fundsBox.paymentLabel=bisq trade with ID {0} @@ -139,20 +139,20 @@ createOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove createOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove createOffer.advancedBox.county=Payments account country: -# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offerPayload restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). +# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offer restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). -createOffer.success.headline=Your offerPayload has been published +createOffer.success.headline=Your offer has been published createOffer.success.info=You can manage your open offers in the \"Portfolio\" screen under \"My open offers\". -# TODO remove createOffer.error.message=An error occurred when placing the offerPayload.\n\n{0} +# TODO remove createOffer.error.message=An error occurred when placing the offer.\n\n{0} -# Take offerPayload +# Take offer takeOffer.amount.prompt=Enter amount in BTC # TODO remove takeOffer.price.prompt=Enter price # TODO remove takeOffer.volume.prompt=Enter amount in {0} # TODO remove takeOffer.minAmount.prompt=Enter min. amount -# TODO remove takeOffer.amountPriceBox.title=Take offerPayload +# TODO remove takeOffer.amountPriceBox.title=Take offer # TODO remove takeOffer.amountPriceBox.subTitle=Buy bitcoin takeOffer.amountPriceBox.buy.amountDescription=Amount of bitcoin to sell takeOffer.amountPriceBox.sell.amountDescription=Amount of bitcoin to buy @@ -164,30 +164,30 @@ takeOffer.amountPriceBox.amountRangeDescription=Possible amount range # TODO remove takeOffer.amountPriceBox.sell.info=Enter the amount of bitcoin you want to buy. You can choose an amount between the minimum amount and the amount. # TODO remove takeOffer.amountPriceBox.next=Next step takeOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. -takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offerPayload. -takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offerPayload. +takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offer. +takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offer. takeOffer.validation.amountLargerThanOfferAmountMinusFee=That input amount would create dust change for the BTC seller. takeOffer.fundsBox.title=Fund your trade -takeOffer.fundsBox.isOfferAvailable=Check if offerPayload is available ... +takeOffer.fundsBox.isOfferAvailable=Check if offer is available ... takeOffer.fundsBox.totalsNeeded=Funds needed: # TODO remove takeOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above takeOffer.fundsBox.address=Trade wallet address: takeOffer.fundsBox.balance=Trade wallet balance: -# TODO remove takeOffer.fundsBox.buy.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.buy.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid in to a locked deposit address. At the end of a successful trade you will get back your security deposit and the bitcoin amount you sold will be transferred \ to the BTC buyer. -# TODO remove takeOffer.fundsBox.sell.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.sell.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid into a locked deposit address. At the end of a successful trade you will get back your security deposit. takeOffer.fundsBox.tradeAmount=Amount to sell: takeOffer.fundsBox.securityDeposit=Security deposit: -takeOffer.fundsBox.offerFee=Take offerPayload fee: +takeOffer.fundsBox.offerFee=Take offer fee: takeOffer.fundsBox.networkFee=Mining fee: takeOffer.fundsBox.total=Total: # TODO remove takeOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove takeOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove takeOffer.fundsBox.takeOffer=Take offerPayload -takeOffer.fundsBox.takeOfferSpinnerInfo=Take offerPayload in progress ... +# TODO remove takeOffer.fundsBox.takeOffer=Take offer +takeOffer.fundsBox.takeOfferSpinnerInfo=Take offer in progress ... takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.title=Advanced settings @@ -197,12 +197,12 @@ takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove takeOffer.advancedBox.county=Payments account country: -# TODO remove takeOffer.advancedBox.info=These are the offerPayload restrictions your trading partner has defined in his offerPayload. \ +# TODO remove takeOffer.advancedBox.info=These are the offer restrictions your trading partner has defined in his offer. \ Your settings match those constraints and you are able to trade with him. -takeOffer.success.headline=You have successfully taken an offerPayload. +takeOffer.success.headline=You have successfully taken an offer. takeOffer.success.info=You can see the status of your trade at the \"Portfolio\" screen under \"Open trades\". -takeOffer.error.message=An error occurred when taking the offerPayload.\n\n{0} +takeOffer.error.message=An error occurred when taking the offer.\n\n{0} # Payment methods # remove N/A=Not available diff --git a/common/src/main/resources/i18n/in_dev/displayStrings_ru.properties b/common/src/main/resources/i18n/in_dev/displayStrings_ru.properties index 7466d8e9fb..0476df4797 100644 --- a/common/src/main/resources/i18n/in_dev/displayStrings_ru.properties +++ b/common/src/main/resources/i18n/in_dev/displayStrings_ru.properties @@ -93,42 +93,42 @@ validation.bankIdNumber={0} must consist of {1} numbers. validation.accountNr=Account number must consist of {0} numbers. validation.accountNrChars=Account number must consist of {0} characters. -# Create offerPayload +# Create offer createOffer.amount.prompt=Enter amount in BTC createOffer.price.prompt=Enter price createOffer.volume.prompt=Enter amount in {0} # TODO remove createOffer.minAmount.prompt=Enter min. amount -# TODO remove createOffer.amountPriceBox.title=Create your offerPayload +# TODO remove createOffer.amountPriceBox.title=Create your offer createOffer.amountPriceBox.amountDescription=Amount of bitcoin to {0} createOffer.amountPriceBox.priceDescriptionFiat=Fixed price per {0} createOffer.amountPriceBox.buy.volumeDescription=Amount in {0} to spend createOffer.amountPriceBox.sell.volumeDescription=Amount in {0} to receive createOffer.amountPriceBox.minAmountDescription=Minimum amount of BTC -# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. -# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. +# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. +# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. # TODO remove createOffer.amountPriceBox.next=Next step # TODO remove createOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. # TODO remove createOffer.amountPriceBox.warning.invalidFiatDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted. # TODO remove createOffer.amountPriceBox.warning.adjustedVolume=The total volume you have entered leads to invalid fractional bitcoin amounts. The amount has been adjusted and a new total volume be calculated from it. -createOffer.amountPriceBox.error.message=An error occurred when placing the offerPayload:\n\n{0} +createOffer.amountPriceBox.error.message=An error occurred when placing the offer:\n\n{0} # TODO remove createOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount. # TODO remove createOffer.validation.minAmountLargerThanAmount=Minimum amount cannot be larger than amount. -createOffer.fundsBox.title=Fund your offerPayload +createOffer.fundsBox.title=Fund your offer createOffer.fundsBox.totalsNeeded=Funds needed: createOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above createOffer.fundsBox.address=Trade wallet address: createOffer.fundsBox.balance=Trade wallet balance: -# TODO remove createOffer.fundsBox.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offerPayload gets executed. If you cancel your offerPayload you can withdraw your funds from that trading wallet. The only payment made when placing an offerPayload is the offerPayload fee payment. https://bisq.io/faq/#6 +# TODO remove createOffer.fundsBox.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offer gets executed. If you cancel your offer you can withdraw your funds from that trading wallet. The only payment made when placing an offer is the offer fee payment. https://bisq.io/faq/#6 createOffer.fundsBox.tradeAmount=Trade amount: createOffer.fundsBox.securityDeposit=Security deposit: -createOffer.fundsBox.offerFee=Create offerPayload fee: +createOffer.fundsBox.offerFee=Create offer fee: createOffer.fundsBox.networkFee=Mining fee: createOffer.fundsBox.total=Total: # TODO remove createOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove createOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove createOffer.fundsBox.placeOffer=Place offerPayload +# TODO remove createOffer.fundsBox.placeOffer=Place offer createOffer.fundsBox.placeOfferSpinnerInfo=Offer publishing is in progress ... createOffer.fundsBox.paymentLabel=bisq trade with ID {0} @@ -139,20 +139,20 @@ createOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove createOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove createOffer.advancedBox.county=Payments account country: -# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offerPayload restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). +# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offer restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). -createOffer.success.headline=Your offerPayload has been published +createOffer.success.headline=Your offer has been published createOffer.success.info=You can manage your open offers in the \"Portfolio\" screen under \"My open offers\". -# TODO remove createOffer.error.message=An error occurred when placing the offerPayload.\n\n{0} +# TODO remove createOffer.error.message=An error occurred when placing the offer.\n\n{0} -# Take offerPayload +# Take offer takeOffer.amount.prompt=Enter amount in BTC # TODO remove takeOffer.price.prompt=Enter price # TODO remove takeOffer.volume.prompt=Enter amount in {0} # TODO remove takeOffer.minAmount.prompt=Enter min. amount -# TODO remove takeOffer.amountPriceBox.title=Take offerPayload +# TODO remove takeOffer.amountPriceBox.title=Take offer # TODO remove takeOffer.amountPriceBox.subTitle=Buy bitcoin takeOffer.amountPriceBox.buy.amountDescription=Amount of bitcoin to sell takeOffer.amountPriceBox.sell.amountDescription=Amount of bitcoin to buy @@ -164,30 +164,30 @@ takeOffer.amountPriceBox.amountRangeDescription=Possible amount range # TODO remove takeOffer.amountPriceBox.sell.info=Enter the amount of bitcoin you want to buy. You can choose an amount between the minimum amount and the amount. # TODO remove takeOffer.amountPriceBox.next=Next step takeOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. -takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offerPayload. -takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offerPayload. +takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offer. +takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offer. takeOffer.validation.amountLargerThanOfferAmountMinusFee=That input amount would create dust change for the BTC seller. takeOffer.fundsBox.title=Fund your trade -takeOffer.fundsBox.isOfferAvailable=Check if offerPayload is available ... +takeOffer.fundsBox.isOfferAvailable=Check if offer is available ... takeOffer.fundsBox.totalsNeeded=Funds needed: # TODO remove takeOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above takeOffer.fundsBox.address=Trade wallet address: takeOffer.fundsBox.balance=Trade wallet balance: -# TODO remove takeOffer.fundsBox.buy.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.buy.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid in to a locked deposit address. At the end of a successful trade you will get back your security deposit and the bitcoin amount you sold will be transferred \ to the BTC buyer. -# TODO remove takeOffer.fundsBox.sell.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.sell.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid into a locked deposit address. At the end of a successful trade you will get back your security deposit. takeOffer.fundsBox.tradeAmount=Amount to sell: takeOffer.fundsBox.securityDeposit=Security deposit: -takeOffer.fundsBox.offerFee=Take offerPayload fee: +takeOffer.fundsBox.offerFee=Take offer fee: takeOffer.fundsBox.networkFee=Mining fee: takeOffer.fundsBox.total=Total: # TODO remove takeOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove takeOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove takeOffer.fundsBox.takeOffer=Take offerPayload -takeOffer.fundsBox.takeOfferSpinnerInfo=Take offerPayload in progress ... +# TODO remove takeOffer.fundsBox.takeOffer=Take offer +takeOffer.fundsBox.takeOfferSpinnerInfo=Take offer in progress ... takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.title=Advanced settings @@ -197,12 +197,12 @@ takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove takeOffer.advancedBox.county=Payments account country: -# TODO remove takeOffer.advancedBox.info=These are the offerPayload restrictions your trading partner has defined in his offerPayload. \ +# TODO remove takeOffer.advancedBox.info=These are the offer restrictions your trading partner has defined in his offer. \ Your settings match those constraints and you are able to trade with him. -takeOffer.success.headline=You have successfully taken an offerPayload. +takeOffer.success.headline=You have successfully taken an offer. takeOffer.success.info=You can see the status of your trade at the \"Portfolio\" screen under \"Open trades\". -takeOffer.error.message=An error occurred when taking the offerPayload.\n\n{0} +takeOffer.error.message=An error occurred when taking the offer.\n\n{0} # Payment methods # remove N/A=Not available diff --git a/common/src/main/resources/i18n/in_dev/displayStrings_se.properties b/common/src/main/resources/i18n/in_dev/displayStrings_se.properties index 38b041e875..57aa062e1c 100644 --- a/common/src/main/resources/i18n/in_dev/displayStrings_se.properties +++ b/common/src/main/resources/i18n/in_dev/displayStrings_se.properties @@ -93,42 +93,42 @@ validation.bankIdNumber={0} must consist of {1} numbers. validation.accountNr=Account number must consist of {0} numbers. validation.accountNrChars=Account number must consist of {0} characters. -# Create offerPayload +# Create offer createOffer.amount.prompt=Enter amount in BTC createOffer.price.prompt=Enter price createOffer.volume.prompt=Enter amount in {0} # TODO remove createOffer.minAmount.prompt=Enter min. amount -# TODO remove createOffer.amountPriceBox.title=Create your offerPayload +# TODO remove createOffer.amountPriceBox.title=Create your offer createOffer.amountPriceBox.amountDescription=Amount of bitcoin to {0} createOffer.amountPriceBox.priceDescriptionFiat=Fixed price per {0} createOffer.amountPriceBox.buy.volumeDescription=Amount in {0} to spend createOffer.amountPriceBox.sell.volumeDescription=Amount in {0} to receive createOffer.amountPriceBox.minAmountDescription=Minimum amount of BTC -# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. -# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. +# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. +# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. # TODO remove createOffer.amountPriceBox.next=Next step # TODO remove createOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. # TODO remove createOffer.amountPriceBox.warning.invalidFiatDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted. # TODO remove createOffer.amountPriceBox.warning.adjustedVolume=The total volume you have entered leads to invalid fractional bitcoin amounts. The amount has been adjusted and a new total volume be calculated from it. -createOffer.amountPriceBox.error.message=An error occurred when placing the offerPayload:\n\n{0} +createOffer.amountPriceBox.error.message=An error occurred when placing the offer:\n\n{0} # TODO remove createOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount. # TODO remove createOffer.validation.minAmountLargerThanAmount=Minimum amount cannot be larger than amount. -createOffer.fundsBox.title=Fund your offerPayload +createOffer.fundsBox.title=Fund your offer createOffer.fundsBox.totalsNeeded=Funds needed: createOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above createOffer.fundsBox.address=Trade wallet address: createOffer.fundsBox.balance=Trade wallet balance: -# TODO remove createOffer.fundsBox.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offerPayload gets executed. If you cancel your offerPayload you can withdraw your funds from that trading wallet. The only payment made when placing an offerPayload is the offerPayload fee payment. https://bisq.io/faq/#6 +# TODO remove createOffer.fundsBox.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offer gets executed. If you cancel your offer you can withdraw your funds from that trading wallet. The only payment made when placing an offer is the offer fee payment. https://bisq.io/faq/#6 createOffer.fundsBox.tradeAmount=Trade amount: createOffer.fundsBox.securityDeposit=Security deposit: -createOffer.fundsBox.offerFee=Create offerPayload fee: +createOffer.fundsBox.offerFee=Create offer fee: createOffer.fundsBox.networkFee=Mining fee: createOffer.fundsBox.total=Total: # TODO remove createOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove createOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove createOffer.fundsBox.placeOffer=Place offerPayload +# TODO remove createOffer.fundsBox.placeOffer=Place offer createOffer.fundsBox.placeOfferSpinnerInfo=Offer publishing is in progress ... createOffer.fundsBox.paymentLabel=bisq trade with ID {0} @@ -139,20 +139,20 @@ createOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove createOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove createOffer.advancedBox.county=Payments account country: -# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offerPayload restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). +# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offer restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). -createOffer.success.headline=Your offerPayload has been published +createOffer.success.headline=Your offer has been published createOffer.success.info=You can manage your open offers in the \"Portfolio\" screen under \"My open offers\". -# TODO remove createOffer.error.message=An error occurred when placing the offerPayload.\n\n{0} +# TODO remove createOffer.error.message=An error occurred when placing the offer.\n\n{0} -# Take offerPayload +# Take offer takeOffer.amount.prompt=Enter amount in BTC # TODO remove takeOffer.price.prompt=Enter price # TODO remove takeOffer.volume.prompt=Enter amount in {0} # TODO remove takeOffer.minAmount.prompt=Enter min. amount -# TODO remove takeOffer.amountPriceBox.title=Take offerPayload +# TODO remove takeOffer.amountPriceBox.title=Take offer # TODO remove takeOffer.amountPriceBox.subTitle=Buy bitcoin takeOffer.amountPriceBox.buy.amountDescription=Amount of bitcoin to sell takeOffer.amountPriceBox.sell.amountDescription=Amount of bitcoin to buy @@ -164,30 +164,30 @@ takeOffer.amountPriceBox.amountRangeDescription=Possible amount range # TODO remove takeOffer.amountPriceBox.sell.info=Enter the amount of bitcoin you want to buy. You can choose an amount between the minimum amount and the amount. # TODO remove takeOffer.amountPriceBox.next=Next step takeOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. -takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offerPayload. -takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offerPayload. +takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offer. +takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offer. takeOffer.validation.amountLargerThanOfferAmountMinusFee=That input amount would create dust change for the BTC seller. takeOffer.fundsBox.title=Fund your trade -takeOffer.fundsBox.isOfferAvailable=Check if offerPayload is available ... +takeOffer.fundsBox.isOfferAvailable=Check if offer is available ... takeOffer.fundsBox.totalsNeeded=Funds needed: # TODO remove takeOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above takeOffer.fundsBox.address=Trade wallet address: takeOffer.fundsBox.balance=Trade wallet balance: -# TODO remove takeOffer.fundsBox.buy.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.buy.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid in to a locked deposit address. At the end of a successful trade you will get back your security deposit and the bitcoin amount you sold will be transferred \ to the BTC buyer. -# TODO remove takeOffer.fundsBox.sell.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.sell.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid into a locked deposit address. At the end of a successful trade you will get back your security deposit. takeOffer.fundsBox.tradeAmount=Amount to sell: takeOffer.fundsBox.securityDeposit=Security deposit: -takeOffer.fundsBox.offerFee=Take offerPayload fee: +takeOffer.fundsBox.offerFee=Take offer fee: takeOffer.fundsBox.networkFee=Mining fee: takeOffer.fundsBox.total=Total: # TODO remove takeOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove takeOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove takeOffer.fundsBox.takeOffer=Take offerPayload -takeOffer.fundsBox.takeOfferSpinnerInfo=Take offerPayload in progress ... +# TODO remove takeOffer.fundsBox.takeOffer=Take offer +takeOffer.fundsBox.takeOfferSpinnerInfo=Take offer in progress ... takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.title=Advanced settings @@ -197,12 +197,12 @@ takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove takeOffer.advancedBox.county=Payments account country: -# TODO remove takeOffer.advancedBox.info=These are the offerPayload restrictions your trading partner has defined in his offerPayload. \ +# TODO remove takeOffer.advancedBox.info=These are the offer restrictions your trading partner has defined in his offer. \ Your settings match those constraints and you are able to trade with him. -takeOffer.success.headline=You have successfully taken an offerPayload. +takeOffer.success.headline=You have successfully taken an offer. takeOffer.success.info=You can see the status of your trade at the \"Portfolio\" screen under \"Open trades\". -takeOffer.error.message=An error occurred when taking the offerPayload.\n\n{0} +takeOffer.error.message=An error occurred when taking the offer.\n\n{0} # Payment methods # remove N/A=Not available diff --git a/common/src/main/resources/i18n/in_dev/displayStrings_th.properties b/common/src/main/resources/i18n/in_dev/displayStrings_th.properties index 1dc8f261f1..7c6783641e 100644 --- a/common/src/main/resources/i18n/in_dev/displayStrings_th.properties +++ b/common/src/main/resources/i18n/in_dev/displayStrings_th.properties @@ -93,42 +93,42 @@ validation.bankIdNumber={0} must consist of {1} numbers. validation.accountNr=Account number must consist of {0} numbers. validation.accountNrChars=Account number must consist of {0} characters. -# Create offerPayload +# Create offer createOffer.amount.prompt=Enter amount in BTC createOffer.price.prompt=Enter price createOffer.volume.prompt=Enter amount in {0} # TODO remove createOffer.minAmount.prompt=Enter min. amount -# TODO remove createOffer.amountPriceBox.title=Create your offerPayload +# TODO remove createOffer.amountPriceBox.title=Create your offer createOffer.amountPriceBox.amountDescription=Amount of bitcoin to {0} createOffer.amountPriceBox.priceDescriptionFiat=Fixed price per {0} createOffer.amountPriceBox.buy.volumeDescription=Amount in {0} to spend createOffer.amountPriceBox.sell.volumeDescription=Amount in {0} to receive createOffer.amountPriceBox.minAmountDescription=Minimum amount of BTC -# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. -# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. +# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. +# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. # TODO remove createOffer.amountPriceBox.next=Next step # TODO remove createOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. # TODO remove createOffer.amountPriceBox.warning.invalidFiatDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted. # TODO remove createOffer.amountPriceBox.warning.adjustedVolume=The total volume you have entered leads to invalid fractional bitcoin amounts. The amount has been adjusted and a new total volume be calculated from it. -createOffer.amountPriceBox.error.message=An error occurred when placing the offerPayload:\n\n{0} +createOffer.amountPriceBox.error.message=An error occurred when placing the offer:\n\n{0} # TODO remove createOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount. # TODO remove createOffer.validation.minAmountLargerThanAmount=Minimum amount cannot be larger than amount. -createOffer.fundsBox.title=Fund your offerPayload +createOffer.fundsBox.title=Fund your offer createOffer.fundsBox.totalsNeeded=Funds needed: createOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above createOffer.fundsBox.address=Trade wallet address: createOffer.fundsBox.balance=Trade wallet balance: -# TODO remove createOffer.fundsBox.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offerPayload gets executed. If you cancel your offerPayload you can withdraw your funds from that trading wallet. The only payment made when placing an offerPayload is the offerPayload fee payment. https://bisq.io/faq/#6 +# TODO remove createOffer.fundsBox.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offer gets executed. If you cancel your offer you can withdraw your funds from that trading wallet. The only payment made when placing an offer is the offer fee payment. https://bisq.io/faq/#6 createOffer.fundsBox.tradeAmount=Trade amount: createOffer.fundsBox.securityDeposit=Security deposit: -createOffer.fundsBox.offerFee=Create offerPayload fee: +createOffer.fundsBox.offerFee=Create offer fee: createOffer.fundsBox.networkFee=Mining fee: createOffer.fundsBox.total=Total: # TODO remove createOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove createOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove createOffer.fundsBox.placeOffer=Place offerPayload +# TODO remove createOffer.fundsBox.placeOffer=Place offer createOffer.fundsBox.placeOfferSpinnerInfo=Offer publishing is in progress ... createOffer.fundsBox.paymentLabel=bisq trade with ID {0} @@ -139,20 +139,20 @@ createOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove createOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove createOffer.advancedBox.county=Payments account country: -# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offerPayload restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). +# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offer restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). -createOffer.success.headline=Your offerPayload has been published +createOffer.success.headline=Your offer has been published createOffer.success.info=You can manage your open offers in the \"Portfolio\" screen under \"My open offers\". -# TODO remove createOffer.error.message=An error occurred when placing the offerPayload.\n\n{0} +# TODO remove createOffer.error.message=An error occurred when placing the offer.\n\n{0} -# Take offerPayload +# Take offer takeOffer.amount.prompt=Enter amount in BTC # TODO remove takeOffer.price.prompt=Enter price # TODO remove takeOffer.volume.prompt=Enter amount in {0} # TODO remove takeOffer.minAmount.prompt=Enter min. amount -# TODO remove takeOffer.amountPriceBox.title=Take offerPayload +# TODO remove takeOffer.amountPriceBox.title=Take offer # TODO remove takeOffer.amountPriceBox.subTitle=Buy bitcoin takeOffer.amountPriceBox.buy.amountDescription=Amount of bitcoin to sell takeOffer.amountPriceBox.sell.amountDescription=Amount of bitcoin to buy @@ -164,30 +164,30 @@ takeOffer.amountPriceBox.amountRangeDescription=Possible amount range # TODO remove takeOffer.amountPriceBox.sell.info=Enter the amount of bitcoin you want to buy. You can choose an amount between the minimum amount and the amount. # TODO remove takeOffer.amountPriceBox.next=Next step takeOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. -takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offerPayload. -takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offerPayload. +takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offer. +takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offer. takeOffer.validation.amountLargerThanOfferAmountMinusFee=That input amount would create dust change for the BTC seller. takeOffer.fundsBox.title=Fund your trade -takeOffer.fundsBox.isOfferAvailable=Check if offerPayload is available ... +takeOffer.fundsBox.isOfferAvailable=Check if offer is available ... takeOffer.fundsBox.totalsNeeded=Funds needed: # TODO remove takeOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above takeOffer.fundsBox.address=Trade wallet address: takeOffer.fundsBox.balance=Trade wallet balance: -# TODO remove takeOffer.fundsBox.buy.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.buy.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid in to a locked deposit address. At the end of a successful trade you will get back your security deposit and the bitcoin amount you sold will be transferred \ to the BTC buyer. -# TODO remove takeOffer.fundsBox.sell.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.sell.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid into a locked deposit address. At the end of a successful trade you will get back your security deposit. takeOffer.fundsBox.tradeAmount=Amount to sell: takeOffer.fundsBox.securityDeposit=Security deposit: -takeOffer.fundsBox.offerFee=Take offerPayload fee: +takeOffer.fundsBox.offerFee=Take offer fee: takeOffer.fundsBox.networkFee=Mining fee: takeOffer.fundsBox.total=Total: # TODO remove takeOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove takeOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove takeOffer.fundsBox.takeOffer=Take offerPayload -takeOffer.fundsBox.takeOfferSpinnerInfo=Take offerPayload in progress ... +# TODO remove takeOffer.fundsBox.takeOffer=Take offer +takeOffer.fundsBox.takeOfferSpinnerInfo=Take offer in progress ... takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.title=Advanced settings @@ -197,12 +197,12 @@ takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove takeOffer.advancedBox.county=Payments account country: -# TODO remove takeOffer.advancedBox.info=These are the offerPayload restrictions your trading partner has defined in his offerPayload. \ +# TODO remove takeOffer.advancedBox.info=These are the offer restrictions your trading partner has defined in his offer. \ Your settings match those constraints and you are able to trade with him. -takeOffer.success.headline=You have successfully taken an offerPayload. +takeOffer.success.headline=You have successfully taken an offer. takeOffer.success.info=You can see the status of your trade at the \"Portfolio\" screen under \"Open trades\". -takeOffer.error.message=An error occurred when taking the offerPayload.\n\n{0} +takeOffer.error.message=An error occurred when taking the offer.\n\n{0} # Payment methods # remove N/A=Not available diff --git a/common/src/main/resources/i18n/in_dev/displayStrings_ua.properties b/common/src/main/resources/i18n/in_dev/displayStrings_ua.properties index 089ef0c4c0..336b092091 100644 --- a/common/src/main/resources/i18n/in_dev/displayStrings_ua.properties +++ b/common/src/main/resources/i18n/in_dev/displayStrings_ua.properties @@ -93,42 +93,42 @@ validation.bankIdNumber={0} must consist of {1} numbers. validation.accountNr=Account number must consist of {0} numbers. validation.accountNrChars=Account number must consist of {0} characters. -# Create offerPayload +# Create offer createOffer.amount.prompt=Enter amount in BTC createOffer.price.prompt=Enter price createOffer.volume.prompt=Enter amount in {0} # TODO remove createOffer.minAmount.prompt=Enter min. amount -# TODO remove createOffer.amountPriceBox.title=Create your offerPayload +# TODO remove createOffer.amountPriceBox.title=Create your offer createOffer.amountPriceBox.amountDescription=Amount of bitcoin to {0} createOffer.amountPriceBox.priceDescriptionFiat=Fixed price per {0} createOffer.amountPriceBox.buy.volumeDescription=Amount in {0} to spend createOffer.amountPriceBox.sell.volumeDescription=Amount in {0} to receive createOffer.amountPriceBox.minAmountDescription=Minimum amount of BTC -# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. -# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. +# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. +# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. # TODO remove createOffer.amountPriceBox.next=Next step # TODO remove createOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. # TODO remove createOffer.amountPriceBox.warning.invalidFiatDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted. # TODO remove createOffer.amountPriceBox.warning.adjustedVolume=The total volume you have entered leads to invalid fractional bitcoin amounts. The amount has been adjusted and a new total volume be calculated from it. -createOffer.amountPriceBox.error.message=An error occurred when placing the offerPayload:\n\n{0} +createOffer.amountPriceBox.error.message=An error occurred when placing the offer:\n\n{0} # TODO remove createOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount. # TODO remove createOffer.validation.minAmountLargerThanAmount=Minimum amount cannot be larger than amount. -createOffer.fundsBox.title=Fund your offerPayload +createOffer.fundsBox.title=Fund your offer createOffer.fundsBox.totalsNeeded=Funds needed: createOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above createOffer.fundsBox.address=Trade wallet address: createOffer.fundsBox.balance=Trade wallet balance: -# TODO remove createOffer.fundsBox.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offerPayload gets executed. If you cancel your offerPayload you can withdraw your funds from that trading wallet. The only payment made when placing an offerPayload is the offerPayload fee payment. https://bisq.io/faq/#6 +# TODO remove createOffer.fundsBox.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offer gets executed. If you cancel your offer you can withdraw your funds from that trading wallet. The only payment made when placing an offer is the offer fee payment. https://bisq.io/faq/#6 createOffer.fundsBox.tradeAmount=Trade amount: createOffer.fundsBox.securityDeposit=Security deposit: -createOffer.fundsBox.offerFee=Create offerPayload fee: +createOffer.fundsBox.offerFee=Create offer fee: createOffer.fundsBox.networkFee=Mining fee: createOffer.fundsBox.total=Total: # TODO remove createOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove createOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove createOffer.fundsBox.placeOffer=Place offerPayload +# TODO remove createOffer.fundsBox.placeOffer=Place offer createOffer.fundsBox.placeOfferSpinnerInfo=Offer publishing is in progress ... createOffer.fundsBox.paymentLabel=bisq trade with ID {0} @@ -139,20 +139,20 @@ createOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove createOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove createOffer.advancedBox.county=Payments account country: -# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offerPayload restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). +# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offer restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). -createOffer.success.headline=Your offerPayload has been published +createOffer.success.headline=Your offer has been published createOffer.success.info=You can manage your open offers in the \"Portfolio\" screen under \"My open offers\". -# TODO remove createOffer.error.message=An error occurred when placing the offerPayload.\n\n{0} +# TODO remove createOffer.error.message=An error occurred when placing the offer.\n\n{0} -# Take offerPayload +# Take offer takeOffer.amount.prompt=Enter amount in BTC # TODO remove takeOffer.price.prompt=Enter price # TODO remove takeOffer.volume.prompt=Enter amount in {0} # TODO remove takeOffer.minAmount.prompt=Enter min. amount -# TODO remove takeOffer.amountPriceBox.title=Take offerPayload +# TODO remove takeOffer.amountPriceBox.title=Take offer # TODO remove takeOffer.amountPriceBox.subTitle=Buy bitcoin takeOffer.amountPriceBox.buy.amountDescription=Amount of bitcoin to sell takeOffer.amountPriceBox.sell.amountDescription=Amount of bitcoin to buy @@ -164,30 +164,30 @@ takeOffer.amountPriceBox.amountRangeDescription=Possible amount range # TODO remove takeOffer.amountPriceBox.sell.info=Enter the amount of bitcoin you want to buy. You can choose an amount between the minimum amount and the amount. # TODO remove takeOffer.amountPriceBox.next=Next step takeOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. -takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offerPayload. -takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offerPayload. +takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offer. +takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offer. takeOffer.validation.amountLargerThanOfferAmountMinusFee=That input amount would create dust change for the BTC seller. takeOffer.fundsBox.title=Fund your trade -takeOffer.fundsBox.isOfferAvailable=Check if offerPayload is available ... +takeOffer.fundsBox.isOfferAvailable=Check if offer is available ... takeOffer.fundsBox.totalsNeeded=Funds needed: # TODO remove takeOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above takeOffer.fundsBox.address=Trade wallet address: takeOffer.fundsBox.balance=Trade wallet balance: -# TODO remove takeOffer.fundsBox.buy.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.buy.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid in to a locked deposit address. At the end of a successful trade you will get back your security deposit and the bitcoin amount you sold will be transferred \ to the BTC buyer. -# TODO remove takeOffer.fundsBox.sell.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.sell.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid into a locked deposit address. At the end of a successful trade you will get back your security deposit. takeOffer.fundsBox.tradeAmount=Amount to sell: takeOffer.fundsBox.securityDeposit=Security deposit: -takeOffer.fundsBox.offerFee=Take offerPayload fee: +takeOffer.fundsBox.offerFee=Take offer fee: takeOffer.fundsBox.networkFee=Mining fee: takeOffer.fundsBox.total=Total: # TODO remove takeOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove takeOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove takeOffer.fundsBox.takeOffer=Take offerPayload -takeOffer.fundsBox.takeOfferSpinnerInfo=Take offerPayload in progress ... +# TODO remove takeOffer.fundsBox.takeOffer=Take offer +takeOffer.fundsBox.takeOfferSpinnerInfo=Take offer in progress ... takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.title=Advanced settings @@ -197,12 +197,12 @@ takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove takeOffer.advancedBox.county=Payments account country: -# TODO remove takeOffer.advancedBox.info=These are the offerPayload restrictions your trading partner has defined in his offerPayload. \ +# TODO remove takeOffer.advancedBox.info=These are the offer restrictions your trading partner has defined in his offer. \ Your settings match those constraints and you are able to trade with him. -takeOffer.success.headline=You have successfully taken an offerPayload. +takeOffer.success.headline=You have successfully taken an offer. takeOffer.success.info=You can see the status of your trade at the \"Portfolio\" screen under \"Open trades\". -takeOffer.error.message=An error occurred when taking the offerPayload.\n\n{0} +takeOffer.error.message=An error occurred when taking the offer.\n\n{0} # Payment methods # remove N/A=Not available diff --git a/common/src/main/resources/i18n/in_dev/displayStrings_uz.properties b/common/src/main/resources/i18n/in_dev/displayStrings_uz.properties index 68ff888d49..7bec88c214 100644 --- a/common/src/main/resources/i18n/in_dev/displayStrings_uz.properties +++ b/common/src/main/resources/i18n/in_dev/displayStrings_uz.properties @@ -93,42 +93,42 @@ validation.bankIdNumber={0} must consist of {1} numbers. validation.accountNr=Account number must consist of {0} numbers. validation.accountNrChars=Account number must consist of {0} characters. -# Create offerPayload +# Create offer createOffer.amount.prompt=Enter amount in BTC createOffer.price.prompt=Enter price createOffer.volume.prompt=Enter amount in {0} # TODO remove createOffer.minAmount.prompt=Enter min. amount -# TODO remove createOffer.amountPriceBox.title=Create your offerPayload +# TODO remove createOffer.amountPriceBox.title=Create your offer createOffer.amountPriceBox.amountDescription=Amount of bitcoin to {0} createOffer.amountPriceBox.priceDescriptionFiat=Fixed price per {0} createOffer.amountPriceBox.buy.volumeDescription=Amount in {0} to spend createOffer.amountPriceBox.sell.volumeDescription=Amount in {0} to receive createOffer.amountPriceBox.minAmountDescription=Minimum amount of BTC -# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. -# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. +# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. +# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. # TODO remove createOffer.amountPriceBox.next=Next step # TODO remove createOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. # TODO remove createOffer.amountPriceBox.warning.invalidFiatDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted. # TODO remove createOffer.amountPriceBox.warning.adjustedVolume=The total volume you have entered leads to invalid fractional bitcoin amounts. The amount has been adjusted and a new total volume be calculated from it. -createOffer.amountPriceBox.error.message=An error occurred when placing the offerPayload:\n\n{0} +createOffer.amountPriceBox.error.message=An error occurred when placing the offer:\n\n{0} # TODO remove createOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount. # TODO remove createOffer.validation.minAmountLargerThanAmount=Minimum amount cannot be larger than amount. -createOffer.fundsBox.title=Fund your offerPayload +createOffer.fundsBox.title=Fund your offer createOffer.fundsBox.totalsNeeded=Funds needed: createOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above createOffer.fundsBox.address=Trade wallet address: createOffer.fundsBox.balance=Trade wallet balance: -# TODO remove createOffer.fundsBox.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offerPayload gets executed. If you cancel your offerPayload you can withdraw your funds from that trading wallet. The only payment made when placing an offerPayload is the offerPayload fee payment. https://bisq.io/faq/#6 +# TODO remove createOffer.fundsBox.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offer gets executed. If you cancel your offer you can withdraw your funds from that trading wallet. The only payment made when placing an offer is the offer fee payment. https://bisq.io/faq/#6 createOffer.fundsBox.tradeAmount=Trade amount: createOffer.fundsBox.securityDeposit=Security deposit: -createOffer.fundsBox.offerFee=Create offerPayload fee: +createOffer.fundsBox.offerFee=Create offer fee: createOffer.fundsBox.networkFee=Mining fee: createOffer.fundsBox.total=Total: # TODO remove createOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove createOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove createOffer.fundsBox.placeOffer=Place offerPayload +# TODO remove createOffer.fundsBox.placeOffer=Place offer createOffer.fundsBox.placeOfferSpinnerInfo=Offer publishing is in progress ... createOffer.fundsBox.paymentLabel=bisq trade with ID {0} @@ -139,20 +139,20 @@ createOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove createOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove createOffer.advancedBox.county=Payments account country: -# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offerPayload restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). +# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offer restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). -createOffer.success.headline=Your offerPayload has been published +createOffer.success.headline=Your offer has been published createOffer.success.info=You can manage your open offers in the \"Portfolio\" screen under \"My open offers\". -# TODO remove createOffer.error.message=An error occurred when placing the offerPayload.\n\n{0} +# TODO remove createOffer.error.message=An error occurred when placing the offer.\n\n{0} -# Take offerPayload +# Take offer takeOffer.amount.prompt=Enter amount in BTC # TODO remove takeOffer.price.prompt=Enter price # TODO remove takeOffer.volume.prompt=Enter amount in {0} # TODO remove takeOffer.minAmount.prompt=Enter min. amount -# TODO remove takeOffer.amountPriceBox.title=Take offerPayload +# TODO remove takeOffer.amountPriceBox.title=Take offer # TODO remove takeOffer.amountPriceBox.subTitle=Buy bitcoin takeOffer.amountPriceBox.buy.amountDescription=Amount of bitcoin to sell takeOffer.amountPriceBox.sell.amountDescription=Amount of bitcoin to buy @@ -164,30 +164,30 @@ takeOffer.amountPriceBox.amountRangeDescription=Possible amount range # TODO remove takeOffer.amountPriceBox.sell.info=Enter the amount of bitcoin you want to buy. You can choose an amount between the minimum amount and the amount. # TODO remove takeOffer.amountPriceBox.next=Next step takeOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. -takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offerPayload. -takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offerPayload. +takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offer. +takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offer. takeOffer.validation.amountLargerThanOfferAmountMinusFee=That input amount would create dust change for the BTC seller. takeOffer.fundsBox.title=Fund your trade -takeOffer.fundsBox.isOfferAvailable=Check if offerPayload is available ... +takeOffer.fundsBox.isOfferAvailable=Check if offer is available ... takeOffer.fundsBox.totalsNeeded=Funds needed: # TODO remove takeOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above takeOffer.fundsBox.address=Trade wallet address: takeOffer.fundsBox.balance=Trade wallet balance: -# TODO remove takeOffer.fundsBox.buy.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.buy.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid in to a locked deposit address. At the end of a successful trade you will get back your security deposit and the bitcoin amount you sold will be transferred \ to the BTC buyer. -# TODO remove takeOffer.fundsBox.sell.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.sell.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid into a locked deposit address. At the end of a successful trade you will get back your security deposit. takeOffer.fundsBox.tradeAmount=Amount to sell: takeOffer.fundsBox.securityDeposit=Security deposit: -takeOffer.fundsBox.offerFee=Take offerPayload fee: +takeOffer.fundsBox.offerFee=Take offer fee: takeOffer.fundsBox.networkFee=Mining fee: takeOffer.fundsBox.total=Total: # TODO remove takeOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove takeOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove takeOffer.fundsBox.takeOffer=Take offerPayload -takeOffer.fundsBox.takeOfferSpinnerInfo=Take offerPayload in progress ... +# TODO remove takeOffer.fundsBox.takeOffer=Take offer +takeOffer.fundsBox.takeOfferSpinnerInfo=Take offer in progress ... takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.title=Advanced settings @@ -197,12 +197,12 @@ takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove takeOffer.advancedBox.county=Payments account country: -# TODO remove takeOffer.advancedBox.info=These are the offerPayload restrictions your trading partner has defined in his offerPayload. \ +# TODO remove takeOffer.advancedBox.info=These are the offer restrictions your trading partner has defined in his offer. \ Your settings match those constraints and you are able to trade with him. -takeOffer.success.headline=You have successfully taken an offerPayload. +takeOffer.success.headline=You have successfully taken an offer. takeOffer.success.info=You can see the status of your trade at the \"Portfolio\" screen under \"Open trades\". -takeOffer.error.message=An error occurred when taking the offerPayload.\n\n{0} +takeOffer.error.message=An error occurred when taking the offer.\n\n{0} # Payment methods # remove N/A=Not available diff --git a/common/src/main/resources/i18n/in_dev/displayStrings_vn.properties b/common/src/main/resources/i18n/in_dev/displayStrings_vn.properties index 33fafa18ff..eae51d7850 100644 --- a/common/src/main/resources/i18n/in_dev/displayStrings_vn.properties +++ b/common/src/main/resources/i18n/in_dev/displayStrings_vn.properties @@ -93,42 +93,42 @@ validation.bankIdNumber={0} must consist of {1} numbers. validation.accountNr=Account number must consist of {0} numbers. validation.accountNrChars=Account number must consist of {0} characters. -# Create offerPayload +# Create offer createOffer.amount.prompt=Enter amount in BTC createOffer.price.prompt=Enter price createOffer.volume.prompt=Enter amount in {0} # TODO remove createOffer.minAmount.prompt=Enter min. amount -# TODO remove createOffer.amountPriceBox.title=Create your offerPayload +# TODO remove createOffer.amountPriceBox.title=Create your offer createOffer.amountPriceBox.amountDescription=Amount of bitcoin to {0} createOffer.amountPriceBox.priceDescriptionFiat=Fixed price per {0} createOffer.amountPriceBox.buy.volumeDescription=Amount in {0} to spend createOffer.amountPriceBox.sell.volumeDescription=Amount in {0} to receive createOffer.amountPriceBox.minAmountDescription=Minimum amount of BTC -# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. -# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offerPayload for the remaining amount in the case that a trader takes your offerPayload with a lower amount as defined in the amount field. Your offerPayload will be removed from the offerbook once a trader has taken your offerPayload. +# TODO remove createOffer.amountPriceBox.buy.info=Define a price for which you want to buy bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. +# TODO remove createOffer.amountPriceBox.sell.info=Define a price for which you want to sell bitcoin and either enter the amount or the trade volume. With the minimum amount you can attract more potential traders by giving them more flexibility. But note that there is no automatic creation of a new offer for the remaining amount in the case that a trader takes your offer with a lower amount as defined in the amount field. Your offer will be removed from the offerbook once a trader has taken your offer. # TODO remove createOffer.amountPriceBox.next=Next step # TODO remove createOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. # TODO remove createOffer.amountPriceBox.warning.invalidFiatDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted. # TODO remove createOffer.amountPriceBox.warning.adjustedVolume=The total volume you have entered leads to invalid fractional bitcoin amounts. The amount has been adjusted and a new total volume be calculated from it. -createOffer.amountPriceBox.error.message=An error occurred when placing the offerPayload:\n\n{0} +createOffer.amountPriceBox.error.message=An error occurred when placing the offer:\n\n{0} # TODO remove createOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount. # TODO remove createOffer.validation.minAmountLargerThanAmount=Minimum amount cannot be larger than amount. -createOffer.fundsBox.title=Fund your offerPayload +createOffer.fundsBox.title=Fund your offer createOffer.fundsBox.totalsNeeded=Funds needed: createOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above createOffer.fundsBox.address=Trade wallet address: createOffer.fundsBox.balance=Trade wallet balance: -# TODO remove createOffer.fundsBox.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offerPayload gets executed. If you cancel your offerPayload you can withdraw your funds from that trading wallet. The only payment made when placing an offerPayload is the offerPayload fee payment. https://bisq.io/faq/#6 +# TODO remove createOffer.fundsBox.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. Those funds are reserved and will be used in the case that your offer gets executed. If you cancel your offer you can withdraw your funds from that trading wallet. The only payment made when placing an offer is the offer fee payment. https://bisq.io/faq/#6 createOffer.fundsBox.tradeAmount=Trade amount: createOffer.fundsBox.securityDeposit=Security deposit: -createOffer.fundsBox.offerFee=Create offerPayload fee: +createOffer.fundsBox.offerFee=Create offer fee: createOffer.fundsBox.networkFee=Mining fee: createOffer.fundsBox.total=Total: # TODO remove createOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove createOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove createOffer.fundsBox.placeOffer=Place offerPayload +# TODO remove createOffer.fundsBox.placeOffer=Place offer createOffer.fundsBox.placeOfferSpinnerInfo=Offer publishing is in progress ... createOffer.fundsBox.paymentLabel=bisq trade with ID {0} @@ -139,20 +139,20 @@ createOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove createOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove createOffer.advancedBox.county=Payments account country: -# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offerPayload restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). +# TODO remove createOffer.advancedBox.info=Your trading partners must fulfill your offer restrictions. You can edit the accepted countries, languages and arbitrators in the settings. The payments account details are used from your current selected payments account (if you have multiple payments accounts). -createOffer.success.headline=Your offerPayload has been published +createOffer.success.headline=Your offer has been published createOffer.success.info=You can manage your open offers in the \"Portfolio\" screen under \"My open offers\". -# TODO remove createOffer.error.message=An error occurred when placing the offerPayload.\n\n{0} +# TODO remove createOffer.error.message=An error occurred when placing the offer.\n\n{0} -# Take offerPayload +# Take offer takeOffer.amount.prompt=Enter amount in BTC # TODO remove takeOffer.price.prompt=Enter price # TODO remove takeOffer.volume.prompt=Enter amount in {0} # TODO remove takeOffer.minAmount.prompt=Enter min. amount -# TODO remove takeOffer.amountPriceBox.title=Take offerPayload +# TODO remove takeOffer.amountPriceBox.title=Take offer # TODO remove takeOffer.amountPriceBox.subTitle=Buy bitcoin takeOffer.amountPriceBox.buy.amountDescription=Amount of bitcoin to sell takeOffer.amountPriceBox.sell.amountDescription=Amount of bitcoin to buy @@ -164,30 +164,30 @@ takeOffer.amountPriceBox.amountRangeDescription=Possible amount range # TODO remove takeOffer.amountPriceBox.sell.info=Enter the amount of bitcoin you want to buy. You can choose an amount between the minimum amount and the amount. # TODO remove takeOffer.amountPriceBox.next=Next step takeOffer.amountPriceBox.warning.invalidBtcDecimalPlaces=The amount you have entered exceeds the number of allowed decimal places.\nThe amount has been adjusted to 4 decimal places. -takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offerPayload. -takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offerPayload. +takeOffer.validation.amountSmallerThanMinAmount=Amount cannot be smaller than minimum amount defined in the offer. +takeOffer.validation.amountLargerThanOfferAmount=Input amount cannot be higher than the amount defined in the offer. takeOffer.validation.amountLargerThanOfferAmountMinusFee=That input amount would create dust change for the BTC seller. takeOffer.fundsBox.title=Fund your trade -takeOffer.fundsBox.isOfferAvailable=Check if offerPayload is available ... +takeOffer.fundsBox.isOfferAvailable=Check if offer is available ... takeOffer.fundsBox.totalsNeeded=Funds needed: # TODO remove takeOffer.fundsBox.totalsNeeded.prompt=Will be calculated from the bitcoin amount entered above takeOffer.fundsBox.address=Trade wallet address: takeOffer.fundsBox.balance=Trade wallet balance: -# TODO remove takeOffer.fundsBox.buy.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.buy.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid in to a locked deposit address. At the end of a successful trade you will get back your security deposit and the bitcoin amount you sold will be transferred \ to the BTC buyer. -# TODO remove takeOffer.fundsBox.sell.info=For every offerPayload there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ +# TODO remove takeOffer.fundsBox.sell.info=For every offer there is a dedicated trade wallet. You need to fund that trade wallet with the necessary bitcoin amount. \ Those funds will be paid into a locked deposit address. At the end of a successful trade you will get back your security deposit. takeOffer.fundsBox.tradeAmount=Amount to sell: takeOffer.fundsBox.securityDeposit=Security deposit: -takeOffer.fundsBox.offerFee=Take offerPayload fee: +takeOffer.fundsBox.offerFee=Take offer fee: takeOffer.fundsBox.networkFee=Mining fee: takeOffer.fundsBox.total=Total: # TODO remove takeOffer.fundsBox.showAdvanced=Show advanced settings # TODO remove takeOffer.fundsBox.hideAdvanced=Hide advanced settings -# TODO remove takeOffer.fundsBox.takeOffer=Take offerPayload -takeOffer.fundsBox.takeOfferSpinnerInfo=Take offerPayload in progress ... +# TODO remove takeOffer.fundsBox.takeOffer=Take offer +takeOffer.fundsBox.takeOfferSpinnerInfo=Take offer in progress ... takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.title=Advanced settings @@ -197,12 +197,12 @@ takeOffer.fundsBox.paymentLabel=bisq trade with ID {0} # TODO remove takeOffer.advancedBox.txType=Payments method: shared.currency=Currency: # TODO remove takeOffer.advancedBox.county=Payments account country: -# TODO remove takeOffer.advancedBox.info=These are the offerPayload restrictions your trading partner has defined in his offerPayload. \ +# TODO remove takeOffer.advancedBox.info=These are the offer restrictions your trading partner has defined in his offer. \ Your settings match those constraints and you are able to trade with him. -takeOffer.success.headline=You have successfully taken an offerPayload. +takeOffer.success.headline=You have successfully taken an offer. takeOffer.success.info=You can see the status of your trade at the \"Portfolio\" screen under \"Open trades\". -takeOffer.error.message=An error occurred when taking the offerPayload.\n\n{0} +takeOffer.error.message=An error occurred when taking the offer.\n\n{0} # Payment methods # remove N/A=Not available diff --git a/core/src/main/java/io/bisq/trade/offer/OfferBookService.java b/core/src/main/java/io/bisq/trade/offer/OfferBookService.java index 40f962e2a1..ec6f92f209 100644 --- a/core/src/main/java/io/bisq/trade/offer/OfferBookService.java +++ b/core/src/main/java/io/bisq/trade/offer/OfferBookService.java @@ -88,8 +88,11 @@ public class OfferBookService { @Override public void onRemoved(ProtectedStorageEntry data) { offerBookChangedListeners.stream().forEach(listener -> { - if (data.getStoragePayload() instanceof OfferPayload) - listener.onRemoved(new Offer((OfferPayload) data.getStoragePayload())); + if (data.getStoragePayload() instanceof OfferPayload) { + Offer offer = new Offer((OfferPayload) data.getStoragePayload()); + offer.setPriceFeedService(priceFeedService); + listener.onRemoved(offer); + } }); } }); diff --git a/gui/src/main/java/io/bisq/gui/main/offer/BuyOfferView.fxml b/gui/src/main/java/io/bisq/gui/main/offer/BuyOfferView.fxml index 1f628dd8d3..6e86087311 100644 --- a/gui/src/main/java/io/bisq/gui/main/offer/BuyOfferView.fxml +++ b/gui/src/main/java/io/bisq/gui/main/offer/BuyOfferView.fxml @@ -19,7 +19,7 @@ - diff --git a/gui/src/main/java/io/bisq/gui/main/offer/SellOfferView.fxml b/gui/src/main/java/io/bisq/gui/main/offer/SellOfferView.fxml index 965afaab87..088f40cac5 100644 --- a/gui/src/main/java/io/bisq/gui/main/offer/SellOfferView.fxml +++ b/gui/src/main/java/io/bisq/gui/main/offer/SellOfferView.fxml @@ -19,7 +19,7 @@ - diff --git a/gui/src/main/java/io/bisq/gui/main/offer/createoffer/CreateOfferDataModel.java b/gui/src/main/java/io/bisq/gui/main/offer/createoffer/CreateOfferDataModel.java index b3980e3350..871ba92e53 100644 --- a/gui/src/main/java/io/bisq/gui/main/offer/createoffer/CreateOfferDataModel.java +++ b/gui/src/main/java/io/bisq/gui/main/offer/createoffer/CreateOfferDataModel.java @@ -363,7 +363,9 @@ class CreateOfferDataModel extends ActivatableDataModel { isPrivateOffer, hashOfChallenge, extraDataMap); - return new Offer(offerPayload); + Offer offer = new Offer(offerPayload); + offer.setPriceFeedService(priceFeedService); + return offer; } void onPlaceOffer(Offer offer, TransactionResultHandler resultHandler) { diff --git a/gui/src/main/java/io/bisq/gui/main/offer/createoffer/CreateOfferView.fxml b/gui/src/main/java/io/bisq/gui/main/offer/createoffer/CreateOfferView.fxml index ccfe31fcd5..b0eb56e044 100644 --- a/gui/src/main/java/io/bisq/gui/main/offer/createoffer/CreateOfferView.fxml +++ b/gui/src/main/java/io/bisq/gui/main/offer/createoffer/CreateOfferView.fxml @@ -18,6 +18,6 @@ --> - diff --git a/gui/src/main/java/io/bisq/gui/main/offer/offerbook/OfferBookView.fxml b/gui/src/main/java/io/bisq/gui/main/offer/offerbook/OfferBookView.fxml index a599a0cdb3..63ef4af37b 100644 --- a/gui/src/main/java/io/bisq/gui/main/offer/offerbook/OfferBookView.fxml +++ b/gui/src/main/java/io/bisq/gui/main/offer/offerbook/OfferBookView.fxml @@ -19,7 +19,7 @@ - diff --git a/gui/src/main/java/io/bisq/gui/main/offer/takeoffer/TakeOfferView.fxml b/gui/src/main/java/io/bisq/gui/main/offer/takeoffer/TakeOfferView.fxml index 6e94c5e0c2..894e31dc05 100644 --- a/gui/src/main/java/io/bisq/gui/main/offer/takeoffer/TakeOfferView.fxml +++ b/gui/src/main/java/io/bisq/gui/main/offer/takeoffer/TakeOfferView.fxml @@ -18,7 +18,7 @@ --> - diff --git a/network/src/main/java/io/bisq/locale/CurrencyUtil.java b/network/src/main/java/io/bisq/locale/CurrencyUtil.java index 85fd80a62b..91744dd6b1 100644 --- a/network/src/main/java/io/bisq/locale/CurrencyUtil.java +++ b/network/src/main/java/io/bisq/locale/CurrencyUtil.java @@ -47,7 +47,7 @@ public class CurrencyUtil { } public static List getAllSortedFiatCurrencies(Locale locale) { - if(Objects.isNull(allSortedCryptoCurrencies)) { + if(Objects.isNull(allSortedFiatCurrencies)) { allSortedFiatCurrencies = createAllSortedFiatCurrenciesList(locale); } return allSortedFiatCurrencies; @@ -299,7 +299,7 @@ public class CurrencyUtil { } public static Optional getFiatCurrency(String currencyCode) { - return allSortedFiatCurrencies.stream().filter(e -> e.getCode().equals(currencyCode)).findAny(); + return getAllSortedFiatCurrencies().stream().filter(e -> e.getCode().equals(currencyCode)).findAny(); } @SuppressWarnings("WeakerAccess") diff --git a/network/src/main/java/io/bisq/p2p/protocol/availability/Offer.java b/network/src/main/java/io/bisq/p2p/protocol/availability/Offer.java index f72f6b51d5..d4074c950f 100644 --- a/network/src/main/java/io/bisq/p2p/protocol/availability/Offer.java +++ b/network/src/main/java/io/bisq/p2p/protocol/availability/Offer.java @@ -23,6 +23,7 @@ import org.bitcoinj.utils.ExchangeRate; import org.bitcoinj.utils.Fiat; import javax.annotation.Nullable; +import java.io.Serializable; import java.text.DecimalFormat; import java.util.Date; import java.util.List; @@ -31,7 +32,7 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkNotNull; @Slf4j -public class Offer { +public class Offer implements Serializable { @Getter private OfferPayload offerPayload; diff --git a/network/src/test/java/io/bisq/p2p/storage/P2PDataStorageTest.java b/network/src/test/java/io/bisq/p2p/storage/P2PDataStorageTest.java index 4d88d019ce..f89cf5c06f 100644 --- a/network/src/test/java/io/bisq/p2p/storage/P2PDataStorageTest.java +++ b/network/src/test/java/io/bisq/p2p/storage/P2PDataStorageTest.java @@ -207,7 +207,7 @@ public class P2PDataStorageTest { Lists.newArrayList("BE", "AU"), "bankid", Lists.newArrayList("BANK1", "BANK2"), - null, + "versionNr", 100, 100, 100, diff --git a/package/linux/LICENSE b/package/linux/LICENSE index 5aec298772..dba13ed2dd 100644 --- a/package/linux/LICENSE +++ b/package/linux/LICENSE @@ -25,7 +25,7 @@ want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. Developers that use our General Public Licenses protect your rights -with two steps: (1) assert copyright on the software, and (2) offerPayload +with two steps: (1) assert copyright on the software, and (2) offer you this License which gives you legal permission to copy, distribute and/or modify the software. @@ -191,7 +191,7 @@ keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, -and you may offerPayload support or warranty protection for a fee. +and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. @@ -244,8 +244,8 @@ in one of these ways: b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a - written offerPayload, valid for at least three years and valid for as - long as you offerPayload spare parts or customer support for that product + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical @@ -255,13 +255,13 @@ in one of these ways: Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the - written offerPayload to provide the Corresponding Source. This + written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offerPayload, in accord + only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offerPayload equivalent access to the + place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to @@ -474,7 +474,7 @@ this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to -make, use, sell, offerPayload for sale, import and otherwise run, modify and +make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express @@ -540,7 +540,7 @@ License would be to refrain entirely from conveying the Program. 13. Remote Network Interaction; Use with the GNU General Public License. Notwithstanding any other provision of this License, if you modify the -Program, your modified version must prominently offerPayload all users +Program, your modified version must prominently offer all users interacting with it remotely through a computer network (if your version supports such interaction) an opportunity to receive the Corresponding Source of your version by providing access to the Corresponding Source @@ -651,7 +651,7 @@ Also add information on how to contact you by electronic and paper mail. network, you should also make sure that it provides a way for users to get its source. For example, if your program is a web application, its interface could display a "Source" link that leads users to an archive -of the code. There are many ways you could offerPayload source, and different +of the code. There are many ways you could offer source, and different solutions will be better for different programs; see section 13 for the specific requirements. From d89e8e98d128ff8eca8a05649031f06d0ded95fb Mon Sep 17 00:00:00 2001 From: Mike Rosseel Date: Thu, 16 Mar 2017 16:48:54 +0100 Subject: [PATCH 4/7] move the last messages to the correct module --- .../main/java/io/bisq/alert/AlertManager.java | 2 +- .../bisq/arbitration/ArbitratorManager.java | 2 +- .../CompensationRequestManager.java | 2 +- .../java/io/bisq/filter/FilterManager.java | 2 +- .../io/bisq/trade/offer/OfferBookService.java | 2 +- .../statistics/TradeStatisticsManager.java | 2 +- .../java/io/bisq/gui/main/MainViewModel.java | 2 +- .../getdata/messages/GetDataRequest.java | 2 +- .../getdata/messages/GetDataResponse.java | 6 ++-- .../messages/GetUpdatedDataRequest.java | 2 +- .../messages/PreliminaryGetDataRequest.java | 2 +- .../keepalive/messages/KeepAliveMessage.java | 2 +- .../p2p/peers/keepalive/messages/Ping.java | 2 +- .../p2p/peers/keepalive/messages/Pong.java | 29 +++++++++++++++++++ .../p2p/peers/peerexchange/Peer.java | 2 +- .../messages/GetPeersRequest.java | 4 +-- .../messages/GetPeersResponse.java | 4 +-- .../messages/PeerExchangeMessage.java | 2 +- .../p2p/storage/messages/AddDataMessage.java | 6 ++-- .../storage/messages/BroadcastMessage.java | 2 +- .../storage/messages/RefreshTTLMessage.java | 2 +- .../storage/messages/RemoveDataMessage.java | 4 +-- .../messages/RemoveMailboxDataMessage.java | 4 +-- .../ProtectedMailboxStorageEntry.java | 9 ++---- .../storageentry/ProtectedStorageEntry.java | 2 +- .../java/io/bisq/p2p/network/Connection.java | 14 ++++----- .../p2p/network/ProtoBufferUtilities.java | 28 +++++++++--------- .../io/bisq/p2p/peers/BroadcastHandler.java | 2 +- .../java/io/bisq/p2p/peers/Broadcaster.java | 2 +- .../java/io/bisq/p2p/peers/PeerManager.java | 2 +- .../peers/getdata/GetDataRequestHandler.java | 8 ++--- .../p2p/peers/getdata/RequestDataHandler.java | 10 +++---- .../p2p/peers/getdata/RequestDataManager.java | 4 +-- .../p2p/peers/keepalive/KeepAliveHandler.java | 4 +-- .../p2p/peers/keepalive/KeepAliveManager.java | 4 +-- .../peerexchange/GetPeersRequestHandler.java | 4 +-- .../peerexchange/PeerExchangeHandler.java | 4 +-- .../peerexchange/PeerExchangeManager.java | 3 +- .../p2p/storage/HashMapChangedListener.java | 2 +- .../io/bisq/p2p/storage/P2PDataStorage.java | 6 ++-- .../java/io/bisq/p2p/storage/P2PService.java | 10 +++---- .../bisq/crypto/EncryptionServiceTests.java | 2 +- .../bisq/p2p/storage/P2PDataStorageTest.java | 4 +-- .../p2p/storage/ProtectedDataStorageTest.java | 4 +-- .../storage/messages/AddDataMessageTest.java | 5 ++-- 45 files changed, 125 insertions(+), 97 deletions(-) rename {network/src/main/java/io/bisq => network-messages/src/main/java/io/bisq/messages}/p2p/peers/getdata/messages/GetDataRequest.java (75%) rename {network/src/main/java/io/bisq => network-messages/src/main/java/io/bisq/messages}/p2p/peers/getdata/messages/GetDataResponse.java (93%) rename {network/src/main/java/io/bisq => network-messages/src/main/java/io/bisq/messages}/p2p/peers/getdata/messages/GetUpdatedDataRequest.java (97%) rename {network/src/main/java/io/bisq => network-messages/src/main/java/io/bisq/messages}/p2p/peers/getdata/messages/PreliminaryGetDataRequest.java (97%) rename {network/src/main/java/io/bisq => network-messages/src/main/java/io/bisq/messages}/p2p/peers/keepalive/messages/KeepAliveMessage.java (89%) rename {network/src/main/java/io/bisq => network-messages/src/main/java/io/bisq/messages}/p2p/peers/keepalive/messages/Ping.java (94%) create mode 100644 network-messages/src/main/java/io/bisq/messages/p2p/peers/keepalive/messages/Pong.java rename {network/src/main/java/io/bisq => network-messages/src/main/java/io/bisq/messages}/p2p/peers/peerexchange/Peer.java (97%) rename {network/src/main/java/io/bisq => network-messages/src/main/java/io/bisq/messages}/p2p/peers/peerexchange/messages/GetPeersRequest.java (96%) rename {network/src/main/java/io/bisq => network-messages/src/main/java/io/bisq/messages}/p2p/peers/peerexchange/messages/GetPeersResponse.java (95%) rename {network/src/main/java/io/bisq => network-messages/src/main/java/io/bisq/messages}/p2p/peers/peerexchange/messages/PeerExchangeMessage.java (90%) rename {network/src/main/java/io/bisq => network-messages/src/main/java/io/bisq/messages}/p2p/storage/messages/AddDataMessage.java (91%) rename {network/src/main/java/io/bisq => network-messages/src/main/java/io/bisq/messages}/p2p/storage/messages/BroadcastMessage.java (92%) rename {network/src/main/java/io/bisq => network-messages/src/main/java/io/bisq/messages}/p2p/storage/messages/RefreshTTLMessage.java (97%) rename {network/src/main/java/io/bisq => network-messages/src/main/java/io/bisq/messages}/p2p/storage/messages/RemoveDataMessage.java (93%) rename {network/src/main/java/io/bisq => network-messages/src/main/java/io/bisq/messages}/p2p/storage/messages/RemoveMailboxDataMessage.java (93%) rename {network/src/main/java/io/bisq => network-messages/src/main/java/io/bisq/messages}/p2p/storage/storageentry/ProtectedMailboxStorageEntry.java (93%) rename {network/src/main/java/io/bisq => network-messages/src/main/java/io/bisq/messages}/p2p/storage/storageentry/ProtectedStorageEntry.java (98%) diff --git a/core/src/main/java/io/bisq/alert/AlertManager.java b/core/src/main/java/io/bisq/alert/AlertManager.java index 9da7fdc4d7..d542c9dcc1 100644 --- a/core/src/main/java/io/bisq/alert/AlertManager.java +++ b/core/src/main/java/io/bisq/alert/AlertManager.java @@ -25,7 +25,7 @@ import io.bisq.messages.crypto.KeyRing; import io.bisq.messages.alert.Alert; import io.bisq.p2p.storage.P2PService; import io.bisq.p2p.storage.HashMapChangedListener; -import io.bisq.p2p.storage.storageentry.ProtectedStorageEntry; +import io.bisq.messages.p2p.storage.storageentry.ProtectedStorageEntry; import io.bisq.user.User; import javafx.beans.property.ObjectProperty; import javafx.beans.property.ReadOnlyObjectProperty; diff --git a/core/src/main/java/io/bisq/arbitration/ArbitratorManager.java b/core/src/main/java/io/bisq/arbitration/ArbitratorManager.java index 683399ba2d..1221566168 100644 --- a/core/src/main/java/io/bisq/arbitration/ArbitratorManager.java +++ b/core/src/main/java/io/bisq/arbitration/ArbitratorManager.java @@ -30,7 +30,7 @@ import io.bisq.p2p.BootstrapListener; import io.bisq.messages.NodeAddress; import io.bisq.p2p.storage.P2PService; import io.bisq.p2p.storage.HashMapChangedListener; -import io.bisq.p2p.storage.storageentry.ProtectedStorageEntry; +import io.bisq.messages.p2p.storage.storageentry.ProtectedStorageEntry; import io.bisq.user.User; import javafx.collections.FXCollections; import javafx.collections.ObservableMap; diff --git a/core/src/main/java/io/bisq/dao/compensation/CompensationRequestManager.java b/core/src/main/java/io/bisq/dao/compensation/CompensationRequestManager.java index 4d059cd341..6d0c14e490 100644 --- a/core/src/main/java/io/bisq/dao/compensation/CompensationRequestManager.java +++ b/core/src/main/java/io/bisq/dao/compensation/CompensationRequestManager.java @@ -27,7 +27,7 @@ import io.bisq.messages.dao.compensation.payload.CompensationRequestPayload; import io.bisq.p2p.storage.P2PService; import io.bisq.p2p.storage.HashMapChangedListener; import io.bisq.payload.StoragePayload; -import io.bisq.p2p.storage.storageentry.ProtectedStorageEntry; +import io.bisq.messages.p2p.storage.storageentry.ProtectedStorageEntry; import io.bisq.storage.Storage; import javafx.collections.FXCollections; import javafx.collections.ObservableList; diff --git a/core/src/main/java/io/bisq/filter/FilterManager.java b/core/src/main/java/io/bisq/filter/FilterManager.java index 6c214ab3be..24b0444d65 100644 --- a/core/src/main/java/io/bisq/filter/FilterManager.java +++ b/core/src/main/java/io/bisq/filter/FilterManager.java @@ -27,7 +27,7 @@ import io.bisq.messages.filter.payload.Filter; import io.bisq.messages.filter.payload.PaymentAccountFilter; import io.bisq.p2p.storage.P2PService; import io.bisq.p2p.storage.HashMapChangedListener; -import io.bisq.p2p.storage.storageentry.ProtectedStorageEntry; +import io.bisq.messages.p2p.storage.storageentry.ProtectedStorageEntry; import io.bisq.user.User; import javafx.beans.property.ObjectProperty; import javafx.beans.property.ReadOnlyObjectProperty; diff --git a/core/src/main/java/io/bisq/trade/offer/OfferBookService.java b/core/src/main/java/io/bisq/trade/offer/OfferBookService.java index ec6f92f209..732e463c59 100644 --- a/core/src/main/java/io/bisq/trade/offer/OfferBookService.java +++ b/core/src/main/java/io/bisq/trade/offer/OfferBookService.java @@ -28,7 +28,7 @@ import io.bisq.p2p.BootstrapListener; import io.bisq.p2p.protocol.availability.Offer; import io.bisq.p2p.storage.HashMapChangedListener; import io.bisq.p2p.storage.P2PService; -import io.bisq.p2p.storage.storageentry.ProtectedStorageEntry; +import io.bisq.messages.p2p.storage.storageentry.ProtectedStorageEntry; import io.bisq.provider.price.PriceFeedService; import io.bisq.storage.PlainTextWrapper; import io.bisq.storage.Storage; diff --git a/core/src/main/java/io/bisq/trade/statistics/TradeStatisticsManager.java b/core/src/main/java/io/bisq/trade/statistics/TradeStatisticsManager.java index de7eb159c6..88d65f528a 100644 --- a/core/src/main/java/io/bisq/trade/statistics/TradeStatisticsManager.java +++ b/core/src/main/java/io/bisq/trade/statistics/TradeStatisticsManager.java @@ -10,7 +10,7 @@ import io.bisq.messages.trade.statistics.payload.TradeStatistics; import io.bisq.p2p.storage.P2PService; import io.bisq.p2p.storage.HashMapChangedListener; import io.bisq.payload.StoragePayload; -import io.bisq.p2p.storage.storageentry.ProtectedStorageEntry; +import io.bisq.messages.p2p.storage.storageentry.ProtectedStorageEntry; import io.bisq.storage.PlainTextWrapper; import io.bisq.storage.Storage; import io.bisq.user.Preferences; diff --git a/gui/src/main/java/io/bisq/gui/main/MainViewModel.java b/gui/src/main/java/io/bisq/gui/main/MainViewModel.java index 26c72772df..9064b5f72d 100644 --- a/gui/src/main/java/io/bisq/gui/main/MainViewModel.java +++ b/gui/src/main/java/io/bisq/gui/main/MainViewModel.java @@ -62,7 +62,7 @@ import io.bisq.p2p.P2PServiceListener; import io.bisq.p2p.network.CloseConnectionReason; import io.bisq.p2p.network.Connection; import io.bisq.p2p.network.ConnectionListener; -import io.bisq.p2p.peers.keepalive.messages.Ping; +import io.bisq.messages.p2p.peers.keepalive.messages.Ping; import io.bisq.p2p.storage.P2PService; import io.bisq.payment.CryptoCurrencyAccount; import io.bisq.payment.OKPayAccount; diff --git a/network/src/main/java/io/bisq/p2p/peers/getdata/messages/GetDataRequest.java b/network-messages/src/main/java/io/bisq/messages/p2p/peers/getdata/messages/GetDataRequest.java similarity index 75% rename from network/src/main/java/io/bisq/p2p/peers/getdata/messages/GetDataRequest.java rename to network-messages/src/main/java/io/bisq/messages/p2p/peers/getdata/messages/GetDataRequest.java index 58ff47a90c..0eb1960178 100644 --- a/network/src/main/java/io/bisq/p2p/peers/getdata/messages/GetDataRequest.java +++ b/network-messages/src/main/java/io/bisq/messages/p2p/peers/getdata/messages/GetDataRequest.java @@ -1,4 +1,4 @@ -package io.bisq.p2p.peers.getdata.messages; +package io.bisq.messages.p2p.peers.getdata.messages; import io.bisq.messages.Message; diff --git a/network/src/main/java/io/bisq/p2p/peers/getdata/messages/GetDataResponse.java b/network-messages/src/main/java/io/bisq/messages/p2p/peers/getdata/messages/GetDataResponse.java similarity index 93% rename from network/src/main/java/io/bisq/p2p/peers/getdata/messages/GetDataResponse.java rename to network-messages/src/main/java/io/bisq/messages/p2p/peers/getdata/messages/GetDataResponse.java index 60685356cc..1696b9d139 100644 --- a/network/src/main/java/io/bisq/p2p/peers/getdata/messages/GetDataResponse.java +++ b/network-messages/src/main/java/io/bisq/messages/p2p/peers/getdata/messages/GetDataResponse.java @@ -1,11 +1,11 @@ -package io.bisq.p2p.peers.getdata.messages; +package io.bisq.messages.p2p.peers.getdata.messages; import io.bisq.app.Capabilities; import io.bisq.app.Version; import io.bisq.common.wire.proto.Messages; import io.bisq.messages.p2p.messaging.SupportedCapabilitiesMessage; -import io.bisq.p2p.storage.storageentry.ProtectedMailboxStorageEntry; -import io.bisq.p2p.storage.storageentry.ProtectedStorageEntry; +import io.bisq.messages.p2p.storage.storageentry.ProtectedMailboxStorageEntry; +import io.bisq.messages.p2p.storage.storageentry.ProtectedStorageEntry; import javax.annotation.Nullable; import java.util.ArrayList; diff --git a/network/src/main/java/io/bisq/p2p/peers/getdata/messages/GetUpdatedDataRequest.java b/network-messages/src/main/java/io/bisq/messages/p2p/peers/getdata/messages/GetUpdatedDataRequest.java similarity index 97% rename from network/src/main/java/io/bisq/p2p/peers/getdata/messages/GetUpdatedDataRequest.java rename to network-messages/src/main/java/io/bisq/messages/p2p/peers/getdata/messages/GetUpdatedDataRequest.java index 37a8dc1fba..9dab975951 100644 --- a/network/src/main/java/io/bisq/p2p/peers/getdata/messages/GetUpdatedDataRequest.java +++ b/network-messages/src/main/java/io/bisq/messages/p2p/peers/getdata/messages/GetUpdatedDataRequest.java @@ -1,4 +1,4 @@ -package io.bisq.p2p.peers.getdata.messages; +package io.bisq.messages.p2p.peers.getdata.messages; import com.google.protobuf.ByteString; import io.bisq.app.Version; diff --git a/network/src/main/java/io/bisq/p2p/peers/getdata/messages/PreliminaryGetDataRequest.java b/network-messages/src/main/java/io/bisq/messages/p2p/peers/getdata/messages/PreliminaryGetDataRequest.java similarity index 97% rename from network/src/main/java/io/bisq/p2p/peers/getdata/messages/PreliminaryGetDataRequest.java rename to network-messages/src/main/java/io/bisq/messages/p2p/peers/getdata/messages/PreliminaryGetDataRequest.java index 1daaabc020..4d6f4965ce 100644 --- a/network/src/main/java/io/bisq/p2p/peers/getdata/messages/PreliminaryGetDataRequest.java +++ b/network-messages/src/main/java/io/bisq/messages/p2p/peers/getdata/messages/PreliminaryGetDataRequest.java @@ -1,4 +1,4 @@ -package io.bisq.p2p.peers.getdata.messages; +package io.bisq.messages.p2p.peers.getdata.messages; import com.google.protobuf.ByteString; import io.bisq.app.Capabilities; diff --git a/network/src/main/java/io/bisq/p2p/peers/keepalive/messages/KeepAliveMessage.java b/network-messages/src/main/java/io/bisq/messages/p2p/peers/keepalive/messages/KeepAliveMessage.java similarity index 89% rename from network/src/main/java/io/bisq/p2p/peers/keepalive/messages/KeepAliveMessage.java rename to network-messages/src/main/java/io/bisq/messages/p2p/peers/keepalive/messages/KeepAliveMessage.java index b83597e569..28cf71cad8 100644 --- a/network/src/main/java/io/bisq/p2p/peers/keepalive/messages/KeepAliveMessage.java +++ b/network-messages/src/main/java/io/bisq/messages/p2p/peers/keepalive/messages/KeepAliveMessage.java @@ -1,4 +1,4 @@ -package io.bisq.p2p.peers.keepalive.messages; +package io.bisq.messages.p2p.peers.keepalive.messages; import io.bisq.app.Version; import io.bisq.messages.Message; diff --git a/network/src/main/java/io/bisq/p2p/peers/keepalive/messages/Ping.java b/network-messages/src/main/java/io/bisq/messages/p2p/peers/keepalive/messages/Ping.java similarity index 94% rename from network/src/main/java/io/bisq/p2p/peers/keepalive/messages/Ping.java rename to network-messages/src/main/java/io/bisq/messages/p2p/peers/keepalive/messages/Ping.java index f996999f41..fcbce94559 100644 --- a/network/src/main/java/io/bisq/p2p/peers/keepalive/messages/Ping.java +++ b/network-messages/src/main/java/io/bisq/messages/p2p/peers/keepalive/messages/Ping.java @@ -1,4 +1,4 @@ -package io.bisq.p2p.peers.keepalive.messages; +package io.bisq.messages.p2p.peers.keepalive.messages; import io.bisq.app.Version; import io.bisq.common.wire.proto.Messages; diff --git a/network-messages/src/main/java/io/bisq/messages/p2p/peers/keepalive/messages/Pong.java b/network-messages/src/main/java/io/bisq/messages/p2p/peers/keepalive/messages/Pong.java new file mode 100644 index 0000000000..f22e74ca70 --- /dev/null +++ b/network-messages/src/main/java/io/bisq/messages/p2p/peers/keepalive/messages/Pong.java @@ -0,0 +1,29 @@ +package io.bisq.messages.p2p.peers.keepalive.messages; + +import io.bisq.app.Version; +import io.bisq.common.wire.proto.Messages; +import io.bisq.messages.util.ProtoBufferUtils; + +public final class Pong extends KeepAliveMessage { + // That object is sent over the wire, so we need to take care of version compatibility. + private static final long serialVersionUID = Version.P2P_NETWORK_VERSION; + + public final int requestNonce; + + public Pong(int requestNonce) { + this.requestNonce = requestNonce; + } + + @Override + public String toString() { + return "Pong{" + + "requestNonce=" + requestNonce + + "} " + super.toString(); + } + + @Override + public Messages.Envelope toProtoBuf() { + Messages.Envelope.Builder baseEnvelope = ProtoBufferUtils.getBaseEnvelope(); + return baseEnvelope.setPong(Messages.Pong.newBuilder().setRequestNonce(requestNonce)).build(); + } +} diff --git a/network/src/main/java/io/bisq/p2p/peers/peerexchange/Peer.java b/network-messages/src/main/java/io/bisq/messages/p2p/peers/peerexchange/Peer.java similarity index 97% rename from network/src/main/java/io/bisq/p2p/peers/peerexchange/Peer.java rename to network-messages/src/main/java/io/bisq/messages/p2p/peers/peerexchange/Peer.java index 7423344c25..5a0972d464 100644 --- a/network/src/main/java/io/bisq/p2p/peers/peerexchange/Peer.java +++ b/network-messages/src/main/java/io/bisq/messages/p2p/peers/peerexchange/Peer.java @@ -1,4 +1,4 @@ -package io.bisq.p2p.peers.peerexchange; +package io.bisq.messages.p2p.peers.peerexchange; import io.bisq.app.Version; import io.bisq.common.persistance.Persistable; diff --git a/network/src/main/java/io/bisq/p2p/peers/peerexchange/messages/GetPeersRequest.java b/network-messages/src/main/java/io/bisq/messages/p2p/peers/peerexchange/messages/GetPeersRequest.java similarity index 96% rename from network/src/main/java/io/bisq/p2p/peers/peerexchange/messages/GetPeersRequest.java rename to network-messages/src/main/java/io/bisq/messages/p2p/peers/peerexchange/messages/GetPeersRequest.java index b6a4ea09c5..1a5b691b92 100644 --- a/network/src/main/java/io/bisq/p2p/peers/peerexchange/messages/GetPeersRequest.java +++ b/network-messages/src/main/java/io/bisq/messages/p2p/peers/peerexchange/messages/GetPeersRequest.java @@ -1,4 +1,4 @@ -package io.bisq.p2p.peers.peerexchange.messages; +package io.bisq.messages.p2p.peers.peerexchange.messages; import io.bisq.app.Capabilities; import io.bisq.app.Version; @@ -7,7 +7,7 @@ import io.bisq.messages.NodeAddress; import io.bisq.messages.SendersNodeAddressMessage; import io.bisq.messages.ToProtoBuffer; import io.bisq.messages.p2p.messaging.SupportedCapabilitiesMessage; -import io.bisq.p2p.peers.peerexchange.Peer; +import io.bisq.messages.p2p.peers.peerexchange.Peer; import javax.annotation.Nullable; import java.util.ArrayList; diff --git a/network/src/main/java/io/bisq/p2p/peers/peerexchange/messages/GetPeersResponse.java b/network-messages/src/main/java/io/bisq/messages/p2p/peers/peerexchange/messages/GetPeersResponse.java similarity index 95% rename from network/src/main/java/io/bisq/p2p/peers/peerexchange/messages/GetPeersResponse.java rename to network-messages/src/main/java/io/bisq/messages/p2p/peers/peerexchange/messages/GetPeersResponse.java index 7b25bee64f..275e0ab94a 100644 --- a/network/src/main/java/io/bisq/p2p/peers/peerexchange/messages/GetPeersResponse.java +++ b/network-messages/src/main/java/io/bisq/messages/p2p/peers/peerexchange/messages/GetPeersResponse.java @@ -1,10 +1,10 @@ -package io.bisq.p2p.peers.peerexchange.messages; +package io.bisq.messages.p2p.peers.peerexchange.messages; import io.bisq.app.Capabilities; import io.bisq.app.Version; import io.bisq.common.wire.proto.Messages; import io.bisq.messages.p2p.messaging.SupportedCapabilitiesMessage; -import io.bisq.p2p.peers.peerexchange.Peer; +import io.bisq.messages.p2p.peers.peerexchange.Peer; import javax.annotation.Nullable; import java.util.ArrayList; diff --git a/network/src/main/java/io/bisq/p2p/peers/peerexchange/messages/PeerExchangeMessage.java b/network-messages/src/main/java/io/bisq/messages/p2p/peers/peerexchange/messages/PeerExchangeMessage.java similarity index 90% rename from network/src/main/java/io/bisq/p2p/peers/peerexchange/messages/PeerExchangeMessage.java rename to network-messages/src/main/java/io/bisq/messages/p2p/peers/peerexchange/messages/PeerExchangeMessage.java index 84ab6cba9a..e4efa08adb 100644 --- a/network/src/main/java/io/bisq/p2p/peers/peerexchange/messages/PeerExchangeMessage.java +++ b/network-messages/src/main/java/io/bisq/messages/p2p/peers/peerexchange/messages/PeerExchangeMessage.java @@ -1,4 +1,4 @@ -package io.bisq.p2p.peers.peerexchange.messages; +package io.bisq.messages.p2p.peers.peerexchange.messages; import io.bisq.app.Version; import io.bisq.messages.Message; diff --git a/network/src/main/java/io/bisq/p2p/storage/messages/AddDataMessage.java b/network-messages/src/main/java/io/bisq/messages/p2p/storage/messages/AddDataMessage.java similarity index 91% rename from network/src/main/java/io/bisq/p2p/storage/messages/AddDataMessage.java rename to network-messages/src/main/java/io/bisq/messages/p2p/storage/messages/AddDataMessage.java index 27b601b936..890e879a6a 100644 --- a/network/src/main/java/io/bisq/p2p/storage/messages/AddDataMessage.java +++ b/network-messages/src/main/java/io/bisq/messages/p2p/storage/messages/AddDataMessage.java @@ -1,10 +1,10 @@ -package io.bisq.p2p.storage.messages; +package io.bisq.messages.p2p.storage.messages; import io.bisq.app.Version; import io.bisq.common.wire.proto.Messages; import io.bisq.messages.util.ProtoBufferUtils; -import io.bisq.p2p.storage.storageentry.ProtectedMailboxStorageEntry; -import io.bisq.p2p.storage.storageentry.ProtectedStorageEntry; +import io.bisq.messages.p2p.storage.storageentry.ProtectedMailboxStorageEntry; +import io.bisq.messages.p2p.storage.storageentry.ProtectedStorageEntry; public final class AddDataMessage extends BroadcastMessage { // That object is sent over the wire, so we need to take care of version compatibility. diff --git a/network/src/main/java/io/bisq/p2p/storage/messages/BroadcastMessage.java b/network-messages/src/main/java/io/bisq/messages/p2p/storage/messages/BroadcastMessage.java similarity index 92% rename from network/src/main/java/io/bisq/p2p/storage/messages/BroadcastMessage.java rename to network-messages/src/main/java/io/bisq/messages/p2p/storage/messages/BroadcastMessage.java index 53900b938b..0dce651d39 100644 --- a/network/src/main/java/io/bisq/p2p/storage/messages/BroadcastMessage.java +++ b/network-messages/src/main/java/io/bisq/messages/p2p/storage/messages/BroadcastMessage.java @@ -1,4 +1,4 @@ -package io.bisq.p2p.storage.messages; +package io.bisq.messages.p2p.storage.messages; import io.bisq.app.Version; import io.bisq.messages.Message; diff --git a/network/src/main/java/io/bisq/p2p/storage/messages/RefreshTTLMessage.java b/network-messages/src/main/java/io/bisq/messages/p2p/storage/messages/RefreshTTLMessage.java similarity index 97% rename from network/src/main/java/io/bisq/p2p/storage/messages/RefreshTTLMessage.java rename to network-messages/src/main/java/io/bisq/messages/p2p/storage/messages/RefreshTTLMessage.java index f941203191..e5ffae4c43 100644 --- a/network/src/main/java/io/bisq/p2p/storage/messages/RefreshTTLMessage.java +++ b/network-messages/src/main/java/io/bisq/messages/p2p/storage/messages/RefreshTTLMessage.java @@ -1,4 +1,4 @@ -package io.bisq.p2p.storage.messages; +package io.bisq.messages.p2p.storage.messages; import com.google.protobuf.ByteString; import io.bisq.app.Version; diff --git a/network/src/main/java/io/bisq/p2p/storage/messages/RemoveDataMessage.java b/network-messages/src/main/java/io/bisq/messages/p2p/storage/messages/RemoveDataMessage.java similarity index 93% rename from network/src/main/java/io/bisq/p2p/storage/messages/RemoveDataMessage.java rename to network-messages/src/main/java/io/bisq/messages/p2p/storage/messages/RemoveDataMessage.java index cf9438354a..5ca89eaadd 100644 --- a/network/src/main/java/io/bisq/p2p/storage/messages/RemoveDataMessage.java +++ b/network-messages/src/main/java/io/bisq/messages/p2p/storage/messages/RemoveDataMessage.java @@ -1,9 +1,9 @@ -package io.bisq.p2p.storage.messages; +package io.bisq.messages.p2p.storage.messages; import io.bisq.app.Version; import io.bisq.common.wire.proto.Messages; import io.bisq.messages.util.ProtoBufferUtils; -import io.bisq.p2p.storage.storageentry.ProtectedStorageEntry; +import io.bisq.messages.p2p.storage.storageentry.ProtectedStorageEntry; public final class RemoveDataMessage extends BroadcastMessage { // That object is sent over the wire, so we need to take care of version compatibility. diff --git a/network/src/main/java/io/bisq/p2p/storage/messages/RemoveMailboxDataMessage.java b/network-messages/src/main/java/io/bisq/messages/p2p/storage/messages/RemoveMailboxDataMessage.java similarity index 93% rename from network/src/main/java/io/bisq/p2p/storage/messages/RemoveMailboxDataMessage.java rename to network-messages/src/main/java/io/bisq/messages/p2p/storage/messages/RemoveMailboxDataMessage.java index 765ff6a877..84585e9080 100644 --- a/network/src/main/java/io/bisq/p2p/storage/messages/RemoveMailboxDataMessage.java +++ b/network-messages/src/main/java/io/bisq/messages/p2p/storage/messages/RemoveMailboxDataMessage.java @@ -1,9 +1,9 @@ -package io.bisq.p2p.storage.messages; +package io.bisq.messages.p2p.storage.messages; import io.bisq.app.Version; import io.bisq.common.wire.proto.Messages; import io.bisq.messages.util.ProtoBufferUtils; -import io.bisq.p2p.storage.storageentry.ProtectedMailboxStorageEntry; +import io.bisq.messages.p2p.storage.storageentry.ProtectedMailboxStorageEntry; public final class RemoveMailboxDataMessage extends BroadcastMessage { // That object is sent over the wire, so we need to take care of version compatibility. diff --git a/network/src/main/java/io/bisq/p2p/storage/storageentry/ProtectedMailboxStorageEntry.java b/network-messages/src/main/java/io/bisq/messages/p2p/storage/storageentry/ProtectedMailboxStorageEntry.java similarity index 93% rename from network/src/main/java/io/bisq/p2p/storage/storageentry/ProtectedMailboxStorageEntry.java rename to network-messages/src/main/java/io/bisq/messages/p2p/storage/storageentry/ProtectedMailboxStorageEntry.java index 7e9353a20f..3e0eeb7cbc 100644 --- a/network/src/main/java/io/bisq/p2p/storage/storageentry/ProtectedMailboxStorageEntry.java +++ b/network-messages/src/main/java/io/bisq/messages/p2p/storage/storageentry/ProtectedMailboxStorageEntry.java @@ -1,13 +1,11 @@ -package io.bisq.p2p.storage.storageentry; +package io.bisq.messages.p2p.storage.storageentry; import com.google.protobuf.ByteString; import io.bisq.app.Version; import io.bisq.common.crypto.Sig; import io.bisq.common.wire.proto.Messages; -import io.bisq.p2p.storage.P2PDataStorage; import io.bisq.payload.MailboxStoragePayload; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; +import lombok.extern.slf4j.Slf4j; import java.io.IOException; import java.security.KeyFactory; @@ -17,12 +15,11 @@ import java.security.PublicKey; import java.security.spec.InvalidKeySpecException; import java.security.spec.X509EncodedKeySpec; +@Slf4j public class ProtectedMailboxStorageEntry extends ProtectedStorageEntry { // That object is sent over the wire, so we need to take care of version compatibility. private static final long serialVersionUID = Version.P2P_NETWORK_VERSION; - private static final Logger log = LoggerFactory.getLogger(P2PDataStorage.class); - public transient PublicKey receiversPubKey; private final byte[] receiversPubKeyBytes; diff --git a/network/src/main/java/io/bisq/p2p/storage/storageentry/ProtectedStorageEntry.java b/network-messages/src/main/java/io/bisq/messages/p2p/storage/storageentry/ProtectedStorageEntry.java similarity index 98% rename from network/src/main/java/io/bisq/p2p/storage/storageentry/ProtectedStorageEntry.java rename to network-messages/src/main/java/io/bisq/messages/p2p/storage/storageentry/ProtectedStorageEntry.java index e448b3d189..e253e9a3e6 100644 --- a/network/src/main/java/io/bisq/p2p/storage/storageentry/ProtectedStorageEntry.java +++ b/network-messages/src/main/java/io/bisq/messages/p2p/storage/storageentry/ProtectedStorageEntry.java @@ -1,4 +1,4 @@ -package io.bisq.p2p.storage.storageentry; +package io.bisq.messages.p2p.storage.storageentry; import com.google.common.annotations.VisibleForTesting; import com.google.protobuf.ByteString; diff --git a/network/src/main/java/io/bisq/p2p/network/Connection.java b/network/src/main/java/io/bisq/p2p/network/Connection.java index c03948758d..c360ec8741 100644 --- a/network/src/main/java/io/bisq/p2p/network/Connection.java +++ b/network/src/main/java/io/bisq/p2p/network/Connection.java @@ -16,13 +16,13 @@ import io.bisq.messages.SendersNodeAddressMessage; import io.bisq.messages.p2p.messaging.PrefixedSealedAndSignedMessage; import io.bisq.messages.p2p.messaging.SupportedCapabilitiesMessage; import io.bisq.p2p.peers.BanList; -import io.bisq.p2p.peers.getdata.messages.GetDataRequest; -import io.bisq.p2p.peers.getdata.messages.GetDataResponse; -import io.bisq.p2p.peers.keepalive.messages.KeepAliveMessage; -import io.bisq.p2p.peers.keepalive.messages.Ping; -import io.bisq.p2p.peers.keepalive.messages.Pong; -import io.bisq.p2p.storage.messages.AddDataMessage; -import io.bisq.p2p.storage.messages.RefreshTTLMessage; +import io.bisq.messages.p2p.peers.getdata.messages.GetDataRequest; +import io.bisq.messages.p2p.peers.getdata.messages.GetDataResponse; +import io.bisq.messages.p2p.peers.keepalive.messages.KeepAliveMessage; +import io.bisq.messages.p2p.peers.keepalive.messages.Ping; +import io.bisq.messages.p2p.peers.keepalive.messages.Pong; +import io.bisq.messages.p2p.storage.messages.AddDataMessage; +import io.bisq.messages.p2p.storage.messages.RefreshTTLMessage; import io.bisq.payload.CapabilityRequiringPayload; import io.bisq.payload.StoragePayload; import javafx.beans.property.ObjectProperty; diff --git a/network/src/main/java/io/bisq/p2p/network/ProtoBufferUtilities.java b/network/src/main/java/io/bisq/p2p/network/ProtoBufferUtilities.java index 8eab4def1e..9559cb5bb2 100644 --- a/network/src/main/java/io/bisq/p2p/network/ProtoBufferUtilities.java +++ b/network/src/main/java/io/bisq/p2p/network/ProtoBufferUtilities.java @@ -26,20 +26,20 @@ import io.bisq.messages.trade.offer.payload.OfferPayload; import io.bisq.messages.trade.payload.Contract; import io.bisq.messages.trade.protocol.trade.messages.*; import io.bisq.messages.trade.statistics.payload.TradeStatistics; -import io.bisq.p2p.peers.getdata.messages.GetDataResponse; -import io.bisq.p2p.peers.getdata.messages.GetUpdatedDataRequest; -import io.bisq.p2p.peers.getdata.messages.PreliminaryGetDataRequest; -import io.bisq.p2p.peers.keepalive.messages.Ping; -import io.bisq.p2p.peers.keepalive.messages.Pong; -import io.bisq.p2p.peers.peerexchange.Peer; -import io.bisq.p2p.peers.peerexchange.messages.GetPeersRequest; -import io.bisq.p2p.peers.peerexchange.messages.GetPeersResponse; -import io.bisq.p2p.storage.messages.AddDataMessage; -import io.bisq.p2p.storage.messages.RefreshTTLMessage; -import io.bisq.p2p.storage.messages.RemoveDataMessage; -import io.bisq.p2p.storage.messages.RemoveMailboxDataMessage; -import io.bisq.p2p.storage.storageentry.ProtectedMailboxStorageEntry; -import io.bisq.p2p.storage.storageentry.ProtectedStorageEntry; +import io.bisq.messages.p2p.peers.getdata.messages.GetDataResponse; +import io.bisq.messages.p2p.peers.getdata.messages.GetUpdatedDataRequest; +import io.bisq.messages.p2p.peers.getdata.messages.PreliminaryGetDataRequest; +import io.bisq.messages.p2p.peers.keepalive.messages.Ping; +import io.bisq.messages.p2p.peers.keepalive.messages.Pong; +import io.bisq.messages.p2p.peers.peerexchange.Peer; +import io.bisq.messages.p2p.peers.peerexchange.messages.GetPeersRequest; +import io.bisq.messages.p2p.peers.peerexchange.messages.GetPeersResponse; +import io.bisq.messages.p2p.storage.messages.AddDataMessage; +import io.bisq.messages.p2p.storage.messages.RefreshTTLMessage; +import io.bisq.messages.p2p.storage.messages.RemoveDataMessage; +import io.bisq.messages.p2p.storage.messages.RemoveMailboxDataMessage; +import io.bisq.messages.p2p.storage.storageentry.ProtectedMailboxStorageEntry; +import io.bisq.messages.p2p.storage.storageentry.ProtectedStorageEntry; import io.bisq.payload.MailboxStoragePayload; import io.bisq.payload.StoragePayload; import io.bisq.user.Preferences; diff --git a/network/src/main/java/io/bisq/p2p/peers/BroadcastHandler.java b/network/src/main/java/io/bisq/p2p/peers/BroadcastHandler.java index ba4830d32c..0f0ee53c8b 100644 --- a/network/src/main/java/io/bisq/p2p/peers/BroadcastHandler.java +++ b/network/src/main/java/io/bisq/p2p/peers/BroadcastHandler.java @@ -10,7 +10,7 @@ import io.bisq.common.util.Utilities; import io.bisq.messages.NodeAddress; import io.bisq.p2p.network.Connection; import io.bisq.p2p.network.NetworkNode; -import io.bisq.p2p.storage.messages.BroadcastMessage; +import io.bisq.messages.p2p.storage.messages.BroadcastMessage; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import org.slf4j.Logger; diff --git a/network/src/main/java/io/bisq/p2p/peers/Broadcaster.java b/network/src/main/java/io/bisq/p2p/peers/Broadcaster.java index 896ce38d3c..e6bd2b75a7 100644 --- a/network/src/main/java/io/bisq/p2p/peers/Broadcaster.java +++ b/network/src/main/java/io/bisq/p2p/peers/Broadcaster.java @@ -4,7 +4,7 @@ import io.bisq.app.Log; import io.bisq.common.util.Utilities; import io.bisq.messages.NodeAddress; import io.bisq.p2p.network.NetworkNode; -import io.bisq.p2p.storage.messages.BroadcastMessage; +import io.bisq.messages.p2p.storage.messages.BroadcastMessage; import org.jetbrains.annotations.Nullable; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/network/src/main/java/io/bisq/p2p/peers/PeerManager.java b/network/src/main/java/io/bisq/p2p/peers/PeerManager.java index 75ef07d99d..a673e6fbe7 100644 --- a/network/src/main/java/io/bisq/p2p/peers/PeerManager.java +++ b/network/src/main/java/io/bisq/p2p/peers/PeerManager.java @@ -6,7 +6,7 @@ import io.bisq.common.Timer; import io.bisq.common.UserThread; import io.bisq.messages.NodeAddress; import io.bisq.p2p.network.*; -import io.bisq.p2p.peers.peerexchange.Peer; +import io.bisq.messages.p2p.peers.peerexchange.Peer; import io.bisq.storage.Storage; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/network/src/main/java/io/bisq/p2p/peers/getdata/GetDataRequestHandler.java b/network/src/main/java/io/bisq/p2p/peers/getdata/GetDataRequestHandler.java index fb64996934..77f8e09409 100644 --- a/network/src/main/java/io/bisq/p2p/peers/getdata/GetDataRequestHandler.java +++ b/network/src/main/java/io/bisq/p2p/peers/getdata/GetDataRequestHandler.java @@ -10,13 +10,13 @@ import io.bisq.common.util.Utilities; import io.bisq.p2p.network.CloseConnectionReason; import io.bisq.p2p.network.Connection; import io.bisq.p2p.network.NetworkNode; -import io.bisq.p2p.peers.getdata.messages.GetDataRequest; -import io.bisq.p2p.peers.getdata.messages.GetDataResponse; -import io.bisq.p2p.peers.getdata.messages.GetUpdatedDataRequest; +import io.bisq.messages.p2p.peers.getdata.messages.GetDataRequest; +import io.bisq.messages.p2p.peers.getdata.messages.GetDataResponse; +import io.bisq.messages.p2p.peers.getdata.messages.GetUpdatedDataRequest; import io.bisq.p2p.storage.P2PDataStorage; import io.bisq.payload.CapabilityRequiringPayload; import io.bisq.payload.StoragePayload; -import io.bisq.p2p.storage.storageentry.ProtectedStorageEntry; +import io.bisq.messages.p2p.storage.storageentry.ProtectedStorageEntry; import org.jetbrains.annotations.NotNull; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/network/src/main/java/io/bisq/p2p/peers/getdata/RequestDataHandler.java b/network/src/main/java/io/bisq/p2p/peers/getdata/RequestDataHandler.java index 88a7dfb532..8d4789a08e 100644 --- a/network/src/main/java/io/bisq/p2p/peers/getdata/RequestDataHandler.java +++ b/network/src/main/java/io/bisq/p2p/peers/getdata/RequestDataHandler.java @@ -13,15 +13,15 @@ import io.bisq.p2p.network.Connection; import io.bisq.p2p.network.MessageListener; import io.bisq.p2p.network.NetworkNode; import io.bisq.p2p.peers.PeerManager; -import io.bisq.p2p.peers.getdata.messages.GetDataRequest; -import io.bisq.p2p.peers.getdata.messages.GetDataResponse; -import io.bisq.p2p.peers.getdata.messages.GetUpdatedDataRequest; -import io.bisq.p2p.peers.getdata.messages.PreliminaryGetDataRequest; +import io.bisq.messages.p2p.peers.getdata.messages.GetDataRequest; +import io.bisq.messages.p2p.peers.getdata.messages.GetDataResponse; +import io.bisq.messages.p2p.peers.getdata.messages.GetUpdatedDataRequest; +import io.bisq.messages.p2p.peers.getdata.messages.PreliminaryGetDataRequest; import io.bisq.p2p.storage.P2PDataStorage; import io.bisq.payload.LazyProcessedStoragePayload; import io.bisq.payload.PersistedStoragePayload; import io.bisq.payload.StoragePayload; -import io.bisq.p2p.storage.storageentry.ProtectedStorageEntry; +import io.bisq.messages.p2p.storage.storageentry.ProtectedStorageEntry; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import org.slf4j.Logger; diff --git a/network/src/main/java/io/bisq/p2p/peers/getdata/RequestDataManager.java b/network/src/main/java/io/bisq/p2p/peers/getdata/RequestDataManager.java index cc4fed995d..f0681a4cfe 100644 --- a/network/src/main/java/io/bisq/p2p/peers/getdata/RequestDataManager.java +++ b/network/src/main/java/io/bisq/p2p/peers/getdata/RequestDataManager.java @@ -7,8 +7,8 @@ import io.bisq.messages.Message; import io.bisq.messages.NodeAddress; import io.bisq.p2p.network.*; import io.bisq.p2p.peers.PeerManager; -import io.bisq.p2p.peers.getdata.messages.GetDataRequest; -import io.bisq.p2p.peers.peerexchange.Peer; +import io.bisq.messages.p2p.peers.getdata.messages.GetDataRequest; +import io.bisq.messages.p2p.peers.peerexchange.Peer; import io.bisq.p2p.storage.P2PDataStorage; import org.jetbrains.annotations.Nullable; import org.slf4j.Logger; diff --git a/network/src/main/java/io/bisq/p2p/peers/keepalive/KeepAliveHandler.java b/network/src/main/java/io/bisq/p2p/peers/keepalive/KeepAliveHandler.java index c605ca58e4..7e6987655c 100644 --- a/network/src/main/java/io/bisq/p2p/peers/keepalive/KeepAliveHandler.java +++ b/network/src/main/java/io/bisq/p2p/peers/keepalive/KeepAliveHandler.java @@ -11,8 +11,8 @@ import io.bisq.p2p.network.Connection; import io.bisq.p2p.network.MessageListener; import io.bisq.p2p.network.NetworkNode; import io.bisq.p2p.peers.PeerManager; -import io.bisq.p2p.peers.keepalive.messages.Ping; -import io.bisq.p2p.peers.keepalive.messages.Pong; +import io.bisq.messages.p2p.peers.keepalive.messages.Ping; +import io.bisq.messages.p2p.peers.keepalive.messages.Pong; import org.jetbrains.annotations.NotNull; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/network/src/main/java/io/bisq/p2p/peers/keepalive/KeepAliveManager.java b/network/src/main/java/io/bisq/p2p/peers/keepalive/KeepAliveManager.java index b2734c944c..c16cacdde2 100644 --- a/network/src/main/java/io/bisq/p2p/peers/keepalive/KeepAliveManager.java +++ b/network/src/main/java/io/bisq/p2p/peers/keepalive/KeepAliveManager.java @@ -9,8 +9,8 @@ import io.bisq.common.UserThread; import io.bisq.messages.Message; import io.bisq.p2p.network.*; import io.bisq.p2p.peers.PeerManager; -import io.bisq.p2p.peers.keepalive.messages.Ping; -import io.bisq.p2p.peers.keepalive.messages.Pong; +import io.bisq.messages.p2p.peers.keepalive.messages.Ping; +import io.bisq.messages.p2p.peers.keepalive.messages.Pong; import org.jetbrains.annotations.NotNull; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/network/src/main/java/io/bisq/p2p/peers/peerexchange/GetPeersRequestHandler.java b/network/src/main/java/io/bisq/p2p/peers/peerexchange/GetPeersRequestHandler.java index 422f2e0bee..597231acd0 100644 --- a/network/src/main/java/io/bisq/p2p/peers/peerexchange/GetPeersRequestHandler.java +++ b/network/src/main/java/io/bisq/p2p/peers/peerexchange/GetPeersRequestHandler.java @@ -10,8 +10,8 @@ import io.bisq.p2p.network.CloseConnectionReason; import io.bisq.p2p.network.Connection; import io.bisq.p2p.network.NetworkNode; import io.bisq.p2p.peers.PeerManager; -import io.bisq.p2p.peers.peerexchange.messages.GetPeersRequest; -import io.bisq.p2p.peers.peerexchange.messages.GetPeersResponse; +import io.bisq.messages.p2p.peers.peerexchange.messages.GetPeersRequest; +import io.bisq.messages.p2p.peers.peerexchange.messages.GetPeersResponse; import org.jetbrains.annotations.NotNull; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/network/src/main/java/io/bisq/p2p/peers/peerexchange/PeerExchangeHandler.java b/network/src/main/java/io/bisq/p2p/peers/peerexchange/PeerExchangeHandler.java index 5628a97179..6b85bcaf60 100644 --- a/network/src/main/java/io/bisq/p2p/peers/peerexchange/PeerExchangeHandler.java +++ b/network/src/main/java/io/bisq/p2p/peers/peerexchange/PeerExchangeHandler.java @@ -13,8 +13,8 @@ import io.bisq.p2p.network.Connection; import io.bisq.p2p.network.MessageListener; import io.bisq.p2p.network.NetworkNode; import io.bisq.p2p.peers.PeerManager; -import io.bisq.p2p.peers.peerexchange.messages.GetPeersRequest; -import io.bisq.p2p.peers.peerexchange.messages.GetPeersResponse; +import io.bisq.messages.p2p.peers.peerexchange.messages.GetPeersRequest; +import io.bisq.messages.p2p.peers.peerexchange.messages.GetPeersResponse; import org.jetbrains.annotations.NotNull; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/network/src/main/java/io/bisq/p2p/peers/peerexchange/PeerExchangeManager.java b/network/src/main/java/io/bisq/p2p/peers/peerexchange/PeerExchangeManager.java index 9e2a9d4b61..eaa3272707 100644 --- a/network/src/main/java/io/bisq/p2p/peers/peerexchange/PeerExchangeManager.java +++ b/network/src/main/java/io/bisq/p2p/peers/peerexchange/PeerExchangeManager.java @@ -6,9 +6,10 @@ import io.bisq.common.Timer; import io.bisq.common.UserThread; import io.bisq.messages.Message; import io.bisq.messages.NodeAddress; +import io.bisq.messages.p2p.peers.peerexchange.Peer; import io.bisq.p2p.network.*; import io.bisq.p2p.peers.PeerManager; -import io.bisq.p2p.peers.peerexchange.messages.GetPeersRequest; +import io.bisq.messages.p2p.peers.peerexchange.messages.GetPeersRequest; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/network/src/main/java/io/bisq/p2p/storage/HashMapChangedListener.java b/network/src/main/java/io/bisq/p2p/storage/HashMapChangedListener.java index 4b5905131c..e939556221 100644 --- a/network/src/main/java/io/bisq/p2p/storage/HashMapChangedListener.java +++ b/network/src/main/java/io/bisq/p2p/storage/HashMapChangedListener.java @@ -1,6 +1,6 @@ package io.bisq.p2p.storage; -import io.bisq.p2p.storage.storageentry.ProtectedStorageEntry; +import io.bisq.messages.p2p.storage.storageentry.ProtectedStorageEntry; public interface HashMapChangedListener { void onAdded(ProtectedStorageEntry data); diff --git a/network/src/main/java/io/bisq/p2p/storage/P2PDataStorage.java b/network/src/main/java/io/bisq/p2p/storage/P2PDataStorage.java index 544a20e796..50d6b740c5 100644 --- a/network/src/main/java/io/bisq/p2p/storage/P2PDataStorage.java +++ b/network/src/main/java/io/bisq/p2p/storage/P2PDataStorage.java @@ -18,9 +18,9 @@ import io.bisq.messages.crypto.Hash; import io.bisq.p2p.network.*; import io.bisq.p2p.peers.BroadcastHandler; import io.bisq.p2p.peers.Broadcaster; -import io.bisq.p2p.storage.messages.*; -import io.bisq.p2p.storage.storageentry.ProtectedMailboxStorageEntry; -import io.bisq.p2p.storage.storageentry.ProtectedStorageEntry; +import io.bisq.messages.p2p.storage.messages.*; +import io.bisq.messages.p2p.storage.storageentry.ProtectedMailboxStorageEntry; +import io.bisq.messages.p2p.storage.storageentry.ProtectedStorageEntry; import io.bisq.payload.*; import io.bisq.storage.FileUtil; import io.bisq.storage.ResourceNotFoundException; diff --git a/network/src/main/java/io/bisq/p2p/storage/P2PService.java b/network/src/main/java/io/bisq/p2p/storage/P2PService.java index f99a963462..ea595e04dc 100644 --- a/network/src/main/java/io/bisq/p2p/storage/P2PService.java +++ b/network/src/main/java/io/bisq/p2p/storage/P2PService.java @@ -32,11 +32,11 @@ import io.bisq.p2p.peers.getdata.RequestDataManager; import io.bisq.p2p.peers.keepalive.KeepAliveManager; import io.bisq.p2p.peers.peerexchange.PeerExchangeManager; import io.bisq.p2p.seed.SeedNodesRepository; -import io.bisq.p2p.storage.messages.AddDataMessage; -import io.bisq.p2p.storage.messages.BroadcastMessage; -import io.bisq.p2p.storage.messages.RefreshTTLMessage; -import io.bisq.p2p.storage.storageentry.ProtectedMailboxStorageEntry; -import io.bisq.p2p.storage.storageentry.ProtectedStorageEntry; +import io.bisq.messages.p2p.storage.messages.AddDataMessage; +import io.bisq.messages.p2p.storage.messages.BroadcastMessage; +import io.bisq.messages.p2p.storage.messages.RefreshTTLMessage; +import io.bisq.messages.p2p.storage.storageentry.ProtectedMailboxStorageEntry; +import io.bisq.messages.p2p.storage.storageentry.ProtectedStorageEntry; import io.bisq.payload.MailboxStoragePayload; import io.bisq.payload.StoragePayload; import io.bisq.storage.FileUtil; diff --git a/network/src/test/java/io/bisq/crypto/EncryptionServiceTests.java b/network/src/test/java/io/bisq/crypto/EncryptionServiceTests.java index 1358a4d7e3..f24603887d 100644 --- a/network/src/test/java/io/bisq/crypto/EncryptionServiceTests.java +++ b/network/src/test/java/io/bisq/crypto/EncryptionServiceTests.java @@ -27,7 +27,7 @@ import io.bisq.messages.NodeAddress; import io.bisq.messages.crypto.*; import io.bisq.messages.p2p.messaging.MailboxMessage; import io.bisq.messages.p2p.messaging.PrefixedSealedAndSignedMessage; -import io.bisq.p2p.peers.keepalive.messages.Ping; +import io.bisq.messages.p2p.peers.keepalive.messages.Ping; import io.bisq.storage.FileUtil; import org.bouncycastle.jce.provider.BouncyCastleProvider; import org.junit.After; diff --git a/network/src/test/java/io/bisq/p2p/storage/P2PDataStorageTest.java b/network/src/test/java/io/bisq/p2p/storage/P2PDataStorageTest.java index f89cf5c06f..60fdfaf6b8 100644 --- a/network/src/test/java/io/bisq/p2p/storage/P2PDataStorageTest.java +++ b/network/src/test/java/io/bisq/p2p/storage/P2PDataStorageTest.java @@ -19,9 +19,9 @@ import io.bisq.p2p.network.NetworkNode; import io.bisq.p2p.network.ProtoBufferUtilities; import io.bisq.p2p.peers.Broadcaster; import io.bisq.p2p.storage.mocks.MockData; -import io.bisq.p2p.storage.storageentry.ProtectedStorageEntry; -import io.bisq.payload.StoragePayload; import io.bisq.storage.FileUtil; +import io.bisq.messages.p2p.storage.storageentry.ProtectedStorageEntry; +import io.bisq.payload.StoragePayload; import lombok.extern.slf4j.Slf4j; import mockit.Mocked; import mockit.integration.junit4.JMockit; diff --git a/network/src/test/java/io/bisq/p2p/storage/ProtectedDataStorageTest.java b/network/src/test/java/io/bisq/p2p/storage/ProtectedDataStorageTest.java index 825e3f5970..40c947a305 100644 --- a/network/src/test/java/io/bisq/p2p/storage/ProtectedDataStorageTest.java +++ b/network/src/test/java/io/bisq/p2p/storage/ProtectedDataStorageTest.java @@ -11,10 +11,10 @@ import io.bisq.messages.crypto.KeyStorage; import io.bisq.p2p.TestUtils; import io.bisq.p2p.network.NetworkNode; import io.bisq.p2p.peers.PeerManager; -import io.bisq.p2p.storage.messages.RefreshTTLMessage; +import io.bisq.messages.p2p.storage.messages.RefreshTTLMessage; import io.bisq.p2p.storage.mocks.MockData; -import io.bisq.p2p.storage.storageentry.ProtectedStorageEntry; import io.bisq.storage.FileUtil; +import io.bisq.messages.p2p.storage.storageentry.ProtectedStorageEntry; import org.bouncycastle.jce.provider.BouncyCastleProvider; import org.junit.*; import org.slf4j.Logger; diff --git a/network/src/test/java/io/bisq/p2p/storage/messages/AddDataMessageTest.java b/network/src/test/java/io/bisq/p2p/storage/messages/AddDataMessageTest.java index 2aea05872b..5c1280c91b 100644 --- a/network/src/test/java/io/bisq/p2p/storage/messages/AddDataMessageTest.java +++ b/network/src/test/java/io/bisq/p2p/storage/messages/AddDataMessageTest.java @@ -7,9 +7,10 @@ import io.bisq.messages.crypto.KeyRing; import io.bisq.messages.crypto.KeyStorage; import io.bisq.messages.crypto.SealedAndSigned; import io.bisq.messages.p2p.messaging.PrefixedSealedAndSignedMessage; +import io.bisq.messages.p2p.storage.messages.AddDataMessage; import io.bisq.p2p.network.ProtoBufferUtilities; -import io.bisq.p2p.storage.storageentry.ProtectedMailboxStorageEntry; -import io.bisq.p2p.storage.storageentry.ProtectedStorageEntry; +import io.bisq.messages.p2p.storage.storageentry.ProtectedMailboxStorageEntry; +import io.bisq.messages.p2p.storage.storageentry.ProtectedStorageEntry; import io.bisq.payload.MailboxStoragePayload; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.RandomUtils; From bd65f274aa51e811c4ec95af387c5218365a7e77 Mon Sep 17 00:00:00 2001 From: Mike Rosseel Date: Thu, 16 Mar 2017 16:50:53 +0100 Subject: [PATCH 5/7] move the last messages to the correct module --- .../p2p/peers/keepalive/messages/Pong.java | 29 ------------------- 1 file changed, 29 deletions(-) delete mode 100644 network/src/main/java/io/bisq/p2p/peers/keepalive/messages/Pong.java diff --git a/network/src/main/java/io/bisq/p2p/peers/keepalive/messages/Pong.java b/network/src/main/java/io/bisq/p2p/peers/keepalive/messages/Pong.java deleted file mode 100644 index b7eca3117b..0000000000 --- a/network/src/main/java/io/bisq/p2p/peers/keepalive/messages/Pong.java +++ /dev/null @@ -1,29 +0,0 @@ -package io.bisq.p2p.peers.keepalive.messages; - -import io.bisq.app.Version; -import io.bisq.common.wire.proto.Messages; -import io.bisq.messages.util.ProtoBufferUtils; - -public final class Pong extends KeepAliveMessage { - // That object is sent over the wire, so we need to take care of version compatibility. - private static final long serialVersionUID = Version.P2P_NETWORK_VERSION; - - public final int requestNonce; - - public Pong(int requestNonce) { - this.requestNonce = requestNonce; - } - - @Override - public String toString() { - return "Pong{" + - "requestNonce=" + requestNonce + - "} " + super.toString(); - } - - @Override - public Messages.Envelope toProtoBuf() { - Messages.Envelope.Builder baseEnvelope = ProtoBufferUtils.getBaseEnvelope(); - return baseEnvelope.setPong(Messages.Pong.newBuilder().setRequestNonce(requestNonce)).build(); - } -} From 4a56abbf0b5ef8527bb509ec342fa0e6bc40ab38 Mon Sep 17 00:00:00 2001 From: Mike Rosseel Date: Thu, 16 Mar 2017 16:57:20 +0100 Subject: [PATCH 6/7] renamed package name to conform to module --- common/src/main/java/io/bisq/app/DevEnv.java | 2 +- .../main/java/io/bisq/alert/AlertManager.java | 6 +- .../alert/PrivateNotificationManager.java | 16 ++-- .../main/java/io/bisq/app/BisqExecutable.java | 8 +- .../bisq/arbitration/ArbitratorManager.java | 8 +- .../bisq/arbitration/ArbitratorService.java | 4 +- .../io/bisq/arbitration/DisputeManager.java | 18 ++--- .../main/java/io/bisq/btc/BitcoinModule.java | 4 +- .../bisq/btc/data/InputsAndChangeOutput.java | 2 +- .../PreparedDepositTxAndOffererInputs.java | 2 +- .../io/bisq/btc/wallet/BsqWalletService.java | 2 +- .../io/bisq/btc/wallet/BtcWalletService.java | 2 +- .../bisq/btc/wallet/TradeWalletService.java | 2 +- .../java/io/bisq/btc/wallet/WalletsSetup.java | 4 +- core/src/main/java/io/bisq/dao/DaoModule.java | 2 +- .../blockchain/BsqBlockchainRpcService.java | 2 +- .../dao/compensation/CompensationRequest.java | 2 +- .../CompensationRequestManager.java | 6 +- .../java/io/bisq/dao/vote/VotingManager.java | 2 +- .../java/io/bisq/filter/FilterManager.java | 8 +- .../java/io/bisq/payment/AliPayAccount.java | 6 +- .../io/bisq/payment/CashDepositAccount.java | 6 +- .../io/bisq/payment/ChaseQuickPayAccount.java | 6 +- .../io/bisq/payment/ClearXchangeAccount.java | 6 +- .../payment/CountryBasedPaymentAccount.java | 4 +- .../bisq/payment/CryptoCurrencyAccount.java | 6 +- .../bisq/payment/FasterPaymentsAccount.java | 6 +- .../bisq/payment/InteracETransferAccount.java | 6 +- .../io/bisq/payment/NationalBankAccount.java | 8 +- .../java/io/bisq/payment/OKPayAccount.java | 6 +- .../java/io/bisq/payment/PaymentAccount.java | 4 +- .../bisq/payment/PaymentAccountFactory.java | 2 +- .../io/bisq/payment/PaymentAccountUtil.java | 2 +- .../io/bisq/payment/PerfectMoneyAccount.java | 6 +- .../java/io/bisq/payment/SameBankAccount.java | 8 +- .../java/io/bisq/payment/SepaAccount.java | 6 +- .../io/bisq/payment/SpecificBanksAccount.java | 6 +- .../java/io/bisq/payment/SwishAccount.java | 6 +- .../payment/USPostalMoneyOrderAccount.java | 6 +- .../io/bisq/trade/BuyerAsOffererTrade.java | 4 +- .../java/io/bisq/trade/BuyerAsTakerTrade.java | 2 +- .../main/java/io/bisq/trade/BuyerTrade.java | 2 +- .../main/java/io/bisq/trade/OffererTrade.java | 4 +- .../io/bisq/trade/SellerAsOffererTrade.java | 4 +- .../io/bisq/trade/SellerAsTakerTrade.java | 2 +- .../main/java/io/bisq/trade/SellerTrade.java | 2 +- core/src/main/java/io/bisq/trade/Trade.java | 10 +-- .../main/java/io/bisq/trade/TradeManager.java | 24 +++--- .../trade/closed/ClosedTradableManager.java | 2 +- .../trade/failed/FailedTradesManager.java | 2 +- .../io/bisq/trade/offer/OfferBookService.java | 4 +- .../io/bisq/trade/offer/OfferForJson.java | 4 +- .../io/bisq/trade/offer/OpenOfferManager.java | 26 +++---- .../tasks/BroadcastCreateOfferFeeTx.java | 2 +- .../placeoffer/tasks/CreateOfferFeeTx.java | 4 +- .../trade/ArbitrationSelectionRule.java | 4 +- .../trade/BuyerAsOffererProtocol.java | 16 ++-- .../protocol/trade/BuyerAsTakerProtocol.java | 12 +-- .../trade/protocol/trade/OffererProtocol.java | 4 +- .../trade/protocol/trade/ProcessModel.java | 14 ++-- .../trade/SellerAsOffererProtocol.java | 18 ++--- .../protocol/trade/SellerAsTakerProtocol.java | 14 ++-- .../trade/protocol/trade/TradeProtocol.java | 14 ++-- .../trade/protocol/trade/TradingPeer.java | 6 +- .../trade/protocol/trade/tasks/TradeTask.java | 4 +- ...ffererCreatesAndSignsDepositTxAsBuyer.java | 2 +- .../buyer/ProcessFinalizePayoutTxRequest.java | 4 +- .../buyer/SendFiatTransferStartedMessage.java | 4 +- .../buyer/SendPayoutTxFinalizedMessage.java | 4 +- .../TakerSignAndPublishDepositTxAsBuyer.java | 4 +- .../tasks/offerer/CreateAndSignContract.java | 6 +- .../ProcessDepositTxPublishedMessage.java | 4 +- .../offerer/ProcessPayDepositRequest.java | 12 +-- .../tasks/offerer/PublishTradeStatistics.java | 2 +- .../offerer/SendPublishDepositTxRequest.java | 4 +- ...fererCreatesAndSignsDepositTxAsSeller.java | 2 +- .../ProcessFiatTransferStartedMessage.java | 6 +- .../ProcessPayoutTxFinalizedMessage.java | 4 +- .../seller/SendFinalizePayoutTxRequest.java | 4 +- .../SignAndPublishDepositTxAsSeller.java | 4 +- .../tasks/taker/CreateTakeOfferFeeTx.java | 4 +- .../taker/ProcessPublishDepositTxRequest.java | 10 +-- .../tasks/taker/PublishTradeStatistics.java | 2 +- .../taker/SendDepositTxPublishedMessage.java | 4 +- .../tasks/taker/SendPayDepositRequest.java | 4 +- .../tasks/taker/VerifyAndSignContract.java | 6 +- .../statistics/TradeStatisticsForJson.java | 4 +- .../statistics/TradeStatisticsManager.java | 6 +- core/src/main/java/io/bisq/user/User.java | 10 +-- .../java/io/bisq/btc/RestrictionsTest.java | 2 +- .../main/java/io/bisq/app/BisqAppModule.java | 4 +- .../io/bisq/gui/components/PeerInfoIcon.java | 1 - .../components/paymentmethods/AliPayForm.java | 4 +- .../components/paymentmethods/BankForm.java | 4 +- .../paymentmethods/CashDepositForm.java | 4 +- .../paymentmethods/ChaseQuickPayForm.java | 4 +- .../paymentmethods/ClearXchangeForm.java | 4 +- .../paymentmethods/CryptoCurrencyForm.java | 4 +- .../paymentmethods/FasterPaymentsForm.java | 4 +- .../paymentmethods/InteracETransferForm.java | 4 +- .../paymentmethods/NationalBankForm.java | 2 +- .../components/paymentmethods/OKPayForm.java | 4 +- .../paymentmethods/PaymentMethodForm.java | 2 +- .../paymentmethods/PerfectMoneyForm.java | 4 +- .../paymentmethods/SameBankForm.java | 2 +- .../components/paymentmethods/SepaForm.java | 4 +- .../paymentmethods/SpecificBankForm.java | 4 +- .../components/paymentmethods/SwishForm.java | 4 +- .../USPostalMoneyOrderForm.java | 4 +- .../java/io/bisq/gui/main/MainViewModel.java | 16 ++-- .../ArbitratorRegistrationView.java | 2 +- .../ArbitratorRegistrationViewModel.java | 6 +- .../AltCoinAccountsDataModel.java | 2 +- .../altcoinaccounts/AltCoinAccountsView.java | 2 +- .../ArbitratorListItem.java | 2 +- .../ArbitratorSelectionViewModel.java | 6 +- .../fiataccounts/FiatAccountsDataModel.java | 2 +- .../fiataccounts/FiatAccountsView.java | 2 +- .../CompensationRequestDisplay.java | 2 +- .../active/FundCompensationRequestWindow.java | 2 +- .../create/CreateCompensationRequestView.java | 6 +- .../dao/voting/vote/CompensationViewItem.java | 2 +- .../bisq/gui/main/disputes/DisputesView.java | 6 +- .../arbitrator/ArbitratorDisputeView.java | 2 +- .../disputes/trader/TraderDisputeView.java | 14 ++-- .../market/offerbook/OfferBookChartView.java | 2 +- .../offerbook/OfferBookChartViewModel.java | 2 +- .../main/market/spread/SpreadViewModel.java | 2 +- .../main/market/trades/TradesChartsView.java | 2 +- .../market/trades/TradesChartsViewModel.java | 2 +- .../io/bisq/gui/main/offer/OfferView.java | 2 +- .../createoffer/CreateOfferDataModel.java | 10 +-- .../offer/createoffer/CreateOfferView.java | 2 +- .../createoffer/CreateOfferViewModel.java | 4 +- .../gui/main/offer/offerbook/OfferBook.java | 2 +- .../main/offer/offerbook/OfferBookView.java | 4 +- .../offer/offerbook/OfferBookViewModel.java | 6 +- .../offer/takeoffer/TakeOfferDataModel.java | 6 +- .../main/offer/takeoffer/TakeOfferView.java | 2 +- .../offer/takeoffer/TakeOfferViewModel.java | 8 +- .../main/overlays/windows/ContractWindow.java | 10 +-- .../windows/DisplayAlertMessageWindow.java | 2 +- .../windows/DisputeSummaryWindow.java | 6 +- .../overlays/windows/EmptyWalletWindow.java | 2 +- .../main/overlays/windows/FilterWindow.java | 4 +- .../overlays/windows/OfferDetailsWindow.java | 6 +- .../windows/SendAlertMessageWindow.java | 2 +- .../SendPrivateNotificationWindow.java | 8 +- .../overlays/windows/TradeDetailsWindow.java | 4 +- .../closedtrades/ClosedTradesDataModel.java | 2 +- .../closedtrades/ClosedTradesView.java | 2 +- .../failedtrades/FailedTradesDataModel.java | 2 +- .../openoffer/OpenOffersDataModel.java | 2 +- .../pendingtrades/PendingTradesDataModel.java | 10 +-- .../pendingtrades/PendingTradesViewModel.java | 4 +- .../pendingtrades/steps/TradeStepView.java | 2 +- .../steps/buyer/BuyerStep2View.java | 10 +-- .../steps/buyer/BuyerStep5View.java | 2 +- .../steps/seller/SellerStep3View.java | 4 +- .../java/io/bisq/gui/util/BSFormatter.java | 4 +- .../validation/SecurityDepositValidator.java | 2 +- .../trades/TradesChartsViewModelTest.java | 4 +- .../offerbook/OfferBookViewModelTest.java | 12 +-- .../java/io/bisq/headless/HeadlessModule.java | 4 +- .../jsocks/protocol/ProxyMessage.java | 2 +- .../server/UserPasswordAuthenticator.java | 2 +- .../tor/control/TorControlConnection.java | 8 +- .../src/main/java/io/nucleo/net/Node.java | 2 +- .../java/io/bisq/monitor/MonitorModule.java | 4 +- .../io/bisq/messages/AnonymousMessage.java | 6 -- .../network_messages/AnonymousMessage.java | 4 + .../CloseConnectionMessage.java | 2 +- .../DecryptedDirectMessageListener.java | 2 +- .../DecryptedMsgWithPubKey.java | 2 +- .../Message.java | 2 +- .../NodeAddress.java | 8 +- .../SendersNodeAddressMessage.java | 2 +- .../ToProtoBuffer.java | 2 +- .../alert/Alert.java | 4 +- .../alert/PrivateNotification.java | 4 +- .../alert/PrivateNotificationMessage.java | 8 +- .../arbitration/Arbitrator.java | 8 +- .../arbitration/Dispute.java | 8 +- .../DisputeCommunicationMessage.java | 8 +- .../arbitration/DisputeList.java | 2 +- .../arbitration/DisputeMessage.java | 4 +- .../arbitration/DisputeResult.java | 4 +- .../arbitration/DisputeResultMessage.java | 6 +- .../arbitration/OpenNewDisputeMessage.java | 6 +- .../arbitration/PeerOpenedDisputeMessage.java | 6 +- .../PeerPublishedPayoutTxMessage.java | 6 +- .../arbitration/payload/Attachment.java | 4 +- .../availability/AvailabilityResult.java | 2 +- .../OfferAvailabilityRequest.java | 6 +- .../OfferAvailabilityResponse.java | 6 +- .../availability/OfferMessage.java | 4 +- .../btc/BitcoinNetwork.java | 2 +- .../btc/BtcOptionKeys.java | 2 +- .../btc/Restrictions.java | 2 +- .../btc/UserAgent.java | 2 +- .../btc/data/RawTransactionInput.java | 4 +- .../crypto/DecryptedDataTuple.java | 4 +- .../crypto/Encryption.java | 6 +- .../crypto/Hash.java | 4 +- .../crypto/KeyRing.java | 2 +- .../crypto/KeyStorage.java | 2 +- .../crypto/PubKeyRing.java | 4 +- .../crypto/SealedAndSigned.java | 4 +- .../dao/blockchain/RpcOptionKeys.java | 2 +- .../payload/CompensationRequestPayload.java | 8 +- .../filter/payload/Filter.java | 4 +- .../filter/payload/PaymentAccountFilter.java | 2 +- .../messaging/DecryptedMailboxListener.java | 6 +- .../p2p/messaging/DirectMessage.java | 4 +- .../p2p/messaging/MailboxMessage.java | 4 +- .../PrefixedSealedAndSignedMessage.java | 8 +- .../messaging/SendDirectMessageListener.java | 2 +- .../messaging/SendMailboxMessageListener.java | 2 +- .../SupportedCapabilitiesMessage.java | 4 +- .../getdata/messages/GetDataRequest.java | 4 +- .../getdata/messages/GetDataResponse.java | 8 +- .../messages/GetUpdatedDataRequest.java | 6 +- .../messages/PreliminaryGetDataRequest.java | 8 +- .../keepalive/messages/KeepAliveMessage.java | 4 +- .../p2p/peers/keepalive/messages/Ping.java | 4 +- .../p2p/peers/keepalive/messages/Pong.java | 4 +- .../p2p/peers/peerexchange/Peer.java | 6 +- .../messages/GetPeersRequest.java | 12 +-- .../messages/GetPeersResponse.java | 6 +- .../messages/PeerExchangeMessage.java | 4 +- .../p2p/storage/messages/AddDataMessage.java | 8 +- .../storage/messages/BroadcastMessage.java | 4 +- .../storage/messages/RefreshTTLMessage.java | 4 +- .../storage/messages/RemoveDataMessage.java | 6 +- .../messages/RemoveMailboxDataMessage.java | 6 +- .../ProtectedMailboxStorageEntry.java | 4 +- .../storageentry/ProtectedStorageEntry.java | 6 +- .../payload/CapabilityRequiringPayload.java | 4 +- .../payload/ExpirablePayload.java | 4 +- .../payload/LazyProcessedStoragePayload.java | 2 +- .../payload/MailboxStoragePayload.java | 6 +- .../payload/PersistedStoragePayload.java | 2 +- .../payload/RequiresOwnerIsOnlinePayload.java | 8 +- .../payload/StoragePayload.java | 2 +- .../payment/PaymentMethod.java | 2 +- .../payload/AliPayAccountContractData.java | 2 +- .../payload/BankAccountContractData.java | 2 +- .../CashDepositAccountContractData.java | 2 +- .../ChaseQuickPayAccountContractData.java | 2 +- .../ClearXchangeAccountContractData.java | 2 +- ...ountryBasedPaymentAccountContractData.java | 2 +- .../CryptoCurrencyAccountContractData.java | 2 +- .../FasterPaymentsAccountContractData.java | 2 +- .../InteracETransferAccountContractData.java | 2 +- .../NationalBankAccountContractData.java | 2 +- .../payload/OKPayAccountContractData.java | 2 +- .../payload/PaymentAccountContractData.java | 4 +- .../PerfectMoneyAccountContractData.java | 2 +- .../payload/SameBankAccountContractData.java | 2 +- .../payload/SepaAccountContractData.java | 2 +- .../SpecificBanksAccountContractData.java | 2 +- .../payload/SwishAccountContractData.java | 2 +- ...USPostalMoneyOrderAccountContractData.java | 2 +- .../protocol/trade/TradeMessage.java | 4 +- .../MarketPriceNotAvailableException.java | 2 +- .../TradePriceOutOfToleranceException.java | 2 +- .../trade/offer/payload/OfferPayload.java | 14 ++-- .../trade/payload/Contract.java | 12 +-- .../messages/DepositTxPublishedMessage.java | 10 +-- .../messages/FiatTransferStartedMessage.java | 10 +-- .../messages/FinalizePayoutTxRequest.java | 10 +-- .../trade/messages/PayDepositRequest.java | 16 ++-- .../messages/PayoutTxFinalizedMessage.java | 10 +-- .../messages/PublishDepositTxRequest.java | 10 +-- .../statistics/payload/TradeStatistics.java | 12 +-- .../util/ProtoBufferUtils.java | 2 +- .../util/Validator.java | 4 +- .../wire/Payload.java | 4 +- .../java/io/bisq/crypto/EncryptionTest.java | 4 +- .../src/test/java/io/bisq/crypto/SigTest.java | 4 +- .../java/io/bisq/app/BisqEnvironment.java | 10 +-- .../io/bisq/crypto/EncryptionService.java | 8 +- .../io/bisq/network/Socks5DnsDiscovery.java | 2 +- .../java/io/bisq/p2p/network/Connection.java | 52 ++++++------- .../p2p/network/LocalhostNetworkNode.java | 2 +- .../io/bisq/p2p/network/MessageListener.java | 2 +- .../java/io/bisq/p2p/network/NetworkNode.java | 4 +- .../bisq/p2p/network/OutboundConnection.java | 2 +- .../p2p/network/ProtoBufferUtilities.java | 78 +++++++++---------- .../java/io/bisq/p2p/network/Statistic.java | 2 +- .../io/bisq/p2p/network/TorNetworkNode.java | 2 +- .../main/java/io/bisq/p2p/peers/BanList.java | 2 +- .../io/bisq/p2p/peers/BroadcastHandler.java | 4 +- .../java/io/bisq/p2p/peers/Broadcaster.java | 4 +- .../java/io/bisq/p2p/peers/PeerManager.java | 4 +- .../peers/getdata/GetDataRequestHandler.java | 12 +-- .../p2p/peers/getdata/RequestDataHandler.java | 20 ++--- .../p2p/peers/getdata/RequestDataManager.java | 8 +- .../p2p/peers/keepalive/KeepAliveHandler.java | 6 +- .../p2p/peers/keepalive/KeepAliveManager.java | 6 +- .../peerexchange/GetPeersRequestHandler.java | 4 +- .../peerexchange/PeerExchangeHandler.java | 8 +- .../peerexchange/PeerExchangeManager.java | 8 +- .../bisq/p2p/protocol/availability/Offer.java | 14 ++-- .../availability/OfferAvailabilityModel.java | 6 +- .../OfferAvailabilityProtocol.java | 12 +-- .../io/bisq/p2p/seed/SeedNodesRepository.java | 2 +- .../p2p/storage/HashMapChangedListener.java | 2 +- .../io/bisq/p2p/storage/P2PDataStorage.java | 21 ++--- .../java/io/bisq/p2p/storage/P2PService.java | 36 ++++----- .../ProcessOfferAvailabilityResponse.java | 6 +- .../tasks/SendOfferAvailabilityRequest.java | 6 +- .../main/java/io/bisq/user/Preferences.java | 6 +- .../bisq/crypto/EncryptionServiceTests.java | 14 ++-- .../io/bisq/messages/alert/AlertTest.java | 1 + .../payload/OKPayAccountContractDataTest.java | 1 + .../test/java/io/bisq/p2p/DummySeedNode.java | 2 +- .../java/io/bisq/p2p/PeerServiceTest.java | 2 +- .../src/test/java/io/bisq/p2p/TestUtils.java | 4 +- .../io/bisq/p2p/mocks/MockMailboxPayload.java | 6 +- .../java/io/bisq/p2p/mocks/MockPayload.java | 4 +- .../bisq/p2p/network/NetworkStressTest.java | 70 ++++++++--------- .../p2p/network/ProtoBufferUtilitiesTest.java | 2 +- .../bisq/p2p/network/TorNetworkNodeTest.java | 2 +- .../io/bisq/p2p/routing/PeerManagerTest.java | 2 +- .../bisq/p2p/storage/P2PDataStorageTest.java | 16 ++-- .../p2p/storage/ProtectedDataStorageTest.java | 12 +-- .../storage/messages/AddDataMessageTest.java | 18 ++--- .../io/bisq/p2p/storage/mocks/MockData.java | 2 +- .../java/io/bisq/seednode/SeedNodeModule.java | 4 +- .../io/bisq/statistics/StatisticsModule.java | 4 +- 331 files changed, 947 insertions(+), 947 deletions(-) delete mode 100644 network-messages/src/main/java/io/bisq/messages/AnonymousMessage.java create mode 100644 network-messages/src/main/java/io/bisq/network_messages/AnonymousMessage.java rename network-messages/src/main/java/io/bisq/{messages => network_messages}/CloseConnectionMessage.java (97%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/DecryptedDirectMessageListener.java (82%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/DecryptedMsgWithPubKey.java (98%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/Message.java (85%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/NodeAddress.java (92%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/SendersNodeAddressMessage.java (75%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/ToProtoBuffer.java (80%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/alert/Alert.java (98%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/alert/PrivateNotification.java (98%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/alert/PrivateNotificationMessage.java (93%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/arbitration/Arbitrator.java (97%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/arbitration/Dispute.java (98%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/arbitration/DisputeCommunicationMessage.java (97%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/arbitration/DisputeList.java (98%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/arbitration/DisputeMessage.java (92%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/arbitration/DisputeResult.java (99%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/arbitration/DisputeResultMessage.java (94%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/arbitration/OpenNewDisputeMessage.java (94%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/arbitration/PeerOpenedDisputeMessage.java (94%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/arbitration/PeerPublishedPayoutTxMessage.java (95%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/arbitration/payload/Attachment.java (94%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/availability/AvailabilityResult.java (79%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/availability/OfferAvailabilityRequest.java (93%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/availability/OfferAvailabilityResponse.java (93%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/availability/OfferMessage.java (93%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/btc/BitcoinNetwork.java (97%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/btc/BtcOptionKeys.java (89%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/btc/Restrictions.java (97%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/btc/UserAgent.java (97%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/btc/data/RawTransactionInput.java (96%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/crypto/DecryptedDataTuple.java (95%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/crypto/Encryption.java (98%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/crypto/Hash.java (96%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/crypto/KeyRing.java (98%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/crypto/KeyStorage.java (99%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/crypto/PubKeyRing.java (98%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/crypto/SealedAndSigned.java (98%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/dao/blockchain/RpcOptionKeys.java (87%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/dao/compensation/payload/CompensationRequestPayload.java (98%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/filter/payload/Filter.java (98%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/filter/payload/PaymentAccountFilter.java (96%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/p2p/messaging/DecryptedMailboxListener.java (51%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/p2p/messaging/DirectMessage.java (89%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/p2p/messaging/MailboxMessage.java (89%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/p2p/messaging/PrefixedSealedAndSignedMessage.java (92%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/p2p/messaging/SendDirectMessageListener.java (65%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/p2p/messaging/SendMailboxMessageListener.java (74%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/p2p/messaging/SupportedCapabilitiesMessage.java (68%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/p2p/peers/getdata/messages/GetDataRequest.java (56%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/p2p/peers/getdata/messages/GetDataResponse.java (90%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/p2p/peers/getdata/messages/GetUpdatedDataRequest.java (93%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/p2p/peers/getdata/messages/PreliminaryGetDataRequest.java (90%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/p2p/peers/keepalive/messages/KeepAliveMessage.java (81%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/p2p/peers/keepalive/messages/Ping.java (89%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/p2p/peers/keepalive/messages/Pong.java (87%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/p2p/peers/peerexchange/Peer.java (92%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/p2p/peers/peerexchange/messages/GetPeersRequest.java (89%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/p2p/peers/peerexchange/messages/GetPeersResponse.java (91%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/p2p/peers/peerexchange/messages/PeerExchangeMessage.java (82%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/p2p/storage/messages/AddDataMessage.java (88%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/p2p/storage/messages/BroadcastMessage.java (84%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/p2p/storage/messages/RefreshTTLMessage.java (95%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/p2p/storage/messages/RemoveDataMessage.java (89%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/p2p/storage/messages/RemoveMailboxDataMessage.java (89%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/p2p/storage/storageentry/ProtectedMailboxStorageEntry.java (96%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/p2p/storage/storageentry/ProtectedStorageEntry.java (96%) rename network-messages/src/main/java/io/bisq/{ => network_messages}/payload/CapabilityRequiringPayload.java (85%) rename network-messages/src/main/java/io/bisq/{ => network_messages}/payload/ExpirablePayload.java (75%) rename network-messages/src/main/java/io/bisq/{ => network_messages}/payload/LazyProcessedStoragePayload.java (83%) rename network-messages/src/main/java/io/bisq/{ => network_messages}/payload/MailboxStoragePayload.java (96%) rename network-messages/src/main/java/io/bisq/{ => network_messages}/payload/PersistedStoragePayload.java (79%) rename network-messages/src/main/java/io/bisq/{ => network_messages}/payload/RequiresOwnerIsOnlinePayload.java (65%) rename network-messages/src/main/java/io/bisq/{ => network_messages}/payload/StoragePayload.java (94%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/payment/PaymentMethod.java (99%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/payment/payload/AliPayAccountContractData.java (98%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/payment/payload/BankAccountContractData.java (98%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/payment/payload/CashDepositAccountContractData.java (99%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/payment/payload/ChaseQuickPayAccountContractData.java (98%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/payment/payload/ClearXchangeAccountContractData.java (98%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/payment/payload/CountryBasedPaymentAccountContractData.java (98%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/payment/payload/CryptoCurrencyAccountContractData.java (98%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/payment/payload/FasterPaymentsAccountContractData.java (98%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/payment/payload/InteracETransferAccountContractData.java (98%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/payment/payload/NationalBankAccountContractData.java (98%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/payment/payload/OKPayAccountContractData.java (97%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/payment/payload/PaymentAccountContractData.java (97%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/payment/payload/PerfectMoneyAccountContractData.java (98%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/payment/payload/SameBankAccountContractData.java (98%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/payment/payload/SepaAccountContractData.java (98%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/payment/payload/SpecificBanksAccountContractData.java (98%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/payment/payload/SwishAccountContractData.java (98%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/payment/payload/USPostalMoneyOrderAccountContractData.java (98%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/protocol/trade/TradeMessage.java (94%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/trade/exceptions/MarketPriceNotAvailableException.java (75%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/trade/exceptions/TradePriceOutOfToleranceException.java (76%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/trade/offer/payload/OfferPayload.java (97%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/trade/payload/Contract.java (97%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/trade/protocol/trade/messages/DepositTxPublishedMessage.java (92%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/trade/protocol/trade/messages/FiatTransferStartedMessage.java (92%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/trade/protocol/trade/messages/FinalizePayoutTxRequest.java (94%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/trade/protocol/trade/messages/PayDepositRequest.java (95%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/trade/protocol/trade/messages/PayoutTxFinalizedMessage.java (92%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/trade/protocol/trade/messages/PublishDepositTxRequest.java (93%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/trade/statistics/payload/TradeStatistics.java (95%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/util/ProtoBufferUtils.java (89%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/util/Validator.java (94%) rename network-messages/src/main/java/io/bisq/{messages => network_messages}/wire/Payload.java (72%) diff --git a/common/src/main/java/io/bisq/app/DevEnv.java b/common/src/main/java/io/bisq/app/DevEnv.java index ae9c3c395c..43e489397e 100644 --- a/common/src/main/java/io/bisq/app/DevEnv.java +++ b/common/src/main/java/io/bisq/app/DevEnv.java @@ -8,7 +8,7 @@ public class DevEnv { // The UI got set the private dev key so the developer does not need to do anything and can test those features. // Features: Arbitration registration (alt+R at account), Alert/Update (alt+m), private message to a // peer (click user icon and alt+r), filter/block offers by various data like offer ID (cmd + f). - // The user can set a program argument to ignore all of those privileged messages. They are intended for + // The user can set a program argument to ignore all of those privileged network_messages. They are intended for // emergency cases only (beside update message and arbitrator registration). public static final boolean USE_DEV_PRIVILEGE_KEYS = true; public static final String DEV_PRIVILEGE_PUB_KEY = "027a381b5333a56e1cc3d90d3a7d07f26509adf7029ed06fc997c656621f8da1ee"; diff --git a/core/src/main/java/io/bisq/alert/AlertManager.java b/core/src/main/java/io/bisq/alert/AlertManager.java index d542c9dcc1..c551389bbe 100644 --- a/core/src/main/java/io/bisq/alert/AlertManager.java +++ b/core/src/main/java/io/bisq/alert/AlertManager.java @@ -21,11 +21,11 @@ import com.google.inject.Inject; import com.google.inject.name.Named; import io.bisq.app.AppOptionKeys; import io.bisq.app.DevEnv; -import io.bisq.messages.crypto.KeyRing; -import io.bisq.messages.alert.Alert; +import io.bisq.network_messages.crypto.KeyRing; +import io.bisq.network_messages.alert.Alert; import io.bisq.p2p.storage.P2PService; import io.bisq.p2p.storage.HashMapChangedListener; -import io.bisq.messages.p2p.storage.storageentry.ProtectedStorageEntry; +import io.bisq.network_messages.p2p.storage.storageentry.ProtectedStorageEntry; import io.bisq.user.User; import javafx.beans.property.ObjectProperty; import javafx.beans.property.ReadOnlyObjectProperty; diff --git a/core/src/main/java/io/bisq/alert/PrivateNotificationManager.java b/core/src/main/java/io/bisq/alert/PrivateNotificationManager.java index 4800939c80..b871c50476 100644 --- a/core/src/main/java/io/bisq/alert/PrivateNotificationManager.java +++ b/core/src/main/java/io/bisq/alert/PrivateNotificationManager.java @@ -21,15 +21,15 @@ import com.google.inject.Inject; import com.google.inject.name.Named; import io.bisq.app.AppOptionKeys; import io.bisq.app.DevEnv; -import io.bisq.messages.crypto.KeyRing; -import io.bisq.messages.crypto.PubKeyRing; -import io.bisq.messages.DecryptedMsgWithPubKey; -import io.bisq.messages.Message; -import io.bisq.messages.alert.PrivateNotification; -import io.bisq.messages.alert.PrivateNotificationMessage; -import io.bisq.messages.NodeAddress; +import io.bisq.network_messages.crypto.KeyRing; +import io.bisq.network_messages.crypto.PubKeyRing; +import io.bisq.network_messages.DecryptedMsgWithPubKey; +import io.bisq.network_messages.Message; +import io.bisq.network_messages.alert.PrivateNotification; +import io.bisq.network_messages.alert.PrivateNotificationMessage; +import io.bisq.network_messages.NodeAddress; import io.bisq.p2p.storage.P2PService; -import io.bisq.messages.p2p.messaging.SendMailboxMessageListener; +import io.bisq.network_messages.p2p.messaging.SendMailboxMessageListener; import javafx.beans.property.ObjectProperty; import javafx.beans.property.ReadOnlyObjectProperty; import javafx.beans.property.SimpleObjectProperty; diff --git a/core/src/main/java/io/bisq/app/BisqExecutable.java b/core/src/main/java/io/bisq/app/BisqExecutable.java index c11902ade8..db46c5c8e2 100644 --- a/core/src/main/java/io/bisq/app/BisqExecutable.java +++ b/core/src/main/java/io/bisq/app/BisqExecutable.java @@ -20,9 +20,9 @@ package io.bisq.app; import io.bisq.BisqException; import io.bisq.btc.RegTestHost; import io.bisq.common.CommonOptionKeys; -import io.bisq.messages.btc.BitcoinNetwork; -import io.bisq.messages.btc.BtcOptionKeys; -import io.bisq.messages.dao.blockchain.RpcOptionKeys; +import io.bisq.network_messages.btc.BitcoinNetwork; +import io.bisq.network_messages.btc.BtcOptionKeys; +import io.bisq.network_messages.dao.blockchain.RpcOptionKeys; import io.bisq.network.NetworkOptionKeys; import io.bisq.p2p.storage.P2PService; import io.bisq.util.joptsimple.EnumValueConverter; @@ -122,7 +122,7 @@ public abstract class BisqExecutable { description("Application data directory", BisqEnvironment.DEFAULT_APP_DATA_DIR)) .withRequiredArg(); parser.accepts(AppOptionKeys.IGNORE_DEV_MSG_KEY, - description("If set to true all signed messages from bisq developers are ignored " + + description("If set to true all signed network_messages from bisq developers are ignored " + "(Global alert, Version update alert, Filters for offers, nodes or trading account data)", false)) .withRequiredArg() .ofType(boolean.class); diff --git a/core/src/main/java/io/bisq/arbitration/ArbitratorManager.java b/core/src/main/java/io/bisq/arbitration/ArbitratorManager.java index 1221566168..2f4eb20c36 100644 --- a/core/src/main/java/io/bisq/arbitration/ArbitratorManager.java +++ b/core/src/main/java/io/bisq/arbitration/ArbitratorManager.java @@ -21,16 +21,16 @@ import com.google.inject.Inject; import io.bisq.app.DevEnv; import io.bisq.common.Timer; import io.bisq.common.UserThread; -import io.bisq.messages.crypto.KeyRing; +import io.bisq.network_messages.crypto.KeyRing; import io.bisq.common.handlers.ErrorMessageHandler; import io.bisq.common.handlers.ResultHandler; -import io.bisq.messages.arbitration.Arbitrator; +import io.bisq.network_messages.arbitration.Arbitrator; import io.bisq.user.Preferences; import io.bisq.p2p.BootstrapListener; -import io.bisq.messages.NodeAddress; +import io.bisq.network_messages.NodeAddress; import io.bisq.p2p.storage.P2PService; import io.bisq.p2p.storage.HashMapChangedListener; -import io.bisq.messages.p2p.storage.storageentry.ProtectedStorageEntry; +import io.bisq.network_messages.p2p.storage.storageentry.ProtectedStorageEntry; import io.bisq.user.User; import javafx.collections.FXCollections; import javafx.collections.ObservableMap; diff --git a/core/src/main/java/io/bisq/arbitration/ArbitratorService.java b/core/src/main/java/io/bisq/arbitration/ArbitratorService.java index a9b96cd27a..1254146fab 100644 --- a/core/src/main/java/io/bisq/arbitration/ArbitratorService.java +++ b/core/src/main/java/io/bisq/arbitration/ArbitratorService.java @@ -19,8 +19,8 @@ package io.bisq.arbitration; import io.bisq.common.handlers.ErrorMessageHandler; import io.bisq.common.handlers.ResultHandler; -import io.bisq.messages.arbitration.Arbitrator; -import io.bisq.messages.NodeAddress; +import io.bisq.network_messages.arbitration.Arbitrator; +import io.bisq.network_messages.NodeAddress; import io.bisq.p2p.storage.P2PService; import io.bisq.p2p.storage.HashMapChangedListener; import org.slf4j.Logger; diff --git a/core/src/main/java/io/bisq/arbitration/DisputeManager.java b/core/src/main/java/io/bisq/arbitration/DisputeManager.java index a72db6ecfd..31fab069f5 100644 --- a/core/src/main/java/io/bisq/arbitration/DisputeManager.java +++ b/core/src/main/java/io/bisq/arbitration/DisputeManager.java @@ -27,20 +27,20 @@ import io.bisq.btc.wallet.BtcWalletService; import io.bisq.btc.wallet.TradeWalletService; import io.bisq.common.Timer; import io.bisq.common.UserThread; -import io.bisq.messages.crypto.KeyRing; -import io.bisq.messages.crypto.PubKeyRing; +import io.bisq.network_messages.crypto.KeyRing; +import io.bisq.network_messages.crypto.PubKeyRing; import io.bisq.common.handlers.FaultHandler; import io.bisq.common.handlers.ResultHandler; -import io.bisq.messages.DecryptedMsgWithPubKey; +import io.bisq.network_messages.DecryptedMsgWithPubKey; import io.bisq.locale.Res; -import io.bisq.messages.Message; -import io.bisq.messages.arbitration.*; -import io.bisq.messages.arbitration.payload.Attachment; -import io.bisq.messages.trade.payload.Contract; +import io.bisq.network_messages.Message; +import io.bisq.network_messages.arbitration.*; +import io.bisq.network_messages.arbitration.payload.Attachment; +import io.bisq.network_messages.trade.payload.Contract; import io.bisq.p2p.BootstrapListener; -import io.bisq.messages.NodeAddress; +import io.bisq.network_messages.NodeAddress; import io.bisq.p2p.storage.P2PService; -import io.bisq.messages.p2p.messaging.SendMailboxMessageListener; +import io.bisq.network_messages.p2p.messaging.SendMailboxMessageListener; import io.bisq.storage.Storage; import io.bisq.trade.Tradable; import io.bisq.trade.Trade; diff --git a/core/src/main/java/io/bisq/btc/BitcoinModule.java b/core/src/main/java/io/bisq/btc/BitcoinModule.java index cd9bedd47e..ea19cac0b1 100644 --- a/core/src/main/java/io/bisq/btc/BitcoinModule.java +++ b/core/src/main/java/io/bisq/btc/BitcoinModule.java @@ -26,8 +26,8 @@ import io.bisq.btc.wallet.BtcWalletService; import io.bisq.btc.wallet.TradeWalletService; import io.bisq.btc.wallet.WalletsSetup; import io.bisq.http.HttpClient; -import io.bisq.messages.btc.BtcOptionKeys; -import io.bisq.messages.btc.UserAgent; +import io.bisq.network_messages.btc.BtcOptionKeys; +import io.bisq.network_messages.btc.UserAgent; import io.bisq.provider.fee.FeeService; import io.bisq.provider.price.PriceFeedService; import org.slf4j.Logger; diff --git a/core/src/main/java/io/bisq/btc/data/InputsAndChangeOutput.java b/core/src/main/java/io/bisq/btc/data/InputsAndChangeOutput.java index c348876a28..85f05e762c 100644 --- a/core/src/main/java/io/bisq/btc/data/InputsAndChangeOutput.java +++ b/core/src/main/java/io/bisq/btc/data/InputsAndChangeOutput.java @@ -17,7 +17,7 @@ package io.bisq.btc.data; -import io.bisq.messages.btc.data.RawTransactionInput; +import io.bisq.network_messages.btc.data.RawTransactionInput; import javax.annotation.Nullable; import java.util.ArrayList; diff --git a/core/src/main/java/io/bisq/btc/data/PreparedDepositTxAndOffererInputs.java b/core/src/main/java/io/bisq/btc/data/PreparedDepositTxAndOffererInputs.java index d097bea4fd..43e9c722e0 100644 --- a/core/src/main/java/io/bisq/btc/data/PreparedDepositTxAndOffererInputs.java +++ b/core/src/main/java/io/bisq/btc/data/PreparedDepositTxAndOffererInputs.java @@ -17,7 +17,7 @@ package io.bisq.btc.data; -import io.bisq.messages.btc.data.RawTransactionInput; +import io.bisq.network_messages.btc.data.RawTransactionInput; import java.util.ArrayList; diff --git a/core/src/main/java/io/bisq/btc/wallet/BsqWalletService.java b/core/src/main/java/io/bisq/btc/wallet/BsqWalletService.java index 075774f3b3..9e25808cbd 100644 --- a/core/src/main/java/io/bisq/btc/wallet/BsqWalletService.java +++ b/core/src/main/java/io/bisq/btc/wallet/BsqWalletService.java @@ -25,7 +25,7 @@ import io.bisq.common.handlers.ErrorMessageHandler; import io.bisq.common.handlers.ResultHandler; import io.bisq.dao.blockchain.BsqBlockchainManager; import io.bisq.dao.blockchain.BsqUTXO; -import io.bisq.messages.btc.Restrictions; +import io.bisq.network_messages.btc.Restrictions; import io.bisq.provider.fee.FeeService; import io.bisq.user.Preferences; import org.bitcoinj.core.*; diff --git a/core/src/main/java/io/bisq/btc/wallet/BtcWalletService.java b/core/src/main/java/io/bisq/btc/wallet/BtcWalletService.java index b5589d5903..d07bc71722 100644 --- a/core/src/main/java/io/bisq/btc/wallet/BtcWalletService.java +++ b/core/src/main/java/io/bisq/btc/wallet/BtcWalletService.java @@ -27,7 +27,7 @@ import io.bisq.btc.InsufficientFundsException; import io.bisq.btc.exceptions.TransactionVerificationException; import io.bisq.btc.exceptions.WalletException; import io.bisq.common.handlers.ErrorMessageHandler; -import io.bisq.messages.btc.Restrictions; +import io.bisq.network_messages.btc.Restrictions; import io.bisq.provider.fee.FeeService; import io.bisq.user.Preferences; import org.bitcoinj.core.*; diff --git a/core/src/main/java/io/bisq/btc/wallet/TradeWalletService.java b/core/src/main/java/io/bisq/btc/wallet/TradeWalletService.java index e2ba1a503b..a5fc257496 100644 --- a/core/src/main/java/io/bisq/btc/wallet/TradeWalletService.java +++ b/core/src/main/java/io/bisq/btc/wallet/TradeWalletService.java @@ -30,7 +30,7 @@ import io.bisq.btc.exceptions.SigningException; import io.bisq.btc.exceptions.TransactionVerificationException; import io.bisq.btc.exceptions.WalletException; import io.bisq.common.util.Utilities; -import io.bisq.messages.btc.data.RawTransactionInput; +import io.bisq.network_messages.btc.data.RawTransactionInput; import io.bisq.user.Preferences; import org.bitcoinj.core.*; import org.bitcoinj.crypto.DeterministicKey; diff --git a/core/src/main/java/io/bisq/btc/wallet/WalletsSetup.java b/core/src/main/java/io/bisq/btc/wallet/WalletsSetup.java index fb5d9e983a..cc47356c8b 100644 --- a/core/src/main/java/io/bisq/btc/wallet/WalletsSetup.java +++ b/core/src/main/java/io/bisq/btc/wallet/WalletsSetup.java @@ -30,8 +30,8 @@ import io.bisq.common.Timer; import io.bisq.common.UserThread; import io.bisq.common.handlers.ExceptionHandler; import io.bisq.common.handlers.ResultHandler; -import io.bisq.messages.btc.BtcOptionKeys; -import io.bisq.messages.btc.UserAgent; +import io.bisq.network_messages.btc.BtcOptionKeys; +import io.bisq.network_messages.btc.UserAgent; import io.bisq.user.Preferences; import io.bisq.network.DnsLookupTor; import io.bisq.network.NetworkOptionKeys; diff --git a/core/src/main/java/io/bisq/dao/DaoModule.java b/core/src/main/java/io/bisq/dao/DaoModule.java index 45b30591b2..dcc7f1d232 100644 --- a/core/src/main/java/io/bisq/dao/DaoModule.java +++ b/core/src/main/java/io/bisq/dao/DaoModule.java @@ -26,7 +26,7 @@ import io.bisq.dao.compensation.CompensationRequestManager; import io.bisq.dao.vote.VotingDefaultValues; import io.bisq.dao.vote.VotingManager; import io.bisq.dao.vote.VotingService; -import io.bisq.messages.dao.blockchain.RpcOptionKeys; +import io.bisq.network_messages.dao.blockchain.RpcOptionKeys; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.core.env.Environment; diff --git a/core/src/main/java/io/bisq/dao/blockchain/BsqBlockchainRpcService.java b/core/src/main/java/io/bisq/dao/blockchain/BsqBlockchainRpcService.java index 22626550dd..6e509a5122 100644 --- a/core/src/main/java/io/bisq/dao/blockchain/BsqBlockchainRpcService.java +++ b/core/src/main/java/io/bisq/dao/blockchain/BsqBlockchainRpcService.java @@ -33,7 +33,7 @@ import io.bisq.common.handlers.ErrorMessageHandler; import io.bisq.common.handlers.ResultHandler; import io.bisq.common.util.Tuple2; import io.bisq.common.util.Utilities; -import io.bisq.messages.dao.blockchain.RpcOptionKeys; +import io.bisq.network_messages.dao.blockchain.RpcOptionKeys; import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.impl.client.HttpClients; import org.apache.http.impl.conn.PoolingHttpClientConnectionManager; diff --git a/core/src/main/java/io/bisq/dao/compensation/CompensationRequest.java b/core/src/main/java/io/bisq/dao/compensation/CompensationRequest.java index ac9612d22f..2c4af8b32a 100644 --- a/core/src/main/java/io/bisq/dao/compensation/CompensationRequest.java +++ b/core/src/main/java/io/bisq/dao/compensation/CompensationRequest.java @@ -19,7 +19,7 @@ package io.bisq.dao.compensation; import io.bisq.app.Version; import io.bisq.common.persistance.Persistable; -import io.bisq.messages.dao.compensation.payload.CompensationRequestPayload; +import io.bisq.network_messages.dao.compensation.payload.CompensationRequestPayload; import org.bitcoinj.core.Coin; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/core/src/main/java/io/bisq/dao/compensation/CompensationRequestManager.java b/core/src/main/java/io/bisq/dao/compensation/CompensationRequestManager.java index 6d0c14e490..e9bb0f865d 100644 --- a/core/src/main/java/io/bisq/dao/compensation/CompensationRequestManager.java +++ b/core/src/main/java/io/bisq/dao/compensation/CompensationRequestManager.java @@ -23,11 +23,11 @@ import io.bisq.btc.wallet.BsqWalletService; import io.bisq.btc.wallet.BtcWalletService; import io.bisq.dao.DaoPeriodService; import io.bisq.dao.vote.VotingDefaultValues; -import io.bisq.messages.dao.compensation.payload.CompensationRequestPayload; +import io.bisq.network_messages.dao.compensation.payload.CompensationRequestPayload; import io.bisq.p2p.storage.P2PService; import io.bisq.p2p.storage.HashMapChangedListener; -import io.bisq.payload.StoragePayload; -import io.bisq.messages.p2p.storage.storageentry.ProtectedStorageEntry; +import io.bisq.network_messages.payload.StoragePayload; +import io.bisq.network_messages.p2p.storage.storageentry.ProtectedStorageEntry; import io.bisq.storage.Storage; import javafx.collections.FXCollections; import javafx.collections.ObservableList; diff --git a/core/src/main/java/io/bisq/dao/vote/VotingManager.java b/core/src/main/java/io/bisq/dao/vote/VotingManager.java index 97c100bead..dff5ce1759 100644 --- a/core/src/main/java/io/bisq/dao/vote/VotingManager.java +++ b/core/src/main/java/io/bisq/dao/vote/VotingManager.java @@ -27,7 +27,7 @@ import io.bisq.dao.DaoPeriodService; import io.bisq.dao.compensation.CompensationRequest; import io.bisq.dao.compensation.CompensationRequestManager; import io.bisq.provider.fee.FeeService; -import io.bisq.messages.dao.compensation.payload.CompensationRequestPayload; +import io.bisq.network_messages.dao.compensation.payload.CompensationRequestPayload; import io.bisq.storage.Storage; import org.apache.commons.lang3.StringUtils; import org.bitcoinj.core.Utils; diff --git a/core/src/main/java/io/bisq/filter/FilterManager.java b/core/src/main/java/io/bisq/filter/FilterManager.java index 24b0444d65..9e9fc0b61e 100644 --- a/core/src/main/java/io/bisq/filter/FilterManager.java +++ b/core/src/main/java/io/bisq/filter/FilterManager.java @@ -21,13 +21,13 @@ import com.google.inject.Inject; import com.google.inject.name.Named; import io.bisq.app.AppOptionKeys; import io.bisq.app.DevEnv; -import io.bisq.messages.crypto.KeyRing; +import io.bisq.network_messages.crypto.KeyRing; import io.bisq.common.wire.proto.Messages; -import io.bisq.messages.filter.payload.Filter; -import io.bisq.messages.filter.payload.PaymentAccountFilter; +import io.bisq.network_messages.filter.payload.Filter; +import io.bisq.network_messages.filter.payload.PaymentAccountFilter; import io.bisq.p2p.storage.P2PService; import io.bisq.p2p.storage.HashMapChangedListener; -import io.bisq.messages.p2p.storage.storageentry.ProtectedStorageEntry; +import io.bisq.network_messages.p2p.storage.storageentry.ProtectedStorageEntry; import io.bisq.user.User; import javafx.beans.property.ObjectProperty; import javafx.beans.property.ReadOnlyObjectProperty; diff --git a/core/src/main/java/io/bisq/payment/AliPayAccount.java b/core/src/main/java/io/bisq/payment/AliPayAccount.java index c93575b951..dfbe862960 100644 --- a/core/src/main/java/io/bisq/payment/AliPayAccount.java +++ b/core/src/main/java/io/bisq/payment/AliPayAccount.java @@ -19,9 +19,9 @@ package io.bisq.payment; import io.bisq.app.Version; import io.bisq.locale.FiatCurrency; -import io.bisq.messages.payment.PaymentMethod; -import io.bisq.messages.payment.payload.AliPayAccountContractData; -import io.bisq.messages.payment.payload.PaymentAccountContractData; +import io.bisq.network_messages.payment.PaymentMethod; +import io.bisq.network_messages.payment.payload.AliPayAccountContractData; +import io.bisq.network_messages.payment.payload.PaymentAccountContractData; import io.bisq.user.Preferences; public final class AliPayAccount extends PaymentAccount { diff --git a/core/src/main/java/io/bisq/payment/CashDepositAccount.java b/core/src/main/java/io/bisq/payment/CashDepositAccount.java index 8dcbdc6fbe..e75509f907 100644 --- a/core/src/main/java/io/bisq/payment/CashDepositAccount.java +++ b/core/src/main/java/io/bisq/payment/CashDepositAccount.java @@ -18,9 +18,9 @@ package io.bisq.payment; import io.bisq.app.Version; -import io.bisq.messages.payment.PaymentMethod; -import io.bisq.messages.payment.payload.CashDepositAccountContractData; -import io.bisq.messages.payment.payload.PaymentAccountContractData; +import io.bisq.network_messages.payment.PaymentMethod; +import io.bisq.network_messages.payment.payload.CashDepositAccountContractData; +import io.bisq.network_messages.payment.payload.PaymentAccountContractData; import javax.annotation.Nullable; diff --git a/core/src/main/java/io/bisq/payment/ChaseQuickPayAccount.java b/core/src/main/java/io/bisq/payment/ChaseQuickPayAccount.java index df22f4d69e..b836615de5 100644 --- a/core/src/main/java/io/bisq/payment/ChaseQuickPayAccount.java +++ b/core/src/main/java/io/bisq/payment/ChaseQuickPayAccount.java @@ -19,9 +19,9 @@ package io.bisq.payment; import io.bisq.app.Version; import io.bisq.locale.FiatCurrency; -import io.bisq.messages.payment.PaymentMethod; -import io.bisq.messages.payment.payload.ChaseQuickPayAccountContractData; -import io.bisq.messages.payment.payload.PaymentAccountContractData; +import io.bisq.network_messages.payment.PaymentMethod; +import io.bisq.network_messages.payment.payload.ChaseQuickPayAccountContractData; +import io.bisq.network_messages.payment.payload.PaymentAccountContractData; import io.bisq.user.Preferences; public final class ChaseQuickPayAccount extends PaymentAccount { diff --git a/core/src/main/java/io/bisq/payment/ClearXchangeAccount.java b/core/src/main/java/io/bisq/payment/ClearXchangeAccount.java index af5f7d84a1..9232218540 100644 --- a/core/src/main/java/io/bisq/payment/ClearXchangeAccount.java +++ b/core/src/main/java/io/bisq/payment/ClearXchangeAccount.java @@ -19,9 +19,9 @@ package io.bisq.payment; import io.bisq.app.Version; import io.bisq.locale.FiatCurrency; -import io.bisq.messages.payment.PaymentMethod; -import io.bisq.messages.payment.payload.ClearXchangeAccountContractData; -import io.bisq.messages.payment.payload.PaymentAccountContractData; +import io.bisq.network_messages.payment.PaymentMethod; +import io.bisq.network_messages.payment.payload.ClearXchangeAccountContractData; +import io.bisq.network_messages.payment.payload.PaymentAccountContractData; import io.bisq.user.Preferences; public final class ClearXchangeAccount extends PaymentAccount { diff --git a/core/src/main/java/io/bisq/payment/CountryBasedPaymentAccount.java b/core/src/main/java/io/bisq/payment/CountryBasedPaymentAccount.java index ee369f9394..5c668ba962 100644 --- a/core/src/main/java/io/bisq/payment/CountryBasedPaymentAccount.java +++ b/core/src/main/java/io/bisq/payment/CountryBasedPaymentAccount.java @@ -19,8 +19,8 @@ package io.bisq.payment; import io.bisq.app.Version; import io.bisq.locale.Country; -import io.bisq.messages.payment.PaymentMethod; -import io.bisq.messages.payment.payload.CountryBasedPaymentAccountContractData; +import io.bisq.network_messages.payment.PaymentMethod; +import io.bisq.network_messages.payment.payload.CountryBasedPaymentAccountContractData; import org.jetbrains.annotations.NotNull; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/core/src/main/java/io/bisq/payment/CryptoCurrencyAccount.java b/core/src/main/java/io/bisq/payment/CryptoCurrencyAccount.java index 1f35c2ae0b..8962594457 100644 --- a/core/src/main/java/io/bisq/payment/CryptoCurrencyAccount.java +++ b/core/src/main/java/io/bisq/payment/CryptoCurrencyAccount.java @@ -18,9 +18,9 @@ package io.bisq.payment; import io.bisq.app.Version; -import io.bisq.messages.payment.PaymentMethod; -import io.bisq.messages.payment.payload.CryptoCurrencyAccountContractData; -import io.bisq.messages.payment.payload.PaymentAccountContractData; +import io.bisq.network_messages.payment.PaymentMethod; +import io.bisq.network_messages.payment.payload.CryptoCurrencyAccountContractData; +import io.bisq.network_messages.payment.payload.PaymentAccountContractData; public final class CryptoCurrencyAccount extends PaymentAccount { // That object is saved to disc. We need to take care of changes to not break deserialization. diff --git a/core/src/main/java/io/bisq/payment/FasterPaymentsAccount.java b/core/src/main/java/io/bisq/payment/FasterPaymentsAccount.java index 85dd476584..0779808978 100644 --- a/core/src/main/java/io/bisq/payment/FasterPaymentsAccount.java +++ b/core/src/main/java/io/bisq/payment/FasterPaymentsAccount.java @@ -19,9 +19,9 @@ package io.bisq.payment; import io.bisq.app.Version; import io.bisq.locale.FiatCurrency; -import io.bisq.messages.payment.PaymentMethod; -import io.bisq.messages.payment.payload.FasterPaymentsAccountContractData; -import io.bisq.messages.payment.payload.PaymentAccountContractData; +import io.bisq.network_messages.payment.PaymentMethod; +import io.bisq.network_messages.payment.payload.FasterPaymentsAccountContractData; +import io.bisq.network_messages.payment.payload.PaymentAccountContractData; import io.bisq.user.Preferences; public final class FasterPaymentsAccount extends PaymentAccount { diff --git a/core/src/main/java/io/bisq/payment/InteracETransferAccount.java b/core/src/main/java/io/bisq/payment/InteracETransferAccount.java index 59433c7b2f..7f03c2ee15 100644 --- a/core/src/main/java/io/bisq/payment/InteracETransferAccount.java +++ b/core/src/main/java/io/bisq/payment/InteracETransferAccount.java @@ -19,9 +19,9 @@ package io.bisq.payment; import io.bisq.app.Version; import io.bisq.locale.FiatCurrency; -import io.bisq.messages.payment.PaymentMethod; -import io.bisq.messages.payment.payload.InteracETransferAccountContractData; -import io.bisq.messages.payment.payload.PaymentAccountContractData; +import io.bisq.network_messages.payment.PaymentMethod; +import io.bisq.network_messages.payment.payload.InteracETransferAccountContractData; +import io.bisq.network_messages.payment.payload.PaymentAccountContractData; import io.bisq.user.Preferences; public final class InteracETransferAccount extends PaymentAccount { diff --git a/core/src/main/java/io/bisq/payment/NationalBankAccount.java b/core/src/main/java/io/bisq/payment/NationalBankAccount.java index ad0bf18ca5..d2eaf97e46 100644 --- a/core/src/main/java/io/bisq/payment/NationalBankAccount.java +++ b/core/src/main/java/io/bisq/payment/NationalBankAccount.java @@ -18,10 +18,10 @@ package io.bisq.payment; import io.bisq.app.Version; -import io.bisq.messages.payment.PaymentMethod; -import io.bisq.messages.payment.payload.BankAccountContractData; -import io.bisq.messages.payment.payload.NationalBankAccountContractData; -import io.bisq.messages.payment.payload.PaymentAccountContractData; +import io.bisq.network_messages.payment.PaymentMethod; +import io.bisq.network_messages.payment.payload.BankAccountContractData; +import io.bisq.network_messages.payment.payload.NationalBankAccountContractData; +import io.bisq.network_messages.payment.payload.PaymentAccountContractData; public final class NationalBankAccount extends CountryBasedPaymentAccount implements SameCountryRestrictedBankAccount { // That object is saved to disc. We need to take care of changes to not break deserialization. diff --git a/core/src/main/java/io/bisq/payment/OKPayAccount.java b/core/src/main/java/io/bisq/payment/OKPayAccount.java index b4752562da..ffc2e49821 100644 --- a/core/src/main/java/io/bisq/payment/OKPayAccount.java +++ b/core/src/main/java/io/bisq/payment/OKPayAccount.java @@ -19,9 +19,9 @@ package io.bisq.payment; import io.bisq.app.Version; import io.bisq.locale.CurrencyUtil; -import io.bisq.messages.payment.PaymentMethod; -import io.bisq.messages.payment.payload.OKPayAccountContractData; -import io.bisq.messages.payment.payload.PaymentAccountContractData; +import io.bisq.network_messages.payment.PaymentMethod; +import io.bisq.network_messages.payment.payload.OKPayAccountContractData; +import io.bisq.network_messages.payment.payload.PaymentAccountContractData; import io.bisq.user.Preferences; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/core/src/main/java/io/bisq/payment/PaymentAccount.java b/core/src/main/java/io/bisq/payment/PaymentAccount.java index 0cb5b49dd6..3d3c713f1a 100644 --- a/core/src/main/java/io/bisq/payment/PaymentAccount.java +++ b/core/src/main/java/io/bisq/payment/PaymentAccount.java @@ -20,8 +20,8 @@ package io.bisq.payment; import io.bisq.app.Version; import io.bisq.common.persistance.Persistable; import io.bisq.locale.TradeCurrency; -import io.bisq.messages.payment.PaymentMethod; -import io.bisq.messages.payment.payload.PaymentAccountContractData; +import io.bisq.network_messages.payment.PaymentMethod; +import io.bisq.network_messages.payment.payload.PaymentAccountContractData; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/core/src/main/java/io/bisq/payment/PaymentAccountFactory.java b/core/src/main/java/io/bisq/payment/PaymentAccountFactory.java index fe1bdf64f8..46bcb5b8f5 100644 --- a/core/src/main/java/io/bisq/payment/PaymentAccountFactory.java +++ b/core/src/main/java/io/bisq/payment/PaymentAccountFactory.java @@ -17,7 +17,7 @@ package io.bisq.payment; -import io.bisq.messages.payment.PaymentMethod; +import io.bisq.network_messages.payment.PaymentMethod; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/core/src/main/java/io/bisq/payment/PaymentAccountUtil.java b/core/src/main/java/io/bisq/payment/PaymentAccountUtil.java index 981fa96a5f..00d533e717 100644 --- a/core/src/main/java/io/bisq/payment/PaymentAccountUtil.java +++ b/core/src/main/java/io/bisq/payment/PaymentAccountUtil.java @@ -1,7 +1,7 @@ package io.bisq.payment; import io.bisq.locale.TradeCurrency; -import io.bisq.messages.payment.PaymentMethod; +import io.bisq.network_messages.payment.PaymentMethod; import io.bisq.p2p.protocol.availability.Offer; import javafx.collections.FXCollections; import javafx.collections.ObservableList; diff --git a/core/src/main/java/io/bisq/payment/PerfectMoneyAccount.java b/core/src/main/java/io/bisq/payment/PerfectMoneyAccount.java index 5558622e4c..e952dc5289 100644 --- a/core/src/main/java/io/bisq/payment/PerfectMoneyAccount.java +++ b/core/src/main/java/io/bisq/payment/PerfectMoneyAccount.java @@ -19,9 +19,9 @@ package io.bisq.payment; import io.bisq.app.Version; import io.bisq.locale.FiatCurrency; -import io.bisq.messages.payment.PaymentMethod; -import io.bisq.messages.payment.payload.PaymentAccountContractData; -import io.bisq.messages.payment.payload.PerfectMoneyAccountContractData; +import io.bisq.network_messages.payment.PaymentMethod; +import io.bisq.network_messages.payment.payload.PaymentAccountContractData; +import io.bisq.network_messages.payment.payload.PerfectMoneyAccountContractData; import io.bisq.user.Preferences; public final class PerfectMoneyAccount extends PaymentAccount { diff --git a/core/src/main/java/io/bisq/payment/SameBankAccount.java b/core/src/main/java/io/bisq/payment/SameBankAccount.java index 19f6321663..21593e6483 100644 --- a/core/src/main/java/io/bisq/payment/SameBankAccount.java +++ b/core/src/main/java/io/bisq/payment/SameBankAccount.java @@ -18,10 +18,10 @@ package io.bisq.payment; import io.bisq.app.Version; -import io.bisq.messages.payment.PaymentMethod; -import io.bisq.messages.payment.payload.BankAccountContractData; -import io.bisq.messages.payment.payload.PaymentAccountContractData; -import io.bisq.messages.payment.payload.SameBankAccountContractData; +import io.bisq.network_messages.payment.PaymentMethod; +import io.bisq.network_messages.payment.payload.BankAccountContractData; +import io.bisq.network_messages.payment.payload.PaymentAccountContractData; +import io.bisq.network_messages.payment.payload.SameBankAccountContractData; public final class SameBankAccount extends CountryBasedPaymentAccount implements BankNameRestrictedBankAccount, SameCountryRestrictedBankAccount { // That object is saved to disc. We need to take care of changes to not break deserialization. diff --git a/core/src/main/java/io/bisq/payment/SepaAccount.java b/core/src/main/java/io/bisq/payment/SepaAccount.java index 9702ae46ac..abc697c69b 100644 --- a/core/src/main/java/io/bisq/payment/SepaAccount.java +++ b/core/src/main/java/io/bisq/payment/SepaAccount.java @@ -19,9 +19,9 @@ package io.bisq.payment; import io.bisq.app.Version; import io.bisq.locale.CountryUtil; -import io.bisq.messages.payment.PaymentMethod; -import io.bisq.messages.payment.payload.PaymentAccountContractData; -import io.bisq.messages.payment.payload.SepaAccountContractData; +import io.bisq.network_messages.payment.PaymentMethod; +import io.bisq.network_messages.payment.payload.PaymentAccountContractData; +import io.bisq.network_messages.payment.payload.SepaAccountContractData; import io.bisq.user.Preferences; import java.util.List; diff --git a/core/src/main/java/io/bisq/payment/SpecificBanksAccount.java b/core/src/main/java/io/bisq/payment/SpecificBanksAccount.java index 2d07ca232e..063bc34b11 100644 --- a/core/src/main/java/io/bisq/payment/SpecificBanksAccount.java +++ b/core/src/main/java/io/bisq/payment/SpecificBanksAccount.java @@ -18,9 +18,9 @@ package io.bisq.payment; import io.bisq.app.Version; -import io.bisq.messages.payment.PaymentMethod; -import io.bisq.messages.payment.payload.PaymentAccountContractData; -import io.bisq.messages.payment.payload.SpecificBanksAccountContractData; +import io.bisq.network_messages.payment.PaymentMethod; +import io.bisq.network_messages.payment.payload.PaymentAccountContractData; +import io.bisq.network_messages.payment.payload.SpecificBanksAccountContractData; import java.util.ArrayList; diff --git a/core/src/main/java/io/bisq/payment/SwishAccount.java b/core/src/main/java/io/bisq/payment/SwishAccount.java index 3340e193a8..469f948d9b 100644 --- a/core/src/main/java/io/bisq/payment/SwishAccount.java +++ b/core/src/main/java/io/bisq/payment/SwishAccount.java @@ -19,9 +19,9 @@ package io.bisq.payment; import io.bisq.app.Version; import io.bisq.locale.FiatCurrency; -import io.bisq.messages.payment.PaymentMethod; -import io.bisq.messages.payment.payload.PaymentAccountContractData; -import io.bisq.messages.payment.payload.SwishAccountContractData; +import io.bisq.network_messages.payment.PaymentMethod; +import io.bisq.network_messages.payment.payload.PaymentAccountContractData; +import io.bisq.network_messages.payment.payload.SwishAccountContractData; import io.bisq.user.Preferences; public final class SwishAccount extends PaymentAccount { diff --git a/core/src/main/java/io/bisq/payment/USPostalMoneyOrderAccount.java b/core/src/main/java/io/bisq/payment/USPostalMoneyOrderAccount.java index eba98e6d99..97caab7ec3 100644 --- a/core/src/main/java/io/bisq/payment/USPostalMoneyOrderAccount.java +++ b/core/src/main/java/io/bisq/payment/USPostalMoneyOrderAccount.java @@ -19,9 +19,9 @@ package io.bisq.payment; import io.bisq.app.Version; import io.bisq.locale.FiatCurrency; -import io.bisq.messages.payment.PaymentMethod; -import io.bisq.messages.payment.payload.PaymentAccountContractData; -import io.bisq.messages.payment.payload.USPostalMoneyOrderAccountContractData; +import io.bisq.network_messages.payment.PaymentMethod; +import io.bisq.network_messages.payment.payload.PaymentAccountContractData; +import io.bisq.network_messages.payment.payload.USPostalMoneyOrderAccountContractData; import io.bisq.user.Preferences; public final class USPostalMoneyOrderAccount extends PaymentAccount { diff --git a/core/src/main/java/io/bisq/trade/BuyerAsOffererTrade.java b/core/src/main/java/io/bisq/trade/BuyerAsOffererTrade.java index 76170bac65..99b7c10fb2 100644 --- a/core/src/main/java/io/bisq/trade/BuyerAsOffererTrade.java +++ b/core/src/main/java/io/bisq/trade/BuyerAsOffererTrade.java @@ -18,8 +18,8 @@ package io.bisq.trade; import io.bisq.app.Version; -import io.bisq.messages.NodeAddress; -import io.bisq.messages.protocol.trade.TradeMessage; +import io.bisq.network_messages.NodeAddress; +import io.bisq.network_messages.protocol.trade.TradeMessage; import io.bisq.p2p.protocol.availability.Offer; import io.bisq.storage.Storage; import io.bisq.trade.protocol.trade.BuyerAsOffererProtocol; diff --git a/core/src/main/java/io/bisq/trade/BuyerAsTakerTrade.java b/core/src/main/java/io/bisq/trade/BuyerAsTakerTrade.java index 7e16295680..961795a81f 100644 --- a/core/src/main/java/io/bisq/trade/BuyerAsTakerTrade.java +++ b/core/src/main/java/io/bisq/trade/BuyerAsTakerTrade.java @@ -18,7 +18,7 @@ package io.bisq.trade; import io.bisq.app.Version; -import io.bisq.messages.NodeAddress; +import io.bisq.network_messages.NodeAddress; import io.bisq.p2p.protocol.availability.Offer; import io.bisq.storage.Storage; import io.bisq.trade.protocol.trade.BuyerAsTakerProtocol; diff --git a/core/src/main/java/io/bisq/trade/BuyerTrade.java b/core/src/main/java/io/bisq/trade/BuyerTrade.java index 3a22db235a..1d9c115e18 100644 --- a/core/src/main/java/io/bisq/trade/BuyerTrade.java +++ b/core/src/main/java/io/bisq/trade/BuyerTrade.java @@ -20,7 +20,7 @@ package io.bisq.trade; import io.bisq.app.Version; import io.bisq.common.handlers.ErrorMessageHandler; import io.bisq.common.handlers.ResultHandler; -import io.bisq.messages.NodeAddress; +import io.bisq.network_messages.NodeAddress; import io.bisq.p2p.protocol.availability.Offer; import io.bisq.storage.Storage; import io.bisq.trade.protocol.trade.BuyerProtocol; diff --git a/core/src/main/java/io/bisq/trade/OffererTrade.java b/core/src/main/java/io/bisq/trade/OffererTrade.java index 33f6c9504b..e2d0fe5ee6 100644 --- a/core/src/main/java/io/bisq/trade/OffererTrade.java +++ b/core/src/main/java/io/bisq/trade/OffererTrade.java @@ -18,8 +18,8 @@ package io.bisq.trade; -import io.bisq.messages.protocol.trade.TradeMessage; -import io.bisq.messages.NodeAddress; +import io.bisq.network_messages.protocol.trade.TradeMessage; +import io.bisq.network_messages.NodeAddress; public interface OffererTrade { void handleTakeOfferRequest(TradeMessage message, NodeAddress peerNodeAddress); diff --git a/core/src/main/java/io/bisq/trade/SellerAsOffererTrade.java b/core/src/main/java/io/bisq/trade/SellerAsOffererTrade.java index a172c647e4..61e48c323d 100644 --- a/core/src/main/java/io/bisq/trade/SellerAsOffererTrade.java +++ b/core/src/main/java/io/bisq/trade/SellerAsOffererTrade.java @@ -18,8 +18,8 @@ package io.bisq.trade; import io.bisq.app.Version; -import io.bisq.messages.NodeAddress; -import io.bisq.messages.protocol.trade.TradeMessage; +import io.bisq.network_messages.NodeAddress; +import io.bisq.network_messages.protocol.trade.TradeMessage; import io.bisq.p2p.protocol.availability.Offer; import io.bisq.storage.Storage; import io.bisq.trade.protocol.trade.OffererProtocol; diff --git a/core/src/main/java/io/bisq/trade/SellerAsTakerTrade.java b/core/src/main/java/io/bisq/trade/SellerAsTakerTrade.java index 31313e2471..584ffae5aa 100644 --- a/core/src/main/java/io/bisq/trade/SellerAsTakerTrade.java +++ b/core/src/main/java/io/bisq/trade/SellerAsTakerTrade.java @@ -18,7 +18,7 @@ package io.bisq.trade; import io.bisq.app.Version; -import io.bisq.messages.NodeAddress; +import io.bisq.network_messages.NodeAddress; import io.bisq.p2p.protocol.availability.Offer; import io.bisq.storage.Storage; import io.bisq.trade.protocol.trade.SellerAsTakerProtocol; diff --git a/core/src/main/java/io/bisq/trade/SellerTrade.java b/core/src/main/java/io/bisq/trade/SellerTrade.java index 73915d13c4..3dddd03da0 100644 --- a/core/src/main/java/io/bisq/trade/SellerTrade.java +++ b/core/src/main/java/io/bisq/trade/SellerTrade.java @@ -20,7 +20,7 @@ package io.bisq.trade; import io.bisq.app.Version; import io.bisq.common.handlers.ErrorMessageHandler; import io.bisq.common.handlers.ResultHandler; -import io.bisq.messages.NodeAddress; +import io.bisq.network_messages.NodeAddress; import io.bisq.p2p.protocol.availability.Offer; import io.bisq.storage.Storage; import io.bisq.trade.protocol.trade.SellerProtocol; diff --git a/core/src/main/java/io/bisq/trade/Trade.java b/core/src/main/java/io/bisq/trade/Trade.java index dbb6d9d3d9..3b3ffd7af6 100644 --- a/core/src/main/java/io/bisq/trade/Trade.java +++ b/core/src/main/java/io/bisq/trade/Trade.java @@ -28,11 +28,11 @@ import io.bisq.btc.wallet.BtcWalletService; import io.bisq.btc.wallet.TradeWalletService; import io.bisq.common.taskrunner.Model; import io.bisq.filter.FilterManager; -import io.bisq.messages.DecryptedMsgWithPubKey; -import io.bisq.messages.NodeAddress; -import io.bisq.messages.arbitration.Arbitrator; -import io.bisq.messages.crypto.KeyRing; -import io.bisq.messages.trade.payload.Contract; +import io.bisq.network_messages.DecryptedMsgWithPubKey; +import io.bisq.network_messages.NodeAddress; +import io.bisq.network_messages.arbitration.Arbitrator; +import io.bisq.network_messages.crypto.KeyRing; +import io.bisq.network_messages.trade.payload.Contract; import io.bisq.p2p.protocol.availability.Offer; import io.bisq.p2p.storage.P2PService; import io.bisq.storage.Storage; diff --git a/core/src/main/java/io/bisq/trade/TradeManager.java b/core/src/main/java/io/bisq/trade/TradeManager.java index 964a780274..aa05eb6d71 100644 --- a/core/src/main/java/io/bisq/trade/TradeManager.java +++ b/core/src/main/java/io/bisq/trade/TradeManager.java @@ -29,16 +29,16 @@ import io.bisq.common.handlers.ErrorMessageHandler; import io.bisq.common.handlers.FaultHandler; import io.bisq.common.handlers.ResultHandler; import io.bisq.filter.FilterManager; -import io.bisq.messages.DecryptedDirectMessageListener; -import io.bisq.messages.DecryptedMsgWithPubKey; -import io.bisq.messages.Message; -import io.bisq.messages.NodeAddress; -import io.bisq.messages.crypto.KeyRing; -import io.bisq.messages.p2p.messaging.DecryptedMailboxListener; -import io.bisq.messages.protocol.trade.TradeMessage; -import io.bisq.messages.trade.offer.payload.OfferPayload; -import io.bisq.messages.trade.protocol.trade.messages.PayDepositRequest; -import io.bisq.messages.trade.statistics.payload.TradeStatistics; +import io.bisq.network_messages.DecryptedDirectMessageListener; +import io.bisq.network_messages.DecryptedMsgWithPubKey; +import io.bisq.network_messages.Message; +import io.bisq.network_messages.NodeAddress; +import io.bisq.network_messages.crypto.KeyRing; +import io.bisq.network_messages.p2p.messaging.DecryptedMailboxListener; +import io.bisq.network_messages.protocol.trade.TradeMessage; +import io.bisq.network_messages.trade.offer.payload.OfferPayload; +import io.bisq.network_messages.trade.protocol.trade.messages.PayDepositRequest; +import io.bisq.network_messages.trade.statistics.payload.TradeStatistics; import io.bisq.p2p.BootstrapListener; import io.bisq.p2p.protocol.availability.Offer; import io.bisq.p2p.protocol.availability.OfferAvailabilityModel; @@ -75,7 +75,7 @@ import java.util.concurrent.TimeUnit; import java.util.stream.Stream; import static com.google.common.base.Preconditions.checkArgument; -import static io.bisq.messages.util.Validator.nonEmptyStringOf; +import static io.bisq.network_messages.util.Validator.nonEmptyStringOf; public class TradeManager { private static final Logger log = LoggerFactory.getLogger(TradeManager.class); @@ -138,7 +138,7 @@ public class TradeManager { public void onDirectMessage(DecryptedMsgWithPubKey decryptedMsgWithPubKey, NodeAddress peerNodeAddress) { Message message = decryptedMsgWithPubKey.message; - // Handler for incoming initial messages from taker + // Handler for incoming initial network_messages from taker if (message instanceof PayDepositRequest) { log.trace("Received PayDepositRequest: " + message); handleInitialTakeOfferRequest((PayDepositRequest) message, peerNodeAddress); diff --git a/core/src/main/java/io/bisq/trade/closed/ClosedTradableManager.java b/core/src/main/java/io/bisq/trade/closed/ClosedTradableManager.java index 56932174e3..0f9b75afc2 100644 --- a/core/src/main/java/io/bisq/trade/closed/ClosedTradableManager.java +++ b/core/src/main/java/io/bisq/trade/closed/ClosedTradableManager.java @@ -18,7 +18,7 @@ package io.bisq.trade.closed; import com.google.inject.Inject; -import io.bisq.messages.crypto.KeyRing; +import io.bisq.network_messages.crypto.KeyRing; import io.bisq.p2p.protocol.availability.Offer; import io.bisq.provider.price.PriceFeedService; import io.bisq.storage.Storage; diff --git a/core/src/main/java/io/bisq/trade/failed/FailedTradesManager.java b/core/src/main/java/io/bisq/trade/failed/FailedTradesManager.java index 2b6ac61a95..cefa7da738 100644 --- a/core/src/main/java/io/bisq/trade/failed/FailedTradesManager.java +++ b/core/src/main/java/io/bisq/trade/failed/FailedTradesManager.java @@ -18,7 +18,7 @@ package io.bisq.trade.failed; import com.google.inject.Inject; -import io.bisq.messages.crypto.KeyRing; +import io.bisq.network_messages.crypto.KeyRing; import io.bisq.p2p.protocol.availability.Offer; import io.bisq.provider.price.PriceFeedService; import io.bisq.storage.Storage; diff --git a/core/src/main/java/io/bisq/trade/offer/OfferBookService.java b/core/src/main/java/io/bisq/trade/offer/OfferBookService.java index 732e463c59..121570ec34 100644 --- a/core/src/main/java/io/bisq/trade/offer/OfferBookService.java +++ b/core/src/main/java/io/bisq/trade/offer/OfferBookService.java @@ -23,12 +23,12 @@ import io.bisq.common.UserThread; import io.bisq.common.handlers.ErrorMessageHandler; import io.bisq.common.handlers.ResultHandler; import io.bisq.common.util.Utilities; -import io.bisq.messages.trade.offer.payload.OfferPayload; +import io.bisq.network_messages.trade.offer.payload.OfferPayload; import io.bisq.p2p.BootstrapListener; import io.bisq.p2p.protocol.availability.Offer; import io.bisq.p2p.storage.HashMapChangedListener; import io.bisq.p2p.storage.P2PService; -import io.bisq.messages.p2p.storage.storageentry.ProtectedStorageEntry; +import io.bisq.network_messages.p2p.storage.storageentry.ProtectedStorageEntry; import io.bisq.provider.price.PriceFeedService; import io.bisq.storage.PlainTextWrapper; import io.bisq.storage.Storage; diff --git a/core/src/main/java/io/bisq/trade/offer/OfferForJson.java b/core/src/main/java/io/bisq/trade/offer/OfferForJson.java index ab2cc626ce..5e3ee13237 100644 --- a/core/src/main/java/io/bisq/trade/offer/OfferForJson.java +++ b/core/src/main/java/io/bisq/trade/offer/OfferForJson.java @@ -2,8 +2,8 @@ package io.bisq.trade.offer; import io.bisq.common.util.MathUtils; import io.bisq.locale.CurrencyUtil; -import io.bisq.messages.payment.PaymentMethod; -import io.bisq.messages.trade.offer.payload.OfferPayload; +import io.bisq.network_messages.payment.PaymentMethod; +import io.bisq.network_messages.trade.offer.payload.OfferPayload; import org.bitcoinj.core.Coin; import org.bitcoinj.utils.ExchangeRate; import org.bitcoinj.utils.Fiat; diff --git a/core/src/main/java/io/bisq/trade/offer/OpenOfferManager.java b/core/src/main/java/io/bisq/trade/offer/OpenOfferManager.java index ef4d2ee965..cfa2ffef53 100644 --- a/core/src/main/java/io/bisq/trade/offer/OpenOfferManager.java +++ b/core/src/main/java/io/bisq/trade/offer/OpenOfferManager.java @@ -25,25 +25,25 @@ import io.bisq.btc.wallet.BtcWalletService; import io.bisq.btc.wallet.TradeWalletService; import io.bisq.common.Timer; import io.bisq.common.UserThread; -import io.bisq.messages.crypto.KeyRing; +import io.bisq.network_messages.crypto.KeyRing; import io.bisq.common.handlers.ErrorMessageHandler; import io.bisq.common.handlers.ResultHandler; -import io.bisq.messages.DecryptedMsgWithPubKey; -import io.bisq.messages.Message; -import io.bisq.messages.availability.AvailabilityResult; -import io.bisq.messages.availability.OfferAvailabilityRequest; -import io.bisq.messages.availability.OfferAvailabilityResponse; +import io.bisq.network_messages.DecryptedMsgWithPubKey; +import io.bisq.network_messages.Message; +import io.bisq.network_messages.availability.AvailabilityResult; +import io.bisq.network_messages.availability.OfferAvailabilityRequest; +import io.bisq.network_messages.availability.OfferAvailabilityResponse; import io.bisq.p2p.protocol.availability.Offer; import io.bisq.provider.price.PriceFeedService; -import io.bisq.messages.trade.exceptions.MarketPriceNotAvailableException; -import io.bisq.messages.trade.exceptions.TradePriceOutOfToleranceException; -import io.bisq.messages.trade.offer.payload.OfferPayload; +import io.bisq.network_messages.trade.exceptions.MarketPriceNotAvailableException; +import io.bisq.network_messages.trade.exceptions.TradePriceOutOfToleranceException; +import io.bisq.network_messages.trade.offer.payload.OfferPayload; import io.bisq.user.Preferences; import io.bisq.p2p.BootstrapListener; -import io.bisq.messages.NodeAddress; +import io.bisq.network_messages.NodeAddress; import io.bisq.p2p.storage.P2PService; -import io.bisq.messages.DecryptedDirectMessageListener; -import io.bisq.messages.p2p.messaging.SendDirectMessageListener; +import io.bisq.network_messages.DecryptedDirectMessageListener; +import io.bisq.network_messages.p2p.messaging.SendDirectMessageListener; import io.bisq.p2p.peers.PeerManager; import io.bisq.storage.Storage; import io.bisq.trade.TradableList; @@ -66,7 +66,7 @@ import java.util.Optional; import java.util.concurrent.TimeUnit; import static com.google.inject.internal.util.$Preconditions.checkNotNull; -import static io.bisq.messages.util.Validator.nonEmptyStringOf; +import static io.bisq.network_messages.util.Validator.nonEmptyStringOf; public class OpenOfferManager implements PeerManager.Listener, DecryptedDirectMessageListener { diff --git a/core/src/main/java/io/bisq/trade/protocol/placeoffer/tasks/BroadcastCreateOfferFeeTx.java b/core/src/main/java/io/bisq/trade/protocol/placeoffer/tasks/BroadcastCreateOfferFeeTx.java index c01caca608..2db72754da 100644 --- a/core/src/main/java/io/bisq/trade/protocol/placeoffer/tasks/BroadcastCreateOfferFeeTx.java +++ b/core/src/main/java/io/bisq/trade/protocol/placeoffer/tasks/BroadcastCreateOfferFeeTx.java @@ -20,7 +20,7 @@ package io.bisq.trade.protocol.placeoffer.tasks; import com.google.common.util.concurrent.FutureCallback; import io.bisq.common.taskrunner.Task; import io.bisq.common.taskrunner.TaskRunner; -import io.bisq.messages.trade.offer.payload.OfferPayload; +import io.bisq.network_messages.trade.offer.payload.OfferPayload; import io.bisq.trade.protocol.placeoffer.PlaceOfferModel; import org.bitcoinj.core.Transaction; import org.jetbrains.annotations.NotNull; diff --git a/core/src/main/java/io/bisq/trade/protocol/placeoffer/tasks/CreateOfferFeeTx.java b/core/src/main/java/io/bisq/trade/protocol/placeoffer/tasks/CreateOfferFeeTx.java index 33e74efe7a..561ebf3d5b 100644 --- a/core/src/main/java/io/bisq/trade/protocol/placeoffer/tasks/CreateOfferFeeTx.java +++ b/core/src/main/java/io/bisq/trade/protocol/placeoffer/tasks/CreateOfferFeeTx.java @@ -21,8 +21,8 @@ import io.bisq.btc.AddressEntry; import io.bisq.btc.wallet.BtcWalletService; import io.bisq.common.taskrunner.Task; import io.bisq.common.taskrunner.TaskRunner; -import io.bisq.messages.NodeAddress; -import io.bisq.messages.arbitration.Arbitrator; +import io.bisq.network_messages.NodeAddress; +import io.bisq.network_messages.arbitration.Arbitrator; import io.bisq.p2p.protocol.availability.Offer; import io.bisq.trade.protocol.placeoffer.PlaceOfferModel; import io.bisq.trade.protocol.trade.ArbitrationSelectionRule; diff --git a/core/src/main/java/io/bisq/trade/protocol/trade/ArbitrationSelectionRule.java b/core/src/main/java/io/bisq/trade/protocol/trade/ArbitrationSelectionRule.java index 98f49b86ea..60c798dfa1 100644 --- a/core/src/main/java/io/bisq/trade/protocol/trade/ArbitrationSelectionRule.java +++ b/core/src/main/java/io/bisq/trade/protocol/trade/ArbitrationSelectionRule.java @@ -17,8 +17,8 @@ package io.bisq.trade.protocol.trade; -import io.bisq.messages.trade.offer.payload.OfferPayload; -import io.bisq.messages.NodeAddress; +import io.bisq.network_messages.trade.offer.payload.OfferPayload; +import io.bisq.network_messages.NodeAddress; import org.bitcoinj.core.Sha256Hash; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/core/src/main/java/io/bisq/trade/protocol/trade/BuyerAsOffererProtocol.java b/core/src/main/java/io/bisq/trade/protocol/trade/BuyerAsOffererProtocol.java index 50d4ad6c6d..79103be6f3 100644 --- a/core/src/main/java/io/bisq/trade/protocol/trade/BuyerAsOffererProtocol.java +++ b/core/src/main/java/io/bisq/trade/protocol/trade/BuyerAsOffererProtocol.java @@ -19,13 +19,13 @@ package io.bisq.trade.protocol.trade; import io.bisq.common.handlers.ErrorMessageHandler; import io.bisq.common.handlers.ResultHandler; -import io.bisq.messages.Message; -import io.bisq.messages.protocol.trade.TradeMessage; -import io.bisq.messages.trade.protocol.trade.messages.DepositTxPublishedMessage; -import io.bisq.messages.trade.protocol.trade.messages.FinalizePayoutTxRequest; -import io.bisq.messages.trade.protocol.trade.messages.PayDepositRequest; -import io.bisq.messages.NodeAddress; -import io.bisq.messages.p2p.messaging.MailboxMessage; +import io.bisq.network_messages.Message; +import io.bisq.network_messages.protocol.trade.TradeMessage; +import io.bisq.network_messages.trade.protocol.trade.messages.DepositTxPublishedMessage; +import io.bisq.network_messages.trade.protocol.trade.messages.FinalizePayoutTxRequest; +import io.bisq.network_messages.trade.protocol.trade.messages.PayDepositRequest; +import io.bisq.network_messages.NodeAddress; +import io.bisq.network_messages.p2p.messaging.MailboxMessage; import io.bisq.trade.BuyerAsOffererTrade; import io.bisq.trade.Trade; import io.bisq.trade.protocol.trade.tasks.buyer.*; @@ -35,7 +35,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import static com.google.common.base.Preconditions.checkArgument; -import static io.bisq.messages.util.Validator.checkTradeId; +import static io.bisq.network_messages.util.Validator.checkTradeId; public class BuyerAsOffererProtocol extends TradeProtocol implements BuyerProtocol, OffererProtocol { private static final Logger log = LoggerFactory.getLogger(BuyerAsOffererProtocol.class); diff --git a/core/src/main/java/io/bisq/trade/protocol/trade/BuyerAsTakerProtocol.java b/core/src/main/java/io/bisq/trade/protocol/trade/BuyerAsTakerProtocol.java index 99c061be19..806a91180b 100644 --- a/core/src/main/java/io/bisq/trade/protocol/trade/BuyerAsTakerProtocol.java +++ b/core/src/main/java/io/bisq/trade/protocol/trade/BuyerAsTakerProtocol.java @@ -20,12 +20,12 @@ package io.bisq.trade.protocol.trade; import io.bisq.common.handlers.ErrorMessageHandler; import io.bisq.common.handlers.ResultHandler; -import io.bisq.messages.Message; -import io.bisq.messages.protocol.trade.TradeMessage; -import io.bisq.messages.trade.protocol.trade.messages.FinalizePayoutTxRequest; -import io.bisq.messages.trade.protocol.trade.messages.PublishDepositTxRequest; -import io.bisq.messages.NodeAddress; -import io.bisq.messages.p2p.messaging.MailboxMessage; +import io.bisq.network_messages.Message; +import io.bisq.network_messages.protocol.trade.TradeMessage; +import io.bisq.network_messages.trade.protocol.trade.messages.FinalizePayoutTxRequest; +import io.bisq.network_messages.trade.protocol.trade.messages.PublishDepositTxRequest; +import io.bisq.network_messages.NodeAddress; +import io.bisq.network_messages.p2p.messaging.MailboxMessage; import io.bisq.trade.BuyerAsTakerTrade; import io.bisq.trade.Trade; import io.bisq.trade.protocol.trade.tasks.buyer.*; diff --git a/core/src/main/java/io/bisq/trade/protocol/trade/OffererProtocol.java b/core/src/main/java/io/bisq/trade/protocol/trade/OffererProtocol.java index 13fe5e57a9..28fd36f58c 100644 --- a/core/src/main/java/io/bisq/trade/protocol/trade/OffererProtocol.java +++ b/core/src/main/java/io/bisq/trade/protocol/trade/OffererProtocol.java @@ -18,8 +18,8 @@ package io.bisq.trade.protocol.trade; -import io.bisq.messages.protocol.trade.TradeMessage; -import io.bisq.messages.NodeAddress; +import io.bisq.network_messages.protocol.trade.TradeMessage; +import io.bisq.network_messages.NodeAddress; public interface OffererProtocol { void handleTakeOfferRequest(TradeMessage message, NodeAddress taker); diff --git a/core/src/main/java/io/bisq/trade/protocol/trade/ProcessModel.java b/core/src/main/java/io/bisq/trade/protocol/trade/ProcessModel.java index 702283cc06..0597ebd019 100644 --- a/core/src/main/java/io/bisq/trade/protocol/trade/ProcessModel.java +++ b/core/src/main/java/io/bisq/trade/protocol/trade/ProcessModel.java @@ -23,13 +23,13 @@ import io.bisq.btc.wallet.BtcWalletService; import io.bisq.btc.wallet.TradeWalletService; import io.bisq.common.taskrunner.Model; import io.bisq.filter.FilterManager; -import io.bisq.messages.NodeAddress; -import io.bisq.messages.btc.data.RawTransactionInput; -import io.bisq.messages.crypto.KeyRing; -import io.bisq.messages.crypto.PubKeyRing; -import io.bisq.messages.filter.payload.PaymentAccountFilter; -import io.bisq.messages.payment.payload.PaymentAccountContractData; -import io.bisq.messages.protocol.trade.TradeMessage; +import io.bisq.network_messages.NodeAddress; +import io.bisq.network_messages.btc.data.RawTransactionInput; +import io.bisq.network_messages.crypto.KeyRing; +import io.bisq.network_messages.crypto.PubKeyRing; +import io.bisq.network_messages.filter.payload.PaymentAccountFilter; +import io.bisq.network_messages.payment.payload.PaymentAccountContractData; +import io.bisq.network_messages.protocol.trade.TradeMessage; import io.bisq.p2p.protocol.availability.Offer; import io.bisq.p2p.storage.P2PService; import io.bisq.payment.PaymentAccount; diff --git a/core/src/main/java/io/bisq/trade/protocol/trade/SellerAsOffererProtocol.java b/core/src/main/java/io/bisq/trade/protocol/trade/SellerAsOffererProtocol.java index 7e3725660e..2f12650958 100644 --- a/core/src/main/java/io/bisq/trade/protocol/trade/SellerAsOffererProtocol.java +++ b/core/src/main/java/io/bisq/trade/protocol/trade/SellerAsOffererProtocol.java @@ -20,14 +20,14 @@ package io.bisq.trade.protocol.trade; import io.bisq.common.handlers.ErrorMessageHandler; import io.bisq.common.handlers.ResultHandler; -import io.bisq.messages.Message; -import io.bisq.messages.protocol.trade.TradeMessage; -import io.bisq.messages.trade.protocol.trade.messages.DepositTxPublishedMessage; -import io.bisq.messages.trade.protocol.trade.messages.FiatTransferStartedMessage; -import io.bisq.messages.trade.protocol.trade.messages.PayDepositRequest; -import io.bisq.messages.trade.protocol.trade.messages.PayoutTxFinalizedMessage; -import io.bisq.messages.NodeAddress; -import io.bisq.messages.p2p.messaging.MailboxMessage; +import io.bisq.network_messages.Message; +import io.bisq.network_messages.protocol.trade.TradeMessage; +import io.bisq.network_messages.trade.protocol.trade.messages.DepositTxPublishedMessage; +import io.bisq.network_messages.trade.protocol.trade.messages.FiatTransferStartedMessage; +import io.bisq.network_messages.trade.protocol.trade.messages.PayDepositRequest; +import io.bisq.network_messages.trade.protocol.trade.messages.PayoutTxFinalizedMessage; +import io.bisq.network_messages.NodeAddress; +import io.bisq.network_messages.p2p.messaging.MailboxMessage; import io.bisq.trade.SellerAsOffererTrade; import io.bisq.trade.Trade; import io.bisq.trade.protocol.trade.tasks.offerer.*; @@ -37,7 +37,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import static com.google.common.base.Preconditions.checkArgument; -import static io.bisq.messages.util.Validator.checkTradeId; +import static io.bisq.network_messages.util.Validator.checkTradeId; public class SellerAsOffererProtocol extends TradeProtocol implements SellerProtocol, OffererProtocol { private static final Logger log = LoggerFactory.getLogger(SellerAsOffererProtocol.class); diff --git a/core/src/main/java/io/bisq/trade/protocol/trade/SellerAsTakerProtocol.java b/core/src/main/java/io/bisq/trade/protocol/trade/SellerAsTakerProtocol.java index 60bdebc084..589f9ef8a7 100644 --- a/core/src/main/java/io/bisq/trade/protocol/trade/SellerAsTakerProtocol.java +++ b/core/src/main/java/io/bisq/trade/protocol/trade/SellerAsTakerProtocol.java @@ -20,13 +20,13 @@ package io.bisq.trade.protocol.trade; import io.bisq.common.handlers.ErrorMessageHandler; import io.bisq.common.handlers.ResultHandler; -import io.bisq.messages.Message; -import io.bisq.messages.protocol.trade.TradeMessage; -import io.bisq.messages.trade.protocol.trade.messages.FiatTransferStartedMessage; -import io.bisq.messages.trade.protocol.trade.messages.PayoutTxFinalizedMessage; -import io.bisq.messages.trade.protocol.trade.messages.PublishDepositTxRequest; -import io.bisq.messages.NodeAddress; -import io.bisq.messages.p2p.messaging.MailboxMessage; +import io.bisq.network_messages.Message; +import io.bisq.network_messages.protocol.trade.TradeMessage; +import io.bisq.network_messages.trade.protocol.trade.messages.FiatTransferStartedMessage; +import io.bisq.network_messages.trade.protocol.trade.messages.PayoutTxFinalizedMessage; +import io.bisq.network_messages.trade.protocol.trade.messages.PublishDepositTxRequest; +import io.bisq.network_messages.NodeAddress; +import io.bisq.network_messages.p2p.messaging.MailboxMessage; import io.bisq.trade.SellerAsTakerTrade; import io.bisq.trade.Trade; import io.bisq.trade.protocol.trade.tasks.seller.*; diff --git a/core/src/main/java/io/bisq/trade/protocol/trade/TradeProtocol.java b/core/src/main/java/io/bisq/trade/protocol/trade/TradeProtocol.java index c2fb778cc6..48ed82cfb4 100644 --- a/core/src/main/java/io/bisq/trade/protocol/trade/TradeProtocol.java +++ b/core/src/main/java/io/bisq/trade/protocol/trade/TradeProtocol.java @@ -19,12 +19,12 @@ package io.bisq.trade.protocol.trade; import io.bisq.common.Timer; import io.bisq.common.UserThread; -import io.bisq.messages.crypto.PubKeyRing; -import io.bisq.messages.DecryptedMsgWithPubKey; -import io.bisq.messages.Message; -import io.bisq.messages.protocol.trade.TradeMessage; -import io.bisq.messages.NodeAddress; -import io.bisq.messages.DecryptedDirectMessageListener; +import io.bisq.network_messages.crypto.PubKeyRing; +import io.bisq.network_messages.DecryptedMsgWithPubKey; +import io.bisq.network_messages.Message; +import io.bisq.network_messages.protocol.trade.TradeMessage; +import io.bisq.network_messages.NodeAddress; +import io.bisq.network_messages.DecryptedDirectMessageListener; import io.bisq.trade.OffererTrade; import io.bisq.trade.Trade; import io.bisq.trade.TradeManager; @@ -33,7 +33,7 @@ import org.slf4j.LoggerFactory; import java.security.PublicKey; -import static io.bisq.messages.util.Validator.nonEmptyStringOf; +import static io.bisq.network_messages.util.Validator.nonEmptyStringOf; public abstract class TradeProtocol { private static final Logger log = LoggerFactory.getLogger(TradeProtocol.class); diff --git a/core/src/main/java/io/bisq/trade/protocol/trade/TradingPeer.java b/core/src/main/java/io/bisq/trade/protocol/trade/TradingPeer.java index adc4544ce9..982152fcd5 100644 --- a/core/src/main/java/io/bisq/trade/protocol/trade/TradingPeer.java +++ b/core/src/main/java/io/bisq/trade/protocol/trade/TradingPeer.java @@ -18,10 +18,10 @@ package io.bisq.trade.protocol.trade; import io.bisq.app.Version; -import io.bisq.messages.crypto.PubKeyRing; +import io.bisq.network_messages.crypto.PubKeyRing; import io.bisq.common.persistance.Persistable; -import io.bisq.messages.btc.data.RawTransactionInput; -import io.bisq.messages.payment.payload.PaymentAccountContractData; +import io.bisq.network_messages.btc.data.RawTransactionInput; +import io.bisq.network_messages.payment.payload.PaymentAccountContractData; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/core/src/main/java/io/bisq/trade/protocol/trade/tasks/TradeTask.java b/core/src/main/java/io/bisq/trade/protocol/trade/tasks/TradeTask.java index 5a07d0d188..2413c07883 100644 --- a/core/src/main/java/io/bisq/trade/protocol/trade/tasks/TradeTask.java +++ b/core/src/main/java/io/bisq/trade/protocol/trade/tasks/TradeTask.java @@ -19,8 +19,8 @@ package io.bisq.trade.protocol.trade.tasks; import io.bisq.common.taskrunner.Task; import io.bisq.common.taskrunner.TaskRunner; -import io.bisq.messages.DecryptedMsgWithPubKey; -import io.bisq.messages.p2p.messaging.MailboxMessage; +import io.bisq.network_messages.DecryptedMsgWithPubKey; +import io.bisq.network_messages.p2p.messaging.MailboxMessage; import io.bisq.trade.Trade; import io.bisq.trade.protocol.trade.ProcessModel; import org.slf4j.Logger; diff --git a/core/src/main/java/io/bisq/trade/protocol/trade/tasks/buyer/OffererCreatesAndSignsDepositTxAsBuyer.java b/core/src/main/java/io/bisq/trade/protocol/trade/tasks/buyer/OffererCreatesAndSignsDepositTxAsBuyer.java index 235933280e..86014a1da1 100644 --- a/core/src/main/java/io/bisq/trade/protocol/trade/tasks/buyer/OffererCreatesAndSignsDepositTxAsBuyer.java +++ b/core/src/main/java/io/bisq/trade/protocol/trade/tasks/buyer/OffererCreatesAndSignsDepositTxAsBuyer.java @@ -20,7 +20,7 @@ package io.bisq.trade.protocol.trade.tasks.buyer; import io.bisq.btc.AddressEntry; import io.bisq.btc.data.PreparedDepositTxAndOffererInputs; import io.bisq.btc.wallet.BtcWalletService; -import io.bisq.messages.crypto.Hash; +import io.bisq.network_messages.crypto.Hash; import io.bisq.common.taskrunner.TaskRunner; import io.bisq.trade.Trade; import io.bisq.trade.protocol.trade.TradingPeer; diff --git a/core/src/main/java/io/bisq/trade/protocol/trade/tasks/buyer/ProcessFinalizePayoutTxRequest.java b/core/src/main/java/io/bisq/trade/protocol/trade/tasks/buyer/ProcessFinalizePayoutTxRequest.java index ebe5a3fdf2..cea42f63f5 100644 --- a/core/src/main/java/io/bisq/trade/protocol/trade/tasks/buyer/ProcessFinalizePayoutTxRequest.java +++ b/core/src/main/java/io/bisq/trade/protocol/trade/tasks/buyer/ProcessFinalizePayoutTxRequest.java @@ -18,14 +18,14 @@ package io.bisq.trade.protocol.trade.tasks.buyer; import io.bisq.common.taskrunner.TaskRunner; -import io.bisq.messages.trade.protocol.trade.messages.FinalizePayoutTxRequest; +import io.bisq.network_messages.trade.protocol.trade.messages.FinalizePayoutTxRequest; import io.bisq.trade.Trade; import io.bisq.trade.protocol.trade.tasks.TradeTask; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import static com.google.common.base.Preconditions.checkNotNull; -import static io.bisq.messages.util.Validator.*; +import static io.bisq.network_messages.util.Validator.*; public class ProcessFinalizePayoutTxRequest extends TradeTask { private static final Logger log = LoggerFactory.getLogger(ProcessFinalizePayoutTxRequest.class); diff --git a/core/src/main/java/io/bisq/trade/protocol/trade/tasks/buyer/SendFiatTransferStartedMessage.java b/core/src/main/java/io/bisq/trade/protocol/trade/tasks/buyer/SendFiatTransferStartedMessage.java index 7cbc7b4973..e7d1f41d50 100644 --- a/core/src/main/java/io/bisq/trade/protocol/trade/tasks/buyer/SendFiatTransferStartedMessage.java +++ b/core/src/main/java/io/bisq/trade/protocol/trade/tasks/buyer/SendFiatTransferStartedMessage.java @@ -20,8 +20,8 @@ package io.bisq.trade.protocol.trade.tasks.buyer; import io.bisq.btc.AddressEntry; import io.bisq.btc.wallet.BtcWalletService; import io.bisq.common.taskrunner.TaskRunner; -import io.bisq.messages.trade.protocol.trade.messages.FiatTransferStartedMessage; -import io.bisq.messages.p2p.messaging.SendMailboxMessageListener; +import io.bisq.network_messages.trade.protocol.trade.messages.FiatTransferStartedMessage; +import io.bisq.network_messages.p2p.messaging.SendMailboxMessageListener; import io.bisq.trade.Trade; import io.bisq.trade.protocol.trade.tasks.TradeTask; import org.slf4j.Logger; diff --git a/core/src/main/java/io/bisq/trade/protocol/trade/tasks/buyer/SendPayoutTxFinalizedMessage.java b/core/src/main/java/io/bisq/trade/protocol/trade/tasks/buyer/SendPayoutTxFinalizedMessage.java index cea7cb2e9f..4629683071 100644 --- a/core/src/main/java/io/bisq/trade/protocol/trade/tasks/buyer/SendPayoutTxFinalizedMessage.java +++ b/core/src/main/java/io/bisq/trade/protocol/trade/tasks/buyer/SendPayoutTxFinalizedMessage.java @@ -18,8 +18,8 @@ package io.bisq.trade.protocol.trade.tasks.buyer; import io.bisq.common.taskrunner.TaskRunner; -import io.bisq.messages.trade.protocol.trade.messages.PayoutTxFinalizedMessage; -import io.bisq.messages.p2p.messaging.SendMailboxMessageListener; +import io.bisq.network_messages.trade.protocol.trade.messages.PayoutTxFinalizedMessage; +import io.bisq.network_messages.p2p.messaging.SendMailboxMessageListener; import io.bisq.trade.Trade; import io.bisq.trade.protocol.trade.tasks.TradeTask; import org.slf4j.Logger; diff --git a/core/src/main/java/io/bisq/trade/protocol/trade/tasks/buyer/TakerSignAndPublishDepositTxAsBuyer.java b/core/src/main/java/io/bisq/trade/protocol/trade/tasks/buyer/TakerSignAndPublishDepositTxAsBuyer.java index 8efdb5e420..7c4457f4e6 100644 --- a/core/src/main/java/io/bisq/trade/protocol/trade/tasks/buyer/TakerSignAndPublishDepositTxAsBuyer.java +++ b/core/src/main/java/io/bisq/trade/protocol/trade/tasks/buyer/TakerSignAndPublishDepositTxAsBuyer.java @@ -20,9 +20,9 @@ package io.bisq.trade.protocol.trade.tasks.buyer; import com.google.common.util.concurrent.FutureCallback; import io.bisq.btc.AddressEntry; import io.bisq.btc.wallet.BtcWalletService; -import io.bisq.messages.crypto.Hash; +import io.bisq.network_messages.crypto.Hash; import io.bisq.common.taskrunner.TaskRunner; -import io.bisq.messages.btc.data.RawTransactionInput; +import io.bisq.network_messages.btc.data.RawTransactionInput; import io.bisq.trade.Trade; import io.bisq.trade.protocol.trade.TradingPeer; import io.bisq.trade.protocol.trade.tasks.TradeTask; diff --git a/core/src/main/java/io/bisq/trade/protocol/trade/tasks/offerer/CreateAndSignContract.java b/core/src/main/java/io/bisq/trade/protocol/trade/tasks/offerer/CreateAndSignContract.java index 33c45afa3f..e813ab97fc 100644 --- a/core/src/main/java/io/bisq/trade/protocol/trade/tasks/offerer/CreateAndSignContract.java +++ b/core/src/main/java/io/bisq/trade/protocol/trade/tasks/offerer/CreateAndSignContract.java @@ -23,9 +23,9 @@ import io.bisq.btc.wallet.BtcWalletService; import io.bisq.common.crypto.Sig; import io.bisq.common.taskrunner.TaskRunner; import io.bisq.common.util.Utilities; -import io.bisq.messages.payment.payload.PaymentAccountContractData; -import io.bisq.messages.trade.payload.Contract; -import io.bisq.messages.NodeAddress; +import io.bisq.network_messages.payment.payload.PaymentAccountContractData; +import io.bisq.network_messages.trade.payload.Contract; +import io.bisq.network_messages.NodeAddress; import io.bisq.trade.BuyerAsOffererTrade; import io.bisq.trade.Trade; import io.bisq.trade.protocol.trade.TradingPeer; diff --git a/core/src/main/java/io/bisq/trade/protocol/trade/tasks/offerer/ProcessDepositTxPublishedMessage.java b/core/src/main/java/io/bisq/trade/protocol/trade/tasks/offerer/ProcessDepositTxPublishedMessage.java index 6ba6afb1d5..501ca1da3f 100644 --- a/core/src/main/java/io/bisq/trade/protocol/trade/tasks/offerer/ProcessDepositTxPublishedMessage.java +++ b/core/src/main/java/io/bisq/trade/protocol/trade/tasks/offerer/ProcessDepositTxPublishedMessage.java @@ -19,7 +19,7 @@ package io.bisq.trade.protocol.trade.tasks.offerer; import io.bisq.btc.wallet.BtcWalletService; import io.bisq.common.taskrunner.TaskRunner; -import io.bisq.messages.trade.protocol.trade.messages.DepositTxPublishedMessage; +import io.bisq.network_messages.trade.protocol.trade.messages.DepositTxPublishedMessage; import io.bisq.trade.OffererTrade; import io.bisq.trade.Trade; import io.bisq.trade.protocol.trade.tasks.TradeTask; @@ -29,7 +29,7 @@ import org.slf4j.LoggerFactory; import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkNotNull; -import static io.bisq.messages.util.Validator.checkTradeId; +import static io.bisq.network_messages.util.Validator.checkTradeId; public class ProcessDepositTxPublishedMessage extends TradeTask { private static final Logger log = LoggerFactory.getLogger(ProcessDepositTxPublishedMessage.class); diff --git a/core/src/main/java/io/bisq/trade/protocol/trade/tasks/offerer/ProcessPayDepositRequest.java b/core/src/main/java/io/bisq/trade/protocol/trade/tasks/offerer/ProcessPayDepositRequest.java index ab31df0f6e..8bcd13760d 100644 --- a/core/src/main/java/io/bisq/trade/protocol/trade/tasks/offerer/ProcessPayDepositRequest.java +++ b/core/src/main/java/io/bisq/trade/protocol/trade/tasks/offerer/ProcessPayDepositRequest.java @@ -18,10 +18,10 @@ package io.bisq.trade.protocol.trade.tasks.offerer; import io.bisq.common.taskrunner.TaskRunner; -import io.bisq.messages.filter.payload.PaymentAccountFilter; -import io.bisq.messages.payment.payload.PaymentAccountContractData; -import io.bisq.messages.trade.exceptions.TradePriceOutOfToleranceException; -import io.bisq.messages.trade.protocol.trade.messages.PayDepositRequest; +import io.bisq.network_messages.filter.payload.PaymentAccountFilter; +import io.bisq.network_messages.payment.payload.PaymentAccountContractData; +import io.bisq.network_messages.trade.exceptions.TradePriceOutOfToleranceException; +import io.bisq.network_messages.trade.protocol.trade.messages.PayDepositRequest; import io.bisq.trade.Trade; import io.bisq.trade.protocol.trade.tasks.TradeTask; import org.bitcoinj.core.Coin; @@ -30,8 +30,8 @@ import org.slf4j.LoggerFactory; import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkNotNull; -import static io.bisq.messages.util.Validator.checkTradeId; -import static io.bisq.messages.util.Validator.nonEmptyStringOf; +import static io.bisq.network_messages.util.Validator.checkTradeId; +import static io.bisq.network_messages.util.Validator.nonEmptyStringOf; public class ProcessPayDepositRequest extends TradeTask { private static final Logger log = LoggerFactory.getLogger(ProcessPayDepositRequest.class); diff --git a/core/src/main/java/io/bisq/trade/protocol/trade/tasks/offerer/PublishTradeStatistics.java b/core/src/main/java/io/bisq/trade/protocol/trade/tasks/offerer/PublishTradeStatistics.java index deb5e0fd7d..43dc94d76e 100644 --- a/core/src/main/java/io/bisq/trade/protocol/trade/tasks/offerer/PublishTradeStatistics.java +++ b/core/src/main/java/io/bisq/trade/protocol/trade/tasks/offerer/PublishTradeStatistics.java @@ -18,7 +18,7 @@ package io.bisq.trade.protocol.trade.tasks.offerer; import io.bisq.common.taskrunner.TaskRunner; -import io.bisq.messages.trade.statistics.payload.TradeStatistics; +import io.bisq.network_messages.trade.statistics.payload.TradeStatistics; import io.bisq.trade.Trade; import io.bisq.trade.protocol.trade.tasks.TradeTask; diff --git a/core/src/main/java/io/bisq/trade/protocol/trade/tasks/offerer/SendPublishDepositTxRequest.java b/core/src/main/java/io/bisq/trade/protocol/trade/tasks/offerer/SendPublishDepositTxRequest.java index c131147350..bd5d9a9685 100644 --- a/core/src/main/java/io/bisq/trade/protocol/trade/tasks/offerer/SendPublishDepositTxRequest.java +++ b/core/src/main/java/io/bisq/trade/protocol/trade/tasks/offerer/SendPublishDepositTxRequest.java @@ -20,8 +20,8 @@ package io.bisq.trade.protocol.trade.tasks.offerer; import io.bisq.btc.AddressEntry; import io.bisq.btc.wallet.BtcWalletService; import io.bisq.common.taskrunner.TaskRunner; -import io.bisq.messages.trade.protocol.trade.messages.PublishDepositTxRequest; -import io.bisq.messages.p2p.messaging.SendDirectMessageListener; +import io.bisq.network_messages.trade.protocol.trade.messages.PublishDepositTxRequest; +import io.bisq.network_messages.p2p.messaging.SendDirectMessageListener; import io.bisq.trade.Trade; import io.bisq.trade.protocol.trade.tasks.TradeTask; import org.slf4j.Logger; diff --git a/core/src/main/java/io/bisq/trade/protocol/trade/tasks/seller/OffererCreatesAndSignsDepositTxAsSeller.java b/core/src/main/java/io/bisq/trade/protocol/trade/tasks/seller/OffererCreatesAndSignsDepositTxAsSeller.java index 650064d1c8..1a26d9671e 100644 --- a/core/src/main/java/io/bisq/trade/protocol/trade/tasks/seller/OffererCreatesAndSignsDepositTxAsSeller.java +++ b/core/src/main/java/io/bisq/trade/protocol/trade/tasks/seller/OffererCreatesAndSignsDepositTxAsSeller.java @@ -20,7 +20,7 @@ package io.bisq.trade.protocol.trade.tasks.seller; import io.bisq.btc.AddressEntry; import io.bisq.btc.data.PreparedDepositTxAndOffererInputs; import io.bisq.btc.wallet.BtcWalletService; -import io.bisq.messages.crypto.Hash; +import io.bisq.network_messages.crypto.Hash; import io.bisq.common.taskrunner.TaskRunner; import io.bisq.trade.Trade; import io.bisq.trade.protocol.trade.TradingPeer; diff --git a/core/src/main/java/io/bisq/trade/protocol/trade/tasks/seller/ProcessFiatTransferStartedMessage.java b/core/src/main/java/io/bisq/trade/protocol/trade/tasks/seller/ProcessFiatTransferStartedMessage.java index b2415a4f67..7290ce205b 100644 --- a/core/src/main/java/io/bisq/trade/protocol/trade/tasks/seller/ProcessFiatTransferStartedMessage.java +++ b/core/src/main/java/io/bisq/trade/protocol/trade/tasks/seller/ProcessFiatTransferStartedMessage.java @@ -18,15 +18,15 @@ package io.bisq.trade.protocol.trade.tasks.seller; import io.bisq.common.taskrunner.TaskRunner; -import io.bisq.messages.trade.protocol.trade.messages.FiatTransferStartedMessage; +import io.bisq.network_messages.trade.protocol.trade.messages.FiatTransferStartedMessage; import io.bisq.trade.Trade; import io.bisq.trade.protocol.trade.tasks.TradeTask; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import static com.google.common.base.Preconditions.checkNotNull; -import static io.bisq.messages.util.Validator.checkTradeId; -import static io.bisq.messages.util.Validator.nonEmptyStringOf; +import static io.bisq.network_messages.util.Validator.checkTradeId; +import static io.bisq.network_messages.util.Validator.nonEmptyStringOf; public class ProcessFiatTransferStartedMessage extends TradeTask { private static final Logger log = LoggerFactory.getLogger(ProcessFiatTransferStartedMessage.class); diff --git a/core/src/main/java/io/bisq/trade/protocol/trade/tasks/seller/ProcessPayoutTxFinalizedMessage.java b/core/src/main/java/io/bisq/trade/protocol/trade/tasks/seller/ProcessPayoutTxFinalizedMessage.java index a463e59897..11bc6a7dea 100644 --- a/core/src/main/java/io/bisq/trade/protocol/trade/tasks/seller/ProcessPayoutTxFinalizedMessage.java +++ b/core/src/main/java/io/bisq/trade/protocol/trade/tasks/seller/ProcessPayoutTxFinalizedMessage.java @@ -19,7 +19,7 @@ package io.bisq.trade.protocol.trade.tasks.seller; import io.bisq.btc.wallet.BtcWalletService; import io.bisq.common.taskrunner.TaskRunner; -import io.bisq.messages.trade.protocol.trade.messages.PayoutTxFinalizedMessage; +import io.bisq.network_messages.trade.protocol.trade.messages.PayoutTxFinalizedMessage; import io.bisq.trade.Trade; import io.bisq.trade.protocol.trade.tasks.TradeTask; import org.bitcoinj.core.Transaction; @@ -28,7 +28,7 @@ import org.slf4j.LoggerFactory; import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkNotNull; -import static io.bisq.messages.util.Validator.checkTradeId; +import static io.bisq.network_messages.util.Validator.checkTradeId; public class ProcessPayoutTxFinalizedMessage extends TradeTask { private static final Logger log = LoggerFactory.getLogger(ProcessPayoutTxFinalizedMessage.class); diff --git a/core/src/main/java/io/bisq/trade/protocol/trade/tasks/seller/SendFinalizePayoutTxRequest.java b/core/src/main/java/io/bisq/trade/protocol/trade/tasks/seller/SendFinalizePayoutTxRequest.java index 3388668605..94e92c0793 100644 --- a/core/src/main/java/io/bisq/trade/protocol/trade/tasks/seller/SendFinalizePayoutTxRequest.java +++ b/core/src/main/java/io/bisq/trade/protocol/trade/tasks/seller/SendFinalizePayoutTxRequest.java @@ -20,8 +20,8 @@ package io.bisq.trade.protocol.trade.tasks.seller; import io.bisq.btc.AddressEntry; import io.bisq.btc.wallet.BtcWalletService; import io.bisq.common.taskrunner.TaskRunner; -import io.bisq.messages.trade.protocol.trade.messages.FinalizePayoutTxRequest; -import io.bisq.messages.p2p.messaging.SendMailboxMessageListener; +import io.bisq.network_messages.trade.protocol.trade.messages.FinalizePayoutTxRequest; +import io.bisq.network_messages.p2p.messaging.SendMailboxMessageListener; import io.bisq.trade.Trade; import io.bisq.trade.protocol.trade.tasks.TradeTask; import org.slf4j.Logger; diff --git a/core/src/main/java/io/bisq/trade/protocol/trade/tasks/seller/SignAndPublishDepositTxAsSeller.java b/core/src/main/java/io/bisq/trade/protocol/trade/tasks/seller/SignAndPublishDepositTxAsSeller.java index 0bc548e373..6f57f67a7c 100644 --- a/core/src/main/java/io/bisq/trade/protocol/trade/tasks/seller/SignAndPublishDepositTxAsSeller.java +++ b/core/src/main/java/io/bisq/trade/protocol/trade/tasks/seller/SignAndPublishDepositTxAsSeller.java @@ -20,9 +20,9 @@ package io.bisq.trade.protocol.trade.tasks.seller; import com.google.common.util.concurrent.FutureCallback; import io.bisq.btc.AddressEntry; import io.bisq.btc.wallet.BtcWalletService; -import io.bisq.messages.crypto.Hash; +import io.bisq.network_messages.crypto.Hash; import io.bisq.common.taskrunner.TaskRunner; -import io.bisq.messages.btc.data.RawTransactionInput; +import io.bisq.network_messages.btc.data.RawTransactionInput; import io.bisq.trade.Trade; import io.bisq.trade.protocol.trade.TradingPeer; import io.bisq.trade.protocol.trade.tasks.TradeTask; diff --git a/core/src/main/java/io/bisq/trade/protocol/trade/tasks/taker/CreateTakeOfferFeeTx.java b/core/src/main/java/io/bisq/trade/protocol/trade/tasks/taker/CreateTakeOfferFeeTx.java index 632021b03b..76ff14256e 100644 --- a/core/src/main/java/io/bisq/trade/protocol/trade/tasks/taker/CreateTakeOfferFeeTx.java +++ b/core/src/main/java/io/bisq/trade/protocol/trade/tasks/taker/CreateTakeOfferFeeTx.java @@ -20,8 +20,8 @@ package io.bisq.trade.protocol.trade.tasks.taker; import io.bisq.btc.AddressEntry; import io.bisq.btc.wallet.BtcWalletService; import io.bisq.common.taskrunner.TaskRunner; -import io.bisq.messages.arbitration.Arbitrator; -import io.bisq.messages.NodeAddress; +import io.bisq.network_messages.arbitration.Arbitrator; +import io.bisq.network_messages.NodeAddress; import io.bisq.trade.Trade; import io.bisq.trade.protocol.trade.ArbitrationSelectionRule; import io.bisq.trade.protocol.trade.tasks.TradeTask; diff --git a/core/src/main/java/io/bisq/trade/protocol/trade/tasks/taker/ProcessPublishDepositTxRequest.java b/core/src/main/java/io/bisq/trade/protocol/trade/tasks/taker/ProcessPublishDepositTxRequest.java index 136bdce155..98ef821607 100644 --- a/core/src/main/java/io/bisq/trade/protocol/trade/tasks/taker/ProcessPublishDepositTxRequest.java +++ b/core/src/main/java/io/bisq/trade/protocol/trade/tasks/taker/ProcessPublishDepositTxRequest.java @@ -18,9 +18,9 @@ package io.bisq.trade.protocol.trade.tasks.taker; import io.bisq.common.taskrunner.TaskRunner; -import io.bisq.messages.filter.payload.PaymentAccountFilter; -import io.bisq.messages.payment.payload.PaymentAccountContractData; -import io.bisq.messages.trade.protocol.trade.messages.PublishDepositTxRequest; +import io.bisq.network_messages.filter.payload.PaymentAccountFilter; +import io.bisq.network_messages.payment.payload.PaymentAccountContractData; +import io.bisq.network_messages.trade.protocol.trade.messages.PublishDepositTxRequest; import io.bisq.trade.Trade; import io.bisq.trade.protocol.trade.tasks.TradeTask; import org.slf4j.Logger; @@ -28,8 +28,8 @@ import org.slf4j.LoggerFactory; import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkNotNull; -import static io.bisq.messages.util.Validator.checkTradeId; -import static io.bisq.messages.util.Validator.nonEmptyStringOf; +import static io.bisq.network_messages.util.Validator.checkTradeId; +import static io.bisq.network_messages.util.Validator.nonEmptyStringOf; public class ProcessPublishDepositTxRequest extends TradeTask { private static final Logger log = LoggerFactory.getLogger(ProcessPublishDepositTxRequest.class); diff --git a/core/src/main/java/io/bisq/trade/protocol/trade/tasks/taker/PublishTradeStatistics.java b/core/src/main/java/io/bisq/trade/protocol/trade/tasks/taker/PublishTradeStatistics.java index b19fd85872..a51ad29127 100644 --- a/core/src/main/java/io/bisq/trade/protocol/trade/tasks/taker/PublishTradeStatistics.java +++ b/core/src/main/java/io/bisq/trade/protocol/trade/tasks/taker/PublishTradeStatistics.java @@ -18,7 +18,7 @@ package io.bisq.trade.protocol.trade.tasks.taker; import io.bisq.common.taskrunner.TaskRunner; -import io.bisq.messages.trade.statistics.payload.TradeStatistics; +import io.bisq.network_messages.trade.statistics.payload.TradeStatistics; import io.bisq.trade.Trade; import io.bisq.trade.protocol.trade.tasks.TradeTask; import org.slf4j.Logger; diff --git a/core/src/main/java/io/bisq/trade/protocol/trade/tasks/taker/SendDepositTxPublishedMessage.java b/core/src/main/java/io/bisq/trade/protocol/trade/tasks/taker/SendDepositTxPublishedMessage.java index 7847806a12..93ab421656 100644 --- a/core/src/main/java/io/bisq/trade/protocol/trade/tasks/taker/SendDepositTxPublishedMessage.java +++ b/core/src/main/java/io/bisq/trade/protocol/trade/tasks/taker/SendDepositTxPublishedMessage.java @@ -18,8 +18,8 @@ package io.bisq.trade.protocol.trade.tasks.taker; import io.bisq.common.taskrunner.TaskRunner; -import io.bisq.messages.trade.protocol.trade.messages.DepositTxPublishedMessage; -import io.bisq.messages.p2p.messaging.SendMailboxMessageListener; +import io.bisq.network_messages.trade.protocol.trade.messages.DepositTxPublishedMessage; +import io.bisq.network_messages.p2p.messaging.SendMailboxMessageListener; import io.bisq.trade.Trade; import io.bisq.trade.protocol.trade.tasks.TradeTask; import org.slf4j.Logger; diff --git a/core/src/main/java/io/bisq/trade/protocol/trade/tasks/taker/SendPayDepositRequest.java b/core/src/main/java/io/bisq/trade/protocol/trade/tasks/taker/SendPayDepositRequest.java index 447cf9578a..9a7e163a00 100644 --- a/core/src/main/java/io/bisq/trade/protocol/trade/tasks/taker/SendPayDepositRequest.java +++ b/core/src/main/java/io/bisq/trade/protocol/trade/tasks/taker/SendPayDepositRequest.java @@ -20,8 +20,8 @@ package io.bisq.trade.protocol.trade.tasks.taker; import io.bisq.btc.AddressEntry; import io.bisq.btc.wallet.BtcWalletService; import io.bisq.common.taskrunner.TaskRunner; -import io.bisq.messages.trade.protocol.trade.messages.PayDepositRequest; -import io.bisq.messages.p2p.messaging.SendMailboxMessageListener; +import io.bisq.network_messages.trade.protocol.trade.messages.PayDepositRequest; +import io.bisq.network_messages.p2p.messaging.SendMailboxMessageListener; import io.bisq.trade.Trade; import io.bisq.trade.protocol.trade.tasks.TradeTask; import org.slf4j.Logger; diff --git a/core/src/main/java/io/bisq/trade/protocol/trade/tasks/taker/VerifyAndSignContract.java b/core/src/main/java/io/bisq/trade/protocol/trade/tasks/taker/VerifyAndSignContract.java index 211b2dab82..186996ce30 100644 --- a/core/src/main/java/io/bisq/trade/protocol/trade/tasks/taker/VerifyAndSignContract.java +++ b/core/src/main/java/io/bisq/trade/protocol/trade/tasks/taker/VerifyAndSignContract.java @@ -22,9 +22,9 @@ import io.bisq.btc.wallet.BtcWalletService; import io.bisq.common.crypto.Sig; import io.bisq.common.taskrunner.TaskRunner; import io.bisq.common.util.Utilities; -import io.bisq.messages.payment.payload.PaymentAccountContractData; -import io.bisq.messages.trade.payload.Contract; -import io.bisq.messages.NodeAddress; +import io.bisq.network_messages.payment.payload.PaymentAccountContractData; +import io.bisq.network_messages.trade.payload.Contract; +import io.bisq.network_messages.NodeAddress; import io.bisq.trade.SellerAsTakerTrade; import io.bisq.trade.Trade; import io.bisq.trade.protocol.trade.TradingPeer; diff --git a/core/src/main/java/io/bisq/trade/statistics/TradeStatisticsForJson.java b/core/src/main/java/io/bisq/trade/statistics/TradeStatisticsForJson.java index 8567a21bf9..47b27bb3a3 100644 --- a/core/src/main/java/io/bisq/trade/statistics/TradeStatisticsForJson.java +++ b/core/src/main/java/io/bisq/trade/statistics/TradeStatisticsForJson.java @@ -2,8 +2,8 @@ package io.bisq.trade.statistics; import io.bisq.common.util.MathUtils; import io.bisq.locale.CurrencyUtil; -import io.bisq.messages.trade.offer.payload.OfferPayload; -import io.bisq.messages.trade.statistics.payload.TradeStatistics; +import io.bisq.network_messages.trade.offer.payload.OfferPayload; +import io.bisq.network_messages.trade.statistics.payload.TradeStatistics; import org.bitcoinj.core.Coin; import org.bitcoinj.utils.ExchangeRate; import org.bitcoinj.utils.Fiat; diff --git a/core/src/main/java/io/bisq/trade/statistics/TradeStatisticsManager.java b/core/src/main/java/io/bisq/trade/statistics/TradeStatisticsManager.java index 88d65f528a..eabccf8112 100644 --- a/core/src/main/java/io/bisq/trade/statistics/TradeStatisticsManager.java +++ b/core/src/main/java/io/bisq/trade/statistics/TradeStatisticsManager.java @@ -6,11 +6,11 @@ import io.bisq.app.AppOptionKeys; import io.bisq.common.util.Utilities; import io.bisq.locale.CurrencyTuple; import io.bisq.locale.CurrencyUtil; -import io.bisq.messages.trade.statistics.payload.TradeStatistics; +import io.bisq.network_messages.trade.statistics.payload.TradeStatistics; import io.bisq.p2p.storage.P2PService; import io.bisq.p2p.storage.HashMapChangedListener; -import io.bisq.payload.StoragePayload; -import io.bisq.messages.p2p.storage.storageentry.ProtectedStorageEntry; +import io.bisq.network_messages.payload.StoragePayload; +import io.bisq.network_messages.p2p.storage.storageentry.ProtectedStorageEntry; import io.bisq.storage.PlainTextWrapper; import io.bisq.storage.Storage; import io.bisq.user.Preferences; diff --git a/core/src/main/java/io/bisq/user/User.java b/core/src/main/java/io/bisq/user/User.java index 8cb763cf3d..d473051615 100644 --- a/core/src/main/java/io/bisq/user/User.java +++ b/core/src/main/java/io/bisq/user/User.java @@ -21,11 +21,11 @@ import io.bisq.app.Version; import io.bisq.common.persistance.Persistable; import io.bisq.locale.LanguageUtil; import io.bisq.locale.TradeCurrency; -import io.bisq.messages.NodeAddress; -import io.bisq.messages.alert.Alert; -import io.bisq.messages.arbitration.Arbitrator; -import io.bisq.messages.crypto.KeyRing; -import io.bisq.messages.filter.payload.Filter; +import io.bisq.network_messages.NodeAddress; +import io.bisq.network_messages.alert.Alert; +import io.bisq.network_messages.arbitration.Arbitrator; +import io.bisq.network_messages.crypto.KeyRing; +import io.bisq.network_messages.filter.payload.Filter; import io.bisq.payment.PaymentAccount; import io.bisq.storage.Storage; import javafx.beans.property.ObjectProperty; diff --git a/core/src/test/java/io/bisq/btc/RestrictionsTest.java b/core/src/test/java/io/bisq/btc/RestrictionsTest.java index cf43aa4304..4d6331dffb 100644 --- a/core/src/test/java/io/bisq/btc/RestrictionsTest.java +++ b/core/src/test/java/io/bisq/btc/RestrictionsTest.java @@ -17,7 +17,7 @@ package io.bisq.btc; -import io.bisq.messages.btc.Restrictions; +import io.bisq.network_messages.btc.Restrictions; import org.bitcoinj.core.Coin; import org.bitcoinj.core.Transaction; import org.junit.Test; diff --git a/gui/src/main/java/io/bisq/app/BisqAppModule.java b/gui/src/main/java/io/bisq/app/BisqAppModule.java index ba6eec10e2..f183a8f930 100644 --- a/gui/src/main/java/io/bisq/app/BisqAppModule.java +++ b/gui/src/main/java/io/bisq/app/BisqAppModule.java @@ -22,8 +22,8 @@ import io.bisq.alert.AlertModule; import io.bisq.arbitration.ArbitratorModule; import io.bisq.btc.BitcoinModule; import io.bisq.common.Clock; -import io.bisq.messages.crypto.KeyRing; -import io.bisq.messages.crypto.KeyStorage; +import io.bisq.network_messages.crypto.KeyRing; +import io.bisq.network_messages.crypto.KeyStorage; import io.bisq.crypto.EncryptionServiceModule; import io.bisq.dao.DaoModule; import io.bisq.filter.FilterModule; diff --git a/gui/src/main/java/io/bisq/gui/components/PeerInfoIcon.java b/gui/src/main/java/io/bisq/gui/components/PeerInfoIcon.java index 9751ec9c9b..e67dfe72b7 100644 --- a/gui/src/main/java/io/bisq/gui/components/PeerInfoIcon.java +++ b/gui/src/main/java/io/bisq/gui/components/PeerInfoIcon.java @@ -3,7 +3,6 @@ package io.bisq.gui.components; import io.bisq.alert.PrivateNotificationManager; import io.bisq.gui.main.overlays.editor.PeerInfoWithTagEditor; import io.bisq.locale.Res; -import io.bisq.messages.trade.offer.payload.OfferPayload; import io.bisq.p2p.protocol.availability.Offer; import io.bisq.user.Preferences; import javafx.geometry.Point2D; diff --git a/gui/src/main/java/io/bisq/gui/components/paymentmethods/AliPayForm.java b/gui/src/main/java/io/bisq/gui/components/paymentmethods/AliPayForm.java index b23305da43..d266bda70c 100644 --- a/gui/src/main/java/io/bisq/gui/components/paymentmethods/AliPayForm.java +++ b/gui/src/main/java/io/bisq/gui/components/paymentmethods/AliPayForm.java @@ -23,8 +23,8 @@ import io.bisq.gui.util.Layout; import io.bisq.gui.util.validation.AliPayValidator; import io.bisq.gui.util.validation.InputValidator; import io.bisq.locale.Res; -import io.bisq.messages.payment.payload.AliPayAccountContractData; -import io.bisq.messages.payment.payload.PaymentAccountContractData; +import io.bisq.network_messages.payment.payload.AliPayAccountContractData; +import io.bisq.network_messages.payment.payload.PaymentAccountContractData; import io.bisq.payment.AliPayAccount; import io.bisq.payment.PaymentAccount; import javafx.scene.control.TextField; diff --git a/gui/src/main/java/io/bisq/gui/components/paymentmethods/BankForm.java b/gui/src/main/java/io/bisq/gui/components/paymentmethods/BankForm.java index 7e7732e50c..ad12e95f71 100644 --- a/gui/src/main/java/io/bisq/gui/components/paymentmethods/BankForm.java +++ b/gui/src/main/java/io/bisq/gui/components/paymentmethods/BankForm.java @@ -29,8 +29,8 @@ import io.bisq.gui.util.validation.BankIdValidator; import io.bisq.gui.util.validation.BranchIdValidator; import io.bisq.gui.util.validation.InputValidator; import io.bisq.locale.*; -import io.bisq.messages.payment.payload.BankAccountContractData; -import io.bisq.messages.payment.payload.PaymentAccountContractData; +import io.bisq.network_messages.payment.payload.BankAccountContractData; +import io.bisq.network_messages.payment.payload.PaymentAccountContractData; import io.bisq.payment.CountryBasedPaymentAccount; import io.bisq.payment.PaymentAccount; import javafx.collections.FXCollections; diff --git a/gui/src/main/java/io/bisq/gui/components/paymentmethods/CashDepositForm.java b/gui/src/main/java/io/bisq/gui/components/paymentmethods/CashDepositForm.java index e1317157fa..5a2f5d5c90 100644 --- a/gui/src/main/java/io/bisq/gui/components/paymentmethods/CashDepositForm.java +++ b/gui/src/main/java/io/bisq/gui/components/paymentmethods/CashDepositForm.java @@ -30,8 +30,8 @@ import io.bisq.gui.util.validation.BankIdValidator; import io.bisq.gui.util.validation.BranchIdValidator; import io.bisq.gui.util.validation.InputValidator; import io.bisq.locale.*; -import io.bisq.messages.payment.payload.CashDepositAccountContractData; -import io.bisq.messages.payment.payload.PaymentAccountContractData; +import io.bisq.network_messages.payment.payload.CashDepositAccountContractData; +import io.bisq.network_messages.payment.payload.PaymentAccountContractData; import io.bisq.payment.CountryBasedPaymentAccount; import io.bisq.payment.PaymentAccount; import io.bisq.user.Preferences; diff --git a/gui/src/main/java/io/bisq/gui/components/paymentmethods/ChaseQuickPayForm.java b/gui/src/main/java/io/bisq/gui/components/paymentmethods/ChaseQuickPayForm.java index 10904f4cff..fb5a491dc1 100644 --- a/gui/src/main/java/io/bisq/gui/components/paymentmethods/ChaseQuickPayForm.java +++ b/gui/src/main/java/io/bisq/gui/components/paymentmethods/ChaseQuickPayForm.java @@ -25,8 +25,8 @@ import io.bisq.gui.util.validation.ChaseQuickPayValidator; import io.bisq.gui.util.validation.InputValidator; import io.bisq.locale.Res; import io.bisq.locale.TradeCurrency; -import io.bisq.messages.payment.payload.ChaseQuickPayAccountContractData; -import io.bisq.messages.payment.payload.PaymentAccountContractData; +import io.bisq.network_messages.payment.payload.ChaseQuickPayAccountContractData; +import io.bisq.network_messages.payment.payload.PaymentAccountContractData; import io.bisq.payment.ChaseQuickPayAccount; import io.bisq.payment.PaymentAccount; import javafx.scene.control.TextField; diff --git a/gui/src/main/java/io/bisq/gui/components/paymentmethods/ClearXchangeForm.java b/gui/src/main/java/io/bisq/gui/components/paymentmethods/ClearXchangeForm.java index dcded2502a..b8556b09d9 100644 --- a/gui/src/main/java/io/bisq/gui/components/paymentmethods/ClearXchangeForm.java +++ b/gui/src/main/java/io/bisq/gui/components/paymentmethods/ClearXchangeForm.java @@ -24,8 +24,8 @@ import io.bisq.gui.util.Layout; import io.bisq.gui.util.validation.ClearXchangeValidator; import io.bisq.gui.util.validation.InputValidator; import io.bisq.locale.Res; -import io.bisq.messages.payment.payload.ClearXchangeAccountContractData; -import io.bisq.messages.payment.payload.PaymentAccountContractData; +import io.bisq.network_messages.payment.payload.ClearXchangeAccountContractData; +import io.bisq.network_messages.payment.payload.PaymentAccountContractData; import io.bisq.payment.ClearXchangeAccount; import io.bisq.payment.PaymentAccount; import javafx.scene.control.TextField; diff --git a/gui/src/main/java/io/bisq/gui/components/paymentmethods/CryptoCurrencyForm.java b/gui/src/main/java/io/bisq/gui/components/paymentmethods/CryptoCurrencyForm.java index ab62b250c9..5828f83a90 100644 --- a/gui/src/main/java/io/bisq/gui/components/paymentmethods/CryptoCurrencyForm.java +++ b/gui/src/main/java/io/bisq/gui/components/paymentmethods/CryptoCurrencyForm.java @@ -26,8 +26,8 @@ import io.bisq.gui.util.validation.InputValidator; import io.bisq.locale.Res; import io.bisq.locale.CurrencyUtil; import io.bisq.locale.TradeCurrency; -import io.bisq.messages.payment.payload.CryptoCurrencyAccountContractData; -import io.bisq.messages.payment.payload.PaymentAccountContractData; +import io.bisq.network_messages.payment.payload.CryptoCurrencyAccountContractData; +import io.bisq.network_messages.payment.payload.PaymentAccountContractData; import io.bisq.payment.CryptoCurrencyAccount; import io.bisq.payment.PaymentAccount; import javafx.collections.FXCollections; diff --git a/gui/src/main/java/io/bisq/gui/components/paymentmethods/FasterPaymentsForm.java b/gui/src/main/java/io/bisq/gui/components/paymentmethods/FasterPaymentsForm.java index 9a34a7b49b..2e36562385 100644 --- a/gui/src/main/java/io/bisq/gui/components/paymentmethods/FasterPaymentsForm.java +++ b/gui/src/main/java/io/bisq/gui/components/paymentmethods/FasterPaymentsForm.java @@ -25,8 +25,8 @@ import io.bisq.gui.util.validation.BranchIdValidator; import io.bisq.gui.util.validation.InputValidator; import io.bisq.locale.Res; import io.bisq.locale.TradeCurrency; -import io.bisq.messages.payment.payload.FasterPaymentsAccountContractData; -import io.bisq.messages.payment.payload.PaymentAccountContractData; +import io.bisq.network_messages.payment.payload.FasterPaymentsAccountContractData; +import io.bisq.network_messages.payment.payload.PaymentAccountContractData; import io.bisq.payment.FasterPaymentsAccount; import io.bisq.payment.PaymentAccount; import javafx.scene.control.TextField; diff --git a/gui/src/main/java/io/bisq/gui/components/paymentmethods/InteracETransferForm.java b/gui/src/main/java/io/bisq/gui/components/paymentmethods/InteracETransferForm.java index c224c14f8f..51158aa002 100644 --- a/gui/src/main/java/io/bisq/gui/components/paymentmethods/InteracETransferForm.java +++ b/gui/src/main/java/io/bisq/gui/components/paymentmethods/InteracETransferForm.java @@ -25,8 +25,8 @@ import io.bisq.gui.util.validation.InputValidator; import io.bisq.gui.util.validation.InteracETransferValidator; import io.bisq.locale.Res; import io.bisq.locale.TradeCurrency; -import io.bisq.messages.payment.payload.InteracETransferAccountContractData; -import io.bisq.messages.payment.payload.PaymentAccountContractData; +import io.bisq.network_messages.payment.payload.InteracETransferAccountContractData; +import io.bisq.network_messages.payment.payload.PaymentAccountContractData; import io.bisq.payment.InteracETransferAccount; import io.bisq.payment.PaymentAccount; import javafx.scene.layout.GridPane; diff --git a/gui/src/main/java/io/bisq/gui/components/paymentmethods/NationalBankForm.java b/gui/src/main/java/io/bisq/gui/components/paymentmethods/NationalBankForm.java index 15efa7cafa..b540b0705e 100644 --- a/gui/src/main/java/io/bisq/gui/components/paymentmethods/NationalBankForm.java +++ b/gui/src/main/java/io/bisq/gui/components/paymentmethods/NationalBankForm.java @@ -19,7 +19,7 @@ package io.bisq.gui.components.paymentmethods; import io.bisq.gui.util.BSFormatter; import io.bisq.gui.util.validation.InputValidator; -import io.bisq.messages.payment.payload.PaymentAccountContractData; +import io.bisq.network_messages.payment.payload.PaymentAccountContractData; import io.bisq.payment.PaymentAccount; import javafx.scene.layout.GridPane; import org.slf4j.Logger; diff --git a/gui/src/main/java/io/bisq/gui/components/paymentmethods/OKPayForm.java b/gui/src/main/java/io/bisq/gui/components/paymentmethods/OKPayForm.java index df4113287b..8cb6d3db51 100644 --- a/gui/src/main/java/io/bisq/gui/components/paymentmethods/OKPayForm.java +++ b/gui/src/main/java/io/bisq/gui/components/paymentmethods/OKPayForm.java @@ -24,8 +24,8 @@ import io.bisq.gui.util.validation.InputValidator; import io.bisq.gui.util.validation.OKPayValidator; import io.bisq.locale.Res; import io.bisq.locale.CurrencyUtil; -import io.bisq.messages.payment.payload.OKPayAccountContractData; -import io.bisq.messages.payment.payload.PaymentAccountContractData; +import io.bisq.network_messages.payment.payload.OKPayAccountContractData; +import io.bisq.network_messages.payment.payload.PaymentAccountContractData; import io.bisq.payment.OKPayAccount; import io.bisq.payment.PaymentAccount; import io.bisq.user.Preferences; diff --git a/gui/src/main/java/io/bisq/gui/components/paymentmethods/PaymentMethodForm.java b/gui/src/main/java/io/bisq/gui/components/paymentmethods/PaymentMethodForm.java index 10ab3d48f6..807ea4f2e1 100644 --- a/gui/src/main/java/io/bisq/gui/components/paymentmethods/PaymentMethodForm.java +++ b/gui/src/main/java/io/bisq/gui/components/paymentmethods/PaymentMethodForm.java @@ -24,7 +24,7 @@ import io.bisq.gui.util.validation.InputValidator; import io.bisq.locale.Res; import io.bisq.locale.CurrencyUtil; import io.bisq.locale.TradeCurrency; -import io.bisq.messages.payment.payload.PaymentAccountContractData; +import io.bisq.network_messages.payment.payload.PaymentAccountContractData; import io.bisq.payment.PaymentAccount; import io.bisq.user.Preferences; import javafx.beans.property.BooleanProperty; diff --git a/gui/src/main/java/io/bisq/gui/components/paymentmethods/PerfectMoneyForm.java b/gui/src/main/java/io/bisq/gui/components/paymentmethods/PerfectMoneyForm.java index 5ded0cc6fb..27dfdbd653 100644 --- a/gui/src/main/java/io/bisq/gui/components/paymentmethods/PerfectMoneyForm.java +++ b/gui/src/main/java/io/bisq/gui/components/paymentmethods/PerfectMoneyForm.java @@ -24,8 +24,8 @@ import io.bisq.gui.util.validation.InputValidator; import io.bisq.gui.util.validation.PerfectMoneyValidator; import io.bisq.locale.Res; import io.bisq.locale.FiatCurrency; -import io.bisq.messages.payment.payload.PaymentAccountContractData; -import io.bisq.messages.payment.payload.PerfectMoneyAccountContractData; +import io.bisq.network_messages.payment.payload.PaymentAccountContractData; +import io.bisq.network_messages.payment.payload.PerfectMoneyAccountContractData; import io.bisq.payment.PaymentAccount; import io.bisq.payment.PerfectMoneyAccount; import javafx.collections.FXCollections; diff --git a/gui/src/main/java/io/bisq/gui/components/paymentmethods/SameBankForm.java b/gui/src/main/java/io/bisq/gui/components/paymentmethods/SameBankForm.java index 13babe571c..d5f7080c49 100644 --- a/gui/src/main/java/io/bisq/gui/components/paymentmethods/SameBankForm.java +++ b/gui/src/main/java/io/bisq/gui/components/paymentmethods/SameBankForm.java @@ -23,7 +23,7 @@ import io.bisq.gui.util.BSFormatter; import io.bisq.gui.util.validation.InputValidator; import io.bisq.locale.Res; import io.bisq.locale.BankUtil; -import io.bisq.messages.payment.payload.PaymentAccountContractData; +import io.bisq.network_messages.payment.payload.PaymentAccountContractData; import io.bisq.payment.CountryBasedPaymentAccount; import io.bisq.payment.PaymentAccount; import javafx.scene.control.Label; diff --git a/gui/src/main/java/io/bisq/gui/components/paymentmethods/SepaForm.java b/gui/src/main/java/io/bisq/gui/components/paymentmethods/SepaForm.java index f9cdd48e14..5391c91ca2 100644 --- a/gui/src/main/java/io/bisq/gui/components/paymentmethods/SepaForm.java +++ b/gui/src/main/java/io/bisq/gui/components/paymentmethods/SepaForm.java @@ -29,8 +29,8 @@ import io.bisq.locale.Country; import io.bisq.locale.CountryUtil; import io.bisq.locale.CurrencyUtil; import io.bisq.locale.TradeCurrency; -import io.bisq.messages.payment.payload.PaymentAccountContractData; -import io.bisq.messages.payment.payload.SepaAccountContractData; +import io.bisq.network_messages.payment.payload.PaymentAccountContractData; +import io.bisq.network_messages.payment.payload.SepaAccountContractData; import io.bisq.payment.CountryBasedPaymentAccount; import io.bisq.payment.PaymentAccount; import io.bisq.payment.SepaAccount; diff --git a/gui/src/main/java/io/bisq/gui/components/paymentmethods/SpecificBankForm.java b/gui/src/main/java/io/bisq/gui/components/paymentmethods/SpecificBankForm.java index c7a167bd6b..3879ed7996 100644 --- a/gui/src/main/java/io/bisq/gui/components/paymentmethods/SpecificBankForm.java +++ b/gui/src/main/java/io/bisq/gui/components/paymentmethods/SpecificBankForm.java @@ -23,8 +23,8 @@ import io.bisq.gui.components.InputTextField; import io.bisq.gui.util.BSFormatter; import io.bisq.gui.util.validation.InputValidator; import io.bisq.locale.Res; -import io.bisq.messages.payment.payload.PaymentAccountContractData; -import io.bisq.messages.payment.payload.SpecificBanksAccountContractData; +import io.bisq.network_messages.payment.payload.PaymentAccountContractData; +import io.bisq.network_messages.payment.payload.SpecificBanksAccountContractData; import io.bisq.payment.PaymentAccount; import javafx.beans.binding.Bindings; import javafx.scene.control.Button; diff --git a/gui/src/main/java/io/bisq/gui/components/paymentmethods/SwishForm.java b/gui/src/main/java/io/bisq/gui/components/paymentmethods/SwishForm.java index 5fe360fa63..4cdda760f7 100644 --- a/gui/src/main/java/io/bisq/gui/components/paymentmethods/SwishForm.java +++ b/gui/src/main/java/io/bisq/gui/components/paymentmethods/SwishForm.java @@ -24,8 +24,8 @@ import io.bisq.gui.util.validation.InputValidator; import io.bisq.gui.util.validation.SwishValidator; import io.bisq.locale.Res; import io.bisq.locale.TradeCurrency; -import io.bisq.messages.payment.payload.PaymentAccountContractData; -import io.bisq.messages.payment.payload.SwishAccountContractData; +import io.bisq.network_messages.payment.payload.PaymentAccountContractData; +import io.bisq.network_messages.payment.payload.SwishAccountContractData; import io.bisq.payment.PaymentAccount; import io.bisq.payment.SwishAccount; import javafx.scene.control.TextField; diff --git a/gui/src/main/java/io/bisq/gui/components/paymentmethods/USPostalMoneyOrderForm.java b/gui/src/main/java/io/bisq/gui/components/paymentmethods/USPostalMoneyOrderForm.java index 14d39e5bfc..6d278f86fc 100644 --- a/gui/src/main/java/io/bisq/gui/components/paymentmethods/USPostalMoneyOrderForm.java +++ b/gui/src/main/java/io/bisq/gui/components/paymentmethods/USPostalMoneyOrderForm.java @@ -24,8 +24,8 @@ import io.bisq.gui.util.validation.InputValidator; import io.bisq.gui.util.validation.USPostalMoneyOrderValidator; import io.bisq.locale.Res; import io.bisq.locale.TradeCurrency; -import io.bisq.messages.payment.payload.PaymentAccountContractData; -import io.bisq.messages.payment.payload.USPostalMoneyOrderAccountContractData; +import io.bisq.network_messages.payment.payload.PaymentAccountContractData; +import io.bisq.network_messages.payment.payload.USPostalMoneyOrderAccountContractData; import io.bisq.payment.PaymentAccount; import io.bisq.payment.USPostalMoneyOrderAccount; import javafx.scene.control.TextArea; diff --git a/gui/src/main/java/io/bisq/gui/main/MainViewModel.java b/gui/src/main/java/io/bisq/gui/main/MainViewModel.java index 9064b5f72d..f6b7c2710a 100644 --- a/gui/src/main/java/io/bisq/gui/main/MainViewModel.java +++ b/gui/src/main/java/io/bisq/gui/main/MainViewModel.java @@ -50,19 +50,19 @@ import io.bisq.gui.util.BSFormatter; import io.bisq.locale.CurrencyUtil; import io.bisq.locale.Res; import io.bisq.locale.TradeCurrency; -import io.bisq.messages.alert.Alert; -import io.bisq.messages.alert.PrivateNotification; -import io.bisq.messages.arbitration.Dispute; -import io.bisq.messages.crypto.DecryptedDataTuple; -import io.bisq.messages.crypto.Encryption; -import io.bisq.messages.crypto.KeyRing; -import io.bisq.messages.crypto.SealedAndSigned; +import io.bisq.network_messages.alert.Alert; +import io.bisq.network_messages.alert.PrivateNotification; +import io.bisq.network_messages.arbitration.Dispute; +import io.bisq.network_messages.crypto.DecryptedDataTuple; +import io.bisq.network_messages.crypto.Encryption; +import io.bisq.network_messages.crypto.KeyRing; +import io.bisq.network_messages.crypto.SealedAndSigned; import io.bisq.provider.price.MarketPrice; import io.bisq.p2p.P2PServiceListener; import io.bisq.p2p.network.CloseConnectionReason; import io.bisq.p2p.network.Connection; import io.bisq.p2p.network.ConnectionListener; -import io.bisq.messages.p2p.peers.keepalive.messages.Ping; +import io.bisq.network_messages.p2p.peers.keepalive.messages.Ping; import io.bisq.p2p.storage.P2PService; import io.bisq.payment.CryptoCurrencyAccount; import io.bisq.payment.OKPayAccount; diff --git a/gui/src/main/java/io/bisq/gui/main/account/arbitratorregistration/ArbitratorRegistrationView.java b/gui/src/main/java/io/bisq/gui/main/account/arbitratorregistration/ArbitratorRegistrationView.java index c5fa14ac8b..1e64aa12f3 100644 --- a/gui/src/main/java/io/bisq/gui/main/account/arbitratorregistration/ArbitratorRegistrationView.java +++ b/gui/src/main/java/io/bisq/gui/main/account/arbitratorregistration/ArbitratorRegistrationView.java @@ -28,7 +28,7 @@ import io.bisq.gui.util.FormBuilder; import io.bisq.gui.util.ImageUtil; import io.bisq.gui.util.Layout; import io.bisq.locale.Res; -import io.bisq.messages.arbitration.Arbitrator; +import io.bisq.network_messages.arbitration.Arbitrator; import io.bisq.locale.LanguageUtil; import io.bisq.user.Preferences; import javafx.beans.value.ChangeListener; diff --git a/gui/src/main/java/io/bisq/gui/main/account/arbitratorregistration/ArbitratorRegistrationViewModel.java b/gui/src/main/java/io/bisq/gui/main/account/arbitratorregistration/ArbitratorRegistrationViewModel.java index 07b65ee8eb..e6a22363f5 100644 --- a/gui/src/main/java/io/bisq/gui/main/account/arbitratorregistration/ArbitratorRegistrationViewModel.java +++ b/gui/src/main/java/io/bisq/gui/main/account/arbitratorregistration/ArbitratorRegistrationViewModel.java @@ -21,13 +21,13 @@ import com.google.inject.Inject; import io.bisq.arbitration.ArbitratorManager; import io.bisq.btc.AddressEntry; import io.bisq.btc.wallet.BtcWalletService; -import io.bisq.messages.crypto.KeyRing; +import io.bisq.network_messages.crypto.KeyRing; import io.bisq.common.handlers.ErrorMessageHandler; import io.bisq.common.handlers.ResultHandler; import io.bisq.gui.common.model.ActivatableViewModel; -import io.bisq.messages.arbitration.Arbitrator; +import io.bisq.network_messages.arbitration.Arbitrator; import io.bisq.locale.LanguageUtil; -import io.bisq.messages.NodeAddress; +import io.bisq.network_messages.NodeAddress; import io.bisq.p2p.storage.P2PService; import io.bisq.user.Preferences; import io.bisq.user.User; diff --git a/gui/src/main/java/io/bisq/gui/main/account/content/altcoinaccounts/AltCoinAccountsDataModel.java b/gui/src/main/java/io/bisq/gui/main/account/content/altcoinaccounts/AltCoinAccountsDataModel.java index 18b5a01f08..067aee2e1b 100644 --- a/gui/src/main/java/io/bisq/gui/main/account/content/altcoinaccounts/AltCoinAccountsDataModel.java +++ b/gui/src/main/java/io/bisq/gui/main/account/content/altcoinaccounts/AltCoinAccountsDataModel.java @@ -23,7 +23,7 @@ import io.bisq.gui.util.GUIUtil; import io.bisq.locale.CryptoCurrency; import io.bisq.locale.FiatCurrency; import io.bisq.locale.TradeCurrency; -import io.bisq.messages.payment.PaymentMethod; +import io.bisq.network_messages.payment.PaymentMethod; import io.bisq.user.Preferences; import io.bisq.payment.CryptoCurrencyAccount; import io.bisq.payment.PaymentAccount; diff --git a/gui/src/main/java/io/bisq/gui/main/account/content/altcoinaccounts/AltCoinAccountsView.java b/gui/src/main/java/io/bisq/gui/main/account/content/altcoinaccounts/AltCoinAccountsView.java index f57d590a3f..3a651f795b 100644 --- a/gui/src/main/java/io/bisq/gui/main/account/content/altcoinaccounts/AltCoinAccountsView.java +++ b/gui/src/main/java/io/bisq/gui/main/account/content/altcoinaccounts/AltCoinAccountsView.java @@ -35,7 +35,7 @@ import io.bisq.gui.util.validation.InputValidator; import io.bisq.locale.Res; import io.bisq.locale.CryptoCurrency; import io.bisq.locale.TradeCurrency; -import io.bisq.messages.payment.PaymentMethod; +import io.bisq.network_messages.payment.PaymentMethod; import io.bisq.payment.PaymentAccount; import io.bisq.payment.PaymentAccountFactory; import javafx.beans.value.ChangeListener; diff --git a/gui/src/main/java/io/bisq/gui/main/account/content/arbitratorselection/ArbitratorListItem.java b/gui/src/main/java/io/bisq/gui/main/account/content/arbitratorselection/ArbitratorListItem.java index 09391ef4f6..41a150e652 100644 --- a/gui/src/main/java/io/bisq/gui/main/account/content/arbitratorselection/ArbitratorListItem.java +++ b/gui/src/main/java/io/bisq/gui/main/account/content/arbitratorselection/ArbitratorListItem.java @@ -18,7 +18,7 @@ package io.bisq.gui.main.account.content.arbitratorselection; import io.bisq.gui.util.BSFormatter; -import io.bisq.messages.arbitration.Arbitrator; +import io.bisq.network_messages.arbitration.Arbitrator; import javafx.beans.property.BooleanProperty; import javafx.beans.property.SimpleBooleanProperty; diff --git a/gui/src/main/java/io/bisq/gui/main/account/content/arbitratorselection/ArbitratorSelectionViewModel.java b/gui/src/main/java/io/bisq/gui/main/account/content/arbitratorselection/ArbitratorSelectionViewModel.java index ee78c5c79e..5368a34020 100644 --- a/gui/src/main/java/io/bisq/gui/main/account/content/arbitratorselection/ArbitratorSelectionViewModel.java +++ b/gui/src/main/java/io/bisq/gui/main/account/content/arbitratorselection/ArbitratorSelectionViewModel.java @@ -19,13 +19,13 @@ package io.bisq.gui.main.account.content.arbitratorselection; import com.google.inject.Inject; import io.bisq.arbitration.ArbitratorManager; -import io.bisq.messages.crypto.KeyRing; +import io.bisq.network_messages.crypto.KeyRing; import io.bisq.gui.common.model.ActivatableDataModel; import io.bisq.gui.util.BSFormatter; -import io.bisq.messages.arbitration.Arbitrator; +import io.bisq.network_messages.arbitration.Arbitrator; import io.bisq.locale.LanguageUtil; import io.bisq.user.Preferences; -import io.bisq.messages.NodeAddress; +import io.bisq.network_messages.NodeAddress; import io.bisq.user.User; import javafx.collections.FXCollections; import javafx.collections.MapChangeListener; diff --git a/gui/src/main/java/io/bisq/gui/main/account/content/fiataccounts/FiatAccountsDataModel.java b/gui/src/main/java/io/bisq/gui/main/account/content/fiataccounts/FiatAccountsDataModel.java index d4e418379e..4b457e961c 100644 --- a/gui/src/main/java/io/bisq/gui/main/account/content/fiataccounts/FiatAccountsDataModel.java +++ b/gui/src/main/java/io/bisq/gui/main/account/content/fiataccounts/FiatAccountsDataModel.java @@ -23,7 +23,7 @@ import io.bisq.gui.util.GUIUtil; import io.bisq.locale.CryptoCurrency; import io.bisq.locale.FiatCurrency; import io.bisq.locale.TradeCurrency; -import io.bisq.messages.payment.PaymentMethod; +import io.bisq.network_messages.payment.PaymentMethod; import io.bisq.user.Preferences; import io.bisq.payment.CryptoCurrencyAccount; import io.bisq.payment.PaymentAccount; diff --git a/gui/src/main/java/io/bisq/gui/main/account/content/fiataccounts/FiatAccountsView.java b/gui/src/main/java/io/bisq/gui/main/account/content/fiataccounts/FiatAccountsView.java index 95f6f60d68..b62344123a 100644 --- a/gui/src/main/java/io/bisq/gui/main/account/content/fiataccounts/FiatAccountsView.java +++ b/gui/src/main/java/io/bisq/gui/main/account/content/fiataccounts/FiatAccountsView.java @@ -31,7 +31,7 @@ import io.bisq.gui.util.ImageUtil; import io.bisq.gui.util.Layout; import io.bisq.gui.util.validation.*; import io.bisq.locale.Res; -import io.bisq.messages.payment.PaymentMethod; +import io.bisq.network_messages.payment.PaymentMethod; import io.bisq.payment.PaymentAccount; import io.bisq.payment.PaymentAccountFactory; import javafx.beans.value.ChangeListener; diff --git a/gui/src/main/java/io/bisq/gui/main/dao/compensation/CompensationRequestDisplay.java b/gui/src/main/java/io/bisq/gui/main/dao/compensation/CompensationRequestDisplay.java index 046df90826..ee352a0185 100644 --- a/gui/src/main/java/io/bisq/gui/main/dao/compensation/CompensationRequestDisplay.java +++ b/gui/src/main/java/io/bisq/gui/main/dao/compensation/CompensationRequestDisplay.java @@ -20,7 +20,7 @@ package io.bisq.gui.main.dao.compensation; import io.bisq.gui.components.InputTextField; import io.bisq.gui.util.Layout; import io.bisq.locale.Res; -import io.bisq.messages.dao.compensation.payload.CompensationRequestPayload; +import io.bisq.network_messages.dao.compensation.payload.CompensationRequestPayload; import javafx.scene.layout.GridPane; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/gui/src/main/java/io/bisq/gui/main/dao/compensation/active/FundCompensationRequestWindow.java b/gui/src/main/java/io/bisq/gui/main/dao/compensation/active/FundCompensationRequestWindow.java index ce30137cb6..afaac0e1c4 100644 --- a/gui/src/main/java/io/bisq/gui/main/dao/compensation/active/FundCompensationRequestWindow.java +++ b/gui/src/main/java/io/bisq/gui/main/dao/compensation/active/FundCompensationRequestWindow.java @@ -20,7 +20,7 @@ package io.bisq.gui.main.dao.compensation.active; import io.bisq.gui.components.InputTextField; import io.bisq.gui.main.overlays.Overlay; import io.bisq.locale.Res; -import io.bisq.messages.dao.compensation.payload.CompensationRequestPayload; +import io.bisq.network_messages.dao.compensation.payload.CompensationRequestPayload; import javafx.scene.Scene; import javafx.scene.control.TextField; import javafx.scene.input.KeyCode; diff --git a/gui/src/main/java/io/bisq/gui/main/dao/compensation/create/CreateCompensationRequestView.java b/gui/src/main/java/io/bisq/gui/main/dao/compensation/create/CreateCompensationRequestView.java index 1c8102091b..ab14081adb 100644 --- a/gui/src/main/java/io/bisq/gui/main/dao/compensation/create/CreateCompensationRequestView.java +++ b/gui/src/main/java/io/bisq/gui/main/dao/compensation/create/CreateCompensationRequestView.java @@ -25,7 +25,7 @@ import io.bisq.btc.exceptions.WalletException; import io.bisq.btc.wallet.BsqWalletService; import io.bisq.btc.wallet.BtcWalletService; import io.bisq.btc.wallet.ChangeBelowDustException; -import io.bisq.messages.crypto.KeyRing; +import io.bisq.network_messages.crypto.KeyRing; import io.bisq.common.util.Utilities; import io.bisq.dao.compensation.CompensationRequestManager; import io.bisq.gui.common.view.ActivatableView; @@ -35,8 +35,8 @@ import io.bisq.gui.main.overlays.popups.Popup; import io.bisq.gui.util.BSFormatter; import io.bisq.locale.Res; import io.bisq.provider.fee.FeeService; -import io.bisq.messages.dao.compensation.payload.CompensationRequestPayload; -import io.bisq.messages.NodeAddress; +import io.bisq.network_messages.dao.compensation.payload.CompensationRequestPayload; +import io.bisq.network_messages.NodeAddress; import io.bisq.p2p.storage.P2PService; import javafx.scene.control.Button; import javafx.scene.layout.GridPane; diff --git a/gui/src/main/java/io/bisq/gui/main/dao/voting/vote/CompensationViewItem.java b/gui/src/main/java/io/bisq/gui/main/dao/voting/vote/CompensationViewItem.java index acf78e5ad3..101ff268f1 100644 --- a/gui/src/main/java/io/bisq/gui/main/dao/voting/vote/CompensationViewItem.java +++ b/gui/src/main/java/io/bisq/gui/main/dao/voting/vote/CompensationViewItem.java @@ -25,7 +25,7 @@ import io.bisq.gui.main.MainView; import io.bisq.gui.main.dao.compensation.CompensationRequestDisplay; import io.bisq.gui.util.Layout; import io.bisq.locale.Res; -import io.bisq.messages.dao.compensation.payload.CompensationRequestPayload; +import io.bisq.network_messages.dao.compensation.payload.CompensationRequestPayload; import javafx.beans.property.DoubleProperty; import javafx.geometry.HPos; import javafx.geometry.Insets; diff --git a/gui/src/main/java/io/bisq/gui/main/disputes/DisputesView.java b/gui/src/main/java/io/bisq/gui/main/disputes/DisputesView.java index 39a9b98e63..ac4e7d29c9 100644 --- a/gui/src/main/java/io/bisq/gui/main/disputes/DisputesView.java +++ b/gui/src/main/java/io/bisq/gui/main/disputes/DisputesView.java @@ -20,7 +20,7 @@ package io.bisq.gui.main.disputes; import io.bisq.app.DevEnv; import io.bisq.arbitration.ArbitratorManager; import io.bisq.arbitration.DisputeManager; -import io.bisq.messages.crypto.KeyRing; +import io.bisq.network_messages.crypto.KeyRing; import io.bisq.gui.Navigation; import io.bisq.gui.common.model.Activatable; import io.bisq.gui.common.view.*; @@ -31,9 +31,9 @@ import io.bisq.gui.main.overlays.popups.Popup; import io.bisq.gui.main.portfolio.PortfolioView; import io.bisq.gui.main.portfolio.pendingtrades.PendingTradesView; import io.bisq.locale.Res; -import io.bisq.messages.arbitration.Arbitrator; +import io.bisq.network_messages.arbitration.Arbitrator; import io.bisq.user.Preferences; -import io.bisq.messages.NodeAddress; +import io.bisq.network_messages.NodeAddress; import javafx.beans.value.ChangeListener; import javafx.collections.MapChangeListener; import javafx.fxml.FXML; diff --git a/gui/src/main/java/io/bisq/gui/main/disputes/arbitrator/ArbitratorDisputeView.java b/gui/src/main/java/io/bisq/gui/main/disputes/arbitrator/ArbitratorDisputeView.java index 1842b31df5..7a61ba055c 100644 --- a/gui/src/main/java/io/bisq/gui/main/disputes/arbitrator/ArbitratorDisputeView.java +++ b/gui/src/main/java/io/bisq/gui/main/disputes/arbitrator/ArbitratorDisputeView.java @@ -19,7 +19,7 @@ package io.bisq.gui.main.disputes.arbitrator; import io.bisq.alert.PrivateNotificationManager; import io.bisq.arbitration.DisputeManager; -import io.bisq.messages.crypto.KeyRing; +import io.bisq.network_messages.crypto.KeyRing; import io.bisq.gui.common.view.FxmlView; import io.bisq.gui.main.disputes.trader.TraderDisputeView; import io.bisq.gui.main.overlays.windows.ContractWindow; diff --git a/gui/src/main/java/io/bisq/gui/main/disputes/trader/TraderDisputeView.java b/gui/src/main/java/io/bisq/gui/main/disputes/trader/TraderDisputeView.java index 97d8bdc8ec..e30c60784e 100644 --- a/gui/src/main/java/io/bisq/gui/main/disputes/trader/TraderDisputeView.java +++ b/gui/src/main/java/io/bisq/gui/main/disputes/trader/TraderDisputeView.java @@ -26,8 +26,8 @@ import io.bisq.app.Version; import io.bisq.arbitration.DisputeManager; import io.bisq.common.Timer; import io.bisq.common.UserThread; -import io.bisq.messages.crypto.KeyRing; -import io.bisq.messages.crypto.PubKeyRing; +import io.bisq.network_messages.crypto.KeyRing; +import io.bisq.network_messages.crypto.PubKeyRing; import io.bisq.common.util.Utilities; import io.bisq.gui.common.view.ActivatableView; import io.bisq.gui.common.view.FxmlView; @@ -44,11 +44,11 @@ import io.bisq.gui.main.overlays.windows.TradeDetailsWindow; import io.bisq.gui.util.BSFormatter; import io.bisq.gui.util.GUIUtil; import io.bisq.locale.Res; -import io.bisq.messages.arbitration.Dispute; -import io.bisq.messages.arbitration.DisputeCommunicationMessage; -import io.bisq.messages.arbitration.payload.Attachment; -import io.bisq.messages.trade.payload.Contract; -import io.bisq.messages.NodeAddress; +import io.bisq.network_messages.arbitration.Dispute; +import io.bisq.network_messages.arbitration.DisputeCommunicationMessage; +import io.bisq.network_messages.arbitration.payload.Attachment; +import io.bisq.network_messages.trade.payload.Contract; +import io.bisq.network_messages.NodeAddress; import io.bisq.p2p.storage.P2PService; import io.bisq.p2p.network.Connection; import io.bisq.trade.Trade; diff --git a/gui/src/main/java/io/bisq/gui/main/market/offerbook/OfferBookChartView.java b/gui/src/main/java/io/bisq/gui/main/market/offerbook/OfferBookChartView.java index 7a2f07c6ea..bffec313d9 100644 --- a/gui/src/main/java/io/bisq/gui/main/market/offerbook/OfferBookChartView.java +++ b/gui/src/main/java/io/bisq/gui/main/market/offerbook/OfferBookChartView.java @@ -31,7 +31,7 @@ import io.bisq.gui.util.CurrencyListItem; import io.bisq.gui.util.GUIUtil; import io.bisq.locale.Res; import io.bisq.locale.CurrencyUtil; -import io.bisq.messages.trade.offer.payload.OfferPayload; +import io.bisq.network_messages.trade.offer.payload.OfferPayload; import io.bisq.p2p.protocol.availability.Offer; import javafx.beans.property.ReadOnlyObjectWrapper; import javafx.beans.property.SimpleStringProperty; diff --git a/gui/src/main/java/io/bisq/gui/main/market/offerbook/OfferBookChartViewModel.java b/gui/src/main/java/io/bisq/gui/main/market/offerbook/OfferBookChartViewModel.java index 004171699a..2cd80c8540 100644 --- a/gui/src/main/java/io/bisq/gui/main/market/offerbook/OfferBookChartViewModel.java +++ b/gui/src/main/java/io/bisq/gui/main/market/offerbook/OfferBookChartViewModel.java @@ -30,7 +30,7 @@ import io.bisq.gui.util.CurrencyListItem; import io.bisq.gui.util.GUIUtil; import io.bisq.locale.CurrencyUtil; import io.bisq.locale.TradeCurrency; -import io.bisq.messages.trade.offer.payload.OfferPayload; +import io.bisq.network_messages.trade.offer.payload.OfferPayload; import io.bisq.p2p.protocol.availability.Offer; import io.bisq.provider.price.PriceFeedService; import io.bisq.user.Preferences; diff --git a/gui/src/main/java/io/bisq/gui/main/market/spread/SpreadViewModel.java b/gui/src/main/java/io/bisq/gui/main/market/spread/SpreadViewModel.java index 8110306bcb..550438d138 100644 --- a/gui/src/main/java/io/bisq/gui/main/market/spread/SpreadViewModel.java +++ b/gui/src/main/java/io/bisq/gui/main/market/spread/SpreadViewModel.java @@ -23,7 +23,7 @@ import io.bisq.gui.main.offer.offerbook.OfferBook; import io.bisq.gui.main.offer.offerbook.OfferBookListItem; import io.bisq.gui.util.BSFormatter; import io.bisq.locale.CurrencyUtil; -import io.bisq.messages.trade.offer.payload.OfferPayload; +import io.bisq.network_messages.trade.offer.payload.OfferPayload; import io.bisq.p2p.protocol.availability.Offer; import io.bisq.provider.price.MarketPrice; import io.bisq.provider.price.PriceFeedService; diff --git a/gui/src/main/java/io/bisq/gui/main/market/trades/TradesChartsView.java b/gui/src/main/java/io/bisq/gui/main/market/trades/TradesChartsView.java index a414be7047..6652e7fc1b 100644 --- a/gui/src/main/java/io/bisq/gui/main/market/trades/TradesChartsView.java +++ b/gui/src/main/java/io/bisq/gui/main/market/trades/TradesChartsView.java @@ -28,7 +28,7 @@ import io.bisq.gui.util.CurrencyListItem; import io.bisq.gui.util.GUIUtil; import io.bisq.locale.Res; import io.bisq.locale.CurrencyUtil; -import io.bisq.messages.trade.statistics.payload.TradeStatistics; +import io.bisq.network_messages.trade.statistics.payload.TradeStatistics; import javafx.beans.property.ReadOnlyObjectWrapper; import javafx.beans.property.SimpleStringProperty; import javafx.beans.property.StringProperty; diff --git a/gui/src/main/java/io/bisq/gui/main/market/trades/TradesChartsViewModel.java b/gui/src/main/java/io/bisq/gui/main/market/trades/TradesChartsViewModel.java index b2eb19ee29..bf69dba923 100644 --- a/gui/src/main/java/io/bisq/gui/main/market/trades/TradesChartsViewModel.java +++ b/gui/src/main/java/io/bisq/gui/main/market/trades/TradesChartsViewModel.java @@ -33,7 +33,7 @@ import io.bisq.locale.CryptoCurrency; import io.bisq.locale.CurrencyUtil; import io.bisq.locale.TradeCurrency; import io.bisq.provider.price.PriceFeedService; -import io.bisq.messages.trade.statistics.payload.TradeStatistics; +import io.bisq.network_messages.trade.statistics.payload.TradeStatistics; import io.bisq.user.Preferences; import io.bisq.trade.statistics.TradeStatisticsManager; import javafx.beans.property.BooleanProperty; diff --git a/gui/src/main/java/io/bisq/gui/main/offer/OfferView.java b/gui/src/main/java/io/bisq/gui/main/offer/OfferView.java index 480b74bd2e..068de7576c 100644 --- a/gui/src/main/java/io/bisq/gui/main/offer/OfferView.java +++ b/gui/src/main/java/io/bisq/gui/main/offer/OfferView.java @@ -30,7 +30,7 @@ import io.bisq.gui.main.offer.takeoffer.TakeOfferView; import io.bisq.locale.CurrencyUtil; import io.bisq.locale.Res; import io.bisq.locale.TradeCurrency; -import io.bisq.messages.trade.offer.payload.OfferPayload; +import io.bisq.network_messages.trade.offer.payload.OfferPayload; import io.bisq.p2p.protocol.availability.Offer; import io.bisq.user.Preferences; import javafx.beans.value.ChangeListener; diff --git a/gui/src/main/java/io/bisq/gui/main/offer/createoffer/CreateOfferDataModel.java b/gui/src/main/java/io/bisq/gui/main/offer/createoffer/CreateOfferDataModel.java index 871ba92e53..2ae7268384 100644 --- a/gui/src/main/java/io/bisq/gui/main/offer/createoffer/CreateOfferDataModel.java +++ b/gui/src/main/java/io/bisq/gui/main/offer/createoffer/CreateOfferDataModel.java @@ -33,11 +33,11 @@ import io.bisq.gui.util.BSFormatter; import io.bisq.locale.CurrencyUtil; import io.bisq.locale.Res; import io.bisq.locale.TradeCurrency; -import io.bisq.messages.arbitration.Arbitrator; -import io.bisq.messages.btc.Restrictions; -import io.bisq.messages.crypto.KeyRing; -import io.bisq.messages.payment.payload.BankAccountContractData; -import io.bisq.messages.trade.offer.payload.OfferPayload; +import io.bisq.network_messages.arbitration.Arbitrator; +import io.bisq.network_messages.btc.Restrictions; +import io.bisq.network_messages.crypto.KeyRing; +import io.bisq.network_messages.payment.payload.BankAccountContractData; +import io.bisq.network_messages.trade.offer.payload.OfferPayload; import io.bisq.p2p.protocol.availability.Offer; import io.bisq.p2p.storage.P2PService; import io.bisq.payment.*; diff --git a/gui/src/main/java/io/bisq/gui/main/offer/createoffer/CreateOfferView.java b/gui/src/main/java/io/bisq/gui/main/offer/createoffer/CreateOfferView.java index 7f705f0354..1e9b886a7c 100644 --- a/gui/src/main/java/io/bisq/gui/main/offer/createoffer/CreateOfferView.java +++ b/gui/src/main/java/io/bisq/gui/main/offer/createoffer/CreateOfferView.java @@ -47,7 +47,7 @@ import io.bisq.gui.util.GUIUtil; import io.bisq.gui.util.Layout; import io.bisq.locale.Res; import io.bisq.locale.TradeCurrency; -import io.bisq.messages.trade.offer.payload.OfferPayload; +import io.bisq.network_messages.trade.offer.payload.OfferPayload; import io.bisq.p2p.protocol.availability.Offer; import io.bisq.payment.PaymentAccount; import io.bisq.user.Preferences; diff --git a/gui/src/main/java/io/bisq/gui/main/offer/createoffer/CreateOfferViewModel.java b/gui/src/main/java/io/bisq/gui/main/offer/createoffer/CreateOfferViewModel.java index b35b79c885..3c05d048ce 100644 --- a/gui/src/main/java/io/bisq/gui/main/offer/createoffer/CreateOfferViewModel.java +++ b/gui/src/main/java/io/bisq/gui/main/offer/createoffer/CreateOfferViewModel.java @@ -42,8 +42,8 @@ import io.bisq.gui.util.validation.SecurityDepositValidator; import io.bisq.locale.CurrencyUtil; import io.bisq.locale.Res; import io.bisq.locale.TradeCurrency; -import io.bisq.messages.btc.Restrictions; -import io.bisq.messages.trade.offer.payload.OfferPayload; +import io.bisq.network_messages.btc.Restrictions; +import io.bisq.network_messages.trade.offer.payload.OfferPayload; import io.bisq.p2p.protocol.availability.Offer; import io.bisq.p2p.storage.P2PService; import io.bisq.payment.PaymentAccount; diff --git a/gui/src/main/java/io/bisq/gui/main/offer/offerbook/OfferBook.java b/gui/src/main/java/io/bisq/gui/main/offer/offerbook/OfferBook.java index de3fa9b079..49d5b5f43a 100644 --- a/gui/src/main/java/io/bisq/gui/main/offer/offerbook/OfferBook.java +++ b/gui/src/main/java/io/bisq/gui/main/offer/offerbook/OfferBook.java @@ -18,7 +18,7 @@ package io.bisq.gui.main.offer.offerbook; import io.bisq.app.Log; -import io.bisq.messages.trade.offer.payload.OfferPayload; +import io.bisq.network_messages.trade.offer.payload.OfferPayload; import io.bisq.p2p.protocol.availability.Offer; import io.bisq.trade.TradeManager; import io.bisq.trade.offer.OfferBookService; diff --git a/gui/src/main/java/io/bisq/gui/main/offer/offerbook/OfferBookView.java b/gui/src/main/java/io/bisq/gui/main/offer/offerbook/OfferBookView.java index 2408842ff6..58d422d27f 100644 --- a/gui/src/main/java/io/bisq/gui/main/offer/offerbook/OfferBookView.java +++ b/gui/src/main/java/io/bisq/gui/main/offer/offerbook/OfferBookView.java @@ -39,8 +39,8 @@ import io.bisq.gui.util.Layout; import io.bisq.locale.FiatCurrency; import io.bisq.locale.Res; import io.bisq.locale.TradeCurrency; -import io.bisq.messages.payment.PaymentMethod; -import io.bisq.messages.trade.offer.payload.OfferPayload; +import io.bisq.network_messages.payment.PaymentMethod; +import io.bisq.network_messages.trade.offer.payload.OfferPayload; import io.bisq.p2p.protocol.availability.Offer; import javafx.beans.property.ReadOnlyObjectWrapper; import javafx.beans.value.ChangeListener; diff --git a/gui/src/main/java/io/bisq/gui/main/offer/offerbook/OfferBookViewModel.java b/gui/src/main/java/io/bisq/gui/main/offer/offerbook/OfferBookViewModel.java index c7660fd112..745f6cc91f 100644 --- a/gui/src/main/java/io/bisq/gui/main/offer/offerbook/OfferBookViewModel.java +++ b/gui/src/main/java/io/bisq/gui/main/offer/offerbook/OfferBookViewModel.java @@ -31,9 +31,9 @@ import io.bisq.gui.main.settings.preferences.PreferencesView; import io.bisq.gui.util.BSFormatter; import io.bisq.gui.util.GUIUtil; import io.bisq.locale.*; -import io.bisq.messages.NodeAddress; -import io.bisq.messages.payment.PaymentMethod; -import io.bisq.messages.trade.offer.payload.OfferPayload; +import io.bisq.network_messages.NodeAddress; +import io.bisq.network_messages.payment.PaymentMethod; +import io.bisq.network_messages.trade.offer.payload.OfferPayload; import io.bisq.p2p.protocol.availability.Offer; import io.bisq.p2p.storage.P2PService; import io.bisq.payment.PaymentAccountUtil; diff --git a/gui/src/main/java/io/bisq/gui/main/offer/takeoffer/TakeOfferDataModel.java b/gui/src/main/java/io/bisq/gui/main/offer/takeoffer/TakeOfferDataModel.java index dfca1c1b50..8dedb4f229 100644 --- a/gui/src/main/java/io/bisq/gui/main/offer/takeoffer/TakeOfferDataModel.java +++ b/gui/src/main/java/io/bisq/gui/main/offer/takeoffer/TakeOfferDataModel.java @@ -29,9 +29,9 @@ import io.bisq.gui.main.overlays.popups.Popup; import io.bisq.gui.util.BSFormatter; import io.bisq.locale.CurrencyUtil; import io.bisq.locale.Res; -import io.bisq.messages.arbitration.Arbitrator; -import io.bisq.messages.payment.PaymentMethod; -import io.bisq.messages.trade.offer.payload.OfferPayload; +import io.bisq.network_messages.arbitration.Arbitrator; +import io.bisq.network_messages.payment.PaymentMethod; +import io.bisq.network_messages.trade.offer.payload.OfferPayload; import io.bisq.p2p.protocol.availability.Offer; import io.bisq.payment.PaymentAccount; import io.bisq.payment.PaymentAccountUtil; diff --git a/gui/src/main/java/io/bisq/gui/main/offer/takeoffer/TakeOfferView.java b/gui/src/main/java/io/bisq/gui/main/offer/takeoffer/TakeOfferView.java index 6d6dc87148..d2965908da 100644 --- a/gui/src/main/java/io/bisq/gui/main/offer/takeoffer/TakeOfferView.java +++ b/gui/src/main/java/io/bisq/gui/main/offer/takeoffer/TakeOfferView.java @@ -47,7 +47,7 @@ import io.bisq.gui.util.GUIUtil; import io.bisq.gui.util.Layout; import io.bisq.locale.Res; import io.bisq.locale.TradeCurrency; -import io.bisq.messages.trade.offer.payload.OfferPayload; +import io.bisq.network_messages.trade.offer.payload.OfferPayload; import io.bisq.p2p.protocol.availability.Offer; import io.bisq.payment.PaymentAccount; import io.bisq.user.Preferences; diff --git a/gui/src/main/java/io/bisq/gui/main/offer/takeoffer/TakeOfferViewModel.java b/gui/src/main/java/io/bisq/gui/main/offer/takeoffer/TakeOfferViewModel.java index 9abcb0f98f..5b9e21cf03 100644 --- a/gui/src/main/java/io/bisq/gui/main/offer/takeoffer/TakeOfferViewModel.java +++ b/gui/src/main/java/io/bisq/gui/main/offer/takeoffer/TakeOfferViewModel.java @@ -29,9 +29,9 @@ import io.bisq.gui.util.GUIUtil; import io.bisq.gui.util.validation.BtcValidator; import io.bisq.gui.util.validation.InputValidator; import io.bisq.locale.Res; -import io.bisq.messages.arbitration.Arbitrator; -import io.bisq.messages.payment.PaymentMethod; -import io.bisq.messages.trade.offer.payload.OfferPayload; +import io.bisq.network_messages.arbitration.Arbitrator; +import io.bisq.network_messages.payment.PaymentMethod; +import io.bisq.network_messages.trade.offer.payload.OfferPayload; import io.bisq.p2p.network.CloseConnectionReason; import io.bisq.p2p.network.Connection; import io.bisq.p2p.network.ConnectionListener; @@ -275,7 +275,7 @@ class TakeOfferViewModel extends ActivatableWithDataModel im // We have 2 situations handled here: // 1. when clicking take offer in the offerbook screen, we do the availability check // 2. Before actually taking the offer in the take offer screen, we check again the availability as some time might have passed in the meantime - // So we use the takeOfferRequested flag to display different messages depending on the context. + // So we use the takeOfferRequested flag to display different network_messages depending on the context. switch (state) { case UNDEFINED: break; diff --git a/gui/src/main/java/io/bisq/gui/main/overlays/windows/ContractWindow.java b/gui/src/main/java/io/bisq/gui/main/overlays/windows/ContractWindow.java index 3f93a1b54e..eff1bf3b97 100644 --- a/gui/src/main/java/io/bisq/gui/main/overlays/windows/ContractWindow.java +++ b/gui/src/main/java/io/bisq/gui/main/overlays/windows/ContractWindow.java @@ -25,12 +25,12 @@ import io.bisq.gui.util.BSFormatter; import io.bisq.gui.util.FormBuilder; import io.bisq.gui.util.Layout; import io.bisq.locale.Res; -import io.bisq.messages.arbitration.Dispute; +import io.bisq.network_messages.arbitration.Dispute; import io.bisq.locale.CountryUtil; -import io.bisq.messages.payment.PaymentMethod; -import io.bisq.messages.payment.payload.PaymentAccountContractData; -import io.bisq.messages.trade.offer.payload.OfferPayload; -import io.bisq.messages.trade.payload.Contract; +import io.bisq.network_messages.payment.PaymentMethod; +import io.bisq.network_messages.payment.payload.PaymentAccountContractData; +import io.bisq.network_messages.trade.offer.payload.OfferPayload; +import io.bisq.network_messages.trade.payload.Contract; import io.bisq.user.Preferences; import javafx.geometry.Insets; import javafx.scene.Scene; diff --git a/gui/src/main/java/io/bisq/gui/main/overlays/windows/DisplayAlertMessageWindow.java b/gui/src/main/java/io/bisq/gui/main/overlays/windows/DisplayAlertMessageWindow.java index 83094ee5d1..513106c2f3 100644 --- a/gui/src/main/java/io/bisq/gui/main/overlays/windows/DisplayAlertMessageWindow.java +++ b/gui/src/main/java/io/bisq/gui/main/overlays/windows/DisplayAlertMessageWindow.java @@ -21,7 +21,7 @@ import io.bisq.gui.components.HyperlinkWithIcon; import io.bisq.gui.main.overlays.Overlay; import io.bisq.gui.util.FormBuilder; import io.bisq.locale.Res; -import io.bisq.messages.alert.Alert; +import io.bisq.network_messages.alert.Alert; import javafx.geometry.Insets; import javafx.scene.control.Button; import javafx.scene.layout.GridPane; diff --git a/gui/src/main/java/io/bisq/gui/main/overlays/windows/DisputeSummaryWindow.java b/gui/src/main/java/io/bisq/gui/main/overlays/windows/DisputeSummaryWindow.java index 3d1ff80f36..2e82885189 100644 --- a/gui/src/main/java/io/bisq/gui/main/overlays/windows/DisputeSummaryWindow.java +++ b/gui/src/main/java/io/bisq/gui/main/overlays/windows/DisputeSummaryWindow.java @@ -31,9 +31,9 @@ import io.bisq.gui.util.BSFormatter; import io.bisq.gui.util.Layout; import io.bisq.gui.util.Transitions; import io.bisq.locale.Res; -import io.bisq.messages.arbitration.Dispute; -import io.bisq.messages.arbitration.DisputeResult; -import io.bisq.messages.trade.payload.Contract; +import io.bisq.network_messages.arbitration.Dispute; +import io.bisq.network_messages.arbitration.DisputeResult; +import io.bisq.network_messages.trade.payload.Contract; import javafx.beans.binding.Bindings; import javafx.beans.binding.ObjectBinding; import javafx.beans.value.ChangeListener; diff --git a/gui/src/main/java/io/bisq/gui/main/overlays/windows/EmptyWalletWindow.java b/gui/src/main/java/io/bisq/gui/main/overlays/windows/EmptyWalletWindow.java index b5c80d3515..0279b9199c 100644 --- a/gui/src/main/java/io/bisq/gui/main/overlays/windows/EmptyWalletWindow.java +++ b/gui/src/main/java/io/bisq/gui/main/overlays/windows/EmptyWalletWindow.java @@ -27,7 +27,7 @@ import io.bisq.gui.main.overlays.popups.Popup; import io.bisq.gui.util.BSFormatter; import io.bisq.gui.util.Transitions; import io.bisq.locale.Res; -import io.bisq.messages.btc.Restrictions; +import io.bisq.network_messages.btc.Restrictions; import io.bisq.trade.offer.OpenOfferManager; import javafx.geometry.Insets; import javafx.scene.Scene; diff --git a/gui/src/main/java/io/bisq/gui/main/overlays/windows/FilterWindow.java b/gui/src/main/java/io/bisq/gui/main/overlays/windows/FilterWindow.java index 4a1f0c34f0..20349ca4e7 100644 --- a/gui/src/main/java/io/bisq/gui/main/overlays/windows/FilterWindow.java +++ b/gui/src/main/java/io/bisq/gui/main/overlays/windows/FilterWindow.java @@ -23,8 +23,8 @@ import io.bisq.gui.components.InputTextField; import io.bisq.gui.main.overlays.Overlay; import io.bisq.gui.main.overlays.popups.Popup; import io.bisq.locale.Res; -import io.bisq.messages.filter.payload.Filter; -import io.bisq.messages.filter.payload.PaymentAccountFilter; +import io.bisq.network_messages.filter.payload.Filter; +import io.bisq.network_messages.filter.payload.PaymentAccountFilter; import javafx.geometry.HPos; import javafx.geometry.Insets; import javafx.scene.Scene; diff --git a/gui/src/main/java/io/bisq/gui/main/overlays/windows/OfferDetailsWindow.java b/gui/src/main/java/io/bisq/gui/main/overlays/windows/OfferDetailsWindow.java index 13b3fc6894..481adcc03a 100644 --- a/gui/src/main/java/io/bisq/gui/main/overlays/windows/OfferDetailsWindow.java +++ b/gui/src/main/java/io/bisq/gui/main/overlays/windows/OfferDetailsWindow.java @@ -18,7 +18,7 @@ package io.bisq.gui.main.overlays.windows; import com.google.common.base.Joiner; -import io.bisq.messages.crypto.KeyRing; +import io.bisq.network_messages.crypto.KeyRing; import io.bisq.common.util.Tuple3; import io.bisq.gui.Navigation; import io.bisq.gui.components.BusyAnimation; @@ -33,8 +33,8 @@ import io.bisq.gui.util.Layout; import io.bisq.locale.Res; import io.bisq.locale.BankUtil; import io.bisq.locale.CountryUtil; -import io.bisq.messages.payment.PaymentMethod; -import io.bisq.messages.trade.offer.payload.OfferPayload; +import io.bisq.network_messages.payment.PaymentMethod; +import io.bisq.network_messages.trade.offer.payload.OfferPayload; import io.bisq.p2p.protocol.availability.Offer; import io.bisq.user.Preferences; import io.bisq.payment.PaymentAccount; diff --git a/gui/src/main/java/io/bisq/gui/main/overlays/windows/SendAlertMessageWindow.java b/gui/src/main/java/io/bisq/gui/main/overlays/windows/SendAlertMessageWindow.java index e769ca3e7d..c93cfc15fb 100644 --- a/gui/src/main/java/io/bisq/gui/main/overlays/windows/SendAlertMessageWindow.java +++ b/gui/src/main/java/io/bisq/gui/main/overlays/windows/SendAlertMessageWindow.java @@ -23,7 +23,7 @@ import io.bisq.gui.components.InputTextField; import io.bisq.gui.main.overlays.Overlay; import io.bisq.gui.main.overlays.popups.Popup; import io.bisq.locale.Res; -import io.bisq.messages.alert.Alert; +import io.bisq.network_messages.alert.Alert; import javafx.geometry.Insets; import javafx.scene.Scene; import javafx.scene.control.Button; diff --git a/gui/src/main/java/io/bisq/gui/main/overlays/windows/SendPrivateNotificationWindow.java b/gui/src/main/java/io/bisq/gui/main/overlays/windows/SendPrivateNotificationWindow.java index 2f85718ae1..a8ada35a34 100644 --- a/gui/src/main/java/io/bisq/gui/main/overlays/windows/SendPrivateNotificationWindow.java +++ b/gui/src/main/java/io/bisq/gui/main/overlays/windows/SendPrivateNotificationWindow.java @@ -18,15 +18,15 @@ package io.bisq.gui.main.overlays.windows; import io.bisq.app.DevEnv; -import io.bisq.messages.crypto.PubKeyRing; +import io.bisq.network_messages.crypto.PubKeyRing; import io.bisq.common.util.Tuple2; import io.bisq.gui.components.InputTextField; import io.bisq.gui.main.overlays.Overlay; import io.bisq.gui.main.overlays.popups.Popup; import io.bisq.locale.Res; -import io.bisq.messages.alert.PrivateNotification; -import io.bisq.messages.NodeAddress; -import io.bisq.messages.p2p.messaging.SendMailboxMessageListener; +import io.bisq.network_messages.alert.PrivateNotification; +import io.bisq.network_messages.NodeAddress; +import io.bisq.network_messages.p2p.messaging.SendMailboxMessageListener; import javafx.geometry.Insets; import javafx.scene.Scene; import javafx.scene.control.Button; diff --git a/gui/src/main/java/io/bisq/gui/main/overlays/windows/TradeDetailsWindow.java b/gui/src/main/java/io/bisq/gui/main/overlays/windows/TradeDetailsWindow.java index 7e97b77f47..fbb8fb6442 100644 --- a/gui/src/main/java/io/bisq/gui/main/overlays/windows/TradeDetailsWindow.java +++ b/gui/src/main/java/io/bisq/gui/main/overlays/windows/TradeDetailsWindow.java @@ -24,8 +24,8 @@ import io.bisq.gui.main.overlays.Overlay; import io.bisq.gui.util.BSFormatter; import io.bisq.gui.util.Layout; import io.bisq.locale.Res; -import io.bisq.messages.payment.payload.PaymentAccountContractData; -import io.bisq.messages.trade.payload.Contract; +import io.bisq.network_messages.payment.payload.PaymentAccountContractData; +import io.bisq.network_messages.trade.payload.Contract; import io.bisq.p2p.protocol.availability.Offer; import io.bisq.trade.Trade; import io.bisq.trade.TradeManager; diff --git a/gui/src/main/java/io/bisq/gui/main/portfolio/closedtrades/ClosedTradesDataModel.java b/gui/src/main/java/io/bisq/gui/main/portfolio/closedtrades/ClosedTradesDataModel.java index bb7cbfb415..7adfe71171 100644 --- a/gui/src/main/java/io/bisq/gui/main/portfolio/closedtrades/ClosedTradesDataModel.java +++ b/gui/src/main/java/io/bisq/gui/main/portfolio/closedtrades/ClosedTradesDataModel.java @@ -19,7 +19,7 @@ package io.bisq.gui.main.portfolio.closedtrades; import com.google.inject.Inject; import io.bisq.gui.common.model.ActivatableDataModel; -import io.bisq.messages.trade.offer.payload.OfferPayload; +import io.bisq.network_messages.trade.offer.payload.OfferPayload; import io.bisq.p2p.protocol.availability.Offer; import io.bisq.trade.Tradable; import io.bisq.trade.closed.ClosedTradableManager; diff --git a/gui/src/main/java/io/bisq/gui/main/portfolio/closedtrades/ClosedTradesView.java b/gui/src/main/java/io/bisq/gui/main/portfolio/closedtrades/ClosedTradesView.java index 09ae69daf9..f3507a768d 100644 --- a/gui/src/main/java/io/bisq/gui/main/portfolio/closedtrades/ClosedTradesView.java +++ b/gui/src/main/java/io/bisq/gui/main/portfolio/closedtrades/ClosedTradesView.java @@ -27,7 +27,7 @@ import io.bisq.gui.main.overlays.windows.OfferDetailsWindow; import io.bisq.gui.main.overlays.windows.TradeDetailsWindow; import io.bisq.gui.util.GUIUtil; import io.bisq.locale.Res; -import io.bisq.messages.NodeAddress; +import io.bisq.network_messages.NodeAddress; import io.bisq.trade.Tradable; import io.bisq.trade.Trade; import io.bisq.trade.offer.OpenOffer; diff --git a/gui/src/main/java/io/bisq/gui/main/portfolio/failedtrades/FailedTradesDataModel.java b/gui/src/main/java/io/bisq/gui/main/portfolio/failedtrades/FailedTradesDataModel.java index c34a77aacb..d080ade237 100644 --- a/gui/src/main/java/io/bisq/gui/main/portfolio/failedtrades/FailedTradesDataModel.java +++ b/gui/src/main/java/io/bisq/gui/main/portfolio/failedtrades/FailedTradesDataModel.java @@ -19,7 +19,7 @@ package io.bisq.gui.main.portfolio.failedtrades; import com.google.inject.Inject; import io.bisq.gui.common.model.ActivatableDataModel; -import io.bisq.messages.trade.offer.payload.OfferPayload; +import io.bisq.network_messages.trade.offer.payload.OfferPayload; import io.bisq.p2p.protocol.availability.Offer; import io.bisq.trade.Trade; import io.bisq.trade.failed.FailedTradesManager; diff --git a/gui/src/main/java/io/bisq/gui/main/portfolio/openoffer/OpenOffersDataModel.java b/gui/src/main/java/io/bisq/gui/main/portfolio/openoffer/OpenOffersDataModel.java index e9aafcdc96..bd9c247253 100644 --- a/gui/src/main/java/io/bisq/gui/main/portfolio/openoffer/OpenOffersDataModel.java +++ b/gui/src/main/java/io/bisq/gui/main/portfolio/openoffer/OpenOffersDataModel.java @@ -21,7 +21,7 @@ import com.google.inject.Inject; import io.bisq.common.handlers.ErrorMessageHandler; import io.bisq.common.handlers.ResultHandler; import io.bisq.gui.common.model.ActivatableDataModel; -import io.bisq.messages.trade.offer.payload.OfferPayload; +import io.bisq.network_messages.trade.offer.payload.OfferPayload; import io.bisq.p2p.protocol.availability.Offer; import io.bisq.provider.price.PriceFeedService; import io.bisq.trade.offer.OpenOffer; diff --git a/gui/src/main/java/io/bisq/gui/main/portfolio/pendingtrades/PendingTradesDataModel.java b/gui/src/main/java/io/bisq/gui/main/portfolio/pendingtrades/PendingTradesDataModel.java index fccd370598..368dca0f1b 100644 --- a/gui/src/main/java/io/bisq/gui/main/portfolio/pendingtrades/PendingTradesDataModel.java +++ b/gui/src/main/java/io/bisq/gui/main/portfolio/pendingtrades/PendingTradesDataModel.java @@ -35,11 +35,11 @@ import io.bisq.gui.main.overlays.popups.Popup; import io.bisq.gui.main.overlays.windows.SelectDepositTxWindow; import io.bisq.gui.main.overlays.windows.WalletPasswordWindow; import io.bisq.locale.Res; -import io.bisq.messages.arbitration.Arbitrator; -import io.bisq.messages.arbitration.Dispute; -import io.bisq.messages.crypto.KeyRing; -import io.bisq.messages.payment.payload.PaymentAccountContractData; -import io.bisq.messages.trade.offer.payload.OfferPayload; +import io.bisq.network_messages.arbitration.Arbitrator; +import io.bisq.network_messages.arbitration.Dispute; +import io.bisq.network_messages.crypto.KeyRing; +import io.bisq.network_messages.payment.payload.PaymentAccountContractData; +import io.bisq.network_messages.trade.offer.payload.OfferPayload; import io.bisq.p2p.protocol.availability.Offer; import io.bisq.p2p.storage.P2PService; import io.bisq.provider.fee.FeeService; diff --git a/gui/src/main/java/io/bisq/gui/main/portfolio/pendingtrades/PendingTradesViewModel.java b/gui/src/main/java/io/bisq/gui/main/portfolio/pendingtrades/PendingTradesViewModel.java index 316f321c9d..1210818612 100644 --- a/gui/src/main/java/io/bisq/gui/main/portfolio/pendingtrades/PendingTradesViewModel.java +++ b/gui/src/main/java/io/bisq/gui/main/portfolio/pendingtrades/PendingTradesViewModel.java @@ -25,8 +25,8 @@ import io.bisq.gui.common.model.ViewModel; import io.bisq.gui.util.BSFormatter; import io.bisq.gui.util.validation.BtcAddressValidator; import io.bisq.locale.Res; -import io.bisq.messages.payment.PaymentMethod; -import io.bisq.messages.trade.payload.Contract; +import io.bisq.network_messages.payment.PaymentMethod; +import io.bisq.network_messages.trade.payload.Contract; import io.bisq.p2p.protocol.availability.Offer; import io.bisq.p2p.storage.P2PService; import io.bisq.trade.Trade; diff --git a/gui/src/main/java/io/bisq/gui/main/portfolio/pendingtrades/steps/TradeStepView.java b/gui/src/main/java/io/bisq/gui/main/portfolio/pendingtrades/steps/TradeStepView.java index dd92e82ff0..981e1f45fe 100644 --- a/gui/src/main/java/io/bisq/gui/main/portfolio/pendingtrades/steps/TradeStepView.java +++ b/gui/src/main/java/io/bisq/gui/main/portfolio/pendingtrades/steps/TradeStepView.java @@ -27,7 +27,7 @@ import io.bisq.gui.main.portfolio.pendingtrades.PendingTradesViewModel; import io.bisq.gui.main.portfolio.pendingtrades.TradeSubView; import io.bisq.gui.util.Layout; import io.bisq.locale.Res; -import io.bisq.messages.arbitration.Dispute; +import io.bisq.network_messages.arbitration.Dispute; import io.bisq.user.Preferences; import io.bisq.trade.Trade; import javafx.beans.value.ChangeListener; diff --git a/gui/src/main/java/io/bisq/gui/main/portfolio/pendingtrades/steps/buyer/BuyerStep2View.java b/gui/src/main/java/io/bisq/gui/main/portfolio/pendingtrades/steps/buyer/BuyerStep2View.java index 66714affe9..2ec7edfb37 100644 --- a/gui/src/main/java/io/bisq/gui/main/portfolio/pendingtrades/steps/buyer/BuyerStep2View.java +++ b/gui/src/main/java/io/bisq/gui/main/portfolio/pendingtrades/steps/buyer/BuyerStep2View.java @@ -29,11 +29,11 @@ import io.bisq.gui.main.portfolio.pendingtrades.steps.TradeStepView; import io.bisq.gui.util.Layout; import io.bisq.locale.CurrencyUtil; import io.bisq.locale.Res; -import io.bisq.messages.payment.PaymentMethod; -import io.bisq.messages.payment.payload.CashDepositAccountContractData; -import io.bisq.messages.payment.payload.CryptoCurrencyAccountContractData; -import io.bisq.messages.payment.payload.PaymentAccountContractData; -import io.bisq.messages.payment.payload.USPostalMoneyOrderAccountContractData; +import io.bisq.network_messages.payment.PaymentMethod; +import io.bisq.network_messages.payment.payload.CashDepositAccountContractData; +import io.bisq.network_messages.payment.payload.CryptoCurrencyAccountContractData; +import io.bisq.network_messages.payment.payload.PaymentAccountContractData; +import io.bisq.network_messages.payment.payload.USPostalMoneyOrderAccountContractData; import io.bisq.trade.Trade; import io.bisq.user.Preferences; import javafx.scene.control.Button; diff --git a/gui/src/main/java/io/bisq/gui/main/portfolio/pendingtrades/steps/buyer/BuyerStep5View.java b/gui/src/main/java/io/bisq/gui/main/portfolio/pendingtrades/steps/buyer/BuyerStep5View.java index e760ec4681..fb48788682 100644 --- a/gui/src/main/java/io/bisq/gui/main/portfolio/pendingtrades/steps/buyer/BuyerStep5View.java +++ b/gui/src/main/java/io/bisq/gui/main/portfolio/pendingtrades/steps/buyer/BuyerStep5View.java @@ -39,7 +39,7 @@ import io.bisq.gui.main.portfolio.pendingtrades.steps.TradeStepView; import io.bisq.gui.util.BSFormatter; import io.bisq.gui.util.Layout; import io.bisq.locale.Res; -import io.bisq.messages.btc.Restrictions; +import io.bisq.network_messages.btc.Restrictions; import javafx.beans.value.ChangeListener; import javafx.geometry.Insets; import javafx.scene.control.Button; diff --git a/gui/src/main/java/io/bisq/gui/main/portfolio/pendingtrades/steps/seller/SellerStep3View.java b/gui/src/main/java/io/bisq/gui/main/portfolio/pendingtrades/steps/seller/SellerStep3View.java index 4b61b8bdeb..a0268d5b3e 100644 --- a/gui/src/main/java/io/bisq/gui/main/portfolio/pendingtrades/steps/seller/SellerStep3View.java +++ b/gui/src/main/java/io/bisq/gui/main/portfolio/pendingtrades/steps/seller/SellerStep3View.java @@ -28,8 +28,8 @@ import io.bisq.gui.main.portfolio.pendingtrades.steps.TradeStepView; import io.bisq.gui.util.Layout; import io.bisq.locale.Res; import io.bisq.locale.CurrencyUtil; -import io.bisq.messages.payment.payload.*; -import io.bisq.messages.trade.payload.Contract; +import io.bisq.network_messages.payment.payload.*; +import io.bisq.network_messages.trade.payload.Contract; import io.bisq.user.Preferences; import io.bisq.trade.Trade; import javafx.scene.control.Button; diff --git a/gui/src/main/java/io/bisq/gui/util/BSFormatter.java b/gui/src/main/java/io/bisq/gui/util/BSFormatter.java index 986e8416d2..90edb96f53 100644 --- a/gui/src/main/java/io/bisq/gui/util/BSFormatter.java +++ b/gui/src/main/java/io/bisq/gui/util/BSFormatter.java @@ -21,10 +21,10 @@ import io.bisq.common.util.MathUtils; import io.bisq.locale.Res; import io.bisq.locale.CurrencyUtil; import io.bisq.locale.LanguageUtil; -import io.bisq.messages.trade.offer.payload.OfferPayload; +import io.bisq.network_messages.trade.offer.payload.OfferPayload; import io.bisq.p2p.protocol.availability.Offer; import io.bisq.user.Preferences; -import io.bisq.messages.NodeAddress; +import io.bisq.network_messages.NodeAddress; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.time.DurationFormatUtils; import org.bitcoinj.core.Coin; diff --git a/gui/src/main/java/io/bisq/gui/util/validation/SecurityDepositValidator.java b/gui/src/main/java/io/bisq/gui/util/validation/SecurityDepositValidator.java index a8b4249ca7..f666bb0ddf 100644 --- a/gui/src/main/java/io/bisq/gui/util/validation/SecurityDepositValidator.java +++ b/gui/src/main/java/io/bisq/gui/util/validation/SecurityDepositValidator.java @@ -19,7 +19,7 @@ package io.bisq.gui.util.validation; import io.bisq.gui.util.BSFormatter; import io.bisq.locale.Res; -import io.bisq.messages.btc.Restrictions; +import io.bisq.network_messages.btc.Restrictions; import org.bitcoinj.core.Coin; import javax.inject.Inject; diff --git a/gui/src/test/java/io/bisq/gui/main/market/trades/TradesChartsViewModelTest.java b/gui/src/test/java/io/bisq/gui/main/market/trades/TradesChartsViewModelTest.java index 7f7d8f89ab..22e10651c6 100644 --- a/gui/src/test/java/io/bisq/gui/main/market/trades/TradesChartsViewModelTest.java +++ b/gui/src/test/java/io/bisq/gui/main/market/trades/TradesChartsViewModelTest.java @@ -1,8 +1,8 @@ package io.bisq.gui.main.market.trades; import io.bisq.gui.main.market.trades.charts.CandleData; -import io.bisq.messages.trade.offer.payload.OfferPayload; -import io.bisq.messages.trade.statistics.payload.TradeStatistics; +import io.bisq.network_messages.trade.offer.payload.OfferPayload; +import io.bisq.network_messages.trade.statistics.payload.TradeStatistics; import org.bitcoinj.core.Coin; import org.bitcoinj.utils.Fiat; import org.junit.Ignore; diff --git a/gui/src/test/java/io/bisq/gui/main/offer/offerbook/OfferBookViewModelTest.java b/gui/src/test/java/io/bisq/gui/main/offer/offerbook/OfferBookViewModelTest.java index 68f3744403..e0e4cd39b0 100644 --- a/gui/src/test/java/io/bisq/gui/main/offer/offerbook/OfferBookViewModelTest.java +++ b/gui/src/test/java/io/bisq/gui/main/offer/offerbook/OfferBookViewModelTest.java @@ -3,12 +3,12 @@ package io.bisq.gui.main.offer.offerbook; import io.bisq.locale.Country; import io.bisq.locale.CryptoCurrency; import io.bisq.locale.FiatCurrency; -import io.bisq.messages.payment.PaymentMethod; -import io.bisq.messages.payment.payload.NationalBankAccountContractData; -import io.bisq.messages.payment.payload.SameBankAccountContractData; -import io.bisq.messages.payment.payload.SepaAccountContractData; -import io.bisq.messages.payment.payload.SpecificBanksAccountContractData; -import io.bisq.messages.trade.offer.payload.OfferPayload; +import io.bisq.network_messages.payment.PaymentMethod; +import io.bisq.network_messages.payment.payload.NationalBankAccountContractData; +import io.bisq.network_messages.payment.payload.SameBankAccountContractData; +import io.bisq.network_messages.payment.payload.SepaAccountContractData; +import io.bisq.network_messages.payment.payload.SpecificBanksAccountContractData; +import io.bisq.network_messages.trade.offer.payload.OfferPayload; import io.bisq.p2p.protocol.availability.Offer; import io.bisq.payment.*; import org.junit.Test; diff --git a/headless/src/main/java/io/bisq/headless/HeadlessModule.java b/headless/src/main/java/io/bisq/headless/HeadlessModule.java index 621fb35966..c1c4e87d44 100644 --- a/headless/src/main/java/io/bisq/headless/HeadlessModule.java +++ b/headless/src/main/java/io/bisq/headless/HeadlessModule.java @@ -24,8 +24,8 @@ import io.bisq.app.BisqEnvironment; import io.bisq.arbitration.ArbitratorModule; import io.bisq.btc.BitcoinModule; import io.bisq.common.Clock; -import io.bisq.messages.crypto.KeyRing; -import io.bisq.messages.crypto.KeyStorage; +import io.bisq.network_messages.crypto.KeyRing; +import io.bisq.network_messages.crypto.KeyStorage; import io.bisq.crypto.EncryptionServiceModule; import io.bisq.dao.DaoModule; import io.bisq.filter.FilterModule; diff --git a/jsocks/src/main/java/com/runjva/sourceforge/jsocks/protocol/ProxyMessage.java b/jsocks/src/main/java/com/runjva/sourceforge/jsocks/protocol/ProxyMessage.java index f7796b055e..5e7ab862c3 100644 --- a/jsocks/src/main/java/com/runjva/sourceforge/jsocks/protocol/ProxyMessage.java +++ b/jsocks/src/main/java/com/runjva/sourceforge/jsocks/protocol/ProxyMessage.java @@ -37,7 +37,7 @@ public abstract class ProxyMessage { public String host = null; /** - * User field for SOCKS4 request messages + * User field for SOCKS4 request network_messages */ public String user = null; diff --git a/jsocks/src/main/java/com/runjva/sourceforge/jsocks/server/UserPasswordAuthenticator.java b/jsocks/src/main/java/com/runjva/sourceforge/jsocks/server/UserPasswordAuthenticator.java index 2a69d32e5a..65b65fe204 100644 --- a/jsocks/src/main/java/com/runjva/sourceforge/jsocks/server/UserPasswordAuthenticator.java +++ b/jsocks/src/main/java/com/runjva/sourceforge/jsocks/server/UserPasswordAuthenticator.java @@ -30,7 +30,7 @@ public class UserPasswordAuthenticator extends ServerAuthenticatorBase { final OutputStream out = s.getOutputStream(); if (in.read() != 5) { - return null; // Drop non version 5 messages. + return null; // Drop non version 5 network_messages. } if (!selectSocks5Authentication(in, out, METHOD_ID)) { diff --git a/jtorctl/src/main/java/net/freehaven/tor/control/TorControlConnection.java b/jtorctl/src/main/java/net/freehaven/tor/control/TorControlConnection.java index cba22e0d9f..af9098a7b1 100644 --- a/jtorctl/src/main/java/net/freehaven/tor/control/TorControlConnection.java +++ b/jtorctl/src/main/java/net/freehaven/tor/control/TorControlConnection.java @@ -236,8 +236,8 @@ public class TorControlConnection implements TorControlCommands { /** * Sets w as the PrintWriter for debugging output, - * which writes out all messages passed between Tor and the controller. - * Outgoing messages are preceded by "\>\>" and incoming messages are preceded + * which writes out all network_messages passed between Tor and the controller. + * Outgoing network_messages are preceded by "\>\>" and incoming network_messages are preceded * by "\<\<" */ public void setDebugging(PrintWriter w) { @@ -246,8 +246,8 @@ public class TorControlConnection implements TorControlCommands { /** * Sets s as the PrintStream for debugging output, - * which writes out all messages passed between Tor and the controller. - * Outgoing messages are preceded by "\>\>" and incoming messages are preceded + * which writes out all network_messages passed between Tor and the controller. + * Outgoing network_messages are preceded by "\>\>" and incoming network_messages are preceded * by "\<\<" */ public void setDebugging(PrintStream s) { diff --git a/jtorproxy/src/main/java/io/nucleo/net/Node.java b/jtorproxy/src/main/java/io/nucleo/net/Node.java index ace3557da3..07fec0a10a 100644 --- a/jtorproxy/src/main/java/io/nucleo/net/Node.java +++ b/jtorproxy/src/main/java/io/nucleo/net/Node.java @@ -304,7 +304,7 @@ public class Node { // Here we go log.debug("Incoming Connection ready!"); try { - // TODO: listeners are only added afterwards, so messages can be lost! + // TODO: listeners are only added afterwards, so network_messages can be lost! IncomingConnection incomingConnection = new IncomingConnection(peer, socket, out, objectInputStream); serverConnectListener.onConnect(incomingConnection); } catch (IOException e) { diff --git a/monitor/src/main/java/io/bisq/monitor/MonitorModule.java b/monitor/src/main/java/io/bisq/monitor/MonitorModule.java index 8f8ec233a0..89bd680abd 100644 --- a/monitor/src/main/java/io/bisq/monitor/MonitorModule.java +++ b/monitor/src/main/java/io/bisq/monitor/MonitorModule.java @@ -24,8 +24,8 @@ import io.bisq.app.BisqEnvironment; import io.bisq.arbitration.ArbitratorModule; import io.bisq.btc.BitcoinModule; import io.bisq.common.Clock; -import io.bisq.messages.crypto.KeyRing; -import io.bisq.messages.crypto.KeyStorage; +import io.bisq.network_messages.crypto.KeyRing; +import io.bisq.network_messages.crypto.KeyStorage; import io.bisq.crypto.EncryptionServiceModule; import io.bisq.dao.DaoModule; import io.bisq.filter.FilterModule; diff --git a/network-messages/src/main/java/io/bisq/messages/AnonymousMessage.java b/network-messages/src/main/java/io/bisq/messages/AnonymousMessage.java deleted file mode 100644 index d00f18c204..0000000000 --- a/network-messages/src/main/java/io/bisq/messages/AnonymousMessage.java +++ /dev/null @@ -1,6 +0,0 @@ -package io.bisq.messages; - -import io.bisq.messages.Message; - -public interface AnonymousMessage extends Message { -} diff --git a/network-messages/src/main/java/io/bisq/network_messages/AnonymousMessage.java b/network-messages/src/main/java/io/bisq/network_messages/AnonymousMessage.java new file mode 100644 index 0000000000..5d5d108e84 --- /dev/null +++ b/network-messages/src/main/java/io/bisq/network_messages/AnonymousMessage.java @@ -0,0 +1,4 @@ +package io.bisq.network_messages; + +public interface AnonymousMessage extends Message { +} diff --git a/network-messages/src/main/java/io/bisq/messages/CloseConnectionMessage.java b/network-messages/src/main/java/io/bisq/network_messages/CloseConnectionMessage.java similarity index 97% rename from network-messages/src/main/java/io/bisq/messages/CloseConnectionMessage.java rename to network-messages/src/main/java/io/bisq/network_messages/CloseConnectionMessage.java index 3970718730..15f558a421 100644 --- a/network-messages/src/main/java/io/bisq/messages/CloseConnectionMessage.java +++ b/network-messages/src/main/java/io/bisq/network_messages/CloseConnectionMessage.java @@ -1,4 +1,4 @@ -package io.bisq.messages; +package io.bisq.network_messages; import io.bisq.app.Version; import io.bisq.common.wire.proto.Messages; diff --git a/network-messages/src/main/java/io/bisq/messages/DecryptedDirectMessageListener.java b/network-messages/src/main/java/io/bisq/network_messages/DecryptedDirectMessageListener.java similarity index 82% rename from network-messages/src/main/java/io/bisq/messages/DecryptedDirectMessageListener.java rename to network-messages/src/main/java/io/bisq/network_messages/DecryptedDirectMessageListener.java index 20734f01e7..ccdd6648d8 100644 --- a/network-messages/src/main/java/io/bisq/messages/DecryptedDirectMessageListener.java +++ b/network-messages/src/main/java/io/bisq/network_messages/DecryptedDirectMessageListener.java @@ -1,4 +1,4 @@ -package io.bisq.messages; +package io.bisq.network_messages; public interface DecryptedDirectMessageListener { diff --git a/network-messages/src/main/java/io/bisq/messages/DecryptedMsgWithPubKey.java b/network-messages/src/main/java/io/bisq/network_messages/DecryptedMsgWithPubKey.java similarity index 98% rename from network-messages/src/main/java/io/bisq/messages/DecryptedMsgWithPubKey.java rename to network-messages/src/main/java/io/bisq/network_messages/DecryptedMsgWithPubKey.java index d3ac80b6e8..3e6034274d 100644 --- a/network-messages/src/main/java/io/bisq/messages/DecryptedMsgWithPubKey.java +++ b/network-messages/src/main/java/io/bisq/network_messages/DecryptedMsgWithPubKey.java @@ -15,7 +15,7 @@ * along with bisq. If not, see . */ -package io.bisq.messages; +package io.bisq.network_messages; import io.bisq.app.Version; import io.bisq.common.persistance.Persistable; diff --git a/network-messages/src/main/java/io/bisq/messages/Message.java b/network-messages/src/main/java/io/bisq/network_messages/Message.java similarity index 85% rename from network-messages/src/main/java/io/bisq/messages/Message.java rename to network-messages/src/main/java/io/bisq/network_messages/Message.java index aec31721cd..08ffb92018 100644 --- a/network-messages/src/main/java/io/bisq/messages/Message.java +++ b/network-messages/src/main/java/io/bisq/network_messages/Message.java @@ -1,4 +1,4 @@ -package io.bisq.messages; +package io.bisq.network_messages; import io.bisq.common.wire.proto.Messages; diff --git a/network-messages/src/main/java/io/bisq/messages/NodeAddress.java b/network-messages/src/main/java/io/bisq/network_messages/NodeAddress.java similarity index 92% rename from network-messages/src/main/java/io/bisq/messages/NodeAddress.java rename to network-messages/src/main/java/io/bisq/network_messages/NodeAddress.java index c05c5fe5af..c63f605628 100644 --- a/network-messages/src/main/java/io/bisq/messages/NodeAddress.java +++ b/network-messages/src/main/java/io/bisq/network_messages/NodeAddress.java @@ -1,9 +1,9 @@ -package io.bisq.messages; +package io.bisq.network_messages; import io.bisq.app.Version; -import io.bisq.messages.crypto.Hash; +import io.bisq.network_messages.crypto.Hash; import io.bisq.common.persistance.Persistable; -import io.bisq.messages.wire.Payload; +import io.bisq.network_messages.wire.Payload; import io.bisq.common.wire.proto.Messages; import lombok.Getter; @@ -34,7 +34,7 @@ public final class NodeAddress implements Persistable, Payload { return hostName + ":" + port; } - // We use just a few chars from the full address to blur the potential receiver for sent messages + // We use just a few chars from the full address to blur the potential receiver for sent network_messages public byte[] getAddressPrefixHash() { if (addressPrefixHash == null) addressPrefixHash = Hash.getHash(getFullAddress().substring(0, Math.min(2, getFullAddress().length()))); diff --git a/network-messages/src/main/java/io/bisq/messages/SendersNodeAddressMessage.java b/network-messages/src/main/java/io/bisq/network_messages/SendersNodeAddressMessage.java similarity index 75% rename from network-messages/src/main/java/io/bisq/messages/SendersNodeAddressMessage.java rename to network-messages/src/main/java/io/bisq/network_messages/SendersNodeAddressMessage.java index cf4d75c8a6..07c7494afb 100644 --- a/network-messages/src/main/java/io/bisq/messages/SendersNodeAddressMessage.java +++ b/network-messages/src/main/java/io/bisq/network_messages/SendersNodeAddressMessage.java @@ -1,4 +1,4 @@ -package io.bisq.messages; +package io.bisq.network_messages; public interface SendersNodeAddressMessage extends Message { diff --git a/network-messages/src/main/java/io/bisq/messages/ToProtoBuffer.java b/network-messages/src/main/java/io/bisq/network_messages/ToProtoBuffer.java similarity index 80% rename from network-messages/src/main/java/io/bisq/messages/ToProtoBuffer.java rename to network-messages/src/main/java/io/bisq/network_messages/ToProtoBuffer.java index ddbd58de62..9e27544c30 100644 --- a/network-messages/src/main/java/io/bisq/messages/ToProtoBuffer.java +++ b/network-messages/src/main/java/io/bisq/network_messages/ToProtoBuffer.java @@ -1,4 +1,4 @@ -package io.bisq.messages; +package io.bisq.network_messages; import com.google.protobuf.Message; diff --git a/network-messages/src/main/java/io/bisq/messages/alert/Alert.java b/network-messages/src/main/java/io/bisq/network_messages/alert/Alert.java similarity index 98% rename from network-messages/src/main/java/io/bisq/messages/alert/Alert.java rename to network-messages/src/main/java/io/bisq/network_messages/alert/Alert.java index 4257086263..34a8a2ee6f 100644 --- a/network-messages/src/main/java/io/bisq/messages/alert/Alert.java +++ b/network-messages/src/main/java/io/bisq/network_messages/alert/Alert.java @@ -15,14 +15,14 @@ * along with bisq. If not, see . */ -package io.bisq.messages.alert; +package io.bisq.network_messages.alert; import com.google.common.annotations.VisibleForTesting; import com.google.protobuf.ByteString; import io.bisq.app.Version; import io.bisq.common.crypto.Sig; import io.bisq.common.wire.proto.Messages; -import io.bisq.payload.StoragePayload; +import io.bisq.network_messages.payload.StoragePayload; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/network-messages/src/main/java/io/bisq/messages/alert/PrivateNotification.java b/network-messages/src/main/java/io/bisq/network_messages/alert/PrivateNotification.java similarity index 98% rename from network-messages/src/main/java/io/bisq/messages/alert/PrivateNotification.java rename to network-messages/src/main/java/io/bisq/network_messages/alert/PrivateNotification.java index 12160561c6..2bf837c47c 100644 --- a/network-messages/src/main/java/io/bisq/messages/alert/PrivateNotification.java +++ b/network-messages/src/main/java/io/bisq/network_messages/alert/PrivateNotification.java @@ -15,12 +15,12 @@ * along with bisq. If not, see . */ -package io.bisq.messages.alert; +package io.bisq.network_messages.alert; import com.google.protobuf.ByteString; import io.bisq.app.Version; import io.bisq.common.crypto.Sig; -import io.bisq.messages.wire.Payload; +import io.bisq.network_messages.wire.Payload; import io.bisq.common.wire.proto.Messages; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/network-messages/src/main/java/io/bisq/messages/alert/PrivateNotificationMessage.java b/network-messages/src/main/java/io/bisq/network_messages/alert/PrivateNotificationMessage.java similarity index 93% rename from network-messages/src/main/java/io/bisq/messages/alert/PrivateNotificationMessage.java rename to network-messages/src/main/java/io/bisq/network_messages/alert/PrivateNotificationMessage.java index af00193ceb..9ff6f4f0c1 100644 --- a/network-messages/src/main/java/io/bisq/messages/alert/PrivateNotificationMessage.java +++ b/network-messages/src/main/java/io/bisq/network_messages/alert/PrivateNotificationMessage.java @@ -1,10 +1,10 @@ -package io.bisq.messages.alert; +package io.bisq.network_messages.alert; import io.bisq.app.Version; import io.bisq.common.wire.proto.Messages; -import io.bisq.messages.NodeAddress; -import io.bisq.messages.p2p.messaging.MailboxMessage; -import io.bisq.messages.util.ProtoBufferUtils; +import io.bisq.network_messages.NodeAddress; +import io.bisq.network_messages.p2p.messaging.MailboxMessage; +import io.bisq.network_messages.util.ProtoBufferUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/network-messages/src/main/java/io/bisq/messages/arbitration/Arbitrator.java b/network-messages/src/main/java/io/bisq/network_messages/arbitration/Arbitrator.java similarity index 97% rename from network-messages/src/main/java/io/bisq/messages/arbitration/Arbitrator.java rename to network-messages/src/main/java/io/bisq/network_messages/arbitration/Arbitrator.java index 7a4e362a37..2e5a97ee08 100644 --- a/network-messages/src/main/java/io/bisq/messages/arbitration/Arbitrator.java +++ b/network-messages/src/main/java/io/bisq/network_messages/arbitration/Arbitrator.java @@ -15,14 +15,14 @@ * along with bisq. If not, see . */ -package io.bisq.messages.arbitration; +package io.bisq.network_messages.arbitration; import com.google.protobuf.ByteString; import io.bisq.app.Version; import io.bisq.common.wire.proto.Messages; -import io.bisq.messages.NodeAddress; -import io.bisq.messages.crypto.PubKeyRing; -import io.bisq.payload.StoragePayload; +import io.bisq.network_messages.NodeAddress; +import io.bisq.network_messages.crypto.PubKeyRing; +import io.bisq.network_messages.payload.StoragePayload; import java.security.PublicKey; import java.util.Arrays; diff --git a/network-messages/src/main/java/io/bisq/messages/arbitration/Dispute.java b/network-messages/src/main/java/io/bisq/network_messages/arbitration/Dispute.java similarity index 98% rename from network-messages/src/main/java/io/bisq/messages/arbitration/Dispute.java rename to network-messages/src/main/java/io/bisq/network_messages/arbitration/Dispute.java index 393c3a5d37..b34a6dddf8 100644 --- a/network-messages/src/main/java/io/bisq/messages/arbitration/Dispute.java +++ b/network-messages/src/main/java/io/bisq/network_messages/arbitration/Dispute.java @@ -15,15 +15,15 @@ * along with bisq. If not, see . */ -package io.bisq.messages.arbitration; +package io.bisq.network_messages.arbitration; import com.google.protobuf.ByteString; import io.bisq.app.Version; -import io.bisq.messages.crypto.PubKeyRing; +import io.bisq.network_messages.crypto.PubKeyRing; import io.bisq.common.util.Utilities; -import io.bisq.messages.wire.Payload; +import io.bisq.network_messages.wire.Payload; import io.bisq.common.wire.proto.Messages; -import io.bisq.messages.trade.payload.Contract; +import io.bisq.network_messages.trade.payload.Contract; import io.bisq.storage.Storage; import javafx.beans.property.*; import javafx.collections.FXCollections; diff --git a/network-messages/src/main/java/io/bisq/messages/arbitration/DisputeCommunicationMessage.java b/network-messages/src/main/java/io/bisq/network_messages/arbitration/DisputeCommunicationMessage.java similarity index 97% rename from network-messages/src/main/java/io/bisq/messages/arbitration/DisputeCommunicationMessage.java rename to network-messages/src/main/java/io/bisq/network_messages/arbitration/DisputeCommunicationMessage.java index e1c2534fa6..5793dc708b 100644 --- a/network-messages/src/main/java/io/bisq/messages/arbitration/DisputeCommunicationMessage.java +++ b/network-messages/src/main/java/io/bisq/network_messages/arbitration/DisputeCommunicationMessage.java @@ -15,13 +15,13 @@ * along with bisq. If not, see . */ -package io.bisq.messages.arbitration; +package io.bisq.network_messages.arbitration; import io.bisq.app.Version; import io.bisq.common.wire.proto.Messages; -import io.bisq.messages.NodeAddress; -import io.bisq.messages.arbitration.payload.Attachment; -import io.bisq.messages.util.ProtoBufferUtils; +import io.bisq.network_messages.NodeAddress; +import io.bisq.network_messages.arbitration.payload.Attachment; +import io.bisq.network_messages.util.ProtoBufferUtils; import javafx.beans.property.BooleanProperty; import javafx.beans.property.SimpleBooleanProperty; import org.slf4j.Logger; diff --git a/network-messages/src/main/java/io/bisq/messages/arbitration/DisputeList.java b/network-messages/src/main/java/io/bisq/network_messages/arbitration/DisputeList.java similarity index 98% rename from network-messages/src/main/java/io/bisq/messages/arbitration/DisputeList.java rename to network-messages/src/main/java/io/bisq/network_messages/arbitration/DisputeList.java index 6f6abae90f..890f1d4e67 100644 --- a/network-messages/src/main/java/io/bisq/messages/arbitration/DisputeList.java +++ b/network-messages/src/main/java/io/bisq/network_messages/arbitration/DisputeList.java @@ -15,7 +15,7 @@ * along with bisq. If not, see . */ -package io.bisq.messages.arbitration; +package io.bisq.network_messages.arbitration; import io.bisq.app.Version; import io.bisq.common.persistance.Persistable; diff --git a/network-messages/src/main/java/io/bisq/messages/arbitration/DisputeMessage.java b/network-messages/src/main/java/io/bisq/network_messages/arbitration/DisputeMessage.java similarity index 92% rename from network-messages/src/main/java/io/bisq/messages/arbitration/DisputeMessage.java rename to network-messages/src/main/java/io/bisq/network_messages/arbitration/DisputeMessage.java index 6a1ab8c0eb..8322c92dfe 100644 --- a/network-messages/src/main/java/io/bisq/messages/arbitration/DisputeMessage.java +++ b/network-messages/src/main/java/io/bisq/network_messages/arbitration/DisputeMessage.java @@ -15,10 +15,10 @@ * along with bisq. If not, see . */ -package io.bisq.messages.arbitration; +package io.bisq.network_messages.arbitration; import io.bisq.app.Version; -import io.bisq.messages.p2p.messaging.MailboxMessage; +import io.bisq.network_messages.p2p.messaging.MailboxMessage; import java.util.UUID; diff --git a/network-messages/src/main/java/io/bisq/messages/arbitration/DisputeResult.java b/network-messages/src/main/java/io/bisq/network_messages/arbitration/DisputeResult.java similarity index 99% rename from network-messages/src/main/java/io/bisq/messages/arbitration/DisputeResult.java rename to network-messages/src/main/java/io/bisq/network_messages/arbitration/DisputeResult.java index 2a6950a28e..ef6e39de90 100644 --- a/network-messages/src/main/java/io/bisq/messages/arbitration/DisputeResult.java +++ b/network-messages/src/main/java/io/bisq/network_messages/arbitration/DisputeResult.java @@ -15,11 +15,11 @@ * along with bisq. If not, see . */ -package io.bisq.messages.arbitration; +package io.bisq.network_messages.arbitration; import com.google.protobuf.ByteString; import io.bisq.app.Version; -import io.bisq.messages.wire.Payload; +import io.bisq.network_messages.wire.Payload; import io.bisq.common.wire.proto.Messages; import javafx.beans.property.*; import lombok.EqualsAndHashCode; diff --git a/network-messages/src/main/java/io/bisq/messages/arbitration/DisputeResultMessage.java b/network-messages/src/main/java/io/bisq/network_messages/arbitration/DisputeResultMessage.java similarity index 94% rename from network-messages/src/main/java/io/bisq/messages/arbitration/DisputeResultMessage.java rename to network-messages/src/main/java/io/bisq/network_messages/arbitration/DisputeResultMessage.java index f452c43789..818cd20ecf 100644 --- a/network-messages/src/main/java/io/bisq/messages/arbitration/DisputeResultMessage.java +++ b/network-messages/src/main/java/io/bisq/network_messages/arbitration/DisputeResultMessage.java @@ -15,12 +15,12 @@ * along with bisq. If not, see . */ -package io.bisq.messages.arbitration; +package io.bisq.network_messages.arbitration; import io.bisq.app.Version; import io.bisq.common.wire.proto.Messages; -import io.bisq.messages.NodeAddress; -import io.bisq.messages.util.ProtoBufferUtils; +import io.bisq.network_messages.NodeAddress; +import io.bisq.network_messages.util.ProtoBufferUtils; public final class DisputeResultMessage extends DisputeMessage { // That object is sent over the wire, so we need to take care of version compatibility. diff --git a/network-messages/src/main/java/io/bisq/messages/arbitration/OpenNewDisputeMessage.java b/network-messages/src/main/java/io/bisq/network_messages/arbitration/OpenNewDisputeMessage.java similarity index 94% rename from network-messages/src/main/java/io/bisq/messages/arbitration/OpenNewDisputeMessage.java rename to network-messages/src/main/java/io/bisq/network_messages/arbitration/OpenNewDisputeMessage.java index cd02875afb..80203e11fd 100644 --- a/network-messages/src/main/java/io/bisq/messages/arbitration/OpenNewDisputeMessage.java +++ b/network-messages/src/main/java/io/bisq/network_messages/arbitration/OpenNewDisputeMessage.java @@ -15,12 +15,12 @@ * along with bisq. If not, see . */ -package io.bisq.messages.arbitration; +package io.bisq.network_messages.arbitration; import io.bisq.app.Version; import io.bisq.common.wire.proto.Messages; -import io.bisq.messages.NodeAddress; -import io.bisq.messages.util.ProtoBufferUtils; +import io.bisq.network_messages.NodeAddress; +import io.bisq.network_messages.util.ProtoBufferUtils; public final class OpenNewDisputeMessage extends DisputeMessage { // That object is sent over the wire, so we need to take care of version compatibility. diff --git a/network-messages/src/main/java/io/bisq/messages/arbitration/PeerOpenedDisputeMessage.java b/network-messages/src/main/java/io/bisq/network_messages/arbitration/PeerOpenedDisputeMessage.java similarity index 94% rename from network-messages/src/main/java/io/bisq/messages/arbitration/PeerOpenedDisputeMessage.java rename to network-messages/src/main/java/io/bisq/network_messages/arbitration/PeerOpenedDisputeMessage.java index 2916d68785..382d7e22cd 100644 --- a/network-messages/src/main/java/io/bisq/messages/arbitration/PeerOpenedDisputeMessage.java +++ b/network-messages/src/main/java/io/bisq/network_messages/arbitration/PeerOpenedDisputeMessage.java @@ -15,12 +15,12 @@ * along with bisq. If not, see . */ -package io.bisq.messages.arbitration; +package io.bisq.network_messages.arbitration; import io.bisq.app.Version; import io.bisq.common.wire.proto.Messages; -import io.bisq.messages.NodeAddress; -import io.bisq.messages.util.ProtoBufferUtils; +import io.bisq.network_messages.NodeAddress; +import io.bisq.network_messages.util.ProtoBufferUtils; public final class PeerOpenedDisputeMessage extends DisputeMessage { // That object is sent over the wire, so we need to take care of version compatibility. diff --git a/network-messages/src/main/java/io/bisq/messages/arbitration/PeerPublishedPayoutTxMessage.java b/network-messages/src/main/java/io/bisq/network_messages/arbitration/PeerPublishedPayoutTxMessage.java similarity index 95% rename from network-messages/src/main/java/io/bisq/messages/arbitration/PeerPublishedPayoutTxMessage.java rename to network-messages/src/main/java/io/bisq/network_messages/arbitration/PeerPublishedPayoutTxMessage.java index 831a0f10b0..da131e0643 100644 --- a/network-messages/src/main/java/io/bisq/messages/arbitration/PeerPublishedPayoutTxMessage.java +++ b/network-messages/src/main/java/io/bisq/network_messages/arbitration/PeerPublishedPayoutTxMessage.java @@ -15,13 +15,13 @@ * along with bisq. If not, see . */ -package io.bisq.messages.arbitration; +package io.bisq.network_messages.arbitration; import com.google.protobuf.ByteString; import io.bisq.app.Version; import io.bisq.common.wire.proto.Messages; -import io.bisq.messages.NodeAddress; -import io.bisq.messages.util.ProtoBufferUtils; +import io.bisq.network_messages.NodeAddress; +import io.bisq.network_messages.util.ProtoBufferUtils; import java.util.Arrays; diff --git a/network-messages/src/main/java/io/bisq/messages/arbitration/payload/Attachment.java b/network-messages/src/main/java/io/bisq/network_messages/arbitration/payload/Attachment.java similarity index 94% rename from network-messages/src/main/java/io/bisq/messages/arbitration/payload/Attachment.java rename to network-messages/src/main/java/io/bisq/network_messages/arbitration/payload/Attachment.java index 90cf3529c5..b949ec5783 100644 --- a/network-messages/src/main/java/io/bisq/messages/arbitration/payload/Attachment.java +++ b/network-messages/src/main/java/io/bisq/network_messages/arbitration/payload/Attachment.java @@ -1,8 +1,8 @@ -package io.bisq.messages.arbitration.payload; +package io.bisq.network_messages.arbitration.payload; import com.google.protobuf.ByteString; import io.bisq.app.Version; -import io.bisq.messages.wire.Payload; +import io.bisq.network_messages.wire.Payload; import io.bisq.common.wire.proto.Messages; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/network-messages/src/main/java/io/bisq/messages/availability/AvailabilityResult.java b/network-messages/src/main/java/io/bisq/network_messages/availability/AvailabilityResult.java similarity index 79% rename from network-messages/src/main/java/io/bisq/messages/availability/AvailabilityResult.java rename to network-messages/src/main/java/io/bisq/network_messages/availability/AvailabilityResult.java index aabde16a78..f5cebbedfa 100644 --- a/network-messages/src/main/java/io/bisq/messages/availability/AvailabilityResult.java +++ b/network-messages/src/main/java/io/bisq/network_messages/availability/AvailabilityResult.java @@ -1,4 +1,4 @@ -package io.bisq.messages.availability; +package io.bisq.network_messages.availability; public enum AvailabilityResult { UNKNOWN_FAILURE, diff --git a/network-messages/src/main/java/io/bisq/messages/availability/OfferAvailabilityRequest.java b/network-messages/src/main/java/io/bisq/network_messages/availability/OfferAvailabilityRequest.java similarity index 93% rename from network-messages/src/main/java/io/bisq/messages/availability/OfferAvailabilityRequest.java rename to network-messages/src/main/java/io/bisq/network_messages/availability/OfferAvailabilityRequest.java index 2e51016d12..b325839f95 100644 --- a/network-messages/src/main/java/io/bisq/messages/availability/OfferAvailabilityRequest.java +++ b/network-messages/src/main/java/io/bisq/network_messages/availability/OfferAvailabilityRequest.java @@ -15,13 +15,13 @@ * along with bisq. If not, see . */ -package io.bisq.messages.availability; +package io.bisq.network_messages.availability; import io.bisq.app.Capabilities; import io.bisq.app.Version; import io.bisq.common.wire.proto.Messages; -import io.bisq.messages.crypto.PubKeyRing; -import io.bisq.messages.p2p.messaging.SupportedCapabilitiesMessage; +import io.bisq.network_messages.crypto.PubKeyRing; +import io.bisq.network_messages.p2p.messaging.SupportedCapabilitiesMessage; import javax.annotation.Nullable; import java.util.ArrayList; diff --git a/network-messages/src/main/java/io/bisq/messages/availability/OfferAvailabilityResponse.java b/network-messages/src/main/java/io/bisq/network_messages/availability/OfferAvailabilityResponse.java similarity index 93% rename from network-messages/src/main/java/io/bisq/messages/availability/OfferAvailabilityResponse.java rename to network-messages/src/main/java/io/bisq/network_messages/availability/OfferAvailabilityResponse.java index 3b2f782a99..43466409fa 100644 --- a/network-messages/src/main/java/io/bisq/messages/availability/OfferAvailabilityResponse.java +++ b/network-messages/src/main/java/io/bisq/network_messages/availability/OfferAvailabilityResponse.java @@ -15,14 +15,14 @@ * along with bisq. If not, see . */ -package io.bisq.messages.availability; +package io.bisq.network_messages.availability; import io.bisq.app.Capabilities; import io.bisq.app.Version; import io.bisq.common.wire.proto.Messages; -import io.bisq.messages.p2p.messaging.SupportedCapabilitiesMessage; -import io.bisq.messages.util.ProtoBufferUtils; +import io.bisq.network_messages.p2p.messaging.SupportedCapabilitiesMessage; +import io.bisq.network_messages.util.ProtoBufferUtils; import javax.annotation.Nullable; import java.util.ArrayList; diff --git a/network-messages/src/main/java/io/bisq/messages/availability/OfferMessage.java b/network-messages/src/main/java/io/bisq/network_messages/availability/OfferMessage.java similarity index 93% rename from network-messages/src/main/java/io/bisq/messages/availability/OfferMessage.java rename to network-messages/src/main/java/io/bisq/network_messages/availability/OfferMessage.java index 702b2c1786..f9cacd5bda 100644 --- a/network-messages/src/main/java/io/bisq/messages/availability/OfferMessage.java +++ b/network-messages/src/main/java/io/bisq/network_messages/availability/OfferMessage.java @@ -15,10 +15,10 @@ * along with bisq. If not, see . */ -package io.bisq.messages.availability; +package io.bisq.network_messages.availability; import io.bisq.app.Version; -import io.bisq.messages.p2p.messaging.DirectMessage; +import io.bisq.network_messages.p2p.messaging.DirectMessage; import javax.annotation.concurrent.Immutable; diff --git a/network-messages/src/main/java/io/bisq/messages/btc/BitcoinNetwork.java b/network-messages/src/main/java/io/bisq/network_messages/btc/BitcoinNetwork.java similarity index 97% rename from network-messages/src/main/java/io/bisq/messages/btc/BitcoinNetwork.java rename to network-messages/src/main/java/io/bisq/network_messages/btc/BitcoinNetwork.java index af700217c8..644b3c9a83 100644 --- a/network-messages/src/main/java/io/bisq/messages/btc/BitcoinNetwork.java +++ b/network-messages/src/main/java/io/bisq/network_messages/btc/BitcoinNetwork.java @@ -15,7 +15,7 @@ * along with bisq. If not, see . */ -package io.bisq.messages.btc; +package io.bisq.network_messages.btc; import org.bitcoinj.core.NetworkParameters; import org.bitcoinj.params.MainNetParams; diff --git a/network-messages/src/main/java/io/bisq/messages/btc/BtcOptionKeys.java b/network-messages/src/main/java/io/bisq/network_messages/btc/BtcOptionKeys.java similarity index 89% rename from network-messages/src/main/java/io/bisq/messages/btc/BtcOptionKeys.java rename to network-messages/src/main/java/io/bisq/network_messages/btc/BtcOptionKeys.java index 1a539917e2..d7ee0c44be 100644 --- a/network-messages/src/main/java/io/bisq/messages/btc/BtcOptionKeys.java +++ b/network-messages/src/main/java/io/bisq/network_messages/btc/BtcOptionKeys.java @@ -1,4 +1,4 @@ -package io.bisq.messages.btc; +package io.bisq.network_messages.btc; public class BtcOptionKeys { public static final String BTC_NETWORK = "bitcoinNetwork"; diff --git a/network-messages/src/main/java/io/bisq/messages/btc/Restrictions.java b/network-messages/src/main/java/io/bisq/network_messages/btc/Restrictions.java similarity index 97% rename from network-messages/src/main/java/io/bisq/messages/btc/Restrictions.java rename to network-messages/src/main/java/io/bisq/network_messages/btc/Restrictions.java index 1096dbf1b0..186eedbeb3 100644 --- a/network-messages/src/main/java/io/bisq/messages/btc/Restrictions.java +++ b/network-messages/src/main/java/io/bisq/network_messages/btc/Restrictions.java @@ -15,7 +15,7 @@ * along with bisq. If not, see . */ -package io.bisq.messages.btc; +package io.bisq.network_messages.btc; import org.bitcoinj.core.Coin; import org.bitcoinj.core.Transaction; diff --git a/network-messages/src/main/java/io/bisq/messages/btc/UserAgent.java b/network-messages/src/main/java/io/bisq/network_messages/btc/UserAgent.java similarity index 97% rename from network-messages/src/main/java/io/bisq/messages/btc/UserAgent.java rename to network-messages/src/main/java/io/bisq/network_messages/btc/UserAgent.java index 3912c31f98..76af4a8ca7 100644 --- a/network-messages/src/main/java/io/bisq/messages/btc/UserAgent.java +++ b/network-messages/src/main/java/io/bisq/network_messages/btc/UserAgent.java @@ -15,7 +15,7 @@ * along with bisq. If not, see . */ -package io.bisq.messages.btc; +package io.bisq.network_messages.btc; import javax.inject.Inject; import javax.inject.Named; diff --git a/network-messages/src/main/java/io/bisq/messages/btc/data/RawTransactionInput.java b/network-messages/src/main/java/io/bisq/network_messages/btc/data/RawTransactionInput.java similarity index 96% rename from network-messages/src/main/java/io/bisq/messages/btc/data/RawTransactionInput.java rename to network-messages/src/main/java/io/bisq/network_messages/btc/data/RawTransactionInput.java index 67df82b108..d0f2d19f53 100644 --- a/network-messages/src/main/java/io/bisq/messages/btc/data/RawTransactionInput.java +++ b/network-messages/src/main/java/io/bisq/network_messages/btc/data/RawTransactionInput.java @@ -15,11 +15,11 @@ * along with bisq. If not, see . */ -package io.bisq.messages.btc.data; +package io.bisq.network_messages.btc.data; import com.google.protobuf.ByteString; import io.bisq.app.Version; -import io.bisq.messages.wire.Payload; +import io.bisq.network_messages.wire.Payload; import io.bisq.common.wire.proto.Messages; import java.util.Arrays; diff --git a/network-messages/src/main/java/io/bisq/messages/crypto/DecryptedDataTuple.java b/network-messages/src/main/java/io/bisq/network_messages/crypto/DecryptedDataTuple.java similarity index 95% rename from network-messages/src/main/java/io/bisq/messages/crypto/DecryptedDataTuple.java rename to network-messages/src/main/java/io/bisq/network_messages/crypto/DecryptedDataTuple.java index 20f276da81..4018cd0529 100644 --- a/network-messages/src/main/java/io/bisq/messages/crypto/DecryptedDataTuple.java +++ b/network-messages/src/main/java/io/bisq/network_messages/crypto/DecryptedDataTuple.java @@ -15,9 +15,9 @@ * along with bisq. If not, see . */ -package io.bisq.messages.crypto; +package io.bisq.network_messages.crypto; -import io.bisq.messages.Message; +import io.bisq.network_messages.Message; import java.security.PublicKey; diff --git a/network-messages/src/main/java/io/bisq/messages/crypto/Encryption.java b/network-messages/src/main/java/io/bisq/network_messages/crypto/Encryption.java similarity index 98% rename from network-messages/src/main/java/io/bisq/messages/crypto/Encryption.java rename to network-messages/src/main/java/io/bisq/network_messages/crypto/Encryption.java index 6d48897dc8..cc397a00ca 100644 --- a/network-messages/src/main/java/io/bisq/messages/crypto/Encryption.java +++ b/network-messages/src/main/java/io/bisq/network_messages/crypto/Encryption.java @@ -15,10 +15,10 @@ * along with bisq. If not, see . */ -package io.bisq.messages.crypto; +package io.bisq.network_messages.crypto; import io.bisq.common.crypto.Sig; -import io.bisq.messages.Message; +import io.bisq.network_messages.Message; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.spongycastle.util.encoders.Hex; @@ -188,7 +188,7 @@ public class Encryption { cipher.init(Cipher.UNWRAP_MODE, privateKey); return (SecretKey) cipher.unwrap(encryptedSecretKey, "AES", Cipher.SECRET_KEY); } catch (Throwable e) { - // errors when trying to decrypt foreign messages are normal + // errors when trying to decrypt foreign network_messages are normal throw new CryptoException(e); } } diff --git a/network-messages/src/main/java/io/bisq/messages/crypto/Hash.java b/network-messages/src/main/java/io/bisq/network_messages/crypto/Hash.java similarity index 96% rename from network-messages/src/main/java/io/bisq/messages/crypto/Hash.java rename to network-messages/src/main/java/io/bisq/network_messages/crypto/Hash.java index 93f5cd0e0c..d67d8970d6 100644 --- a/network-messages/src/main/java/io/bisq/messages/crypto/Hash.java +++ b/network-messages/src/main/java/io/bisq/network_messages/crypto/Hash.java @@ -15,10 +15,10 @@ * along with bisq. If not, see . */ -package io.bisq.messages.crypto; +package io.bisq.network_messages.crypto; import com.google.common.base.Charsets; -import io.bisq.messages.ToProtoBuffer; +import io.bisq.network_messages.ToProtoBuffer; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.spongycastle.util.encoders.Hex; diff --git a/network-messages/src/main/java/io/bisq/messages/crypto/KeyRing.java b/network-messages/src/main/java/io/bisq/network_messages/crypto/KeyRing.java similarity index 98% rename from network-messages/src/main/java/io/bisq/messages/crypto/KeyRing.java rename to network-messages/src/main/java/io/bisq/network_messages/crypto/KeyRing.java index 2e0801aa64..ae0544702a 100644 --- a/network-messages/src/main/java/io/bisq/messages/crypto/KeyRing.java +++ b/network-messages/src/main/java/io/bisq/network_messages/crypto/KeyRing.java @@ -15,7 +15,7 @@ * along with bisq. If not, see . */ -package io.bisq.messages.crypto; +package io.bisq.network_messages.crypto; import io.bisq.common.crypto.Sig; diff --git a/network-messages/src/main/java/io/bisq/messages/crypto/KeyStorage.java b/network-messages/src/main/java/io/bisq/network_messages/crypto/KeyStorage.java similarity index 99% rename from network-messages/src/main/java/io/bisq/messages/crypto/KeyStorage.java rename to network-messages/src/main/java/io/bisq/network_messages/crypto/KeyStorage.java index 7aed9a562d..a4df27a6ed 100644 --- a/network-messages/src/main/java/io/bisq/messages/crypto/KeyStorage.java +++ b/network-messages/src/main/java/io/bisq/network_messages/crypto/KeyStorage.java @@ -15,7 +15,7 @@ * along with bisq. If not, see . */ -package io.bisq.messages.crypto; +package io.bisq.network_messages.crypto; import com.google.inject.Inject; import io.bisq.common.crypto.Sig; diff --git a/network-messages/src/main/java/io/bisq/messages/crypto/PubKeyRing.java b/network-messages/src/main/java/io/bisq/network_messages/crypto/PubKeyRing.java similarity index 98% rename from network-messages/src/main/java/io/bisq/messages/crypto/PubKeyRing.java rename to network-messages/src/main/java/io/bisq/network_messages/crypto/PubKeyRing.java index 48e22333ea..09169bb1f6 100644 --- a/network-messages/src/main/java/io/bisq/messages/crypto/PubKeyRing.java +++ b/network-messages/src/main/java/io/bisq/network_messages/crypto/PubKeyRing.java @@ -15,13 +15,13 @@ * along with bisq. If not, see . */ -package io.bisq.messages.crypto; +package io.bisq.network_messages.crypto; import com.google.protobuf.ByteString; import io.bisq.app.Version; import io.bisq.common.crypto.Sig; import io.bisq.common.wire.proto.Messages; -import io.bisq.messages.wire.Payload; +import io.bisq.network_messages.wire.Payload; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/network-messages/src/main/java/io/bisq/messages/crypto/SealedAndSigned.java b/network-messages/src/main/java/io/bisq/network_messages/crypto/SealedAndSigned.java similarity index 98% rename from network-messages/src/main/java/io/bisq/messages/crypto/SealedAndSigned.java rename to network-messages/src/main/java/io/bisq/network_messages/crypto/SealedAndSigned.java index 818817f25b..b7a8cb5911 100644 --- a/network-messages/src/main/java/io/bisq/messages/crypto/SealedAndSigned.java +++ b/network-messages/src/main/java/io/bisq/network_messages/crypto/SealedAndSigned.java @@ -15,12 +15,12 @@ * along with bisq. If not, see . */ -package io.bisq.messages.crypto; +package io.bisq.network_messages.crypto; import com.google.protobuf.ByteString; import io.bisq.app.Version; import io.bisq.common.crypto.Sig; -import io.bisq.messages.wire.Payload; +import io.bisq.network_messages.wire.Payload; import io.bisq.common.wire.proto.Messages; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/network-messages/src/main/java/io/bisq/messages/dao/blockchain/RpcOptionKeys.java b/network-messages/src/main/java/io/bisq/network_messages/dao/blockchain/RpcOptionKeys.java similarity index 87% rename from network-messages/src/main/java/io/bisq/messages/dao/blockchain/RpcOptionKeys.java rename to network-messages/src/main/java/io/bisq/network_messages/dao/blockchain/RpcOptionKeys.java index 8fd90a26e2..0248bffc11 100644 --- a/network-messages/src/main/java/io/bisq/messages/dao/blockchain/RpcOptionKeys.java +++ b/network-messages/src/main/java/io/bisq/network_messages/dao/blockchain/RpcOptionKeys.java @@ -1,4 +1,4 @@ -package io.bisq.messages.dao.blockchain; +package io.bisq.network_messages.dao.blockchain; public class RpcOptionKeys { public static final String RPC_USER = "rpcUser"; diff --git a/network-messages/src/main/java/io/bisq/messages/dao/compensation/payload/CompensationRequestPayload.java b/network-messages/src/main/java/io/bisq/network_messages/dao/compensation/payload/CompensationRequestPayload.java similarity index 98% rename from network-messages/src/main/java/io/bisq/messages/dao/compensation/payload/CompensationRequestPayload.java rename to network-messages/src/main/java/io/bisq/network_messages/dao/compensation/payload/CompensationRequestPayload.java index 5b1b6ebe0e..c23b7f169f 100644 --- a/network-messages/src/main/java/io/bisq/messages/dao/compensation/payload/CompensationRequestPayload.java +++ b/network-messages/src/main/java/io/bisq/network_messages/dao/compensation/payload/CompensationRequestPayload.java @@ -15,15 +15,15 @@ * along with bisq. If not, see . */ -package io.bisq.messages.dao.compensation.payload; +package io.bisq.network_messages.dao.compensation.payload; import io.bisq.app.Version; import io.bisq.common.crypto.Sig; import io.bisq.common.util.JsonExclude; import io.bisq.common.wire.proto.Messages; -import io.bisq.messages.NodeAddress; -import io.bisq.payload.LazyProcessedStoragePayload; -import io.bisq.payload.PersistedStoragePayload; +import io.bisq.network_messages.NodeAddress; +import io.bisq.network_messages.payload.LazyProcessedStoragePayload; +import io.bisq.network_messages.payload.PersistedStoragePayload; import org.bitcoinj.core.Coin; import org.bitcoinj.core.Utils; import org.slf4j.Logger; diff --git a/network-messages/src/main/java/io/bisq/messages/filter/payload/Filter.java b/network-messages/src/main/java/io/bisq/network_messages/filter/payload/Filter.java similarity index 98% rename from network-messages/src/main/java/io/bisq/messages/filter/payload/Filter.java rename to network-messages/src/main/java/io/bisq/network_messages/filter/payload/Filter.java index 158b8c1d34..ea3f1ac6df 100644 --- a/network-messages/src/main/java/io/bisq/messages/filter/payload/Filter.java +++ b/network-messages/src/main/java/io/bisq/network_messages/filter/payload/Filter.java @@ -15,13 +15,13 @@ * along with bisq. If not, see . */ -package io.bisq.messages.filter.payload; +package io.bisq.network_messages.filter.payload; import com.google.protobuf.ByteString; import io.bisq.app.Version; import io.bisq.common.crypto.Sig; import io.bisq.common.wire.proto.Messages; -import io.bisq.payload.StoragePayload; +import io.bisq.network_messages.payload.StoragePayload; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/network-messages/src/main/java/io/bisq/messages/filter/payload/PaymentAccountFilter.java b/network-messages/src/main/java/io/bisq/network_messages/filter/payload/PaymentAccountFilter.java similarity index 96% rename from network-messages/src/main/java/io/bisq/messages/filter/payload/PaymentAccountFilter.java rename to network-messages/src/main/java/io/bisq/network_messages/filter/payload/PaymentAccountFilter.java index 300b16187e..b02a5878f1 100644 --- a/network-messages/src/main/java/io/bisq/messages/filter/payload/PaymentAccountFilter.java +++ b/network-messages/src/main/java/io/bisq/network_messages/filter/payload/PaymentAccountFilter.java @@ -1,4 +1,4 @@ -package io.bisq.messages.filter.payload; +package io.bisq.network_messages.filter.payload; import io.bisq.app.Version; import io.bisq.common.wire.proto.Messages; diff --git a/network-messages/src/main/java/io/bisq/messages/p2p/messaging/DecryptedMailboxListener.java b/network-messages/src/main/java/io/bisq/network_messages/p2p/messaging/DecryptedMailboxListener.java similarity index 51% rename from network-messages/src/main/java/io/bisq/messages/p2p/messaging/DecryptedMailboxListener.java rename to network-messages/src/main/java/io/bisq/network_messages/p2p/messaging/DecryptedMailboxListener.java index 0651c9522c..a936618f12 100644 --- a/network-messages/src/main/java/io/bisq/messages/p2p/messaging/DecryptedMailboxListener.java +++ b/network-messages/src/main/java/io/bisq/network_messages/p2p/messaging/DecryptedMailboxListener.java @@ -1,8 +1,8 @@ -package io.bisq.messages.p2p.messaging; +package io.bisq.network_messages.p2p.messaging; -import io.bisq.messages.DecryptedMsgWithPubKey; -import io.bisq.messages.NodeAddress; +import io.bisq.network_messages.DecryptedMsgWithPubKey; +import io.bisq.network_messages.NodeAddress; public interface DecryptedMailboxListener { diff --git a/network-messages/src/main/java/io/bisq/messages/p2p/messaging/DirectMessage.java b/network-messages/src/main/java/io/bisq/network_messages/p2p/messaging/DirectMessage.java similarity index 89% rename from network-messages/src/main/java/io/bisq/messages/p2p/messaging/DirectMessage.java rename to network-messages/src/main/java/io/bisq/network_messages/p2p/messaging/DirectMessage.java index 6df661f915..72612d8d29 100644 --- a/network-messages/src/main/java/io/bisq/messages/p2p/messaging/DirectMessage.java +++ b/network-messages/src/main/java/io/bisq/network_messages/p2p/messaging/DirectMessage.java @@ -15,9 +15,9 @@ * along with bisq. If not, see . */ -package io.bisq.messages.p2p.messaging; +package io.bisq.network_messages.p2p.messaging; -import io.bisq.messages.Message; +import io.bisq.network_messages.Message; public interface DirectMessage extends Message { } diff --git a/network-messages/src/main/java/io/bisq/messages/p2p/messaging/MailboxMessage.java b/network-messages/src/main/java/io/bisq/network_messages/p2p/messaging/MailboxMessage.java similarity index 89% rename from network-messages/src/main/java/io/bisq/messages/p2p/messaging/MailboxMessage.java rename to network-messages/src/main/java/io/bisq/network_messages/p2p/messaging/MailboxMessage.java index 7093acb571..eeaf4ada7b 100644 --- a/network-messages/src/main/java/io/bisq/messages/p2p/messaging/MailboxMessage.java +++ b/network-messages/src/main/java/io/bisq/network_messages/p2p/messaging/MailboxMessage.java @@ -15,10 +15,10 @@ * along with bisq. If not, see . */ -package io.bisq.messages.p2p.messaging; +package io.bisq.network_messages.p2p.messaging; -import io.bisq.messages.NodeAddress; +import io.bisq.network_messages.NodeAddress; public interface MailboxMessage extends DirectMessage { NodeAddress getSenderNodeAddress(); diff --git a/network-messages/src/main/java/io/bisq/messages/p2p/messaging/PrefixedSealedAndSignedMessage.java b/network-messages/src/main/java/io/bisq/network_messages/p2p/messaging/PrefixedSealedAndSignedMessage.java similarity index 92% rename from network-messages/src/main/java/io/bisq/messages/p2p/messaging/PrefixedSealedAndSignedMessage.java rename to network-messages/src/main/java/io/bisq/network_messages/p2p/messaging/PrefixedSealedAndSignedMessage.java index b5533d7709..602debe64c 100644 --- a/network-messages/src/main/java/io/bisq/messages/p2p/messaging/PrefixedSealedAndSignedMessage.java +++ b/network-messages/src/main/java/io/bisq/network_messages/p2p/messaging/PrefixedSealedAndSignedMessage.java @@ -1,11 +1,11 @@ -package io.bisq.messages.p2p.messaging; +package io.bisq.network_messages.p2p.messaging; import com.google.protobuf.ByteString; import io.bisq.app.Version; -import io.bisq.messages.crypto.SealedAndSigned; +import io.bisq.network_messages.crypto.SealedAndSigned; import io.bisq.common.wire.proto.Messages; -import io.bisq.messages.NodeAddress; -import io.bisq.messages.SendersNodeAddressMessage; +import io.bisq.network_messages.NodeAddress; +import io.bisq.network_messages.SendersNodeAddressMessage; import java.util.Arrays; import java.util.UUID; diff --git a/network-messages/src/main/java/io/bisq/messages/p2p/messaging/SendDirectMessageListener.java b/network-messages/src/main/java/io/bisq/network_messages/p2p/messaging/SendDirectMessageListener.java similarity index 65% rename from network-messages/src/main/java/io/bisq/messages/p2p/messaging/SendDirectMessageListener.java rename to network-messages/src/main/java/io/bisq/network_messages/p2p/messaging/SendDirectMessageListener.java index afc89cf44b..9103be42f8 100644 --- a/network-messages/src/main/java/io/bisq/messages/p2p/messaging/SendDirectMessageListener.java +++ b/network-messages/src/main/java/io/bisq/network_messages/p2p/messaging/SendDirectMessageListener.java @@ -1,4 +1,4 @@ -package io.bisq.messages.p2p.messaging; +package io.bisq.network_messages.p2p.messaging; public interface SendDirectMessageListener { void onArrived(); diff --git a/network-messages/src/main/java/io/bisq/messages/p2p/messaging/SendMailboxMessageListener.java b/network-messages/src/main/java/io/bisq/network_messages/p2p/messaging/SendMailboxMessageListener.java similarity index 74% rename from network-messages/src/main/java/io/bisq/messages/p2p/messaging/SendMailboxMessageListener.java rename to network-messages/src/main/java/io/bisq/network_messages/p2p/messaging/SendMailboxMessageListener.java index 914deaac73..3223648282 100644 --- a/network-messages/src/main/java/io/bisq/messages/p2p/messaging/SendMailboxMessageListener.java +++ b/network-messages/src/main/java/io/bisq/network_messages/p2p/messaging/SendMailboxMessageListener.java @@ -1,4 +1,4 @@ -package io.bisq.messages.p2p.messaging; +package io.bisq.network_messages.p2p.messaging; public interface SendMailboxMessageListener { void onArrived(); diff --git a/network-messages/src/main/java/io/bisq/messages/p2p/messaging/SupportedCapabilitiesMessage.java b/network-messages/src/main/java/io/bisq/network_messages/p2p/messaging/SupportedCapabilitiesMessage.java similarity index 68% rename from network-messages/src/main/java/io/bisq/messages/p2p/messaging/SupportedCapabilitiesMessage.java rename to network-messages/src/main/java/io/bisq/network_messages/p2p/messaging/SupportedCapabilitiesMessage.java index e4c8bf53c2..23d804e97a 100644 --- a/network-messages/src/main/java/io/bisq/messages/p2p/messaging/SupportedCapabilitiesMessage.java +++ b/network-messages/src/main/java/io/bisq/network_messages/p2p/messaging/SupportedCapabilitiesMessage.java @@ -1,6 +1,6 @@ -package io.bisq.messages.p2p.messaging; +package io.bisq.network_messages.p2p.messaging; -import io.bisq.messages.Message; +import io.bisq.network_messages.Message; import javax.annotation.Nullable; import java.util.ArrayList; diff --git a/network-messages/src/main/java/io/bisq/messages/p2p/peers/getdata/messages/GetDataRequest.java b/network-messages/src/main/java/io/bisq/network_messages/p2p/peers/getdata/messages/GetDataRequest.java similarity index 56% rename from network-messages/src/main/java/io/bisq/messages/p2p/peers/getdata/messages/GetDataRequest.java rename to network-messages/src/main/java/io/bisq/network_messages/p2p/peers/getdata/messages/GetDataRequest.java index 0eb1960178..a272112eb2 100644 --- a/network-messages/src/main/java/io/bisq/messages/p2p/peers/getdata/messages/GetDataRequest.java +++ b/network-messages/src/main/java/io/bisq/network_messages/p2p/peers/getdata/messages/GetDataRequest.java @@ -1,6 +1,6 @@ -package io.bisq.messages.p2p.peers.getdata.messages; +package io.bisq.network_messages.p2p.peers.getdata.messages; -import io.bisq.messages.Message; +import io.bisq.network_messages.Message; import java.util.Set; diff --git a/network-messages/src/main/java/io/bisq/messages/p2p/peers/getdata/messages/GetDataResponse.java b/network-messages/src/main/java/io/bisq/network_messages/p2p/peers/getdata/messages/GetDataResponse.java similarity index 90% rename from network-messages/src/main/java/io/bisq/messages/p2p/peers/getdata/messages/GetDataResponse.java rename to network-messages/src/main/java/io/bisq/network_messages/p2p/peers/getdata/messages/GetDataResponse.java index 1696b9d139..7dc6bca4da 100644 --- a/network-messages/src/main/java/io/bisq/messages/p2p/peers/getdata/messages/GetDataResponse.java +++ b/network-messages/src/main/java/io/bisq/network_messages/p2p/peers/getdata/messages/GetDataResponse.java @@ -1,11 +1,11 @@ -package io.bisq.messages.p2p.peers.getdata.messages; +package io.bisq.network_messages.p2p.peers.getdata.messages; import io.bisq.app.Capabilities; import io.bisq.app.Version; import io.bisq.common.wire.proto.Messages; -import io.bisq.messages.p2p.messaging.SupportedCapabilitiesMessage; -import io.bisq.messages.p2p.storage.storageentry.ProtectedMailboxStorageEntry; -import io.bisq.messages.p2p.storage.storageentry.ProtectedStorageEntry; +import io.bisq.network_messages.p2p.messaging.SupportedCapabilitiesMessage; +import io.bisq.network_messages.p2p.storage.storageentry.ProtectedMailboxStorageEntry; +import io.bisq.network_messages.p2p.storage.storageentry.ProtectedStorageEntry; import javax.annotation.Nullable; import java.util.ArrayList; diff --git a/network-messages/src/main/java/io/bisq/messages/p2p/peers/getdata/messages/GetUpdatedDataRequest.java b/network-messages/src/main/java/io/bisq/network_messages/p2p/peers/getdata/messages/GetUpdatedDataRequest.java similarity index 93% rename from network-messages/src/main/java/io/bisq/messages/p2p/peers/getdata/messages/GetUpdatedDataRequest.java rename to network-messages/src/main/java/io/bisq/network_messages/p2p/peers/getdata/messages/GetUpdatedDataRequest.java index 9dab975951..30c249516c 100644 --- a/network-messages/src/main/java/io/bisq/messages/p2p/peers/getdata/messages/GetUpdatedDataRequest.java +++ b/network-messages/src/main/java/io/bisq/network_messages/p2p/peers/getdata/messages/GetUpdatedDataRequest.java @@ -1,10 +1,10 @@ -package io.bisq.messages.p2p.peers.getdata.messages; +package io.bisq.network_messages.p2p.peers.getdata.messages; import com.google.protobuf.ByteString; import io.bisq.app.Version; import io.bisq.common.wire.proto.Messages; -import io.bisq.messages.NodeAddress; -import io.bisq.messages.SendersNodeAddressMessage; +import io.bisq.network_messages.NodeAddress; +import io.bisq.network_messages.SendersNodeAddressMessage; import java.util.Set; import java.util.stream.Collectors; diff --git a/network-messages/src/main/java/io/bisq/messages/p2p/peers/getdata/messages/PreliminaryGetDataRequest.java b/network-messages/src/main/java/io/bisq/network_messages/p2p/peers/getdata/messages/PreliminaryGetDataRequest.java similarity index 90% rename from network-messages/src/main/java/io/bisq/messages/p2p/peers/getdata/messages/PreliminaryGetDataRequest.java rename to network-messages/src/main/java/io/bisq/network_messages/p2p/peers/getdata/messages/PreliminaryGetDataRequest.java index 4d6f4965ce..6791fdded7 100644 --- a/network-messages/src/main/java/io/bisq/messages/p2p/peers/getdata/messages/PreliminaryGetDataRequest.java +++ b/network-messages/src/main/java/io/bisq/network_messages/p2p/peers/getdata/messages/PreliminaryGetDataRequest.java @@ -1,12 +1,12 @@ -package io.bisq.messages.p2p.peers.getdata.messages; +package io.bisq.network_messages.p2p.peers.getdata.messages; import com.google.protobuf.ByteString; import io.bisq.app.Capabilities; import io.bisq.app.Version; import io.bisq.common.wire.proto.Messages; -import io.bisq.messages.AnonymousMessage; -import io.bisq.messages.ToProtoBuffer; -import io.bisq.messages.p2p.messaging.SupportedCapabilitiesMessage; +import io.bisq.network_messages.AnonymousMessage; +import io.bisq.network_messages.ToProtoBuffer; +import io.bisq.network_messages.p2p.messaging.SupportedCapabilitiesMessage; import javax.annotation.Nullable; import java.util.ArrayList; diff --git a/network-messages/src/main/java/io/bisq/messages/p2p/peers/keepalive/messages/KeepAliveMessage.java b/network-messages/src/main/java/io/bisq/network_messages/p2p/peers/keepalive/messages/KeepAliveMessage.java similarity index 81% rename from network-messages/src/main/java/io/bisq/messages/p2p/peers/keepalive/messages/KeepAliveMessage.java rename to network-messages/src/main/java/io/bisq/network_messages/p2p/peers/keepalive/messages/KeepAliveMessage.java index 28cf71cad8..12f1bcc8f2 100644 --- a/network-messages/src/main/java/io/bisq/messages/p2p/peers/keepalive/messages/KeepAliveMessage.java +++ b/network-messages/src/main/java/io/bisq/network_messages/p2p/peers/keepalive/messages/KeepAliveMessage.java @@ -1,7 +1,7 @@ -package io.bisq.messages.p2p.peers.keepalive.messages; +package io.bisq.network_messages.p2p.peers.keepalive.messages; import io.bisq.app.Version; -import io.bisq.messages.Message; +import io.bisq.network_messages.Message; public abstract class KeepAliveMessage implements Message { //TODO add serialVersionUID also in superclasses as changes would break compatibility diff --git a/network-messages/src/main/java/io/bisq/messages/p2p/peers/keepalive/messages/Ping.java b/network-messages/src/main/java/io/bisq/network_messages/p2p/peers/keepalive/messages/Ping.java similarity index 89% rename from network-messages/src/main/java/io/bisq/messages/p2p/peers/keepalive/messages/Ping.java rename to network-messages/src/main/java/io/bisq/network_messages/p2p/peers/keepalive/messages/Ping.java index fcbce94559..c7d203cadb 100644 --- a/network-messages/src/main/java/io/bisq/messages/p2p/peers/keepalive/messages/Ping.java +++ b/network-messages/src/main/java/io/bisq/network_messages/p2p/peers/keepalive/messages/Ping.java @@ -1,8 +1,8 @@ -package io.bisq.messages.p2p.peers.keepalive.messages; +package io.bisq.network_messages.p2p.peers.keepalive.messages; import io.bisq.app.Version; import io.bisq.common.wire.proto.Messages; -import io.bisq.messages.util.ProtoBufferUtils; +import io.bisq.network_messages.util.ProtoBufferUtils; public final class Ping extends KeepAliveMessage { // That object is sent over the wire, so we need to take care of version compatibility. diff --git a/network-messages/src/main/java/io/bisq/messages/p2p/peers/keepalive/messages/Pong.java b/network-messages/src/main/java/io/bisq/network_messages/p2p/peers/keepalive/messages/Pong.java similarity index 87% rename from network-messages/src/main/java/io/bisq/messages/p2p/peers/keepalive/messages/Pong.java rename to network-messages/src/main/java/io/bisq/network_messages/p2p/peers/keepalive/messages/Pong.java index f22e74ca70..3712c84b06 100644 --- a/network-messages/src/main/java/io/bisq/messages/p2p/peers/keepalive/messages/Pong.java +++ b/network-messages/src/main/java/io/bisq/network_messages/p2p/peers/keepalive/messages/Pong.java @@ -1,8 +1,8 @@ -package io.bisq.messages.p2p.peers.keepalive.messages; +package io.bisq.network_messages.p2p.peers.keepalive.messages; import io.bisq.app.Version; import io.bisq.common.wire.proto.Messages; -import io.bisq.messages.util.ProtoBufferUtils; +import io.bisq.network_messages.util.ProtoBufferUtils; public final class Pong extends KeepAliveMessage { // That object is sent over the wire, so we need to take care of version compatibility. diff --git a/network-messages/src/main/java/io/bisq/messages/p2p/peers/peerexchange/Peer.java b/network-messages/src/main/java/io/bisq/network_messages/p2p/peers/peerexchange/Peer.java similarity index 92% rename from network-messages/src/main/java/io/bisq/messages/p2p/peers/peerexchange/Peer.java rename to network-messages/src/main/java/io/bisq/network_messages/p2p/peers/peerexchange/Peer.java index 5a0972d464..0e431eee3a 100644 --- a/network-messages/src/main/java/io/bisq/messages/p2p/peers/peerexchange/Peer.java +++ b/network-messages/src/main/java/io/bisq/network_messages/p2p/peers/peerexchange/Peer.java @@ -1,10 +1,10 @@ -package io.bisq.messages.p2p.peers.peerexchange; +package io.bisq.network_messages.p2p.peers.peerexchange; import io.bisq.app.Version; import io.bisq.common.persistance.Persistable; import io.bisq.common.wire.proto.Messages; -import io.bisq.messages.NodeAddress; -import io.bisq.messages.wire.Payload; +import io.bisq.network_messages.NodeAddress; +import io.bisq.network_messages.wire.Payload; import java.util.Date; diff --git a/network-messages/src/main/java/io/bisq/messages/p2p/peers/peerexchange/messages/GetPeersRequest.java b/network-messages/src/main/java/io/bisq/network_messages/p2p/peers/peerexchange/messages/GetPeersRequest.java similarity index 89% rename from network-messages/src/main/java/io/bisq/messages/p2p/peers/peerexchange/messages/GetPeersRequest.java rename to network-messages/src/main/java/io/bisq/network_messages/p2p/peers/peerexchange/messages/GetPeersRequest.java index 1a5b691b92..91ed7927fe 100644 --- a/network-messages/src/main/java/io/bisq/messages/p2p/peers/peerexchange/messages/GetPeersRequest.java +++ b/network-messages/src/main/java/io/bisq/network_messages/p2p/peers/peerexchange/messages/GetPeersRequest.java @@ -1,13 +1,13 @@ -package io.bisq.messages.p2p.peers.peerexchange.messages; +package io.bisq.network_messages.p2p.peers.peerexchange.messages; import io.bisq.app.Capabilities; import io.bisq.app.Version; import io.bisq.common.wire.proto.Messages; -import io.bisq.messages.NodeAddress; -import io.bisq.messages.SendersNodeAddressMessage; -import io.bisq.messages.ToProtoBuffer; -import io.bisq.messages.p2p.messaging.SupportedCapabilitiesMessage; -import io.bisq.messages.p2p.peers.peerexchange.Peer; +import io.bisq.network_messages.NodeAddress; +import io.bisq.network_messages.SendersNodeAddressMessage; +import io.bisq.network_messages.ToProtoBuffer; +import io.bisq.network_messages.p2p.messaging.SupportedCapabilitiesMessage; +import io.bisq.network_messages.p2p.peers.peerexchange.Peer; import javax.annotation.Nullable; import java.util.ArrayList; diff --git a/network-messages/src/main/java/io/bisq/messages/p2p/peers/peerexchange/messages/GetPeersResponse.java b/network-messages/src/main/java/io/bisq/network_messages/p2p/peers/peerexchange/messages/GetPeersResponse.java similarity index 91% rename from network-messages/src/main/java/io/bisq/messages/p2p/peers/peerexchange/messages/GetPeersResponse.java rename to network-messages/src/main/java/io/bisq/network_messages/p2p/peers/peerexchange/messages/GetPeersResponse.java index 275e0ab94a..36cdd64040 100644 --- a/network-messages/src/main/java/io/bisq/messages/p2p/peers/peerexchange/messages/GetPeersResponse.java +++ b/network-messages/src/main/java/io/bisq/network_messages/p2p/peers/peerexchange/messages/GetPeersResponse.java @@ -1,10 +1,10 @@ -package io.bisq.messages.p2p.peers.peerexchange.messages; +package io.bisq.network_messages.p2p.peers.peerexchange.messages; import io.bisq.app.Capabilities; import io.bisq.app.Version; import io.bisq.common.wire.proto.Messages; -import io.bisq.messages.p2p.messaging.SupportedCapabilitiesMessage; -import io.bisq.messages.p2p.peers.peerexchange.Peer; +import io.bisq.network_messages.p2p.messaging.SupportedCapabilitiesMessage; +import io.bisq.network_messages.p2p.peers.peerexchange.Peer; import javax.annotation.Nullable; import java.util.ArrayList; diff --git a/network-messages/src/main/java/io/bisq/messages/p2p/peers/peerexchange/messages/PeerExchangeMessage.java b/network-messages/src/main/java/io/bisq/network_messages/p2p/peers/peerexchange/messages/PeerExchangeMessage.java similarity index 82% rename from network-messages/src/main/java/io/bisq/messages/p2p/peers/peerexchange/messages/PeerExchangeMessage.java rename to network-messages/src/main/java/io/bisq/network_messages/p2p/peers/peerexchange/messages/PeerExchangeMessage.java index e4efa08adb..922cfb700b 100644 --- a/network-messages/src/main/java/io/bisq/messages/p2p/peers/peerexchange/messages/PeerExchangeMessage.java +++ b/network-messages/src/main/java/io/bisq/network_messages/p2p/peers/peerexchange/messages/PeerExchangeMessage.java @@ -1,7 +1,7 @@ -package io.bisq.messages.p2p.peers.peerexchange.messages; +package io.bisq.network_messages.p2p.peers.peerexchange.messages; import io.bisq.app.Version; -import io.bisq.messages.Message; +import io.bisq.network_messages.Message; abstract class PeerExchangeMessage implements Message { //TODO add serialVersionUID also in superclasses as changes would break compatibility diff --git a/network-messages/src/main/java/io/bisq/messages/p2p/storage/messages/AddDataMessage.java b/network-messages/src/main/java/io/bisq/network_messages/p2p/storage/messages/AddDataMessage.java similarity index 88% rename from network-messages/src/main/java/io/bisq/messages/p2p/storage/messages/AddDataMessage.java rename to network-messages/src/main/java/io/bisq/network_messages/p2p/storage/messages/AddDataMessage.java index 890e879a6a..4a09f1062d 100644 --- a/network-messages/src/main/java/io/bisq/messages/p2p/storage/messages/AddDataMessage.java +++ b/network-messages/src/main/java/io/bisq/network_messages/p2p/storage/messages/AddDataMessage.java @@ -1,10 +1,10 @@ -package io.bisq.messages.p2p.storage.messages; +package io.bisq.network_messages.p2p.storage.messages; import io.bisq.app.Version; import io.bisq.common.wire.proto.Messages; -import io.bisq.messages.util.ProtoBufferUtils; -import io.bisq.messages.p2p.storage.storageentry.ProtectedMailboxStorageEntry; -import io.bisq.messages.p2p.storage.storageentry.ProtectedStorageEntry; +import io.bisq.network_messages.util.ProtoBufferUtils; +import io.bisq.network_messages.p2p.storage.storageentry.ProtectedMailboxStorageEntry; +import io.bisq.network_messages.p2p.storage.storageentry.ProtectedStorageEntry; public final class AddDataMessage extends BroadcastMessage { // That object is sent over the wire, so we need to take care of version compatibility. diff --git a/network-messages/src/main/java/io/bisq/messages/p2p/storage/messages/BroadcastMessage.java b/network-messages/src/main/java/io/bisq/network_messages/p2p/storage/messages/BroadcastMessage.java similarity index 84% rename from network-messages/src/main/java/io/bisq/messages/p2p/storage/messages/BroadcastMessage.java rename to network-messages/src/main/java/io/bisq/network_messages/p2p/storage/messages/BroadcastMessage.java index 0dce651d39..05d96b86cd 100644 --- a/network-messages/src/main/java/io/bisq/messages/p2p/storage/messages/BroadcastMessage.java +++ b/network-messages/src/main/java/io/bisq/network_messages/p2p/storage/messages/BroadcastMessage.java @@ -1,7 +1,7 @@ -package io.bisq.messages.p2p.storage.messages; +package io.bisq.network_messages.p2p.storage.messages; import io.bisq.app.Version; -import io.bisq.messages.Message; +import io.bisq.network_messages.Message; public abstract class BroadcastMessage implements Message { //TODO add serialVersionUID also in superclasses as changes would break compatibility diff --git a/network-messages/src/main/java/io/bisq/messages/p2p/storage/messages/RefreshTTLMessage.java b/network-messages/src/main/java/io/bisq/network_messages/p2p/storage/messages/RefreshTTLMessage.java similarity index 95% rename from network-messages/src/main/java/io/bisq/messages/p2p/storage/messages/RefreshTTLMessage.java rename to network-messages/src/main/java/io/bisq/network_messages/p2p/storage/messages/RefreshTTLMessage.java index e5ffae4c43..544a57a8cc 100644 --- a/network-messages/src/main/java/io/bisq/messages/p2p/storage/messages/RefreshTTLMessage.java +++ b/network-messages/src/main/java/io/bisq/network_messages/p2p/storage/messages/RefreshTTLMessage.java @@ -1,9 +1,9 @@ -package io.bisq.messages.p2p.storage.messages; +package io.bisq.network_messages.p2p.storage.messages; import com.google.protobuf.ByteString; import io.bisq.app.Version; import io.bisq.common.wire.proto.Messages; -import io.bisq.messages.ToProtoBuffer; +import io.bisq.network_messages.ToProtoBuffer; import java.util.Arrays; diff --git a/network-messages/src/main/java/io/bisq/messages/p2p/storage/messages/RemoveDataMessage.java b/network-messages/src/main/java/io/bisq/network_messages/p2p/storage/messages/RemoveDataMessage.java similarity index 89% rename from network-messages/src/main/java/io/bisq/messages/p2p/storage/messages/RemoveDataMessage.java rename to network-messages/src/main/java/io/bisq/network_messages/p2p/storage/messages/RemoveDataMessage.java index 5ca89eaadd..7685793102 100644 --- a/network-messages/src/main/java/io/bisq/messages/p2p/storage/messages/RemoveDataMessage.java +++ b/network-messages/src/main/java/io/bisq/network_messages/p2p/storage/messages/RemoveDataMessage.java @@ -1,9 +1,9 @@ -package io.bisq.messages.p2p.storage.messages; +package io.bisq.network_messages.p2p.storage.messages; import io.bisq.app.Version; import io.bisq.common.wire.proto.Messages; -import io.bisq.messages.util.ProtoBufferUtils; -import io.bisq.messages.p2p.storage.storageentry.ProtectedStorageEntry; +import io.bisq.network_messages.util.ProtoBufferUtils; +import io.bisq.network_messages.p2p.storage.storageentry.ProtectedStorageEntry; public final class RemoveDataMessage extends BroadcastMessage { // That object is sent over the wire, so we need to take care of version compatibility. diff --git a/network-messages/src/main/java/io/bisq/messages/p2p/storage/messages/RemoveMailboxDataMessage.java b/network-messages/src/main/java/io/bisq/network_messages/p2p/storage/messages/RemoveMailboxDataMessage.java similarity index 89% rename from network-messages/src/main/java/io/bisq/messages/p2p/storage/messages/RemoveMailboxDataMessage.java rename to network-messages/src/main/java/io/bisq/network_messages/p2p/storage/messages/RemoveMailboxDataMessage.java index 84585e9080..2842ed65ee 100644 --- a/network-messages/src/main/java/io/bisq/messages/p2p/storage/messages/RemoveMailboxDataMessage.java +++ b/network-messages/src/main/java/io/bisq/network_messages/p2p/storage/messages/RemoveMailboxDataMessage.java @@ -1,9 +1,9 @@ -package io.bisq.messages.p2p.storage.messages; +package io.bisq.network_messages.p2p.storage.messages; import io.bisq.app.Version; import io.bisq.common.wire.proto.Messages; -import io.bisq.messages.util.ProtoBufferUtils; -import io.bisq.messages.p2p.storage.storageentry.ProtectedMailboxStorageEntry; +import io.bisq.network_messages.util.ProtoBufferUtils; +import io.bisq.network_messages.p2p.storage.storageentry.ProtectedMailboxStorageEntry; public final class RemoveMailboxDataMessage extends BroadcastMessage { // That object is sent over the wire, so we need to take care of version compatibility. diff --git a/network-messages/src/main/java/io/bisq/messages/p2p/storage/storageentry/ProtectedMailboxStorageEntry.java b/network-messages/src/main/java/io/bisq/network_messages/p2p/storage/storageentry/ProtectedMailboxStorageEntry.java similarity index 96% rename from network-messages/src/main/java/io/bisq/messages/p2p/storage/storageentry/ProtectedMailboxStorageEntry.java rename to network-messages/src/main/java/io/bisq/network_messages/p2p/storage/storageentry/ProtectedMailboxStorageEntry.java index 3e0eeb7cbc..599be30458 100644 --- a/network-messages/src/main/java/io/bisq/messages/p2p/storage/storageentry/ProtectedMailboxStorageEntry.java +++ b/network-messages/src/main/java/io/bisq/network_messages/p2p/storage/storageentry/ProtectedMailboxStorageEntry.java @@ -1,10 +1,10 @@ -package io.bisq.messages.p2p.storage.storageentry; +package io.bisq.network_messages.p2p.storage.storageentry; import com.google.protobuf.ByteString; import io.bisq.app.Version; import io.bisq.common.crypto.Sig; import io.bisq.common.wire.proto.Messages; -import io.bisq.payload.MailboxStoragePayload; +import io.bisq.network_messages.payload.MailboxStoragePayload; import lombok.extern.slf4j.Slf4j; import java.io.IOException; diff --git a/network-messages/src/main/java/io/bisq/messages/p2p/storage/storageentry/ProtectedStorageEntry.java b/network-messages/src/main/java/io/bisq/network_messages/p2p/storage/storageentry/ProtectedStorageEntry.java similarity index 96% rename from network-messages/src/main/java/io/bisq/messages/p2p/storage/storageentry/ProtectedStorageEntry.java rename to network-messages/src/main/java/io/bisq/network_messages/p2p/storage/storageentry/ProtectedStorageEntry.java index e253e9a3e6..343f0665ed 100644 --- a/network-messages/src/main/java/io/bisq/messages/p2p/storage/storageentry/ProtectedStorageEntry.java +++ b/network-messages/src/main/java/io/bisq/network_messages/p2p/storage/storageentry/ProtectedStorageEntry.java @@ -1,4 +1,4 @@ -package io.bisq.messages.p2p.storage.storageentry; +package io.bisq.network_messages.p2p.storage.storageentry; import com.google.common.annotations.VisibleForTesting; import com.google.protobuf.ByteString; @@ -6,8 +6,8 @@ import com.google.protobuf.Message; import io.bisq.app.Version; import io.bisq.common.crypto.Sig; import io.bisq.common.wire.proto.Messages; -import io.bisq.messages.wire.Payload; -import io.bisq.payload.StoragePayload; +import io.bisq.network_messages.wire.Payload; +import io.bisq.network_messages.payload.StoragePayload; import lombok.EqualsAndHashCode; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/network-messages/src/main/java/io/bisq/payload/CapabilityRequiringPayload.java b/network-messages/src/main/java/io/bisq/network_messages/payload/CapabilityRequiringPayload.java similarity index 85% rename from network-messages/src/main/java/io/bisq/payload/CapabilityRequiringPayload.java rename to network-messages/src/main/java/io/bisq/network_messages/payload/CapabilityRequiringPayload.java index 368ccad4a3..a07cd43445 100644 --- a/network-messages/src/main/java/io/bisq/payload/CapabilityRequiringPayload.java +++ b/network-messages/src/main/java/io/bisq/network_messages/payload/CapabilityRequiringPayload.java @@ -1,7 +1,7 @@ -package io.bisq.payload; +package io.bisq.network_messages.payload; -import io.bisq.messages.wire.Payload; +import io.bisq.network_messages.wire.Payload; import java.util.List; diff --git a/network-messages/src/main/java/io/bisq/payload/ExpirablePayload.java b/network-messages/src/main/java/io/bisq/network_messages/payload/ExpirablePayload.java similarity index 75% rename from network-messages/src/main/java/io/bisq/payload/ExpirablePayload.java rename to network-messages/src/main/java/io/bisq/network_messages/payload/ExpirablePayload.java index c9b2480d0d..9c38d70124 100644 --- a/network-messages/src/main/java/io/bisq/payload/ExpirablePayload.java +++ b/network-messages/src/main/java/io/bisq/network_messages/payload/ExpirablePayload.java @@ -1,7 +1,7 @@ -package io.bisq.payload; +package io.bisq.network_messages.payload; -import io.bisq.messages.wire.Payload; +import io.bisq.network_messages.wire.Payload; /** * Messages which support a time to live diff --git a/network-messages/src/main/java/io/bisq/payload/LazyProcessedStoragePayload.java b/network-messages/src/main/java/io/bisq/network_messages/payload/LazyProcessedStoragePayload.java similarity index 83% rename from network-messages/src/main/java/io/bisq/payload/LazyProcessedStoragePayload.java rename to network-messages/src/main/java/io/bisq/network_messages/payload/LazyProcessedStoragePayload.java index 8681aa6d0b..fab81c2288 100644 --- a/network-messages/src/main/java/io/bisq/payload/LazyProcessedStoragePayload.java +++ b/network-messages/src/main/java/io/bisq/network_messages/payload/LazyProcessedStoragePayload.java @@ -1,4 +1,4 @@ -package io.bisq.payload; +package io.bisq.network_messages.payload; /** * Marker interface for payload which gets delayed processed at startup so we don't hit performance too much. diff --git a/network-messages/src/main/java/io/bisq/payload/MailboxStoragePayload.java b/network-messages/src/main/java/io/bisq/network_messages/payload/MailboxStoragePayload.java similarity index 96% rename from network-messages/src/main/java/io/bisq/payload/MailboxStoragePayload.java rename to network-messages/src/main/java/io/bisq/network_messages/payload/MailboxStoragePayload.java index 3cbe827f49..b4458f81f5 100644 --- a/network-messages/src/main/java/io/bisq/payload/MailboxStoragePayload.java +++ b/network-messages/src/main/java/io/bisq/network_messages/payload/MailboxStoragePayload.java @@ -1,10 +1,10 @@ -package io.bisq.payload; +package io.bisq.network_messages.payload; import com.google.protobuf.ByteString; import io.bisq.app.Version; import io.bisq.common.crypto.Sig; import io.bisq.common.wire.proto.Messages; -import io.bisq.messages.p2p.messaging.PrefixedSealedAndSignedMessage; +import io.bisq.network_messages.p2p.messaging.PrefixedSealedAndSignedMessage; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -23,7 +23,7 @@ import java.util.concurrent.TimeUnit; * but only the receiver is permitted to remove the data. * That is the typical requirement for a mailbox like system. *

    - * Typical payloads are trade or dispute messages to be stored when the peer is offline. + * Typical payloads are trade or dispute network_messages to be stored when the peer is offline. */ public final class MailboxStoragePayload implements StoragePayload { // That object is sent over the wire, so we need to take care of version compatibility. diff --git a/network-messages/src/main/java/io/bisq/payload/PersistedStoragePayload.java b/network-messages/src/main/java/io/bisq/network_messages/payload/PersistedStoragePayload.java similarity index 79% rename from network-messages/src/main/java/io/bisq/payload/PersistedStoragePayload.java rename to network-messages/src/main/java/io/bisq/network_messages/payload/PersistedStoragePayload.java index eed11b3eb8..b65004ca9d 100644 --- a/network-messages/src/main/java/io/bisq/payload/PersistedStoragePayload.java +++ b/network-messages/src/main/java/io/bisq/network_messages/payload/PersistedStoragePayload.java @@ -1,4 +1,4 @@ -package io.bisq.payload; +package io.bisq.network_messages.payload; /** * Marker interface for payload which gets persisted. diff --git a/network-messages/src/main/java/io/bisq/payload/RequiresOwnerIsOnlinePayload.java b/network-messages/src/main/java/io/bisq/network_messages/payload/RequiresOwnerIsOnlinePayload.java similarity index 65% rename from network-messages/src/main/java/io/bisq/payload/RequiresOwnerIsOnlinePayload.java rename to network-messages/src/main/java/io/bisq/network_messages/payload/RequiresOwnerIsOnlinePayload.java index dddad5d439..23eb52d8ba 100644 --- a/network-messages/src/main/java/io/bisq/payload/RequiresOwnerIsOnlinePayload.java +++ b/network-messages/src/main/java/io/bisq/network_messages/payload/RequiresOwnerIsOnlinePayload.java @@ -1,10 +1,10 @@ -package io.bisq.payload; +package io.bisq.network_messages.payload; -import io.bisq.messages.NodeAddress; -import io.bisq.messages.wire.Payload; +import io.bisq.network_messages.NodeAddress; +import io.bisq.network_messages.wire.Payload; /** - * Used for messages which require that the data owner is online. + * Used for network_messages which require that the data owner is online. *

    * This is used for the offers to avoid dead offers in case the offerer is in standby mode or the app has * terminated without sending the remove message (e.g. network connection lost or in case of a crash). diff --git a/network-messages/src/main/java/io/bisq/payload/StoragePayload.java b/network-messages/src/main/java/io/bisq/network_messages/payload/StoragePayload.java similarity index 94% rename from network-messages/src/main/java/io/bisq/payload/StoragePayload.java rename to network-messages/src/main/java/io/bisq/network_messages/payload/StoragePayload.java index cd696b305f..6380bade51 100644 --- a/network-messages/src/main/java/io/bisq/payload/StoragePayload.java +++ b/network-messages/src/main/java/io/bisq/network_messages/payload/StoragePayload.java @@ -1,4 +1,4 @@ -package io.bisq.payload; +package io.bisq.network_messages.payload; import java.security.PublicKey; diff --git a/network-messages/src/main/java/io/bisq/messages/payment/PaymentMethod.java b/network-messages/src/main/java/io/bisq/network_messages/payment/PaymentMethod.java similarity index 99% rename from network-messages/src/main/java/io/bisq/messages/payment/PaymentMethod.java rename to network-messages/src/main/java/io/bisq/network_messages/payment/PaymentMethod.java index f3d5080142..e278c53301 100644 --- a/network-messages/src/main/java/io/bisq/messages/payment/PaymentMethod.java +++ b/network-messages/src/main/java/io/bisq/network_messages/payment/PaymentMethod.java @@ -15,7 +15,7 @@ * along with bisq. If not, see . */ -package io.bisq.messages.payment; +package io.bisq.network_messages.payment; import io.bisq.app.Version; import io.bisq.common.persistance.Persistable; diff --git a/network-messages/src/main/java/io/bisq/messages/payment/payload/AliPayAccountContractData.java b/network-messages/src/main/java/io/bisq/network_messages/payment/payload/AliPayAccountContractData.java similarity index 98% rename from network-messages/src/main/java/io/bisq/messages/payment/payload/AliPayAccountContractData.java rename to network-messages/src/main/java/io/bisq/network_messages/payment/payload/AliPayAccountContractData.java index c799f61044..789732911b 100644 --- a/network-messages/src/main/java/io/bisq/messages/payment/payload/AliPayAccountContractData.java +++ b/network-messages/src/main/java/io/bisq/network_messages/payment/payload/AliPayAccountContractData.java @@ -15,7 +15,7 @@ * along with bisq. If not, see . */ -package io.bisq.messages.payment.payload; +package io.bisq.network_messages.payment.payload; import io.bisq.app.Version; import io.bisq.common.wire.proto.Messages; diff --git a/network-messages/src/main/java/io/bisq/messages/payment/payload/BankAccountContractData.java b/network-messages/src/main/java/io/bisq/network_messages/payment/payload/BankAccountContractData.java similarity index 98% rename from network-messages/src/main/java/io/bisq/messages/payment/payload/BankAccountContractData.java rename to network-messages/src/main/java/io/bisq/network_messages/payment/payload/BankAccountContractData.java index 90a3aa2d30..416ce9addc 100644 --- a/network-messages/src/main/java/io/bisq/messages/payment/payload/BankAccountContractData.java +++ b/network-messages/src/main/java/io/bisq/network_messages/payment/payload/BankAccountContractData.java @@ -15,7 +15,7 @@ * along with bisq. If not, see . */ -package io.bisq.messages.payment.payload; +package io.bisq.network_messages.payment.payload; import io.bisq.app.Version; import io.bisq.locale.BankUtil; diff --git a/network-messages/src/main/java/io/bisq/messages/payment/payload/CashDepositAccountContractData.java b/network-messages/src/main/java/io/bisq/network_messages/payment/payload/CashDepositAccountContractData.java similarity index 99% rename from network-messages/src/main/java/io/bisq/messages/payment/payload/CashDepositAccountContractData.java rename to network-messages/src/main/java/io/bisq/network_messages/payment/payload/CashDepositAccountContractData.java index 3d67b27796..0c8552a13e 100644 --- a/network-messages/src/main/java/io/bisq/messages/payment/payload/CashDepositAccountContractData.java +++ b/network-messages/src/main/java/io/bisq/network_messages/payment/payload/CashDepositAccountContractData.java @@ -15,7 +15,7 @@ * along with bisq. If not, see . */ -package io.bisq.messages.payment.payload; +package io.bisq.network_messages.payment.payload; import io.bisq.app.Version; import io.bisq.common.wire.proto.Messages; diff --git a/network-messages/src/main/java/io/bisq/messages/payment/payload/ChaseQuickPayAccountContractData.java b/network-messages/src/main/java/io/bisq/network_messages/payment/payload/ChaseQuickPayAccountContractData.java similarity index 98% rename from network-messages/src/main/java/io/bisq/messages/payment/payload/ChaseQuickPayAccountContractData.java rename to network-messages/src/main/java/io/bisq/network_messages/payment/payload/ChaseQuickPayAccountContractData.java index 1d1db60a58..331764a328 100644 --- a/network-messages/src/main/java/io/bisq/messages/payment/payload/ChaseQuickPayAccountContractData.java +++ b/network-messages/src/main/java/io/bisq/network_messages/payment/payload/ChaseQuickPayAccountContractData.java @@ -15,7 +15,7 @@ * along with bisq. If not, see . */ -package io.bisq.messages.payment.payload; +package io.bisq.network_messages.payment.payload; import io.bisq.app.Version; import io.bisq.common.wire.proto.Messages; diff --git a/network-messages/src/main/java/io/bisq/messages/payment/payload/ClearXchangeAccountContractData.java b/network-messages/src/main/java/io/bisq/network_messages/payment/payload/ClearXchangeAccountContractData.java similarity index 98% rename from network-messages/src/main/java/io/bisq/messages/payment/payload/ClearXchangeAccountContractData.java rename to network-messages/src/main/java/io/bisq/network_messages/payment/payload/ClearXchangeAccountContractData.java index 167c671ba3..8e599a9437 100644 --- a/network-messages/src/main/java/io/bisq/messages/payment/payload/ClearXchangeAccountContractData.java +++ b/network-messages/src/main/java/io/bisq/network_messages/payment/payload/ClearXchangeAccountContractData.java @@ -15,7 +15,7 @@ * along with bisq. If not, see . */ -package io.bisq.messages.payment.payload; +package io.bisq.network_messages.payment.payload; import io.bisq.app.Version; import io.bisq.common.wire.proto.Messages; diff --git a/network-messages/src/main/java/io/bisq/messages/payment/payload/CountryBasedPaymentAccountContractData.java b/network-messages/src/main/java/io/bisq/network_messages/payment/payload/CountryBasedPaymentAccountContractData.java similarity index 98% rename from network-messages/src/main/java/io/bisq/messages/payment/payload/CountryBasedPaymentAccountContractData.java rename to network-messages/src/main/java/io/bisq/network_messages/payment/payload/CountryBasedPaymentAccountContractData.java index 38abf579a2..1949d9753e 100644 --- a/network-messages/src/main/java/io/bisq/messages/payment/payload/CountryBasedPaymentAccountContractData.java +++ b/network-messages/src/main/java/io/bisq/network_messages/payment/payload/CountryBasedPaymentAccountContractData.java @@ -15,7 +15,7 @@ * along with bisq. If not, see . */ -package io.bisq.messages.payment.payload; +package io.bisq.network_messages.payment.payload; import io.bisq.app.Version; import sun.reflect.generics.reflectiveObjects.NotImplementedException; diff --git a/network-messages/src/main/java/io/bisq/messages/payment/payload/CryptoCurrencyAccountContractData.java b/network-messages/src/main/java/io/bisq/network_messages/payment/payload/CryptoCurrencyAccountContractData.java similarity index 98% rename from network-messages/src/main/java/io/bisq/messages/payment/payload/CryptoCurrencyAccountContractData.java rename to network-messages/src/main/java/io/bisq/network_messages/payment/payload/CryptoCurrencyAccountContractData.java index f8862022a3..17dbf7f97c 100644 --- a/network-messages/src/main/java/io/bisq/messages/payment/payload/CryptoCurrencyAccountContractData.java +++ b/network-messages/src/main/java/io/bisq/network_messages/payment/payload/CryptoCurrencyAccountContractData.java @@ -15,7 +15,7 @@ * along with bisq. If not, see . */ -package io.bisq.messages.payment.payload; +package io.bisq.network_messages.payment.payload; import io.bisq.app.Version; import io.bisq.common.wire.proto.Messages; diff --git a/network-messages/src/main/java/io/bisq/messages/payment/payload/FasterPaymentsAccountContractData.java b/network-messages/src/main/java/io/bisq/network_messages/payment/payload/FasterPaymentsAccountContractData.java similarity index 98% rename from network-messages/src/main/java/io/bisq/messages/payment/payload/FasterPaymentsAccountContractData.java rename to network-messages/src/main/java/io/bisq/network_messages/payment/payload/FasterPaymentsAccountContractData.java index 9d4a5ca21c..628ead0e01 100644 --- a/network-messages/src/main/java/io/bisq/messages/payment/payload/FasterPaymentsAccountContractData.java +++ b/network-messages/src/main/java/io/bisq/network_messages/payment/payload/FasterPaymentsAccountContractData.java @@ -15,7 +15,7 @@ * along with bisq. If not, see . */ -package io.bisq.messages.payment.payload; +package io.bisq.network_messages.payment.payload; import io.bisq.app.Version; import io.bisq.common.wire.proto.Messages; diff --git a/network-messages/src/main/java/io/bisq/messages/payment/payload/InteracETransferAccountContractData.java b/network-messages/src/main/java/io/bisq/network_messages/payment/payload/InteracETransferAccountContractData.java similarity index 98% rename from network-messages/src/main/java/io/bisq/messages/payment/payload/InteracETransferAccountContractData.java rename to network-messages/src/main/java/io/bisq/network_messages/payment/payload/InteracETransferAccountContractData.java index 5683caa0e6..7aa85a27b7 100644 --- a/network-messages/src/main/java/io/bisq/messages/payment/payload/InteracETransferAccountContractData.java +++ b/network-messages/src/main/java/io/bisq/network_messages/payment/payload/InteracETransferAccountContractData.java @@ -15,7 +15,7 @@ * along with bisq. If not, see . */ -package io.bisq.messages.payment.payload; +package io.bisq.network_messages.payment.payload; import io.bisq.app.Version; import io.bisq.common.wire.proto.Messages; diff --git a/network-messages/src/main/java/io/bisq/messages/payment/payload/NationalBankAccountContractData.java b/network-messages/src/main/java/io/bisq/network_messages/payment/payload/NationalBankAccountContractData.java similarity index 98% rename from network-messages/src/main/java/io/bisq/messages/payment/payload/NationalBankAccountContractData.java rename to network-messages/src/main/java/io/bisq/network_messages/payment/payload/NationalBankAccountContractData.java index 267401542e..ef548743d9 100644 --- a/network-messages/src/main/java/io/bisq/messages/payment/payload/NationalBankAccountContractData.java +++ b/network-messages/src/main/java/io/bisq/network_messages/payment/payload/NationalBankAccountContractData.java @@ -15,7 +15,7 @@ * along with bisq. If not, see . */ -package io.bisq.messages.payment.payload; +package io.bisq.network_messages.payment.payload; import io.bisq.app.Version; import io.bisq.common.wire.proto.Messages; diff --git a/network-messages/src/main/java/io/bisq/messages/payment/payload/OKPayAccountContractData.java b/network-messages/src/main/java/io/bisq/network_messages/payment/payload/OKPayAccountContractData.java similarity index 97% rename from network-messages/src/main/java/io/bisq/messages/payment/payload/OKPayAccountContractData.java rename to network-messages/src/main/java/io/bisq/network_messages/payment/payload/OKPayAccountContractData.java index 9d743b32e8..85cc00f684 100644 --- a/network-messages/src/main/java/io/bisq/messages/payment/payload/OKPayAccountContractData.java +++ b/network-messages/src/main/java/io/bisq/network_messages/payment/payload/OKPayAccountContractData.java @@ -15,7 +15,7 @@ * along with bisq. If not, see . */ -package io.bisq.messages.payment.payload; +package io.bisq.network_messages.payment.payload; import io.bisq.app.Version; import io.bisq.common.wire.proto.Messages; diff --git a/network-messages/src/main/java/io/bisq/messages/payment/payload/PaymentAccountContractData.java b/network-messages/src/main/java/io/bisq/network_messages/payment/payload/PaymentAccountContractData.java similarity index 97% rename from network-messages/src/main/java/io/bisq/messages/payment/payload/PaymentAccountContractData.java rename to network-messages/src/main/java/io/bisq/network_messages/payment/payload/PaymentAccountContractData.java index e856841b42..1f04e9ec87 100644 --- a/network-messages/src/main/java/io/bisq/messages/payment/payload/PaymentAccountContractData.java +++ b/network-messages/src/main/java/io/bisq/network_messages/payment/payload/PaymentAccountContractData.java @@ -15,10 +15,10 @@ * along with bisq. If not, see . */ -package io.bisq.messages.payment.payload; +package io.bisq.network_messages.payment.payload; import io.bisq.app.Version; -import io.bisq.messages.wire.Payload; +import io.bisq.network_messages.wire.Payload; public abstract class PaymentAccountContractData implements Payload { // That object is sent over the wire, so we need to take care of version compatibility. diff --git a/network-messages/src/main/java/io/bisq/messages/payment/payload/PerfectMoneyAccountContractData.java b/network-messages/src/main/java/io/bisq/network_messages/payment/payload/PerfectMoneyAccountContractData.java similarity index 98% rename from network-messages/src/main/java/io/bisq/messages/payment/payload/PerfectMoneyAccountContractData.java rename to network-messages/src/main/java/io/bisq/network_messages/payment/payload/PerfectMoneyAccountContractData.java index b2805900c9..0d6a5042b9 100644 --- a/network-messages/src/main/java/io/bisq/messages/payment/payload/PerfectMoneyAccountContractData.java +++ b/network-messages/src/main/java/io/bisq/network_messages/payment/payload/PerfectMoneyAccountContractData.java @@ -15,7 +15,7 @@ * along with bisq. If not, see . */ -package io.bisq.messages.payment.payload; +package io.bisq.network_messages.payment.payload; import io.bisq.app.Version; import io.bisq.common.wire.proto.Messages; diff --git a/network-messages/src/main/java/io/bisq/messages/payment/payload/SameBankAccountContractData.java b/network-messages/src/main/java/io/bisq/network_messages/payment/payload/SameBankAccountContractData.java similarity index 98% rename from network-messages/src/main/java/io/bisq/messages/payment/payload/SameBankAccountContractData.java rename to network-messages/src/main/java/io/bisq/network_messages/payment/payload/SameBankAccountContractData.java index 5b868da730..83d8b01d7f 100644 --- a/network-messages/src/main/java/io/bisq/messages/payment/payload/SameBankAccountContractData.java +++ b/network-messages/src/main/java/io/bisq/network_messages/payment/payload/SameBankAccountContractData.java @@ -15,7 +15,7 @@ * along with bisq. If not, see . */ -package io.bisq.messages.payment.payload; +package io.bisq.network_messages.payment.payload; import io.bisq.app.Version; import io.bisq.common.wire.proto.Messages; diff --git a/network-messages/src/main/java/io/bisq/messages/payment/payload/SepaAccountContractData.java b/network-messages/src/main/java/io/bisq/network_messages/payment/payload/SepaAccountContractData.java similarity index 98% rename from network-messages/src/main/java/io/bisq/messages/payment/payload/SepaAccountContractData.java rename to network-messages/src/main/java/io/bisq/network_messages/payment/payload/SepaAccountContractData.java index ca599a0af3..ac9f212af8 100644 --- a/network-messages/src/main/java/io/bisq/messages/payment/payload/SepaAccountContractData.java +++ b/network-messages/src/main/java/io/bisq/network_messages/payment/payload/SepaAccountContractData.java @@ -15,7 +15,7 @@ * along with bisq. If not, see . */ -package io.bisq.messages.payment.payload; +package io.bisq.network_messages.payment.payload; import io.bisq.app.Version; import io.bisq.common.wire.proto.Messages; diff --git a/network-messages/src/main/java/io/bisq/messages/payment/payload/SpecificBanksAccountContractData.java b/network-messages/src/main/java/io/bisq/network_messages/payment/payload/SpecificBanksAccountContractData.java similarity index 98% rename from network-messages/src/main/java/io/bisq/messages/payment/payload/SpecificBanksAccountContractData.java rename to network-messages/src/main/java/io/bisq/network_messages/payment/payload/SpecificBanksAccountContractData.java index a0f11b1f74..c4d9d32ebf 100644 --- a/network-messages/src/main/java/io/bisq/messages/payment/payload/SpecificBanksAccountContractData.java +++ b/network-messages/src/main/java/io/bisq/network_messages/payment/payload/SpecificBanksAccountContractData.java @@ -15,7 +15,7 @@ * along with bisq. If not, see . */ -package io.bisq.messages.payment.payload; +package io.bisq.network_messages.payment.payload; import com.google.common.base.Joiner; import io.bisq.app.Version; diff --git a/network-messages/src/main/java/io/bisq/messages/payment/payload/SwishAccountContractData.java b/network-messages/src/main/java/io/bisq/network_messages/payment/payload/SwishAccountContractData.java similarity index 98% rename from network-messages/src/main/java/io/bisq/messages/payment/payload/SwishAccountContractData.java rename to network-messages/src/main/java/io/bisq/network_messages/payment/payload/SwishAccountContractData.java index cc377ca574..9b6092944b 100644 --- a/network-messages/src/main/java/io/bisq/messages/payment/payload/SwishAccountContractData.java +++ b/network-messages/src/main/java/io/bisq/network_messages/payment/payload/SwishAccountContractData.java @@ -15,7 +15,7 @@ * along with bisq. If not, see . */ -package io.bisq.messages.payment.payload; +package io.bisq.network_messages.payment.payload; import io.bisq.app.Version; import io.bisq.common.wire.proto.Messages; diff --git a/network-messages/src/main/java/io/bisq/messages/payment/payload/USPostalMoneyOrderAccountContractData.java b/network-messages/src/main/java/io/bisq/network_messages/payment/payload/USPostalMoneyOrderAccountContractData.java similarity index 98% rename from network-messages/src/main/java/io/bisq/messages/payment/payload/USPostalMoneyOrderAccountContractData.java rename to network-messages/src/main/java/io/bisq/network_messages/payment/payload/USPostalMoneyOrderAccountContractData.java index 2e2d0c30b2..dc6b7eb59b 100644 --- a/network-messages/src/main/java/io/bisq/messages/payment/payload/USPostalMoneyOrderAccountContractData.java +++ b/network-messages/src/main/java/io/bisq/network_messages/payment/payload/USPostalMoneyOrderAccountContractData.java @@ -15,7 +15,7 @@ * along with bisq. If not, see . */ -package io.bisq.messages.payment.payload; +package io.bisq.network_messages.payment.payload; import io.bisq.app.Version; import io.bisq.common.wire.proto.Messages; diff --git a/network-messages/src/main/java/io/bisq/messages/protocol/trade/TradeMessage.java b/network-messages/src/main/java/io/bisq/network_messages/protocol/trade/TradeMessage.java similarity index 94% rename from network-messages/src/main/java/io/bisq/messages/protocol/trade/TradeMessage.java rename to network-messages/src/main/java/io/bisq/network_messages/protocol/trade/TradeMessage.java index b6db9159ba..a2e9dffd4f 100644 --- a/network-messages/src/main/java/io/bisq/messages/protocol/trade/TradeMessage.java +++ b/network-messages/src/main/java/io/bisq/network_messages/protocol/trade/TradeMessage.java @@ -15,10 +15,10 @@ * along with bisq. If not, see . */ -package io.bisq.messages.protocol.trade; +package io.bisq.network_messages.protocol.trade; import io.bisq.app.Version; -import io.bisq.messages.p2p.messaging.DirectMessage; +import io.bisq.network_messages.p2p.messaging.DirectMessage; import javax.annotation.concurrent.Immutable; diff --git a/network-messages/src/main/java/io/bisq/messages/trade/exceptions/MarketPriceNotAvailableException.java b/network-messages/src/main/java/io/bisq/network_messages/trade/exceptions/MarketPriceNotAvailableException.java similarity index 75% rename from network-messages/src/main/java/io/bisq/messages/trade/exceptions/MarketPriceNotAvailableException.java rename to network-messages/src/main/java/io/bisq/network_messages/trade/exceptions/MarketPriceNotAvailableException.java index f4f9674865..8bb5dc9c14 100644 --- a/network-messages/src/main/java/io/bisq/messages/trade/exceptions/MarketPriceNotAvailableException.java +++ b/network-messages/src/main/java/io/bisq/network_messages/trade/exceptions/MarketPriceNotAvailableException.java @@ -1,4 +1,4 @@ -package io.bisq.messages.trade.exceptions; +package io.bisq.network_messages.trade.exceptions; public class MarketPriceNotAvailableException extends Exception { public MarketPriceNotAvailableException(String message) { diff --git a/network-messages/src/main/java/io/bisq/messages/trade/exceptions/TradePriceOutOfToleranceException.java b/network-messages/src/main/java/io/bisq/network_messages/trade/exceptions/TradePriceOutOfToleranceException.java similarity index 76% rename from network-messages/src/main/java/io/bisq/messages/trade/exceptions/TradePriceOutOfToleranceException.java rename to network-messages/src/main/java/io/bisq/network_messages/trade/exceptions/TradePriceOutOfToleranceException.java index 388773c5d2..de65c693cc 100644 --- a/network-messages/src/main/java/io/bisq/messages/trade/exceptions/TradePriceOutOfToleranceException.java +++ b/network-messages/src/main/java/io/bisq/network_messages/trade/exceptions/TradePriceOutOfToleranceException.java @@ -1,4 +1,4 @@ -package io.bisq.messages.trade.exceptions; +package io.bisq.network_messages.trade.exceptions; public class TradePriceOutOfToleranceException extends Exception { public TradePriceOutOfToleranceException(String message) { diff --git a/network-messages/src/main/java/io/bisq/messages/trade/offer/payload/OfferPayload.java b/network-messages/src/main/java/io/bisq/network_messages/trade/offer/payload/OfferPayload.java similarity index 97% rename from network-messages/src/main/java/io/bisq/messages/trade/offer/payload/OfferPayload.java rename to network-messages/src/main/java/io/bisq/network_messages/trade/offer/payload/OfferPayload.java index 546d73efdb..038f97b397 100644 --- a/network-messages/src/main/java/io/bisq/messages/trade/offer/payload/OfferPayload.java +++ b/network-messages/src/main/java/io/bisq/network_messages/trade/offer/payload/OfferPayload.java @@ -15,7 +15,7 @@ * along with bisq. If not, see . */ -package io.bisq.messages.trade.offer.payload; +package io.bisq.network_messages.trade.offer.payload; import com.google.common.collect.Lists; import com.google.common.collect.Maps; @@ -24,12 +24,12 @@ import io.bisq.app.Version; import io.bisq.common.util.JsonExclude; import io.bisq.common.util.Utilities; import io.bisq.common.wire.proto.Messages; -import io.bisq.messages.NodeAddress; -import io.bisq.messages.btc.Restrictions; -import io.bisq.messages.crypto.PubKeyRing; -import io.bisq.messages.payment.PaymentMethod; -import io.bisq.payload.RequiresOwnerIsOnlinePayload; -import io.bisq.payload.StoragePayload; +import io.bisq.network_messages.NodeAddress; +import io.bisq.network_messages.btc.Restrictions; +import io.bisq.network_messages.crypto.PubKeyRing; +import io.bisq.network_messages.payment.PaymentMethod; +import io.bisq.network_messages.payload.RequiresOwnerIsOnlinePayload; +import io.bisq.network_messages.payload.StoragePayload; import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.Setter; diff --git a/network-messages/src/main/java/io/bisq/messages/trade/payload/Contract.java b/network-messages/src/main/java/io/bisq/network_messages/trade/payload/Contract.java similarity index 97% rename from network-messages/src/main/java/io/bisq/messages/trade/payload/Contract.java rename to network-messages/src/main/java/io/bisq/network_messages/trade/payload/Contract.java index a64f10a1c7..58a5e12878 100644 --- a/network-messages/src/main/java/io/bisq/messages/trade/payload/Contract.java +++ b/network-messages/src/main/java/io/bisq/network_messages/trade/payload/Contract.java @@ -15,18 +15,18 @@ * along with bisq. If not, see . */ -package io.bisq.messages.trade.payload; +package io.bisq.network_messages.trade.payload; import com.google.common.base.Preconditions; import com.google.protobuf.ByteString; import io.bisq.app.Version; import io.bisq.common.util.JsonExclude; -import io.bisq.messages.trade.offer.payload.OfferPayload; -import io.bisq.messages.wire.Payload; +import io.bisq.network_messages.trade.offer.payload.OfferPayload; +import io.bisq.network_messages.wire.Payload; import io.bisq.common.wire.proto.Messages; -import io.bisq.messages.NodeAddress; -import io.bisq.messages.crypto.PubKeyRing; -import io.bisq.messages.payment.payload.PaymentAccountContractData; +import io.bisq.network_messages.NodeAddress; +import io.bisq.network_messages.crypto.PubKeyRing; +import io.bisq.network_messages.payment.payload.PaymentAccountContractData; import org.bitcoinj.core.Coin; import org.bitcoinj.core.Utils; import org.bitcoinj.utils.Fiat; diff --git a/network-messages/src/main/java/io/bisq/messages/trade/protocol/trade/messages/DepositTxPublishedMessage.java b/network-messages/src/main/java/io/bisq/network_messages/trade/protocol/trade/messages/DepositTxPublishedMessage.java similarity index 92% rename from network-messages/src/main/java/io/bisq/messages/trade/protocol/trade/messages/DepositTxPublishedMessage.java rename to network-messages/src/main/java/io/bisq/network_messages/trade/protocol/trade/messages/DepositTxPublishedMessage.java index e3ee8c074b..fb0c6e9c49 100644 --- a/network-messages/src/main/java/io/bisq/messages/trade/protocol/trade/messages/DepositTxPublishedMessage.java +++ b/network-messages/src/main/java/io/bisq/network_messages/trade/protocol/trade/messages/DepositTxPublishedMessage.java @@ -15,15 +15,15 @@ * along with bisq. If not, see . */ -package io.bisq.messages.trade.protocol.trade.messages; +package io.bisq.network_messages.trade.protocol.trade.messages; import com.google.protobuf.ByteString; import io.bisq.app.Version; import io.bisq.common.wire.proto.Messages; -import io.bisq.messages.NodeAddress; -import io.bisq.messages.p2p.messaging.MailboxMessage; -import io.bisq.messages.protocol.trade.TradeMessage; -import io.bisq.messages.util.ProtoBufferUtils; +import io.bisq.network_messages.NodeAddress; +import io.bisq.network_messages.p2p.messaging.MailboxMessage; +import io.bisq.network_messages.protocol.trade.TradeMessage; +import io.bisq.network_messages.util.ProtoBufferUtils; import javax.annotation.concurrent.Immutable; import java.util.Arrays; diff --git a/network-messages/src/main/java/io/bisq/messages/trade/protocol/trade/messages/FiatTransferStartedMessage.java b/network-messages/src/main/java/io/bisq/network_messages/trade/protocol/trade/messages/FiatTransferStartedMessage.java similarity index 92% rename from network-messages/src/main/java/io/bisq/messages/trade/protocol/trade/messages/FiatTransferStartedMessage.java rename to network-messages/src/main/java/io/bisq/network_messages/trade/protocol/trade/messages/FiatTransferStartedMessage.java index 6c09007bbf..dca4718b22 100644 --- a/network-messages/src/main/java/io/bisq/messages/trade/protocol/trade/messages/FiatTransferStartedMessage.java +++ b/network-messages/src/main/java/io/bisq/network_messages/trade/protocol/trade/messages/FiatTransferStartedMessage.java @@ -15,14 +15,14 @@ * along with bisq. If not, see . */ -package io.bisq.messages.trade.protocol.trade.messages; +package io.bisq.network_messages.trade.protocol.trade.messages; import io.bisq.app.Version; import io.bisq.common.wire.proto.Messages; -import io.bisq.messages.NodeAddress; -import io.bisq.messages.p2p.messaging.MailboxMessage; -import io.bisq.messages.protocol.trade.TradeMessage; -import io.bisq.messages.util.ProtoBufferUtils; +import io.bisq.network_messages.NodeAddress; +import io.bisq.network_messages.p2p.messaging.MailboxMessage; +import io.bisq.network_messages.protocol.trade.TradeMessage; +import io.bisq.network_messages.util.ProtoBufferUtils; import javax.annotation.concurrent.Immutable; import java.util.UUID; diff --git a/network-messages/src/main/java/io/bisq/messages/trade/protocol/trade/messages/FinalizePayoutTxRequest.java b/network-messages/src/main/java/io/bisq/network_messages/trade/protocol/trade/messages/FinalizePayoutTxRequest.java similarity index 94% rename from network-messages/src/main/java/io/bisq/messages/trade/protocol/trade/messages/FinalizePayoutTxRequest.java rename to network-messages/src/main/java/io/bisq/network_messages/trade/protocol/trade/messages/FinalizePayoutTxRequest.java index e99aed07bb..853c1d1887 100644 --- a/network-messages/src/main/java/io/bisq/messages/trade/protocol/trade/messages/FinalizePayoutTxRequest.java +++ b/network-messages/src/main/java/io/bisq/network_messages/trade/protocol/trade/messages/FinalizePayoutTxRequest.java @@ -15,15 +15,15 @@ * along with bisq. If not, see . */ -package io.bisq.messages.trade.protocol.trade.messages; +package io.bisq.network_messages.trade.protocol.trade.messages; import com.google.protobuf.ByteString; import io.bisq.app.Version; import io.bisq.common.wire.proto.Messages; -import io.bisq.messages.NodeAddress; -import io.bisq.messages.p2p.messaging.MailboxMessage; -import io.bisq.messages.protocol.trade.TradeMessage; -import io.bisq.messages.util.ProtoBufferUtils; +import io.bisq.network_messages.NodeAddress; +import io.bisq.network_messages.p2p.messaging.MailboxMessage; +import io.bisq.network_messages.protocol.trade.TradeMessage; +import io.bisq.network_messages.util.ProtoBufferUtils; import javax.annotation.concurrent.Immutable; import java.util.Arrays; diff --git a/network-messages/src/main/java/io/bisq/messages/trade/protocol/trade/messages/PayDepositRequest.java b/network-messages/src/main/java/io/bisq/network_messages/trade/protocol/trade/messages/PayDepositRequest.java similarity index 95% rename from network-messages/src/main/java/io/bisq/messages/trade/protocol/trade/messages/PayDepositRequest.java rename to network-messages/src/main/java/io/bisq/network_messages/trade/protocol/trade/messages/PayDepositRequest.java index 8da6b89345..89f8289306 100644 --- a/network-messages/src/main/java/io/bisq/messages/trade/protocol/trade/messages/PayDepositRequest.java +++ b/network-messages/src/main/java/io/bisq/network_messages/trade/protocol/trade/messages/PayDepositRequest.java @@ -15,18 +15,18 @@ * along with bisq. If not, see . */ -package io.bisq.messages.trade.protocol.trade.messages; +package io.bisq.network_messages.trade.protocol.trade.messages; import com.google.protobuf.ByteString; import io.bisq.app.Version; import io.bisq.common.wire.proto.Messages; -import io.bisq.messages.NodeAddress; -import io.bisq.messages.btc.data.RawTransactionInput; -import io.bisq.messages.crypto.PubKeyRing; -import io.bisq.messages.p2p.messaging.MailboxMessage; -import io.bisq.messages.payment.payload.PaymentAccountContractData; -import io.bisq.messages.protocol.trade.TradeMessage; -import io.bisq.messages.util.ProtoBufferUtils; +import io.bisq.network_messages.NodeAddress; +import io.bisq.network_messages.btc.data.RawTransactionInput; +import io.bisq.network_messages.crypto.PubKeyRing; +import io.bisq.network_messages.p2p.messaging.MailboxMessage; +import io.bisq.network_messages.payment.payload.PaymentAccountContractData; +import io.bisq.network_messages.protocol.trade.TradeMessage; +import io.bisq.network_messages.util.ProtoBufferUtils; import org.bitcoinj.core.Coin; import javax.annotation.Nullable; diff --git a/network-messages/src/main/java/io/bisq/messages/trade/protocol/trade/messages/PayoutTxFinalizedMessage.java b/network-messages/src/main/java/io/bisq/network_messages/trade/protocol/trade/messages/PayoutTxFinalizedMessage.java similarity index 92% rename from network-messages/src/main/java/io/bisq/messages/trade/protocol/trade/messages/PayoutTxFinalizedMessage.java rename to network-messages/src/main/java/io/bisq/network_messages/trade/protocol/trade/messages/PayoutTxFinalizedMessage.java index 7a0e473500..2efb1749e9 100644 --- a/network-messages/src/main/java/io/bisq/messages/trade/protocol/trade/messages/PayoutTxFinalizedMessage.java +++ b/network-messages/src/main/java/io/bisq/network_messages/trade/protocol/trade/messages/PayoutTxFinalizedMessage.java @@ -15,15 +15,15 @@ * along with bisq. If not, see . */ -package io.bisq.messages.trade.protocol.trade.messages; +package io.bisq.network_messages.trade.protocol.trade.messages; import com.google.protobuf.ByteString; import io.bisq.app.Version; import io.bisq.common.wire.proto.Messages; -import io.bisq.messages.NodeAddress; -import io.bisq.messages.p2p.messaging.MailboxMessage; -import io.bisq.messages.protocol.trade.TradeMessage; -import io.bisq.messages.util.ProtoBufferUtils; +import io.bisq.network_messages.NodeAddress; +import io.bisq.network_messages.p2p.messaging.MailboxMessage; +import io.bisq.network_messages.protocol.trade.TradeMessage; +import io.bisq.network_messages.util.ProtoBufferUtils; import javax.annotation.concurrent.Immutable; import java.util.Arrays; diff --git a/network-messages/src/main/java/io/bisq/messages/trade/protocol/trade/messages/PublishDepositTxRequest.java b/network-messages/src/main/java/io/bisq/network_messages/trade/protocol/trade/messages/PublishDepositTxRequest.java similarity index 93% rename from network-messages/src/main/java/io/bisq/messages/trade/protocol/trade/messages/PublishDepositTxRequest.java rename to network-messages/src/main/java/io/bisq/network_messages/trade/protocol/trade/messages/PublishDepositTxRequest.java index fb77d9da7f..172fa4e854 100644 --- a/network-messages/src/main/java/io/bisq/messages/trade/protocol/trade/messages/PublishDepositTxRequest.java +++ b/network-messages/src/main/java/io/bisq/network_messages/trade/protocol/trade/messages/PublishDepositTxRequest.java @@ -15,16 +15,16 @@ * along with bisq. If not, see . */ -package io.bisq.messages.trade.protocol.trade.messages; +package io.bisq.network_messages.trade.protocol.trade.messages; import com.google.protobuf.ByteString; import io.bisq.app.Version; import io.bisq.common.util.Utilities; import io.bisq.common.wire.proto.Messages; -import io.bisq.messages.btc.data.RawTransactionInput; -import io.bisq.messages.payment.payload.PaymentAccountContractData; -import io.bisq.messages.protocol.trade.TradeMessage; -import io.bisq.messages.util.ProtoBufferUtils; +import io.bisq.network_messages.btc.data.RawTransactionInput; +import io.bisq.network_messages.payment.payload.PaymentAccountContractData; +import io.bisq.network_messages.protocol.trade.TradeMessage; +import io.bisq.network_messages.util.ProtoBufferUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/network-messages/src/main/java/io/bisq/messages/trade/statistics/payload/TradeStatistics.java b/network-messages/src/main/java/io/bisq/network_messages/trade/statistics/payload/TradeStatistics.java similarity index 95% rename from network-messages/src/main/java/io/bisq/messages/trade/statistics/payload/TradeStatistics.java rename to network-messages/src/main/java/io/bisq/network_messages/trade/statistics/payload/TradeStatistics.java index cbed654e79..4725c4b6c5 100644 --- a/network-messages/src/main/java/io/bisq/messages/trade/statistics/payload/TradeStatistics.java +++ b/network-messages/src/main/java/io/bisq/network_messages/trade/statistics/payload/TradeStatistics.java @@ -1,14 +1,14 @@ -package io.bisq.messages.trade.statistics.payload; +package io.bisq.network_messages.trade.statistics.payload; import io.bisq.app.Capabilities; import io.bisq.app.Version; import io.bisq.common.util.JsonExclude; import io.bisq.common.wire.proto.Messages; -import io.bisq.messages.crypto.PubKeyRing; -import io.bisq.messages.trade.offer.payload.OfferPayload; -import io.bisq.payload.CapabilityRequiringPayload; -import io.bisq.payload.LazyProcessedStoragePayload; -import io.bisq.payload.PersistedStoragePayload; +import io.bisq.network_messages.crypto.PubKeyRing; +import io.bisq.network_messages.trade.offer.payload.OfferPayload; +import io.bisq.network_messages.payload.CapabilityRequiringPayload; +import io.bisq.network_messages.payload.LazyProcessedStoragePayload; +import io.bisq.network_messages.payload.PersistedStoragePayload; import org.bitcoinj.core.Coin; import org.bitcoinj.utils.ExchangeRate; import org.bitcoinj.utils.Fiat; diff --git a/network-messages/src/main/java/io/bisq/messages/util/ProtoBufferUtils.java b/network-messages/src/main/java/io/bisq/network_messages/util/ProtoBufferUtils.java similarity index 89% rename from network-messages/src/main/java/io/bisq/messages/util/ProtoBufferUtils.java rename to network-messages/src/main/java/io/bisq/network_messages/util/ProtoBufferUtils.java index 4dff6e6579..214814ad10 100644 --- a/network-messages/src/main/java/io/bisq/messages/util/ProtoBufferUtils.java +++ b/network-messages/src/main/java/io/bisq/network_messages/util/ProtoBufferUtils.java @@ -1,4 +1,4 @@ -package io.bisq.messages.util; +package io.bisq.network_messages.util; import io.bisq.app.Version; import io.bisq.common.wire.proto.Messages; diff --git a/network-messages/src/main/java/io/bisq/messages/util/Validator.java b/network-messages/src/main/java/io/bisq/network_messages/util/Validator.java similarity index 94% rename from network-messages/src/main/java/io/bisq/messages/util/Validator.java rename to network-messages/src/main/java/io/bisq/network_messages/util/Validator.java index 30dd8acc28..c18e251ba1 100644 --- a/network-messages/src/main/java/io/bisq/messages/util/Validator.java +++ b/network-messages/src/main/java/io/bisq/network_messages/util/Validator.java @@ -15,9 +15,9 @@ * along with bisq. If not, see . */ -package io.bisq.messages.util; +package io.bisq.network_messages.util; -import io.bisq.messages.protocol.trade.TradeMessage; +import io.bisq.network_messages.protocol.trade.TradeMessage; import org.bitcoinj.core.Coin; import static com.google.common.base.Preconditions.checkArgument; diff --git a/network-messages/src/main/java/io/bisq/messages/wire/Payload.java b/network-messages/src/main/java/io/bisq/network_messages/wire/Payload.java similarity index 72% rename from network-messages/src/main/java/io/bisq/messages/wire/Payload.java rename to network-messages/src/main/java/io/bisq/network_messages/wire/Payload.java index d9f47484ea..2055de5cfb 100644 --- a/network-messages/src/main/java/io/bisq/messages/wire/Payload.java +++ b/network-messages/src/main/java/io/bisq/network_messages/wire/Payload.java @@ -1,7 +1,7 @@ -package io.bisq.messages.wire; +package io.bisq.network_messages.wire; import com.google.protobuf.Message; -import io.bisq.messages.ToProtoBuffer; +import io.bisq.network_messages.ToProtoBuffer; import java.io.Serializable; diff --git a/network-messages/src/test/java/io/bisq/crypto/EncryptionTest.java b/network-messages/src/test/java/io/bisq/crypto/EncryptionTest.java index d9cbfa7a8b..9276245c60 100644 --- a/network-messages/src/test/java/io/bisq/crypto/EncryptionTest.java +++ b/network-messages/src/test/java/io/bisq/crypto/EncryptionTest.java @@ -1,8 +1,8 @@ package io.bisq.crypto; import io.bisq.common.crypto.CryptoException; -import io.bisq.messages.crypto.KeyRing; -import io.bisq.messages.crypto.KeyStorage; +import io.bisq.network_messages.crypto.KeyRing; +import io.bisq.network_messages.crypto.KeyStorage; import io.bisq.storage.FileUtil; import org.bouncycastle.jce.provider.BouncyCastleProvider; import org.junit.After; diff --git a/network-messages/src/test/java/io/bisq/crypto/SigTest.java b/network-messages/src/test/java/io/bisq/crypto/SigTest.java index beb3f6a1ad..b72a5c81ff 100644 --- a/network-messages/src/test/java/io/bisq/crypto/SigTest.java +++ b/network-messages/src/test/java/io/bisq/crypto/SigTest.java @@ -2,8 +2,8 @@ package io.bisq.crypto; import io.bisq.common.crypto.CryptoException; import io.bisq.common.crypto.Sig; -import io.bisq.messages.crypto.KeyRing; -import io.bisq.messages.crypto.KeyStorage; +import io.bisq.network_messages.crypto.KeyRing; +import io.bisq.network_messages.crypto.KeyStorage; import io.bisq.storage.FileUtil; import org.bouncycastle.jce.provider.BouncyCastleProvider; import org.junit.After; diff --git a/network/src/main/java/io/bisq/app/BisqEnvironment.java b/network/src/main/java/io/bisq/app/BisqEnvironment.java index e9f6087666..aefa36d83c 100644 --- a/network/src/main/java/io/bisq/app/BisqEnvironment.java +++ b/network/src/main/java/io/bisq/app/BisqEnvironment.java @@ -21,11 +21,11 @@ import ch.qos.logback.classic.Level; import io.bisq.BisqException; import io.bisq.common.CommonOptionKeys; import io.bisq.common.util.Utilities; -import io.bisq.messages.btc.BitcoinNetwork; -import io.bisq.messages.btc.BtcOptionKeys; -import io.bisq.messages.btc.UserAgent; -import io.bisq.messages.crypto.KeyStorage; -import io.bisq.messages.dao.blockchain.RpcOptionKeys; +import io.bisq.network_messages.btc.BitcoinNetwork; +import io.bisq.network_messages.btc.BtcOptionKeys; +import io.bisq.network_messages.btc.UserAgent; +import io.bisq.network_messages.crypto.KeyStorage; +import io.bisq.network_messages.dao.blockchain.RpcOptionKeys; import io.bisq.network.NetworkOptionKeys; import io.bisq.storage.Storage; import joptsimple.OptionSet; diff --git a/network/src/main/java/io/bisq/crypto/EncryptionService.java b/network/src/main/java/io/bisq/crypto/EncryptionService.java index 4f93c082de..16c193b4bf 100644 --- a/network/src/main/java/io/bisq/crypto/EncryptionService.java +++ b/network/src/main/java/io/bisq/crypto/EncryptionService.java @@ -21,16 +21,16 @@ import com.google.protobuf.InvalidProtocolBufferException; import io.bisq.common.crypto.CryptoException; import io.bisq.common.crypto.Sig; import io.bisq.common.wire.proto.Messages; -import io.bisq.messages.DecryptedMsgWithPubKey; -import io.bisq.messages.Message; -import io.bisq.messages.crypto.*; +import io.bisq.network_messages.DecryptedMsgWithPubKey; +import io.bisq.network_messages.Message; +import io.bisq.network_messages.crypto.*; import io.bisq.p2p.network.ProtoBufferUtilities; import javax.crypto.SecretKey; import javax.inject.Inject; import java.security.PrivateKey; -import static io.bisq.messages.crypto.Encryption.decryptSecretKey; +import static io.bisq.network_messages.crypto.Encryption.decryptSecretKey; public class EncryptionService { private final KeyRing keyRing; diff --git a/network/src/main/java/io/bisq/network/Socks5DnsDiscovery.java b/network/src/main/java/io/bisq/network/Socks5DnsDiscovery.java index 1327b0159b..5aa5429e77 100644 --- a/network/src/main/java/io/bisq/network/Socks5DnsDiscovery.java +++ b/network/src/main/java/io/bisq/network/Socks5DnsDiscovery.java @@ -77,7 +77,7 @@ public class Socks5DnsDiscovery extends MultiplexingDiscovery { for (String seed : seeds) { if ("dnsseed.bluematt.me".equals(seed)) { // this dns is known to fail with tor-resolve because it returns too many addrs. - // we avoid adding it in order to prevent ugly log messages. + // we avoid adding it in order to prevent ugly log network_messages. continue; } discoveries.add(new Socks5DnsSeedDiscovery(proxy, params, seed)); diff --git a/network/src/main/java/io/bisq/p2p/network/Connection.java b/network/src/main/java/io/bisq/p2p/network/Connection.java index c360ec8741..2c097ca829 100644 --- a/network/src/main/java/io/bisq/p2p/network/Connection.java +++ b/network/src/main/java/io/bisq/p2p/network/Connection.java @@ -9,22 +9,22 @@ import io.bisq.common.UserThread; import io.bisq.common.util.Tuple2; import io.bisq.common.util.Utilities; import io.bisq.common.wire.proto.Messages; -import io.bisq.messages.CloseConnectionMessage; -import io.bisq.messages.Message; -import io.bisq.messages.NodeAddress; -import io.bisq.messages.SendersNodeAddressMessage; -import io.bisq.messages.p2p.messaging.PrefixedSealedAndSignedMessage; -import io.bisq.messages.p2p.messaging.SupportedCapabilitiesMessage; +import io.bisq.network_messages.CloseConnectionMessage; +import io.bisq.network_messages.Message; +import io.bisq.network_messages.NodeAddress; +import io.bisq.network_messages.SendersNodeAddressMessage; +import io.bisq.network_messages.p2p.messaging.PrefixedSealedAndSignedMessage; +import io.bisq.network_messages.p2p.messaging.SupportedCapabilitiesMessage; import io.bisq.p2p.peers.BanList; -import io.bisq.messages.p2p.peers.getdata.messages.GetDataRequest; -import io.bisq.messages.p2p.peers.getdata.messages.GetDataResponse; -import io.bisq.messages.p2p.peers.keepalive.messages.KeepAliveMessage; -import io.bisq.messages.p2p.peers.keepalive.messages.Ping; -import io.bisq.messages.p2p.peers.keepalive.messages.Pong; -import io.bisq.messages.p2p.storage.messages.AddDataMessage; -import io.bisq.messages.p2p.storage.messages.RefreshTTLMessage; -import io.bisq.payload.CapabilityRequiringPayload; -import io.bisq.payload.StoragePayload; +import io.bisq.network_messages.p2p.peers.getdata.messages.GetDataRequest; +import io.bisq.network_messages.p2p.peers.getdata.messages.GetDataResponse; +import io.bisq.network_messages.p2p.peers.keepalive.messages.KeepAliveMessage; +import io.bisq.network_messages.p2p.peers.keepalive.messages.Ping; +import io.bisq.network_messages.p2p.peers.keepalive.messages.Pong; +import io.bisq.network_messages.p2p.storage.messages.AddDataMessage; +import io.bisq.network_messages.p2p.storage.messages.RefreshTTLMessage; +import io.bisq.network_messages.payload.CapabilityRequiringPayload; +import io.bisq.network_messages.payload.StoragePayload; import javafx.beans.property.ObjectProperty; import javafx.beans.property.ReadOnlyObjectProperty; import javafx.beans.property.SimpleObjectProperty; @@ -180,7 +180,7 @@ public class Connection implements MessageListener { try { Log.traceCall(); - // Throttle outbound messages + // Throttle outbound network_messages long now = System.currentTimeMillis(); long elapsed = now - lastSendTimeStamp; if (elapsed < 20) { @@ -324,7 +324,7 @@ public class Connection implements MessageListener { if (messageTimeStamps.size() >= MSG_THROTTLE_PER_SEC) { // check if we got more than 70 (MSG_THROTTLE_PER_SEC) msg per sec. long compareValue = messageTimeStamps.get(messageTimeStamps.size() - MSG_THROTTLE_PER_SEC).first; - // if duration < 1 sec we received too much messages + // if duration < 1 sec we received too much network_messages violated = now - compareValue < TimeUnit.SECONDS.toMillis(1); if (violated) { log.error("violatesThrottleLimit MSG_THROTTLE_PER_SEC "); @@ -339,7 +339,7 @@ public class Connection implements MessageListener { if (!violated) { // check if we got more than 50 msg per 10 sec. long compareValue = messageTimeStamps.get(messageTimeStamps.size() - MSG_THROTTLE_PER_10_SEC).first; - // if duration < 10 sec we received too much messages + // if duration < 10 sec we received too much network_messages violated = now - compareValue < TimeUnit.SECONDS.toMillis(10); if (violated) { @@ -362,7 +362,7 @@ public class Connection implements MessageListener { // MessageListener implementation /////////////////////////////////////////////////////////////////////////////////////////// - // Only receive non - CloseConnectionMessage messages + // Only receive non - CloseConnectionMessage network_messages @Override public void onMessage(Message message, Connection connection) { checkArgument(connection.equals(this)); @@ -737,13 +737,13 @@ public class Connection implements MessageListener { } Connection connection = sharedModel.connection; - log.trace("InputHandler waiting for incoming messages.\n\tConnection=" + connection); + log.trace("InputHandler waiting for incoming network_messages.\n\tConnection=" + connection); - // Throttle inbound messages + // Throttle inbound network_messages long now = System.currentTimeMillis(); long elapsed = now - lastReadTimeStamp; if (elapsed < 10) { - log.debug("We got 2 messages received in less than 10 ms. We set the thread to sleep " + + log.debug("We got 2 network_messages received in less than 10 ms. We set the thread to sleep " + "for 20 ms to avoid getting flooded by our peer. lastReadTimeStamp={}, now={}, elapsed={}", lastReadTimeStamp, now, elapsed); Thread.sleep(20); @@ -802,7 +802,7 @@ public class Connection implements MessageListener { Utilities.toTruncatedString(envelope.toString()), size); } else if (message instanceof Message) { - // We want to log all incoming messages (except Pong and RefreshTTLMessage) + // We want to log all incoming network_messages (except Pong and RefreshTTLMessage) // so we log before the data type checks //log.info("size={}; object={}", size, Utilities.toTruncatedString(rawInputObject.toString(), 100)); log.debug("\n\n<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\n" + @@ -824,7 +824,7 @@ public class Connection implements MessageListener { // We want to track the size of each object even if it is invalid data connection.statistic.addReceivedBytes(size); - // We want to track the messages also before the checks, so do it early... + // We want to track the network_messages also before the checks, so do it early... if (message instanceof Message) { connection.statistic.addReceivedMessage(message); } @@ -890,12 +890,12 @@ public class Connection implements MessageListener { // First a seed node gets a message from a peer (PreliminaryDataRequest using // AnonymousMessage interface) which does not have its hidden service // published, so it does not know its address. As the IncomingConnection does not have the - // peersNodeAddress set that connection cannot be used for outgoing messages until we + // peersNodeAddress set that connection cannot be used for outgoing network_messages until we // get the address set. // At the data update message (DataRequest using SendersNodeAddressMessage interface) // after the HS is published we get the peer's address set. - // There are only those messages used for new connections to a peer: + // There are only those network_messages used for new connections to a peer: // 1. PreliminaryDataRequest // 2. DataRequest (implements SendersNodeAddressMessage) // 3. GetPeersRequest (implements SendersNodeAddressMessage) diff --git a/network/src/main/java/io/bisq/p2p/network/LocalhostNetworkNode.java b/network/src/main/java/io/bisq/p2p/network/LocalhostNetworkNode.java index f54ec0b9ab..ec787031a2 100644 --- a/network/src/main/java/io/bisq/p2p/network/LocalhostNetworkNode.java +++ b/network/src/main/java/io/bisq/p2p/network/LocalhostNetworkNode.java @@ -9,7 +9,7 @@ import com.msopentech.thali.java.toronionproxy.JavaOnionProxyManager; import io.bisq.app.Log; import io.bisq.common.UserThread; import io.bisq.common.util.Utilities; -import io.bisq.messages.NodeAddress; +import io.bisq.network_messages.NodeAddress; import io.nucleo.net.HiddenServiceDescriptor; import io.nucleo.net.TorNode; import org.jetbrains.annotations.NotNull; diff --git a/network/src/main/java/io/bisq/p2p/network/MessageListener.java b/network/src/main/java/io/bisq/p2p/network/MessageListener.java index fe5ce55e87..92cc8e2a02 100644 --- a/network/src/main/java/io/bisq/p2p/network/MessageListener.java +++ b/network/src/main/java/io/bisq/p2p/network/MessageListener.java @@ -1,6 +1,6 @@ package io.bisq.p2p.network; -import io.bisq.messages.Message; +import io.bisq.network_messages.Message; public interface MessageListener { void onMessage(Message message, Connection connection); diff --git a/network/src/main/java/io/bisq/p2p/network/NetworkNode.java b/network/src/main/java/io/bisq/p2p/network/NetworkNode.java index 0db8427aff..5c466e276f 100644 --- a/network/src/main/java/io/bisq/p2p/network/NetworkNode.java +++ b/network/src/main/java/io/bisq/p2p/network/NetworkNode.java @@ -5,8 +5,8 @@ import com.runjva.sourceforge.jsocks.protocol.Socks5Proxy; import io.bisq.app.Log; import io.bisq.common.UserThread; import io.bisq.common.util.Utilities; -import io.bisq.messages.Message; -import io.bisq.messages.NodeAddress; +import io.bisq.network_messages.Message; +import io.bisq.network_messages.NodeAddress; import javafx.beans.property.ObjectProperty; import javafx.beans.property.ReadOnlyObjectProperty; import javafx.beans.property.SimpleObjectProperty; diff --git a/network/src/main/java/io/bisq/p2p/network/OutboundConnection.java b/network/src/main/java/io/bisq/p2p/network/OutboundConnection.java index 2ddd5a268b..ea500eca68 100644 --- a/network/src/main/java/io/bisq/p2p/network/OutboundConnection.java +++ b/network/src/main/java/io/bisq/p2p/network/OutboundConnection.java @@ -1,6 +1,6 @@ package io.bisq.p2p.network; -import io.bisq.messages.NodeAddress; +import io.bisq.network_messages.NodeAddress; import java.net.Socket; diff --git a/network/src/main/java/io/bisq/p2p/network/ProtoBufferUtilities.java b/network/src/main/java/io/bisq/p2p/network/ProtoBufferUtilities.java index 9559cb5bb2..3f2ab42b9a 100644 --- a/network/src/main/java/io/bisq/p2p/network/ProtoBufferUtilities.java +++ b/network/src/main/java/io/bisq/p2p/network/ProtoBufferUtilities.java @@ -3,45 +3,45 @@ package io.bisq.p2p.network; import com.google.protobuf.ByteString; import io.bisq.common.wire.proto.Messages; import io.bisq.locale.CountryUtil; -import io.bisq.messages.CloseConnectionMessage; -import io.bisq.messages.Message; -import io.bisq.messages.NodeAddress; -import io.bisq.messages.alert.Alert; -import io.bisq.messages.alert.PrivateNotification; -import io.bisq.messages.alert.PrivateNotificationMessage; -import io.bisq.messages.arbitration.*; -import io.bisq.messages.arbitration.payload.Attachment; -import io.bisq.messages.availability.AvailabilityResult; -import io.bisq.messages.availability.OfferAvailabilityRequest; -import io.bisq.messages.availability.OfferAvailabilityResponse; -import io.bisq.messages.btc.data.RawTransactionInput; -import io.bisq.messages.crypto.PubKeyRing; -import io.bisq.messages.crypto.SealedAndSigned; -import io.bisq.messages.dao.compensation.payload.CompensationRequestPayload; -import io.bisq.messages.filter.payload.Filter; -import io.bisq.messages.filter.payload.PaymentAccountFilter; -import io.bisq.messages.p2p.messaging.PrefixedSealedAndSignedMessage; -import io.bisq.messages.payment.payload.*; -import io.bisq.messages.trade.offer.payload.OfferPayload; -import io.bisq.messages.trade.payload.Contract; -import io.bisq.messages.trade.protocol.trade.messages.*; -import io.bisq.messages.trade.statistics.payload.TradeStatistics; -import io.bisq.messages.p2p.peers.getdata.messages.GetDataResponse; -import io.bisq.messages.p2p.peers.getdata.messages.GetUpdatedDataRequest; -import io.bisq.messages.p2p.peers.getdata.messages.PreliminaryGetDataRequest; -import io.bisq.messages.p2p.peers.keepalive.messages.Ping; -import io.bisq.messages.p2p.peers.keepalive.messages.Pong; -import io.bisq.messages.p2p.peers.peerexchange.Peer; -import io.bisq.messages.p2p.peers.peerexchange.messages.GetPeersRequest; -import io.bisq.messages.p2p.peers.peerexchange.messages.GetPeersResponse; -import io.bisq.messages.p2p.storage.messages.AddDataMessage; -import io.bisq.messages.p2p.storage.messages.RefreshTTLMessage; -import io.bisq.messages.p2p.storage.messages.RemoveDataMessage; -import io.bisq.messages.p2p.storage.messages.RemoveMailboxDataMessage; -import io.bisq.messages.p2p.storage.storageentry.ProtectedMailboxStorageEntry; -import io.bisq.messages.p2p.storage.storageentry.ProtectedStorageEntry; -import io.bisq.payload.MailboxStoragePayload; -import io.bisq.payload.StoragePayload; +import io.bisq.network_messages.CloseConnectionMessage; +import io.bisq.network_messages.Message; +import io.bisq.network_messages.NodeAddress; +import io.bisq.network_messages.alert.Alert; +import io.bisq.network_messages.alert.PrivateNotification; +import io.bisq.network_messages.alert.PrivateNotificationMessage; +import io.bisq.network_messages.arbitration.*; +import io.bisq.network_messages.arbitration.payload.Attachment; +import io.bisq.network_messages.availability.AvailabilityResult; +import io.bisq.network_messages.availability.OfferAvailabilityRequest; +import io.bisq.network_messages.availability.OfferAvailabilityResponse; +import io.bisq.network_messages.btc.data.RawTransactionInput; +import io.bisq.network_messages.crypto.PubKeyRing; +import io.bisq.network_messages.crypto.SealedAndSigned; +import io.bisq.network_messages.dao.compensation.payload.CompensationRequestPayload; +import io.bisq.network_messages.filter.payload.Filter; +import io.bisq.network_messages.filter.payload.PaymentAccountFilter; +import io.bisq.network_messages.p2p.messaging.PrefixedSealedAndSignedMessage; +import io.bisq.network_messages.payment.payload.*; +import io.bisq.network_messages.trade.offer.payload.OfferPayload; +import io.bisq.network_messages.trade.payload.Contract; +import io.bisq.network_messages.trade.protocol.trade.messages.*; +import io.bisq.network_messages.trade.statistics.payload.TradeStatistics; +import io.bisq.network_messages.p2p.peers.getdata.messages.GetDataResponse; +import io.bisq.network_messages.p2p.peers.getdata.messages.GetUpdatedDataRequest; +import io.bisq.network_messages.p2p.peers.getdata.messages.PreliminaryGetDataRequest; +import io.bisq.network_messages.p2p.peers.keepalive.messages.Ping; +import io.bisq.network_messages.p2p.peers.keepalive.messages.Pong; +import io.bisq.network_messages.p2p.peers.peerexchange.Peer; +import io.bisq.network_messages.p2p.peers.peerexchange.messages.GetPeersRequest; +import io.bisq.network_messages.p2p.peers.peerexchange.messages.GetPeersResponse; +import io.bisq.network_messages.p2p.storage.messages.AddDataMessage; +import io.bisq.network_messages.p2p.storage.messages.RefreshTTLMessage; +import io.bisq.network_messages.p2p.storage.messages.RemoveDataMessage; +import io.bisq.network_messages.p2p.storage.messages.RemoveMailboxDataMessage; +import io.bisq.network_messages.p2p.storage.storageentry.ProtectedMailboxStorageEntry; +import io.bisq.network_messages.p2p.storage.storageentry.ProtectedStorageEntry; +import io.bisq.network_messages.payload.MailboxStoragePayload; +import io.bisq.network_messages.payload.StoragePayload; import io.bisq.user.Preferences; import lombok.extern.slf4j.Slf4j; import org.apache.commons.io.output.WriterOutputStream; diff --git a/network/src/main/java/io/bisq/p2p/network/Statistic.java b/network/src/main/java/io/bisq/p2p/network/Statistic.java index 7e5542c07b..c4d3fcb4e4 100644 --- a/network/src/main/java/io/bisq/p2p/network/Statistic.java +++ b/network/src/main/java/io/bisq/p2p/network/Statistic.java @@ -1,7 +1,7 @@ package io.bisq.p2p.network; import io.bisq.common.UserThread; -import io.bisq.messages.Message; +import io.bisq.network_messages.Message; import javafx.beans.property.IntegerProperty; import javafx.beans.property.LongProperty; import javafx.beans.property.SimpleIntegerProperty; diff --git a/network/src/main/java/io/bisq/p2p/network/TorNetworkNode.java b/network/src/main/java/io/bisq/p2p/network/TorNetworkNode.java index 6bf1cc96b4..4b9cd191b4 100644 --- a/network/src/main/java/io/bisq/p2p/network/TorNetworkNode.java +++ b/network/src/main/java/io/bisq/p2p/network/TorNetworkNode.java @@ -11,7 +11,7 @@ import io.bisq.app.Log; import io.bisq.common.Timer; import io.bisq.common.UserThread; import io.bisq.common.util.Utilities; -import io.bisq.messages.NodeAddress; +import io.bisq.network_messages.NodeAddress; import io.bisq.p2p.Utils; import io.nucleo.net.HiddenServiceDescriptor; import io.nucleo.net.JavaTorNode; diff --git a/network/src/main/java/io/bisq/p2p/peers/BanList.java b/network/src/main/java/io/bisq/p2p/peers/BanList.java index b710a4b73d..f22b66466d 100644 --- a/network/src/main/java/io/bisq/p2p/peers/BanList.java +++ b/network/src/main/java/io/bisq/p2p/peers/BanList.java @@ -1,6 +1,6 @@ package io.bisq.p2p.peers; -import io.bisq.messages.NodeAddress; +import io.bisq.network_messages.NodeAddress; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/network/src/main/java/io/bisq/p2p/peers/BroadcastHandler.java b/network/src/main/java/io/bisq/p2p/peers/BroadcastHandler.java index 0f0ee53c8b..32142aec0f 100644 --- a/network/src/main/java/io/bisq/p2p/peers/BroadcastHandler.java +++ b/network/src/main/java/io/bisq/p2p/peers/BroadcastHandler.java @@ -7,10 +7,10 @@ import io.bisq.app.Log; import io.bisq.common.Timer; import io.bisq.common.UserThread; import io.bisq.common.util.Utilities; -import io.bisq.messages.NodeAddress; +import io.bisq.network_messages.NodeAddress; import io.bisq.p2p.network.Connection; import io.bisq.p2p.network.NetworkNode; -import io.bisq.messages.p2p.storage.messages.BroadcastMessage; +import io.bisq.network_messages.p2p.storage.messages.BroadcastMessage; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import org.slf4j.Logger; diff --git a/network/src/main/java/io/bisq/p2p/peers/Broadcaster.java b/network/src/main/java/io/bisq/p2p/peers/Broadcaster.java index e6bd2b75a7..8c650f99d2 100644 --- a/network/src/main/java/io/bisq/p2p/peers/Broadcaster.java +++ b/network/src/main/java/io/bisq/p2p/peers/Broadcaster.java @@ -2,9 +2,9 @@ package io.bisq.p2p.peers; import io.bisq.app.Log; import io.bisq.common.util.Utilities; -import io.bisq.messages.NodeAddress; +import io.bisq.network_messages.NodeAddress; import io.bisq.p2p.network.NetworkNode; -import io.bisq.messages.p2p.storage.messages.BroadcastMessage; +import io.bisq.network_messages.p2p.storage.messages.BroadcastMessage; import org.jetbrains.annotations.Nullable; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/network/src/main/java/io/bisq/p2p/peers/PeerManager.java b/network/src/main/java/io/bisq/p2p/peers/PeerManager.java index a673e6fbe7..da7cbea6ee 100644 --- a/network/src/main/java/io/bisq/p2p/peers/PeerManager.java +++ b/network/src/main/java/io/bisq/p2p/peers/PeerManager.java @@ -4,9 +4,9 @@ import io.bisq.app.Log; import io.bisq.common.Clock; import io.bisq.common.Timer; import io.bisq.common.UserThread; -import io.bisq.messages.NodeAddress; +import io.bisq.network_messages.NodeAddress; import io.bisq.p2p.network.*; -import io.bisq.messages.p2p.peers.peerexchange.Peer; +import io.bisq.network_messages.p2p.peers.peerexchange.Peer; import io.bisq.storage.Storage; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/network/src/main/java/io/bisq/p2p/peers/getdata/GetDataRequestHandler.java b/network/src/main/java/io/bisq/p2p/peers/getdata/GetDataRequestHandler.java index 77f8e09409..57d56d78ac 100644 --- a/network/src/main/java/io/bisq/p2p/peers/getdata/GetDataRequestHandler.java +++ b/network/src/main/java/io/bisq/p2p/peers/getdata/GetDataRequestHandler.java @@ -10,13 +10,13 @@ import io.bisq.common.util.Utilities; import io.bisq.p2p.network.CloseConnectionReason; import io.bisq.p2p.network.Connection; import io.bisq.p2p.network.NetworkNode; -import io.bisq.messages.p2p.peers.getdata.messages.GetDataRequest; -import io.bisq.messages.p2p.peers.getdata.messages.GetDataResponse; -import io.bisq.messages.p2p.peers.getdata.messages.GetUpdatedDataRequest; +import io.bisq.network_messages.p2p.peers.getdata.messages.GetDataRequest; +import io.bisq.network_messages.p2p.peers.getdata.messages.GetDataResponse; +import io.bisq.network_messages.p2p.peers.getdata.messages.GetUpdatedDataRequest; import io.bisq.p2p.storage.P2PDataStorage; -import io.bisq.payload.CapabilityRequiringPayload; -import io.bisq.payload.StoragePayload; -import io.bisq.messages.p2p.storage.storageentry.ProtectedStorageEntry; +import io.bisq.network_messages.payload.CapabilityRequiringPayload; +import io.bisq.network_messages.payload.StoragePayload; +import io.bisq.network_messages.p2p.storage.storageentry.ProtectedStorageEntry; import org.jetbrains.annotations.NotNull; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/network/src/main/java/io/bisq/p2p/peers/getdata/RequestDataHandler.java b/network/src/main/java/io/bisq/p2p/peers/getdata/RequestDataHandler.java index 8d4789a08e..2f454dc28c 100644 --- a/network/src/main/java/io/bisq/p2p/peers/getdata/RequestDataHandler.java +++ b/network/src/main/java/io/bisq/p2p/peers/getdata/RequestDataHandler.java @@ -6,22 +6,22 @@ import com.google.common.util.concurrent.SettableFuture; import io.bisq.app.Log; import io.bisq.common.Timer; import io.bisq.common.UserThread; -import io.bisq.messages.Message; -import io.bisq.messages.NodeAddress; +import io.bisq.network_messages.Message; +import io.bisq.network_messages.NodeAddress; import io.bisq.p2p.network.CloseConnectionReason; import io.bisq.p2p.network.Connection; import io.bisq.p2p.network.MessageListener; import io.bisq.p2p.network.NetworkNode; import io.bisq.p2p.peers.PeerManager; -import io.bisq.messages.p2p.peers.getdata.messages.GetDataRequest; -import io.bisq.messages.p2p.peers.getdata.messages.GetDataResponse; -import io.bisq.messages.p2p.peers.getdata.messages.GetUpdatedDataRequest; -import io.bisq.messages.p2p.peers.getdata.messages.PreliminaryGetDataRequest; +import io.bisq.network_messages.p2p.peers.getdata.messages.GetDataRequest; +import io.bisq.network_messages.p2p.peers.getdata.messages.GetDataResponse; +import io.bisq.network_messages.p2p.peers.getdata.messages.GetUpdatedDataRequest; +import io.bisq.network_messages.p2p.peers.getdata.messages.PreliminaryGetDataRequest; import io.bisq.p2p.storage.P2PDataStorage; -import io.bisq.payload.LazyProcessedStoragePayload; -import io.bisq.payload.PersistedStoragePayload; -import io.bisq.payload.StoragePayload; -import io.bisq.messages.p2p.storage.storageentry.ProtectedStorageEntry; +import io.bisq.network_messages.payload.LazyProcessedStoragePayload; +import io.bisq.network_messages.payload.PersistedStoragePayload; +import io.bisq.network_messages.payload.StoragePayload; +import io.bisq.network_messages.p2p.storage.storageentry.ProtectedStorageEntry; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import org.slf4j.Logger; diff --git a/network/src/main/java/io/bisq/p2p/peers/getdata/RequestDataManager.java b/network/src/main/java/io/bisq/p2p/peers/getdata/RequestDataManager.java index f0681a4cfe..a4eda65f60 100644 --- a/network/src/main/java/io/bisq/p2p/peers/getdata/RequestDataManager.java +++ b/network/src/main/java/io/bisq/p2p/peers/getdata/RequestDataManager.java @@ -3,12 +3,12 @@ package io.bisq.p2p.peers.getdata; import io.bisq.app.Log; import io.bisq.common.Timer; import io.bisq.common.UserThread; -import io.bisq.messages.Message; -import io.bisq.messages.NodeAddress; +import io.bisq.network_messages.Message; +import io.bisq.network_messages.NodeAddress; import io.bisq.p2p.network.*; import io.bisq.p2p.peers.PeerManager; -import io.bisq.messages.p2p.peers.getdata.messages.GetDataRequest; -import io.bisq.messages.p2p.peers.peerexchange.Peer; +import io.bisq.network_messages.p2p.peers.getdata.messages.GetDataRequest; +import io.bisq.network_messages.p2p.peers.peerexchange.Peer; import io.bisq.p2p.storage.P2PDataStorage; import org.jetbrains.annotations.Nullable; import org.slf4j.Logger; diff --git a/network/src/main/java/io/bisq/p2p/peers/keepalive/KeepAliveHandler.java b/network/src/main/java/io/bisq/p2p/peers/keepalive/KeepAliveHandler.java index 7e6987655c..d483ea4a3d 100644 --- a/network/src/main/java/io/bisq/p2p/peers/keepalive/KeepAliveHandler.java +++ b/network/src/main/java/io/bisq/p2p/peers/keepalive/KeepAliveHandler.java @@ -6,13 +6,13 @@ import com.google.common.util.concurrent.SettableFuture; import io.bisq.app.Log; import io.bisq.common.Timer; import io.bisq.common.UserThread; -import io.bisq.messages.Message; +import io.bisq.network_messages.Message; import io.bisq.p2p.network.Connection; import io.bisq.p2p.network.MessageListener; import io.bisq.p2p.network.NetworkNode; import io.bisq.p2p.peers.PeerManager; -import io.bisq.messages.p2p.peers.keepalive.messages.Ping; -import io.bisq.messages.p2p.peers.keepalive.messages.Pong; +import io.bisq.network_messages.p2p.peers.keepalive.messages.Ping; +import io.bisq.network_messages.p2p.peers.keepalive.messages.Pong; import org.jetbrains.annotations.NotNull; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/network/src/main/java/io/bisq/p2p/peers/keepalive/KeepAliveManager.java b/network/src/main/java/io/bisq/p2p/peers/keepalive/KeepAliveManager.java index c16cacdde2..0e202707ab 100644 --- a/network/src/main/java/io/bisq/p2p/peers/keepalive/KeepAliveManager.java +++ b/network/src/main/java/io/bisq/p2p/peers/keepalive/KeepAliveManager.java @@ -6,11 +6,11 @@ import com.google.common.util.concurrent.SettableFuture; import io.bisq.app.Log; import io.bisq.common.Timer; import io.bisq.common.UserThread; -import io.bisq.messages.Message; +import io.bisq.network_messages.Message; import io.bisq.p2p.network.*; import io.bisq.p2p.peers.PeerManager; -import io.bisq.messages.p2p.peers.keepalive.messages.Ping; -import io.bisq.messages.p2p.peers.keepalive.messages.Pong; +import io.bisq.network_messages.p2p.peers.keepalive.messages.Ping; +import io.bisq.network_messages.p2p.peers.keepalive.messages.Pong; import org.jetbrains.annotations.NotNull; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/network/src/main/java/io/bisq/p2p/peers/peerexchange/GetPeersRequestHandler.java b/network/src/main/java/io/bisq/p2p/peers/peerexchange/GetPeersRequestHandler.java index 597231acd0..ab913372a8 100644 --- a/network/src/main/java/io/bisq/p2p/peers/peerexchange/GetPeersRequestHandler.java +++ b/network/src/main/java/io/bisq/p2p/peers/peerexchange/GetPeersRequestHandler.java @@ -10,8 +10,8 @@ import io.bisq.p2p.network.CloseConnectionReason; import io.bisq.p2p.network.Connection; import io.bisq.p2p.network.NetworkNode; import io.bisq.p2p.peers.PeerManager; -import io.bisq.messages.p2p.peers.peerexchange.messages.GetPeersRequest; -import io.bisq.messages.p2p.peers.peerexchange.messages.GetPeersResponse; +import io.bisq.network_messages.p2p.peers.peerexchange.messages.GetPeersRequest; +import io.bisq.network_messages.p2p.peers.peerexchange.messages.GetPeersResponse; import org.jetbrains.annotations.NotNull; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/network/src/main/java/io/bisq/p2p/peers/peerexchange/PeerExchangeHandler.java b/network/src/main/java/io/bisq/p2p/peers/peerexchange/PeerExchangeHandler.java index 6b85bcaf60..ec7cde51ae 100644 --- a/network/src/main/java/io/bisq/p2p/peers/peerexchange/PeerExchangeHandler.java +++ b/network/src/main/java/io/bisq/p2p/peers/peerexchange/PeerExchangeHandler.java @@ -6,15 +6,15 @@ import com.google.common.util.concurrent.SettableFuture; import io.bisq.app.Log; import io.bisq.common.Timer; import io.bisq.common.UserThread; -import io.bisq.messages.Message; -import io.bisq.messages.NodeAddress; +import io.bisq.network_messages.Message; +import io.bisq.network_messages.NodeAddress; import io.bisq.p2p.network.CloseConnectionReason; import io.bisq.p2p.network.Connection; import io.bisq.p2p.network.MessageListener; import io.bisq.p2p.network.NetworkNode; import io.bisq.p2p.peers.PeerManager; -import io.bisq.messages.p2p.peers.peerexchange.messages.GetPeersRequest; -import io.bisq.messages.p2p.peers.peerexchange.messages.GetPeersResponse; +import io.bisq.network_messages.p2p.peers.peerexchange.messages.GetPeersRequest; +import io.bisq.network_messages.p2p.peers.peerexchange.messages.GetPeersResponse; import org.jetbrains.annotations.NotNull; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/network/src/main/java/io/bisq/p2p/peers/peerexchange/PeerExchangeManager.java b/network/src/main/java/io/bisq/p2p/peers/peerexchange/PeerExchangeManager.java index eaa3272707..450fd8d321 100644 --- a/network/src/main/java/io/bisq/p2p/peers/peerexchange/PeerExchangeManager.java +++ b/network/src/main/java/io/bisq/p2p/peers/peerexchange/PeerExchangeManager.java @@ -4,12 +4,12 @@ import com.google.common.base.Preconditions; import io.bisq.app.Log; import io.bisq.common.Timer; import io.bisq.common.UserThread; -import io.bisq.messages.Message; -import io.bisq.messages.NodeAddress; -import io.bisq.messages.p2p.peers.peerexchange.Peer; +import io.bisq.network_messages.Message; +import io.bisq.network_messages.NodeAddress; +import io.bisq.network_messages.p2p.peers.peerexchange.Peer; import io.bisq.p2p.network.*; import io.bisq.p2p.peers.PeerManager; -import io.bisq.messages.p2p.peers.peerexchange.messages.GetPeersRequest; +import io.bisq.network_messages.p2p.peers.peerexchange.messages.GetPeersRequest; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/network/src/main/java/io/bisq/p2p/protocol/availability/Offer.java b/network/src/main/java/io/bisq/p2p/protocol/availability/Offer.java index d4074c950f..4b1161f9d0 100644 --- a/network/src/main/java/io/bisq/p2p/protocol/availability/Offer.java +++ b/network/src/main/java/io/bisq/p2p/protocol/availability/Offer.java @@ -5,13 +5,13 @@ import io.bisq.common.handlers.ResultHandler; import io.bisq.common.util.JsonExclude; import io.bisq.common.util.MathUtils; import io.bisq.locale.CurrencyUtil; -import io.bisq.messages.NodeAddress; -import io.bisq.messages.crypto.KeyRing; -import io.bisq.messages.crypto.PubKeyRing; -import io.bisq.messages.payment.PaymentMethod; -import io.bisq.messages.trade.exceptions.MarketPriceNotAvailableException; -import io.bisq.messages.trade.exceptions.TradePriceOutOfToleranceException; -import io.bisq.messages.trade.offer.payload.OfferPayload; +import io.bisq.network_messages.NodeAddress; +import io.bisq.network_messages.crypto.KeyRing; +import io.bisq.network_messages.crypto.PubKeyRing; +import io.bisq.network_messages.payment.PaymentMethod; +import io.bisq.network_messages.trade.exceptions.MarketPriceNotAvailableException; +import io.bisq.network_messages.trade.exceptions.TradePriceOutOfToleranceException; +import io.bisq.network_messages.trade.offer.payload.OfferPayload; import io.bisq.provider.price.MarketPrice; import io.bisq.provider.price.PriceFeedService; import javafx.beans.property.*; diff --git a/network/src/main/java/io/bisq/p2p/protocol/availability/OfferAvailabilityModel.java b/network/src/main/java/io/bisq/p2p/protocol/availability/OfferAvailabilityModel.java index 8d987d0f30..6152b763c0 100644 --- a/network/src/main/java/io/bisq/p2p/protocol/availability/OfferAvailabilityModel.java +++ b/network/src/main/java/io/bisq/p2p/protocol/availability/OfferAvailabilityModel.java @@ -18,9 +18,9 @@ package io.bisq.p2p.protocol.availability; import io.bisq.common.taskrunner.Model; -import io.bisq.messages.NodeAddress; -import io.bisq.messages.availability.OfferAvailabilityResponse; -import io.bisq.messages.crypto.PubKeyRing; +import io.bisq.network_messages.NodeAddress; +import io.bisq.network_messages.availability.OfferAvailabilityResponse; +import io.bisq.network_messages.crypto.PubKeyRing; import io.bisq.p2p.storage.P2PService; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/network/src/main/java/io/bisq/p2p/protocol/availability/OfferAvailabilityProtocol.java b/network/src/main/java/io/bisq/p2p/protocol/availability/OfferAvailabilityProtocol.java index 2d14707807..37406b247f 100644 --- a/network/src/main/java/io/bisq/p2p/protocol/availability/OfferAvailabilityProtocol.java +++ b/network/src/main/java/io/bisq/p2p/protocol/availability/OfferAvailabilityProtocol.java @@ -22,12 +22,12 @@ import io.bisq.common.UserThread; import io.bisq.common.handlers.ErrorMessageHandler; import io.bisq.common.handlers.ResultHandler; import io.bisq.common.taskrunner.TaskRunner; -import io.bisq.messages.DecryptedDirectMessageListener; -import io.bisq.messages.Message; -import io.bisq.messages.availability.OfferAvailabilityResponse; -import io.bisq.messages.availability.OfferMessage; -import io.bisq.messages.trade.offer.payload.OfferPayload; -import io.bisq.messages.util.Validator; +import io.bisq.network_messages.DecryptedDirectMessageListener; +import io.bisq.network_messages.Message; +import io.bisq.network_messages.availability.OfferAvailabilityResponse; +import io.bisq.network_messages.availability.OfferMessage; +import io.bisq.network_messages.trade.offer.payload.OfferPayload; +import io.bisq.network_messages.util.Validator; import io.bisq.protocol.availability.tasks.ProcessOfferAvailabilityResponse; import io.bisq.protocol.availability.tasks.SendOfferAvailabilityRequest; import org.slf4j.Logger; diff --git a/network/src/main/java/io/bisq/p2p/seed/SeedNodesRepository.java b/network/src/main/java/io/bisq/p2p/seed/SeedNodesRepository.java index 334f73852f..632e4ad719 100644 --- a/network/src/main/java/io/bisq/p2p/seed/SeedNodesRepository.java +++ b/network/src/main/java/io/bisq/p2p/seed/SeedNodesRepository.java @@ -2,7 +2,7 @@ package io.bisq.p2p.seed; import com.google.common.collect.Sets; import io.bisq.app.DevEnv; -import io.bisq.messages.NodeAddress; +import io.bisq.network_messages.NodeAddress; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/network/src/main/java/io/bisq/p2p/storage/HashMapChangedListener.java b/network/src/main/java/io/bisq/p2p/storage/HashMapChangedListener.java index e939556221..e4f3945ac9 100644 --- a/network/src/main/java/io/bisq/p2p/storage/HashMapChangedListener.java +++ b/network/src/main/java/io/bisq/p2p/storage/HashMapChangedListener.java @@ -1,6 +1,6 @@ package io.bisq.p2p.storage; -import io.bisq.messages.p2p.storage.storageentry.ProtectedStorageEntry; +import io.bisq.network_messages.p2p.storage.storageentry.ProtectedStorageEntry; public interface HashMapChangedListener { void onAdded(ProtectedStorageEntry data); diff --git a/network/src/main/java/io/bisq/p2p/storage/P2PDataStorage.java b/network/src/main/java/io/bisq/p2p/storage/P2PDataStorage.java index 50d6b740c5..113fb5d6b5 100644 --- a/network/src/main/java/io/bisq/p2p/storage/P2PDataStorage.java +++ b/network/src/main/java/io/bisq/p2p/storage/P2PDataStorage.java @@ -11,16 +11,17 @@ import io.bisq.common.persistance.Persistable; import io.bisq.common.util.Tuple2; import io.bisq.common.util.Utilities; import io.bisq.common.wire.proto.Messages; -import io.bisq.messages.Message; -import io.bisq.messages.NodeAddress; -import io.bisq.messages.ToProtoBuffer; -import io.bisq.messages.crypto.Hash; +import io.bisq.network_messages.Message; +import io.bisq.network_messages.NodeAddress; +import io.bisq.network_messages.ToProtoBuffer; +import io.bisq.network_messages.crypto.Hash; +import io.bisq.network_messages.payload.*; import io.bisq.p2p.network.*; import io.bisq.p2p.peers.BroadcastHandler; import io.bisq.p2p.peers.Broadcaster; -import io.bisq.messages.p2p.storage.messages.*; -import io.bisq.messages.p2p.storage.storageentry.ProtectedMailboxStorageEntry; -import io.bisq.messages.p2p.storage.storageentry.ProtectedStorageEntry; +import io.bisq.network_messages.p2p.storage.messages.*; +import io.bisq.network_messages.p2p.storage.storageentry.ProtectedMailboxStorageEntry; +import io.bisq.network_messages.p2p.storage.storageentry.ProtectedStorageEntry; import io.bisq.payload.*; import io.bisq.storage.FileUtil; import io.bisq.storage.ResourceNotFoundException; @@ -125,7 +126,7 @@ public class P2PDataStorage implements MessageListener, ConnectionListener { removeExpiredEntriesTimer = UserThread.runPeriodically(() -> { log.trace("removeExpiredEntries"); // The moment when an object becomes expired will not be synchronous in the network and we could - // get add messages after the object has expired. To avoid repeated additions of already expired + // get add network_messages after the object has expired. To avoid repeated additions of already expired // object when we get it sent from new peers, we don’t remove the sequence number from the map. // That way an ADD message for an already expired data will fail because the sequence number // is equal and not larger as expected. @@ -497,7 +498,7 @@ public class P2PDataStorage implements MessageListener, ConnectionListener { String msg; if (newSequenceNumber == 0) { msg = "Sequence number is equal to the stored one and both are 0." + - "That is expected for messages which never got updated (mailbox msg)."; + "That is expected for network_messages which never got updated (mailbox msg)."; } else { msg = "Sequence number is equal to the stored one. sequenceNumber = " + newSequenceNumber + " / storedSequenceNumber=" + storedSequenceNumber; @@ -536,7 +537,7 @@ public class P2PDataStorage implements MessageListener, ConnectionListener { } // Check that the pubkey of the storage entry matches the allowed pubkey for the addition or removal operation - // in the contained mailbox message, or the pubkey of other kinds of messages. + // in the contained mailbox message, or the pubkey of other kinds of network_messages. boolean checkPublicKeys(ProtectedStorageEntry protectedStorageEntry, boolean isAddOperation) { boolean result; if (protectedStorageEntry.getStoragePayload() instanceof MailboxStoragePayload) { diff --git a/network/src/main/java/io/bisq/p2p/storage/P2PService.java b/network/src/main/java/io/bisq/p2p/storage/P2PService.java index ea595e04dc..6b84d2bc93 100644 --- a/network/src/main/java/io/bisq/p2p/storage/P2PService.java +++ b/network/src/main/java/io/bisq/p2p/storage/P2PService.java @@ -13,13 +13,13 @@ import io.bisq.common.UserThread; import io.bisq.common.crypto.CryptoException; import io.bisq.common.util.Utilities; import io.bisq.crypto.EncryptionService; -import io.bisq.messages.DecryptedDirectMessageListener; -import io.bisq.messages.DecryptedMsgWithPubKey; -import io.bisq.messages.Message; -import io.bisq.messages.NodeAddress; -import io.bisq.messages.crypto.KeyRing; -import io.bisq.messages.crypto.PubKeyRing; -import io.bisq.messages.p2p.messaging.*; +import io.bisq.network_messages.DecryptedDirectMessageListener; +import io.bisq.network_messages.DecryptedMsgWithPubKey; +import io.bisq.network_messages.Message; +import io.bisq.network_messages.NodeAddress; +import io.bisq.network_messages.crypto.KeyRing; +import io.bisq.network_messages.crypto.PubKeyRing; +import io.bisq.network_messages.p2p.messaging.*; import io.bisq.network.NetworkOptionKeys; import io.bisq.network.Socks5ProxyProvider; import io.bisq.p2p.P2PServiceListener; @@ -32,13 +32,13 @@ import io.bisq.p2p.peers.getdata.RequestDataManager; import io.bisq.p2p.peers.keepalive.KeepAliveManager; import io.bisq.p2p.peers.peerexchange.PeerExchangeManager; import io.bisq.p2p.seed.SeedNodesRepository; -import io.bisq.messages.p2p.storage.messages.AddDataMessage; -import io.bisq.messages.p2p.storage.messages.BroadcastMessage; -import io.bisq.messages.p2p.storage.messages.RefreshTTLMessage; -import io.bisq.messages.p2p.storage.storageentry.ProtectedMailboxStorageEntry; -import io.bisq.messages.p2p.storage.storageentry.ProtectedStorageEntry; -import io.bisq.payload.MailboxStoragePayload; -import io.bisq.payload.StoragePayload; +import io.bisq.network_messages.p2p.storage.messages.AddDataMessage; +import io.bisq.network_messages.p2p.storage.messages.BroadcastMessage; +import io.bisq.network_messages.p2p.storage.messages.RefreshTTLMessage; +import io.bisq.network_messages.p2p.storage.storageentry.ProtectedMailboxStorageEntry; +import io.bisq.network_messages.p2p.storage.storageentry.ProtectedStorageEntry; +import io.bisq.network_messages.payload.MailboxStoragePayload; +import io.bisq.network_messages.payload.StoragePayload; import io.bisq.storage.FileUtil; import io.bisq.storage.Storage; import javafx.beans.property.*; @@ -532,7 +532,7 @@ public class P2PService implements SetupListener, MessageListener, ConnectionLis private void processProtectedMailboxStorageEntry(ProtectedMailboxStorageEntry protectedMailboxStorageEntry) { Log.traceCall(); final NodeAddress nodeAddress = networkNode.getNodeAddress(); - // Seed nodes don't receive mailbox messages + // Seed nodes don't receive mailbox network_messages if (optionalEncryptionService.isPresent() && nodeAddress != null && !seedNodesRepository.isSeedNode(nodeAddress)) { Log.traceCall(); MailboxStoragePayload mailboxStoragePayload = protectedMailboxStorageEntry.getMailboxStoragePayload(); @@ -544,7 +544,7 @@ public class P2PService implements SetupListener, MessageListener, ConnectionLis if (decryptedMsgWithPubKey.message instanceof MailboxMessage) { MailboxMessage mailboxMessage = (MailboxMessage) decryptedMsgWithPubKey.message; NodeAddress senderNodeAddress = mailboxMessage.getSenderNodeAddress(); - checkNotNull(senderNodeAddress, "senderAddress must not be null for mailbox messages"); + checkNotNull(senderNodeAddress, "senderAddress must not be null for mailbox network_messages"); mailboxMap.put(mailboxMessage.getUID(), protectedMailboxStorageEntry); log.trace("Decryption of SealedAndSignedMessage succeeded. senderAddress=" @@ -659,7 +659,7 @@ public class P2PService implements SetupListener, MessageListener, ConnectionLis // does not arrive. // We could use onBroadcastCompleted instead but it might take too long if one peer // is very badly connected. - // TODO We could check for a certain threshold of no. of incoming messages of the same msg + // TODO We could check for a certain threshold of no. of incoming network_messages of the same msg // to see how well it is propagated. BitcoinJ uses such an approach for tx propagation. UserThread.runAfter(() -> { log.info("Broadcasted to first peer (with 3 sec. delayed): Message = {}", Utilities.toTruncatedString(message)); @@ -705,7 +705,7 @@ public class P2PService implements SetupListener, MessageListener, ConnectionLis public void removeEntryFromMailbox(DecryptedMsgWithPubKey decryptedMsgWithPubKey) { // We need to delay a bit to avoid that we remove our msg then get it from other peers again and reapply it again. - // If we delay the removal we have better chances that repeated messages we got from other peers are already filtered + // If we delay the removal we have better chances that repeated network_messages we got from other peers are already filtered // at the P2PService layer. // Though we have to check in the client classes to not apply the same message again as there is no guarantee // when we would get a message again from the network. diff --git a/network/src/main/java/io/bisq/protocol/availability/tasks/ProcessOfferAvailabilityResponse.java b/network/src/main/java/io/bisq/protocol/availability/tasks/ProcessOfferAvailabilityResponse.java index bc0e327ae8..41c069c271 100644 --- a/network/src/main/java/io/bisq/protocol/availability/tasks/ProcessOfferAvailabilityResponse.java +++ b/network/src/main/java/io/bisq/protocol/availability/tasks/ProcessOfferAvailabilityResponse.java @@ -19,9 +19,9 @@ package io.bisq.protocol.availability.tasks; import io.bisq.common.taskrunner.Task; import io.bisq.common.taskrunner.TaskRunner; -import io.bisq.messages.availability.AvailabilityResult; -import io.bisq.messages.availability.OfferAvailabilityResponse; -import io.bisq.messages.trade.offer.payload.OfferPayload; +import io.bisq.network_messages.availability.AvailabilityResult; +import io.bisq.network_messages.availability.OfferAvailabilityResponse; +import io.bisq.network_messages.trade.offer.payload.OfferPayload; import io.bisq.p2p.protocol.availability.OfferAvailabilityModel; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/network/src/main/java/io/bisq/protocol/availability/tasks/SendOfferAvailabilityRequest.java b/network/src/main/java/io/bisq/protocol/availability/tasks/SendOfferAvailabilityRequest.java index 066d01c0af..7825ff1939 100644 --- a/network/src/main/java/io/bisq/protocol/availability/tasks/SendOfferAvailabilityRequest.java +++ b/network/src/main/java/io/bisq/protocol/availability/tasks/SendOfferAvailabilityRequest.java @@ -19,9 +19,9 @@ package io.bisq.protocol.availability.tasks; import io.bisq.common.taskrunner.Task; import io.bisq.common.taskrunner.TaskRunner; -import io.bisq.messages.availability.OfferAvailabilityRequest; -import io.bisq.messages.p2p.messaging.SendDirectMessageListener; -import io.bisq.messages.trade.offer.payload.OfferPayload; +import io.bisq.network_messages.availability.OfferAvailabilityRequest; +import io.bisq.network_messages.p2p.messaging.SendDirectMessageListener; +import io.bisq.network_messages.trade.offer.payload.OfferPayload; import io.bisq.p2p.protocol.availability.OfferAvailabilityModel; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/network/src/main/java/io/bisq/user/Preferences.java b/network/src/main/java/io/bisq/user/Preferences.java index 8d1ab0425a..b73766386c 100644 --- a/network/src/main/java/io/bisq/user/Preferences.java +++ b/network/src/main/java/io/bisq/user/Preferences.java @@ -23,9 +23,9 @@ import io.bisq.app.Version; import io.bisq.common.persistance.Persistable; import io.bisq.common.util.Utilities; import io.bisq.locale.*; -import io.bisq.messages.btc.BitcoinNetwork; -import io.bisq.messages.btc.BtcOptionKeys; -import io.bisq.messages.btc.Restrictions; +import io.bisq.network_messages.btc.BitcoinNetwork; +import io.bisq.network_messages.btc.BtcOptionKeys; +import io.bisq.network_messages.btc.Restrictions; import io.bisq.provider.fee.FeeService; import io.bisq.storage.Storage; import javafx.beans.property.*; diff --git a/network/src/test/java/io/bisq/crypto/EncryptionServiceTests.java b/network/src/test/java/io/bisq/crypto/EncryptionServiceTests.java index f24603887d..e56883e9a3 100644 --- a/network/src/test/java/io/bisq/crypto/EncryptionServiceTests.java +++ b/network/src/test/java/io/bisq/crypto/EncryptionServiceTests.java @@ -21,13 +21,13 @@ package io.bisq.crypto; import io.bisq.app.Version; import io.bisq.common.crypto.CryptoException; import io.bisq.common.wire.proto.Messages; -import io.bisq.messages.DecryptedMsgWithPubKey; -import io.bisq.messages.Message; -import io.bisq.messages.NodeAddress; -import io.bisq.messages.crypto.*; -import io.bisq.messages.p2p.messaging.MailboxMessage; -import io.bisq.messages.p2p.messaging.PrefixedSealedAndSignedMessage; -import io.bisq.messages.p2p.peers.keepalive.messages.Ping; +import io.bisq.network_messages.DecryptedMsgWithPubKey; +import io.bisq.network_messages.Message; +import io.bisq.network_messages.NodeAddress; +import io.bisq.network_messages.crypto.*; +import io.bisq.network_messages.p2p.messaging.MailboxMessage; +import io.bisq.network_messages.p2p.messaging.PrefixedSealedAndSignedMessage; +import io.bisq.network_messages.p2p.peers.keepalive.messages.Ping; import io.bisq.storage.FileUtil; import org.bouncycastle.jce.provider.BouncyCastleProvider; import org.junit.After; diff --git a/network/src/test/java/io/bisq/messages/alert/AlertTest.java b/network/src/test/java/io/bisq/messages/alert/AlertTest.java index b4435718bd..7d988a0658 100644 --- a/network/src/test/java/io/bisq/messages/alert/AlertTest.java +++ b/network/src/test/java/io/bisq/messages/alert/AlertTest.java @@ -17,6 +17,7 @@ package io.bisq.messages.alert; +import io.bisq.network_messages.alert.Alert; import org.junit.Test; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/network/src/test/java/io/bisq/messages/payment/payload/OKPayAccountContractDataTest.java b/network/src/test/java/io/bisq/messages/payment/payload/OKPayAccountContractDataTest.java index 773064a38c..b1fdfe35e9 100644 --- a/network/src/test/java/io/bisq/messages/payment/payload/OKPayAccountContractDataTest.java +++ b/network/src/test/java/io/bisq/messages/payment/payload/OKPayAccountContractDataTest.java @@ -2,6 +2,7 @@ package io.bisq.messages.payment.payload; import com.google.protobuf.util.JsonFormat; import io.bisq.common.wire.proto.Messages; +import io.bisq.network_messages.payment.payload.OKPayAccountContractData; import org.junit.Test; import java.io.IOException; diff --git a/network/src/test/java/io/bisq/p2p/DummySeedNode.java b/network/src/test/java/io/bisq/p2p/DummySeedNode.java index 3042225644..529c39b249 100644 --- a/network/src/test/java/io/bisq/p2p/DummySeedNode.java +++ b/network/src/test/java/io/bisq/p2p/DummySeedNode.java @@ -8,7 +8,7 @@ import io.bisq.common.Clock; import io.bisq.common.CommonOptionKeys; import io.bisq.common.UserThread; import io.bisq.common.util.Utilities; -import io.bisq.messages.NodeAddress; +import io.bisq.network_messages.NodeAddress; import io.bisq.network.NetworkOptionKeys; import io.bisq.p2p.peers.BanList; import io.bisq.p2p.seed.SeedNodesRepository; diff --git a/network/src/test/java/io/bisq/p2p/PeerServiceTest.java b/network/src/test/java/io/bisq/p2p/PeerServiceTest.java index c651b8cdd4..e2950e7275 100644 --- a/network/src/test/java/io/bisq/p2p/PeerServiceTest.java +++ b/network/src/test/java/io/bisq/p2p/PeerServiceTest.java @@ -1,6 +1,6 @@ package io.bisq.p2p; -import io.bisq.messages.NodeAddress; +import io.bisq.network_messages.NodeAddress; import io.bisq.p2p.network.LocalhostNetworkNode; import io.bisq.p2p.storage.P2PService; import org.junit.After; diff --git a/network/src/test/java/io/bisq/p2p/TestUtils.java b/network/src/test/java/io/bisq/p2p/TestUtils.java index 90de79376f..0a69cbb58f 100644 --- a/network/src/test/java/io/bisq/p2p/TestUtils.java +++ b/network/src/test/java/io/bisq/p2p/TestUtils.java @@ -2,8 +2,8 @@ package io.bisq.p2p; import io.bisq.common.Clock; import io.bisq.crypto.EncryptionService; -import io.bisq.messages.NodeAddress; -import io.bisq.messages.crypto.KeyRing; +import io.bisq.network_messages.NodeAddress; +import io.bisq.network_messages.crypto.KeyRing; import io.bisq.p2p.seed.SeedNodesRepository; import io.bisq.p2p.storage.P2PService; import org.slf4j.Logger; diff --git a/network/src/test/java/io/bisq/p2p/mocks/MockMailboxPayload.java b/network/src/test/java/io/bisq/p2p/mocks/MockMailboxPayload.java index a8e66f3aca..e4c761864e 100644 --- a/network/src/test/java/io/bisq/p2p/mocks/MockMailboxPayload.java +++ b/network/src/test/java/io/bisq/p2p/mocks/MockMailboxPayload.java @@ -2,9 +2,9 @@ package io.bisq.p2p.mocks; import io.bisq.app.Version; import io.bisq.common.wire.proto.Messages; -import io.bisq.messages.NodeAddress; -import io.bisq.messages.p2p.messaging.MailboxMessage; -import io.bisq.payload.ExpirablePayload; +import io.bisq.network_messages.NodeAddress; +import io.bisq.network_messages.p2p.messaging.MailboxMessage; +import io.bisq.network_messages.payload.ExpirablePayload; import sun.reflect.generics.reflectiveObjects.NotImplementedException; import java.util.UUID; diff --git a/network/src/test/java/io/bisq/p2p/mocks/MockPayload.java b/network/src/test/java/io/bisq/p2p/mocks/MockPayload.java index 25468f3856..c060643e5b 100644 --- a/network/src/test/java/io/bisq/p2p/mocks/MockPayload.java +++ b/network/src/test/java/io/bisq/p2p/mocks/MockPayload.java @@ -2,8 +2,8 @@ package io.bisq.p2p.mocks; import io.bisq.app.Version; import io.bisq.common.wire.proto.Messages; -import io.bisq.messages.Message; -import io.bisq.payload.ExpirablePayload; +import io.bisq.network_messages.Message; +import io.bisq.network_messages.payload.ExpirablePayload; import sun.reflect.generics.reflectiveObjects.NotImplementedException; public final class MockPayload implements Message, ExpirablePayload { diff --git a/network/src/test/java/io/bisq/p2p/network/NetworkStressTest.java b/network/src/test/java/io/bisq/p2p/network/NetworkStressTest.java index 05c578dfed..b6e41f7faf 100644 --- a/network/src/test/java/io/bisq/p2p/network/NetworkStressTest.java +++ b/network/src/test/java/io/bisq/p2p/network/NetworkStressTest.java @@ -6,13 +6,13 @@ import io.bisq.common.UserThread; import io.bisq.common.util.Tuple3; import io.bisq.common.wire.proto.Messages; import io.bisq.crypto.EncryptionService; -import io.bisq.messages.DecryptedDirectMessageListener; -import io.bisq.messages.DecryptedMsgWithPubKey; -import io.bisq.messages.NodeAddress; -import io.bisq.messages.crypto.KeyRing; -import io.bisq.messages.crypto.KeyStorage; -import io.bisq.messages.crypto.PubKeyRing; -import io.bisq.messages.p2p.messaging.*; +import io.bisq.network_messages.DecryptedDirectMessageListener; +import io.bisq.network_messages.DecryptedMsgWithPubKey; +import io.bisq.network_messages.NodeAddress; +import io.bisq.network_messages.crypto.KeyRing; +import io.bisq.network_messages.crypto.KeyStorage; +import io.bisq.network_messages.crypto.PubKeyRing; +import io.bisq.network_messages.p2p.messaging.*; import io.bisq.p2p.DummySeedNode; import io.bisq.p2p.P2PServiceListener; import io.bisq.p2p.Utils; @@ -60,7 +60,7 @@ public class NetworkStressTest { // Test parameters /** - * Whether to log messages less important than warnings. + * Whether to log network_messages less important than warnings. */ private static final boolean USE_DETAILED_LOGGING = false; @@ -75,11 +75,11 @@ public class NetworkStressTest { */ private static final String TEST_DIR_ENVVAR = "STRESS_TEST_DIR"; /** - * Environment variable to specify the number of direct messages sent per peer. + * Environment variable to specify the number of direct network_messages sent per peer. */ private static final String DIRECT_COUNT_ENVVAR = "STRESS_TEST_NDIRECT"; /** - * Environment variable to specify the number of mailbox messages sent per peer. + * Environment variable to specify the number of mailbox network_messages sent per peer. */ private static final String MAILBOX_COUNT_ENVVAR = "STRESS_TEST_NMAILBOX"; @@ -93,15 +93,15 @@ public class NetworkStressTest { */ private static final int NPEERS_DEFAULT = 4; /** - * Minimum number of peers for the test to work (2 for direct messages, 3 for mailbox messages). + * Minimum number of peers for the test to work (2 for direct network_messages, 3 for mailbox network_messages). */ private static final int NPEERS_MIN = 3; /** - * Default number of direct messages to be sent by each peer. + * Default number of direct network_messages to be sent by each peer. */ private static final int DIRECT_COUNT_DEFAULT = 100; /** - * Default number of mailbox messages to be sent by each peer. + * Default number of mailbox network_messages to be sent by each peer. */ private static final int MAILBOX_COUNT_DEFAULT = 100; @@ -118,11 +118,11 @@ public class NetworkStressTest { */ private static long MAX_SHUTDOWN_DELAY_SECS = 2; /** - * Minimum delay between direct messages in milliseconds, 25% larger than throttle limit. + * Minimum delay between direct network_messages in milliseconds, 25% larger than throttle limit. */ private static long MIN_DIRECT_DELAY_MILLIS = Math.round(1.25 * (1.0 / Connection.MSG_THROTTLE_PER_SEC) * 1000); /** - * Maximum delay between direct messages in milliseconds, 10 times larger than minimum. + * Maximum delay between direct network_messages in milliseconds, 10 times larger than minimum. */ private static long MAX_DIRECT_DELAY_MILLIS = 10 * MIN_DIRECT_DELAY_MILLIS; /** @@ -166,11 +166,11 @@ public class NetworkStressTest { private List peerPKRings = new ArrayList<>(); /** - * Number of direct messages to be sent by each peer. + * Number of direct network_messages to be sent by each peer. */ private int directCount = DIRECT_COUNT_DEFAULT; /** - * Number of mailbox messages to be sent by each peer. + * Number of mailbox network_messages to be sent by each peer. */ private int mailboxCount = MAILBOX_COUNT_DEFAULT; @@ -559,7 +559,7 @@ public class NetworkStressTest { for (final P2PService srcPeer : peerNodes) { final NodeAddress srcPeerAddress = srcPeer.getAddress(); - // Make the peer ready for receiving direct messages. + // Make the peer ready for receiving direct network_messages. srcPeer.addDecryptedDirectMessageListener((decryptedMsgWithPubKey, peerNodeAddress) -> { if (!(decryptedMsgWithPubKey.message instanceof StressTestDirectMessage)) return; @@ -606,23 +606,23 @@ public class NetworkStressTest { ); } } - print("%d direct messages scheduled to be sent by each of %d peers", directCount, nPeers); + print("%d direct network_messages scheduled to be sent by each of %d peers", directCount, nPeers); // Since receiving is completed before sending is reported to be complete, // all receiving checks should end before all sending checks to avoid deadlocking. - /** Time to transmit all messages in the worst random case, and with no computation delays. */ + /** Time to transmit all network_messages in the worst random case, and with no computation delays. */ final long idealMaxDirectDelay = MAX_DIRECT_DELAY_MILLIS * directCount; // Wait for peers to complete receiving. We are generous here. - assertLatch("timed out while receiving direct messages", + assertLatch("timed out while receiving direct network_messages", receivedDirectLatch, 25 * idealMaxDirectDelay, TimeUnit.MILLISECONDS); final long recvMillis = System.currentTimeMillis() - sendStartMillis; - print("receiving %d direct messages per peer took %ss (%.2f x ideal max)", + print("receiving %d direct network_messages per peer took %ss (%.2f x ideal max)", directCount, recvMillis / 1000.0, recvMillis / (float) idealMaxDirectDelay); // Wait for peers to complete sending. // This should be nearly instantaneous after waiting for reception is completed. - assertLatch("timed out while sending direct messages", + assertLatch("timed out while sending direct network_messages", sentDirectLatch, idealMaxDirectDelay / 10, TimeUnit.MILLISECONDS); Tuple3 mma = minMaxAvg(sentDelays); - print("sending %d direct messages per peer took %ss (min/max/avg %s/%s/%s ms)", + print("sending %d direct network_messages per peer took %ss (min/max/avg %s/%s/%s ms)", directCount, (System.currentTimeMillis() - sendStartMillis) / 1000.0, mma.first, mma.second, mma.third); org.junit.Assert.assertFalse("some peer(s) failed to send a direct message", sentDirectFailed.get()); @@ -632,16 +632,16 @@ public class NetworkStressTest { // # DIRECT + MAILBOX SENDING AND RECEIVING /** - * Test sending and receiving mailbox messages. + * Test sending and receiving mailbox network_messages. */ @Test public void test_mailbox() throws InterruptedException { // We start by putting the first half of peers online and the second one offline. - // Then the first online peer sends a number of messages to random peers (regardless of their state), - // so that some messages are delivered directly and others into a mailbox. + // Then the first online peer sends a number of network_messages to random peers (regardless of their state), + // so that some network_messages are delivered directly and others into a mailbox. // Then the first online peer is put offline and the last offline peer is put online - // (so it can get its mailbox messages), - // and the new first online node sends messages. + // (so it can get its mailbox network_messages), + // and the new first online node sends network_messages. // This is repeated until all nodes have been online and offline. final int nPeers = peerNodes.size(); @@ -649,7 +649,7 @@ public class NetworkStressTest { // depending on whether the message goes direct or via mailbox. final CountDownLatch receivedMailboxLatch = new CountDownLatch(mailboxCount * nPeers); - // Configure the first half of peers to receive messages... + // Configure the first half of peers to receive network_messages... int firstPeerDown = (int) Math.ceil(nPeers / 2.0); for (P2PService peer : peerNodes.subList(0, firstPeerDown)) { addMailboxListeners(peer, receivedMailboxLatch); @@ -665,13 +665,13 @@ public class NetworkStressTest { // Cycle through peers sending to others, stopping the peer // and starting one of the stopped peers. - print("%d mailbox messages to be sent by each of %d peers", mailboxCount, nPeers); + print("%d mailbox network_messages to be sent by each of %d peers", mailboxCount, nPeers); BooleanProperty sentMailboxFailed = new SimpleBooleanProperty(false); final long sendStartMillis = System.currentTimeMillis(); for (int firstOnline = 0, firstOffline = firstPeerDown; firstOnline < nPeers; firstOnline++, firstOffline = ++firstOffline % nPeers) { - // The first online peer sends messages to random other peers. + // The first online peer sends network_messages to random other peers. final P2PService onlinePeer = peerNodes.get(firstOnline); final NodeAddress onlinePeerAddress = onlinePeer.getAddress(); final CountDownLatch sendLatch = new CountDownLatch(mailboxCount); @@ -729,12 +729,12 @@ public class NetworkStressTest { TimeUnit.SECONDS); //print("put peer %d online", firstOffline); } - /** Time to transmit all messages with the estimated per-message delay, with no computation delays. */ + /** Time to transmit all network_messages with the estimated per-message delay, with no computation delays. */ final long idealMaxMailboxDelay = 2 * MAILBOX_DELAY_SECS * 1000 * nPeers * mailboxCount; - assertLatch("timed out while receiving mailbox messages", + assertLatch("timed out while receiving mailbox network_messages", receivedMailboxLatch, idealMaxMailboxDelay, TimeUnit.MILLISECONDS); final long recvMillis = System.currentTimeMillis() - sendStartMillis; - print("receiving %d mailbox messages per peer took %ss (%.2f x ideal max)", + print("receiving %d mailbox network_messages per peer took %ss (%.2f x ideal max)", mailboxCount, recvMillis / 1000.0, recvMillis / (float) idealMaxMailboxDelay); org.junit.Assert.assertFalse("some peer(s) failed to send a message", sentMailboxFailed.get()); } diff --git a/network/src/test/java/io/bisq/p2p/network/ProtoBufferUtilitiesTest.java b/network/src/test/java/io/bisq/p2p/network/ProtoBufferUtilitiesTest.java index a60e670d5f..0deaa7a152 100644 --- a/network/src/test/java/io/bisq/p2p/network/ProtoBufferUtilitiesTest.java +++ b/network/src/test/java/io/bisq/p2p/network/ProtoBufferUtilitiesTest.java @@ -1,7 +1,7 @@ package io.bisq.p2p.network; import io.bisq.common.wire.proto.Messages; -import io.bisq.messages.trade.offer.payload.OfferPayload; +import io.bisq.network_messages.trade.offer.payload.OfferPayload; import org.junit.Test; import static org.junit.Assert.assertEquals; diff --git a/network/src/test/java/io/bisq/p2p/network/TorNetworkNodeTest.java b/network/src/test/java/io/bisq/p2p/network/TorNetworkNodeTest.java index 5b63a77338..337a5eb75d 100644 --- a/network/src/test/java/io/bisq/p2p/network/TorNetworkNodeTest.java +++ b/network/src/test/java/io/bisq/p2p/network/TorNetworkNodeTest.java @@ -3,7 +3,7 @@ package io.bisq.p2p.network; import com.google.common.util.concurrent.FutureCallback; import com.google.common.util.concurrent.Futures; import com.google.common.util.concurrent.SettableFuture; -import io.bisq.messages.Message; +import io.bisq.network_messages.Message; import io.bisq.p2p.mocks.MockPayload; import org.bouncycastle.jce.provider.BouncyCastleProvider; import org.jetbrains.annotations.NotNull; diff --git a/network/src/test/java/io/bisq/p2p/routing/PeerManagerTest.java b/network/src/test/java/io/bisq/p2p/routing/PeerManagerTest.java index 2f7f41b689..f96448df0b 100644 --- a/network/src/test/java/io/bisq/p2p/routing/PeerManagerTest.java +++ b/network/src/test/java/io/bisq/p2p/routing/PeerManagerTest.java @@ -1,6 +1,6 @@ package io.bisq.p2p.routing; -import io.bisq.messages.NodeAddress; +import io.bisq.network_messages.NodeAddress; import io.bisq.p2p.DummySeedNode; import io.bisq.p2p.P2PServiceListener; import io.bisq.p2p.network.LocalhostNetworkNode; diff --git a/network/src/test/java/io/bisq/p2p/storage/P2PDataStorageTest.java b/network/src/test/java/io/bisq/p2p/storage/P2PDataStorageTest.java index 60fdfaf6b8..2052fddba9 100644 --- a/network/src/test/java/io/bisq/p2p/storage/P2PDataStorageTest.java +++ b/network/src/test/java/io/bisq/p2p/storage/P2PDataStorageTest.java @@ -8,20 +8,20 @@ import io.bisq.common.crypto.Sig; import io.bisq.common.util.Utilities; import io.bisq.common.wire.proto.Messages; import io.bisq.crypto.EncryptionService; -import io.bisq.messages.NodeAddress; -import io.bisq.messages.alert.Alert; -import io.bisq.messages.crypto.Hash; -import io.bisq.messages.crypto.KeyRing; -import io.bisq.messages.crypto.KeyStorage; -import io.bisq.messages.trade.offer.payload.OfferPayload; +import io.bisq.network_messages.NodeAddress; +import io.bisq.network_messages.alert.Alert; +import io.bisq.network_messages.crypto.Hash; +import io.bisq.network_messages.crypto.KeyRing; +import io.bisq.network_messages.crypto.KeyStorage; +import io.bisq.network_messages.trade.offer.payload.OfferPayload; import io.bisq.p2p.TestUtils; import io.bisq.p2p.network.NetworkNode; import io.bisq.p2p.network.ProtoBufferUtilities; import io.bisq.p2p.peers.Broadcaster; import io.bisq.p2p.storage.mocks.MockData; import io.bisq.storage.FileUtil; -import io.bisq.messages.p2p.storage.storageentry.ProtectedStorageEntry; -import io.bisq.payload.StoragePayload; +import io.bisq.network_messages.p2p.storage.storageentry.ProtectedStorageEntry; +import io.bisq.network_messages.payload.StoragePayload; import lombok.extern.slf4j.Slf4j; import mockit.Mocked; import mockit.integration.junit4.JMockit; diff --git a/network/src/test/java/io/bisq/p2p/storage/ProtectedDataStorageTest.java b/network/src/test/java/io/bisq/p2p/storage/ProtectedDataStorageTest.java index 40c947a305..c335e8c426 100644 --- a/network/src/test/java/io/bisq/p2p/storage/ProtectedDataStorageTest.java +++ b/network/src/test/java/io/bisq/p2p/storage/ProtectedDataStorageTest.java @@ -4,17 +4,17 @@ import io.bisq.common.UserThread; import io.bisq.common.crypto.CryptoException; import io.bisq.common.crypto.Sig; import io.bisq.crypto.EncryptionService; -import io.bisq.messages.NodeAddress; -import io.bisq.messages.crypto.Hash; -import io.bisq.messages.crypto.KeyRing; -import io.bisq.messages.crypto.KeyStorage; +import io.bisq.network_messages.NodeAddress; +import io.bisq.network_messages.crypto.Hash; +import io.bisq.network_messages.crypto.KeyRing; +import io.bisq.network_messages.crypto.KeyStorage; import io.bisq.p2p.TestUtils; import io.bisq.p2p.network.NetworkNode; import io.bisq.p2p.peers.PeerManager; -import io.bisq.messages.p2p.storage.messages.RefreshTTLMessage; +import io.bisq.network_messages.p2p.storage.messages.RefreshTTLMessage; import io.bisq.p2p.storage.mocks.MockData; import io.bisq.storage.FileUtil; -import io.bisq.messages.p2p.storage.storageentry.ProtectedStorageEntry; +import io.bisq.network_messages.p2p.storage.storageentry.ProtectedStorageEntry; import org.bouncycastle.jce.provider.BouncyCastleProvider; import org.junit.*; import org.slf4j.Logger; diff --git a/network/src/test/java/io/bisq/p2p/storage/messages/AddDataMessageTest.java b/network/src/test/java/io/bisq/p2p/storage/messages/AddDataMessageTest.java index 5c1280c91b..6c3d9cc18e 100644 --- a/network/src/test/java/io/bisq/p2p/storage/messages/AddDataMessageTest.java +++ b/network/src/test/java/io/bisq/p2p/storage/messages/AddDataMessageTest.java @@ -2,16 +2,16 @@ package io.bisq.p2p.storage.messages; import io.bisq.common.crypto.CryptoException; import io.bisq.common.wire.proto.Messages; -import io.bisq.messages.NodeAddress; -import io.bisq.messages.crypto.KeyRing; -import io.bisq.messages.crypto.KeyStorage; -import io.bisq.messages.crypto.SealedAndSigned; -import io.bisq.messages.p2p.messaging.PrefixedSealedAndSignedMessage; -import io.bisq.messages.p2p.storage.messages.AddDataMessage; +import io.bisq.network_messages.NodeAddress; +import io.bisq.network_messages.crypto.KeyRing; +import io.bisq.network_messages.crypto.KeyStorage; +import io.bisq.network_messages.crypto.SealedAndSigned; +import io.bisq.network_messages.p2p.messaging.PrefixedSealedAndSignedMessage; +import io.bisq.network_messages.p2p.storage.messages.AddDataMessage; import io.bisq.p2p.network.ProtoBufferUtilities; -import io.bisq.messages.p2p.storage.storageentry.ProtectedMailboxStorageEntry; -import io.bisq.messages.p2p.storage.storageentry.ProtectedStorageEntry; -import io.bisq.payload.MailboxStoragePayload; +import io.bisq.network_messages.p2p.storage.storageentry.ProtectedMailboxStorageEntry; +import io.bisq.network_messages.p2p.storage.storageentry.ProtectedStorageEntry; +import io.bisq.network_messages.payload.MailboxStoragePayload; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.RandomUtils; import org.bouncycastle.jce.provider.BouncyCastleProvider; diff --git a/network/src/test/java/io/bisq/p2p/storage/mocks/MockData.java b/network/src/test/java/io/bisq/p2p/storage/mocks/MockData.java index 88fcfc06bd..10455563ec 100644 --- a/network/src/test/java/io/bisq/p2p/storage/mocks/MockData.java +++ b/network/src/test/java/io/bisq/p2p/storage/mocks/MockData.java @@ -1,7 +1,7 @@ package io.bisq.p2p.storage.mocks; import io.bisq.common.wire.proto.Messages; -import io.bisq.payload.StoragePayload; +import io.bisq.network_messages.payload.StoragePayload; import sun.reflect.generics.reflectiveObjects.NotImplementedException; import java.security.PublicKey; diff --git a/seednode/src/main/java/io/bisq/seednode/SeedNodeModule.java b/seednode/src/main/java/io/bisq/seednode/SeedNodeModule.java index 3898e6aace..8ffccf1b98 100644 --- a/seednode/src/main/java/io/bisq/seednode/SeedNodeModule.java +++ b/seednode/src/main/java/io/bisq/seednode/SeedNodeModule.java @@ -24,8 +24,8 @@ import io.bisq.app.BisqEnvironment; import io.bisq.arbitration.ArbitratorModule; import io.bisq.btc.BitcoinModule; import io.bisq.common.Clock; -import io.bisq.messages.crypto.KeyRing; -import io.bisq.messages.crypto.KeyStorage; +import io.bisq.network_messages.crypto.KeyRing; +import io.bisq.network_messages.crypto.KeyStorage; import io.bisq.crypto.EncryptionServiceModule; import io.bisq.dao.DaoModule; import io.bisq.filter.FilterModule; diff --git a/statistics/src/main/java/io/bisq/statistics/StatisticsModule.java b/statistics/src/main/java/io/bisq/statistics/StatisticsModule.java index 934b1956cd..d94e14ef2c 100644 --- a/statistics/src/main/java/io/bisq/statistics/StatisticsModule.java +++ b/statistics/src/main/java/io/bisq/statistics/StatisticsModule.java @@ -24,8 +24,8 @@ import io.bisq.app.BisqEnvironment; import io.bisq.arbitration.ArbitratorModule; import io.bisq.btc.BitcoinModule; import io.bisq.common.Clock; -import io.bisq.messages.crypto.KeyRing; -import io.bisq.messages.crypto.KeyStorage; +import io.bisq.network_messages.crypto.KeyRing; +import io.bisq.network_messages.crypto.KeyStorage; import io.bisq.crypto.EncryptionServiceModule; import io.bisq.dao.DaoModule; import io.bisq.filter.FilterModule; From 7ed46912cb5add6dd0683bcaec1a9676a769b925 Mon Sep 17 00:00:00 2001 From: Mike Rosseel Date: Thu, 16 Mar 2017 17:08:27 +0100 Subject: [PATCH 7/7] move tests --- .../test/java/io/bisq/network_messages}/alert/AlertTest.java | 3 +-- .../io/bisq/{ => network_messages}/crypto/EncryptionTest.java | 4 +--- .../java/io/bisq/{ => network_messages}/crypto/SigTest.java | 4 +--- .../payment/payload/OKPayAccountContractDataTest.java | 2 +- network/src/main/java/io/bisq/p2p/storage/P2PDataStorage.java | 1 - 5 files changed, 4 insertions(+), 10 deletions(-) rename {network/src/test/java/io/bisq/messages => network-messages/src/test/java/io/bisq/network_messages}/alert/AlertTest.java (95%) rename network-messages/src/test/java/io/bisq/{ => network_messages}/crypto/EncryptionTest.java (90%) rename network-messages/src/test/java/io/bisq/{ => network_messages}/crypto/SigTest.java (94%) rename {network/src/test/java/io/bisq/messages => network-messages/src/test/java/io/bisq/network_messages}/payment/payload/OKPayAccountContractDataTest.java (95%) diff --git a/network/src/test/java/io/bisq/messages/alert/AlertTest.java b/network-messages/src/test/java/io/bisq/network_messages/alert/AlertTest.java similarity index 95% rename from network/src/test/java/io/bisq/messages/alert/AlertTest.java rename to network-messages/src/test/java/io/bisq/network_messages/alert/AlertTest.java index 7d988a0658..7b26bd1b34 100644 --- a/network/src/test/java/io/bisq/messages/alert/AlertTest.java +++ b/network-messages/src/test/java/io/bisq/network_messages/alert/AlertTest.java @@ -15,9 +15,8 @@ * along with bisq. If not, see . */ -package io.bisq.messages.alert; +package io.bisq.network_messages.alert; -import io.bisq.network_messages.alert.Alert; import org.junit.Test; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/network-messages/src/test/java/io/bisq/crypto/EncryptionTest.java b/network-messages/src/test/java/io/bisq/network_messages/crypto/EncryptionTest.java similarity index 90% rename from network-messages/src/test/java/io/bisq/crypto/EncryptionTest.java rename to network-messages/src/test/java/io/bisq/network_messages/crypto/EncryptionTest.java index 9276245c60..416279b1ca 100644 --- a/network-messages/src/test/java/io/bisq/crypto/EncryptionTest.java +++ b/network-messages/src/test/java/io/bisq/network_messages/crypto/EncryptionTest.java @@ -1,8 +1,6 @@ -package io.bisq.crypto; +package io.bisq.network_messages.crypto; import io.bisq.common.crypto.CryptoException; -import io.bisq.network_messages.crypto.KeyRing; -import io.bisq.network_messages.crypto.KeyStorage; import io.bisq.storage.FileUtil; import org.bouncycastle.jce.provider.BouncyCastleProvider; import org.junit.After; diff --git a/network-messages/src/test/java/io/bisq/crypto/SigTest.java b/network-messages/src/test/java/io/bisq/network_messages/crypto/SigTest.java similarity index 94% rename from network-messages/src/test/java/io/bisq/crypto/SigTest.java rename to network-messages/src/test/java/io/bisq/network_messages/crypto/SigTest.java index b72a5c81ff..4a13634481 100644 --- a/network-messages/src/test/java/io/bisq/crypto/SigTest.java +++ b/network-messages/src/test/java/io/bisq/network_messages/crypto/SigTest.java @@ -1,9 +1,7 @@ -package io.bisq.crypto; +package io.bisq.network_messages.crypto; import io.bisq.common.crypto.CryptoException; import io.bisq.common.crypto.Sig; -import io.bisq.network_messages.crypto.KeyRing; -import io.bisq.network_messages.crypto.KeyStorage; import io.bisq.storage.FileUtil; import org.bouncycastle.jce.provider.BouncyCastleProvider; import org.junit.After; diff --git a/network/src/test/java/io/bisq/messages/payment/payload/OKPayAccountContractDataTest.java b/network-messages/src/test/java/io/bisq/network_messages/payment/payload/OKPayAccountContractDataTest.java similarity index 95% rename from network/src/test/java/io/bisq/messages/payment/payload/OKPayAccountContractDataTest.java rename to network-messages/src/test/java/io/bisq/network_messages/payment/payload/OKPayAccountContractDataTest.java index b1fdfe35e9..a2f315b57d 100644 --- a/network/src/test/java/io/bisq/messages/payment/payload/OKPayAccountContractDataTest.java +++ b/network-messages/src/test/java/io/bisq/network_messages/payment/payload/OKPayAccountContractDataTest.java @@ -1,4 +1,4 @@ -package io.bisq.messages.payment.payload; +package io.bisq.network_messages.payment.payload; import com.google.protobuf.util.JsonFormat; import io.bisq.common.wire.proto.Messages; diff --git a/network/src/main/java/io/bisq/p2p/storage/P2PDataStorage.java b/network/src/main/java/io/bisq/p2p/storage/P2PDataStorage.java index 113fb5d6b5..36be21a24e 100644 --- a/network/src/main/java/io/bisq/p2p/storage/P2PDataStorage.java +++ b/network/src/main/java/io/bisq/p2p/storage/P2PDataStorage.java @@ -22,7 +22,6 @@ import io.bisq.p2p.peers.Broadcaster; import io.bisq.network_messages.p2p.storage.messages.*; import io.bisq.network_messages.p2p.storage.storageentry.ProtectedMailboxStorageEntry; import io.bisq.network_messages.p2p.storage.storageentry.ProtectedStorageEntry; -import io.bisq.payload.*; import io.bisq.storage.FileUtil; import io.bisq.storage.ResourceNotFoundException; import io.bisq.storage.Storage;