From 041d8ec7a7917c52ff32b198d2a17cb8335b8c10 Mon Sep 17 00:00:00 2001 From: Chris Beams Date: Thu, 2 Oct 2014 15:30:17 +0200 Subject: [PATCH] Upgrade to BitcoinJ 0.12-SNAPSHOT - Update imports to reflect BitcoinJ's repackaging, including: git grep -l 'import com.google.bitcoin' | \ xargs perl -p -i -e 's/import com.google.bitcoin/import org.bitcoinj/' git grep -l 'com.google.bitcoin' | \ xargs perl -p -i -e 's/com.google.bitcoin/org.bitcoinj/' - Replace use of BitcoinJ's CoinFormat, which has now been renamed to MonetaryFormat, using: git grep -l 'CoinFormat' | \ xargs perl -p -i -e 's/CoinFormat/MonetaryFormat/g' - Fix calls to BitcoinJ's Script#correctlySpends, whose signature has changed from 0.11 => 0.12. See #98 --- .idea/codeStyleSettings.xml | 2 +- build.gradle | 3 +- .../btc/AddressBasedCoinSelector.java | 20 +++--- .../java/io/bitsquare/btc/AddressEntry.java | 8 +-- src/main/java/io/bitsquare/btc/FeePolicy.java | 10 +-- .../java/io/bitsquare/btc/Restrictions.java | 4 +- .../java/io/bitsquare/btc/WalletFacade.java | 62 +++++++++---------- .../listeners/AddressConfidenceListener.java | 4 +- .../btc/listeners/BalanceListener.java | 4 +- .../btc/listeners/TxConfidenceListener.java | 2 +- .../io/bitsquare/crypto/CryptoFacade.java | 8 +-- .../java/io/bitsquare/di/BitSquareModule.java | 8 +-- .../gui/components/AddressTextField.java | 4 +- .../gui/components/BalanceTextField.java | 6 +- .../io/bitsquare/gui/components/Popups.java | 2 +- .../gui/components/TxIdTextField.java | 2 +- .../ArbitratorRegistrationViewCB.java | 12 ++-- .../registration/RegistrationModel.java | 6 +- .../content/registration/RegistrationPM.java | 4 +- .../restrictions/RestrictionsModel.java | 4 +- .../transactions/TransactionsListItem.java | 10 +-- .../transactions/TransactionsViewCB.java | 2 +- .../funds/withdrawal/WithdrawalListItem.java | 6 +- .../funds/withdrawal/WithdrawalViewCB.java | 8 +-- .../orders/pending/PendingTradesModel.java | 10 +-- .../gui/main/trade/TradeNavigator.java | 4 +- .../bitsquare/gui/main/trade/TradeViewCB.java | 4 +- .../trade/createoffer/CreateOfferModel.java | 6 +- .../main/trade/createoffer/CreateOfferPM.java | 6 +- .../trade/createoffer/CreateOfferViewCB.java | 4 +- .../main/trade/orderbook/OrderBookModel.java | 6 +- .../gui/main/trade/orderbook/OrderBookPM.java | 4 +- .../main/trade/takeoffer/TakeOfferModel.java | 6 +- .../gui/main/trade/takeoffer/TakeOfferPM.java | 4 +- .../main/trade/takeoffer/TakeOfferViewCB.java | 2 +- .../io/bitsquare/gui/util/BSFormatter.java | 28 ++++----- .../util/validation/BtcAddressValidator.java | 6 +- .../gui/util/validation/BtcValidator.java | 2 +- .../util/validation/OptionalBtcValidator.java | 2 +- .../io/bitsquare/persistence/Persistence.java | 2 +- .../java/io/bitsquare/settings/Settings.java | 6 +- .../java/io/bitsquare/trade/Contract.java | 2 +- src/main/java/io/bitsquare/trade/Offer.java | 6 +- src/main/java/io/bitsquare/trade/Trade.java | 6 +- .../java/io/bitsquare/trade/TradeManager.java | 6 +- .../handlers/TransactionResultHandler.java | 2 +- .../createoffer/CreateOfferCoordinator.java | 2 +- .../tasks/BroadCastOfferFeeTx.java | 2 +- .../createoffer/tasks/CreateOfferFeeTx.java | 2 +- .../offerer/BuyerAcceptsOfferProtocol.java | 8 +-- .../BuyerAcceptsOfferProtocolListener.java | 2 +- .../messages/BankTransferInitedMessage.java | 2 +- .../trade/offerer/tasks/CreateDepositTx.java | 8 +-- .../offerer/tasks/SendDepositTxIdToTaker.java | 4 +- .../offerer/tasks/SendSignedPayoutTx.java | 4 +- ...etupListenerForBlockChainConfirmation.java | 4 +- .../tasks/SignAndPublishDepositTx.java | 2 +- .../offerer/tasks/VerifyAndSignContract.java | 4 +- .../trade/taker/SellerTakesOfferProtocol.java | 6 +- .../SellerTakesOfferProtocolListener.java | 2 +- .../messages/TakeOfferFeePayedMessage.java | 2 +- .../taker/tasks/CreateAndSignContract.java | 4 +- .../trade/taker/tasks/PayDeposit.java | 6 +- .../trade/taker/tasks/PayTakeOfferFee.java | 4 +- .../tasks/SendSignedTakerDepositTxAsHex.java | 4 +- .../tasks/SendTakeOfferFeePayedTxId.java | 2 +- .../taker/tasks/SignAndPublishPayoutTx.java | 6 +- .../java/io/bitsquare/util/DSAKeyUtil.java | 2 +- src/main/java/io/bitsquare/util/FileUtil.java | 2 +- .../java/io/bitsquare/util/Utilities.java | 4 +- .../java/io/bitsquare/util/Validator.java | 2 +- src/main/resources/logback.xml | 24 +++---- .../io/bitsquare/btc/RestrictionsTest.java | 4 +- .../trade/createoffer/CreateOfferPMTest.java | 4 +- .../bitsquare/gui/util/BSFormatterTest.java | 2 +- .../gui/util/validation/BtcValidatorTest.java | 4 +- 76 files changed, 227 insertions(+), 226 deletions(-) diff --git a/.idea/codeStyleSettings.xml b/.idea/codeStyleSettings.xml index 6d74efc6dfc..e0138f2f2ad 100644 --- a/.idea/codeStyleSettings.xml +++ b/.idea/codeStyleSettings.xml @@ -18,7 +18,7 @@ - + diff --git a/build.gradle b/build.gradle index bf26e8866eb..f85f9c3850d 100644 --- a/build.gradle +++ b/build.gradle @@ -24,11 +24,12 @@ task executableJar(type: OneJar) { repositories { jcenter() + maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' } maven { url 'http://partnerdemo.artifactoryonline.com/partnerdemo/libs-snapshots-local' } } dependencies { - compile 'com.google:bitcoinj:0.12.308de4e-SNAPSHOT' + compile 'org.bitcoinj:bitcoinj-core:0.12-SNAPSHOT' compile 'net.tomp2p:tomp2p-all:5.0-Alpha24.805623c-SNAPSHOT' compile 'org.slf4j:slf4j-api:1.7.7' compile 'ch.qos.logback:logback-core:1.1.2' diff --git a/src/main/java/io/bitsquare/btc/AddressBasedCoinSelector.java b/src/main/java/io/bitsquare/btc/AddressBasedCoinSelector.java index deec179cdd5..b1260cd2fc7 100644 --- a/src/main/java/io/bitsquare/btc/AddressBasedCoinSelector.java +++ b/src/main/java/io/bitsquare/btc/AddressBasedCoinSelector.java @@ -17,15 +17,15 @@ package io.bitsquare.btc; -import com.google.bitcoin.core.Address; -import com.google.bitcoin.core.Coin; -import com.google.bitcoin.core.NetworkParameters; -import com.google.bitcoin.core.Transaction; -import com.google.bitcoin.core.TransactionConfidence; -import com.google.bitcoin.core.TransactionOutput; -import com.google.bitcoin.params.RegTestParams; -import com.google.bitcoin.wallet.CoinSelection; -import com.google.bitcoin.wallet.DefaultCoinSelector; +import org.bitcoinj.core.Address; +import org.bitcoinj.core.Coin; +import org.bitcoinj.core.NetworkParameters; +import org.bitcoinj.core.Transaction; +import org.bitcoinj.core.TransactionConfidence; +import org.bitcoinj.core.TransactionOutput; +import org.bitcoinj.params.RegTestParams; +import org.bitcoinj.wallet.CoinSelection; +import org.bitcoinj.wallet.DefaultCoinSelector; import com.google.common.annotations.VisibleForTesting; @@ -40,7 +40,7 @@ import org.slf4j.LoggerFactory; /** - * This class implements a {@link com.google.bitcoin.wallet.CoinSelector} which attempts to get the highest priority + * This class implements a {@link org.bitcoinj.wallet.CoinSelector} which attempts to get the highest priority * possible. This means that the transaction is the most likely to get confirmed. Note that this means we may end up * "spending" more priority than would be required to get the transaction we are creating confirmed. */ diff --git a/src/main/java/io/bitsquare/btc/AddressEntry.java b/src/main/java/io/bitsquare/btc/AddressEntry.java index 077f7653b68..797a7814ffb 100644 --- a/src/main/java/io/bitsquare/btc/AddressEntry.java +++ b/src/main/java/io/bitsquare/btc/AddressEntry.java @@ -17,10 +17,10 @@ package io.bitsquare.btc; -import com.google.bitcoin.core.Address; -import com.google.bitcoin.core.NetworkParameters; -import com.google.bitcoin.core.Utils; -import com.google.bitcoin.crypto.DeterministicKey; +import org.bitcoinj.core.Address; +import org.bitcoinj.core.NetworkParameters; +import org.bitcoinj.core.Utils; +import org.bitcoinj.crypto.DeterministicKey; import java.io.Serializable; diff --git a/src/main/java/io/bitsquare/btc/FeePolicy.java b/src/main/java/io/bitsquare/btc/FeePolicy.java index 32ac55fd9aa..27e1b9c274e 100644 --- a/src/main/java/io/bitsquare/btc/FeePolicy.java +++ b/src/main/java/io/bitsquare/btc/FeePolicy.java @@ -17,11 +17,11 @@ package io.bitsquare.btc; -import com.google.bitcoin.core.Address; -import com.google.bitcoin.core.AddressFormatException; -import com.google.bitcoin.core.Coin; -import com.google.bitcoin.core.NetworkParameters; -import com.google.bitcoin.core.Transaction; +import org.bitcoinj.core.Address; +import org.bitcoinj.core.AddressFormatException; +import org.bitcoinj.core.Coin; +import org.bitcoinj.core.NetworkParameters; +import org.bitcoinj.core.Transaction; import javax.inject.Inject; diff --git a/src/main/java/io/bitsquare/btc/Restrictions.java b/src/main/java/io/bitsquare/btc/Restrictions.java index fa63cab75ae..85f2c40f029 100644 --- a/src/main/java/io/bitsquare/btc/Restrictions.java +++ b/src/main/java/io/bitsquare/btc/Restrictions.java @@ -17,8 +17,8 @@ package io.bitsquare.btc; -import com.google.bitcoin.core.Coin; -import com.google.bitcoin.core.Transaction; +import org.bitcoinj.core.Coin; +import org.bitcoinj.core.Transaction; // Lets see if we get more restriction otherwise move it to other class public class Restrictions { diff --git a/src/main/java/io/bitsquare/btc/WalletFacade.java b/src/main/java/io/bitsquare/btc/WalletFacade.java index 2083e6e9b82..ef881adc266 100644 --- a/src/main/java/io/bitsquare/btc/WalletFacade.java +++ b/src/main/java/io/bitsquare/btc/WalletFacade.java @@ -24,31 +24,31 @@ import io.bitsquare.crypto.CryptoFacade; import io.bitsquare.persistence.Persistence; -import com.google.bitcoin.core.Address; -import com.google.bitcoin.core.AddressFormatException; -import com.google.bitcoin.core.Coin; -import com.google.bitcoin.core.ECKey; -import com.google.bitcoin.core.InsufficientMoneyException; -import com.google.bitcoin.core.NetworkParameters; -import com.google.bitcoin.core.ScriptException; -import com.google.bitcoin.core.Sha256Hash; -import com.google.bitcoin.core.Transaction; -import com.google.bitcoin.core.TransactionConfidence; -import com.google.bitcoin.core.TransactionInput; -import com.google.bitcoin.core.TransactionOutPoint; -import com.google.bitcoin.core.TransactionOutput; -import com.google.bitcoin.core.Utils; -import com.google.bitcoin.core.VerificationException; -import com.google.bitcoin.core.Wallet; -import com.google.bitcoin.core.WalletEventListener; -import com.google.bitcoin.crypto.DeterministicKey; -import com.google.bitcoin.crypto.TransactionSignature; -import com.google.bitcoin.kits.WalletAppKit; -import com.google.bitcoin.params.MainNetParams; -import com.google.bitcoin.params.RegTestParams; -import com.google.bitcoin.script.Script; -import com.google.bitcoin.script.ScriptBuilder; -import com.google.bitcoin.utils.Threading; +import org.bitcoinj.core.Address; +import org.bitcoinj.core.AddressFormatException; +import org.bitcoinj.core.Coin; +import org.bitcoinj.core.ECKey; +import org.bitcoinj.core.InsufficientMoneyException; +import org.bitcoinj.core.NetworkParameters; +import org.bitcoinj.core.ScriptException; +import org.bitcoinj.core.Sha256Hash; +import org.bitcoinj.core.Transaction; +import org.bitcoinj.core.TransactionConfidence; +import org.bitcoinj.core.TransactionInput; +import org.bitcoinj.core.TransactionOutPoint; +import org.bitcoinj.core.TransactionOutput; +import org.bitcoinj.core.Utils; +import org.bitcoinj.core.VerificationException; +import org.bitcoinj.core.Wallet; +import org.bitcoinj.core.WalletEventListener; +import org.bitcoinj.crypto.DeterministicKey; +import org.bitcoinj.crypto.TransactionSignature; +import org.bitcoinj.kits.WalletAppKit; +import org.bitcoinj.params.MainNetParams; +import org.bitcoinj.params.RegTestParams; +import org.bitcoinj.script.Script; +import org.bitcoinj.script.ScriptBuilder; +import org.bitcoinj.utils.Threading; import com.google.common.collect.ImmutableList; import com.google.common.util.concurrent.FutureCallback; @@ -81,7 +81,7 @@ import lighthouse.files.AppDirectory; -import static com.google.bitcoin.script.ScriptOpCodes.OP_RETURN; +import static org.bitcoinj.script.ScriptOpCodes.OP_RETURN; /** * TODO: use walletextension (with protobuffer) instead of saving addressEntryList via storage @@ -802,7 +802,7 @@ else if (scriptPubKey.isSentToAddress()) { } log.trace("check if it can be correctly spent for input 1"); - input.getScriptSig().correctlySpends(tx, 1, scriptPubKey, false); + input.getScriptSig().correctlySpends(tx, 1, scriptPubKey); log.trace("verify tx"); tx.verify(); @@ -917,12 +917,12 @@ else if (scriptPubKey.isSentToAddress()) { throw new ScriptException("Don't know how to sign for this kind of scriptPubKey: " + scriptPubKey); } - input.getScriptSig().correctlySpends(tx, 0, scriptPubKey, false); + input.getScriptSig().correctlySpends(tx, 0, scriptPubKey); log.trace("check if it can be correctly spent for input 0 OK"); TransactionInput input1 = tx.getInput(1); scriptPubKey = input1.getConnectedOutput().getScriptPubKey(); - input1.getScriptSig().correctlySpends(tx, 1, scriptPubKey, false); + input1.getScriptSig().correctlySpends(tx, 1, scriptPubKey); log.trace("check if it can be correctly spent for input 1 OK"); /* @@ -1053,7 +1053,7 @@ public void takerSignsAndSendsTx(String depositTxAsHex, tx.verify(); log.trace("check if it can be correctly spent for ms input"); - tx.getInput(0).getScriptSig().correctlySpends(tx, 0, multiSigScript, false); + tx.getInput(0).getScriptSig().correctlySpends(tx, 0, multiSigScript); log.trace("verify multiSigOutput"); tx.getInput(0).verify(multiSigOutput); @@ -1140,7 +1140,7 @@ public static interface DownloadListener { void downloadComplete(); } - private class BlockChainDownloadListener extends com.google.bitcoin.core.DownloadListener { + private class BlockChainDownloadListener extends org.bitcoinj.core.DownloadListener { @Override protected void progress(double percent, int blocksSoFar, Date date) { super.progress(percent, blocksSoFar, date); diff --git a/src/main/java/io/bitsquare/btc/listeners/AddressConfidenceListener.java b/src/main/java/io/bitsquare/btc/listeners/AddressConfidenceListener.java index 8cf4f680885..321d148b582 100644 --- a/src/main/java/io/bitsquare/btc/listeners/AddressConfidenceListener.java +++ b/src/main/java/io/bitsquare/btc/listeners/AddressConfidenceListener.java @@ -17,8 +17,8 @@ package io.bitsquare.btc.listeners; -import com.google.bitcoin.core.Address; -import com.google.bitcoin.core.TransactionConfidence; +import org.bitcoinj.core.Address; +import org.bitcoinj.core.TransactionConfidence; public class AddressConfidenceListener { private final Address address; diff --git a/src/main/java/io/bitsquare/btc/listeners/BalanceListener.java b/src/main/java/io/bitsquare/btc/listeners/BalanceListener.java index 24e77ddbdc9..070eb26a8ec 100644 --- a/src/main/java/io/bitsquare/btc/listeners/BalanceListener.java +++ b/src/main/java/io/bitsquare/btc/listeners/BalanceListener.java @@ -17,8 +17,8 @@ package io.bitsquare.btc.listeners; -import com.google.bitcoin.core.Address; -import com.google.bitcoin.core.Coin; +import org.bitcoinj.core.Address; +import org.bitcoinj.core.Coin; public class BalanceListener { private Address address; diff --git a/src/main/java/io/bitsquare/btc/listeners/TxConfidenceListener.java b/src/main/java/io/bitsquare/btc/listeners/TxConfidenceListener.java index 2c1f60131c3..d32b0c95b9d 100644 --- a/src/main/java/io/bitsquare/btc/listeners/TxConfidenceListener.java +++ b/src/main/java/io/bitsquare/btc/listeners/TxConfidenceListener.java @@ -17,7 +17,7 @@ package io.bitsquare.btc.listeners; -import com.google.bitcoin.core.TransactionConfidence; +import org.bitcoinj.core.TransactionConfidence; public class TxConfidenceListener { private final String txID; diff --git a/src/main/java/io/bitsquare/crypto/CryptoFacade.java b/src/main/java/io/bitsquare/crypto/CryptoFacade.java index 9564598d73b..7c1dc74eefa 100644 --- a/src/main/java/io/bitsquare/crypto/CryptoFacade.java +++ b/src/main/java/io/bitsquare/crypto/CryptoFacade.java @@ -17,10 +17,10 @@ package io.bitsquare.crypto; -import com.google.bitcoin.core.ECKey; -import com.google.bitcoin.core.Sha256Hash; -import com.google.bitcoin.core.Utils; -import com.google.bitcoin.crypto.KeyCrypterException; +import org.bitcoinj.core.ECKey; +import org.bitcoinj.core.Sha256Hash; +import org.bitcoinj.core.Utils; +import org.bitcoinj.crypto.KeyCrypterException; import com.google.common.base.Charsets; diff --git a/src/main/java/io/bitsquare/di/BitSquareModule.java b/src/main/java/io/bitsquare/di/BitSquareModule.java index af074af0cdc..fd090e0c58f 100644 --- a/src/main/java/io/bitsquare/di/BitSquareModule.java +++ b/src/main/java/io/bitsquare/di/BitSquareModule.java @@ -41,10 +41,10 @@ import io.bitsquare.user.User; import io.bitsquare.util.ConfigLoader; -import com.google.bitcoin.core.NetworkParameters; -import com.google.bitcoin.params.MainNetParams; -import com.google.bitcoin.params.RegTestParams; -import com.google.bitcoin.params.TestNet3Params; +import org.bitcoinj.core.NetworkParameters; +import org.bitcoinj.params.MainNetParams; +import org.bitcoinj.params.RegTestParams; +import org.bitcoinj.params.TestNet3Params; import com.google.inject.AbstractModule; import com.google.inject.Provider; diff --git a/src/main/java/io/bitsquare/gui/components/AddressTextField.java b/src/main/java/io/bitsquare/gui/components/AddressTextField.java index ef73b7d4617..d7ffa9bff6a 100644 --- a/src/main/java/io/bitsquare/gui/components/AddressTextField.java +++ b/src/main/java/io/bitsquare/gui/components/AddressTextField.java @@ -19,8 +19,8 @@ import io.bitsquare.gui.OverlayManager; -import com.google.bitcoin.core.Coin; -import com.google.bitcoin.uri.BitcoinURI; +import org.bitcoinj.core.Coin; +import org.bitcoinj.uri.BitcoinURI; import java.awt.*; diff --git a/src/main/java/io/bitsquare/gui/components/BalanceTextField.java b/src/main/java/io/bitsquare/gui/components/BalanceTextField.java index ae672e16c81..4d35ddc40da 100644 --- a/src/main/java/io/bitsquare/gui/components/BalanceTextField.java +++ b/src/main/java/io/bitsquare/gui/components/BalanceTextField.java @@ -23,9 +23,9 @@ import io.bitsquare.gui.components.confidence.ConfidenceProgressIndicator; import io.bitsquare.gui.util.BSFormatter; -import com.google.bitcoin.core.Address; -import com.google.bitcoin.core.Coin; -import com.google.bitcoin.core.TransactionConfidence; +import org.bitcoinj.core.Address; +import org.bitcoinj.core.Coin; +import org.bitcoinj.core.TransactionConfidence; import javafx.scene.control.*; import javafx.scene.effect.*; diff --git a/src/main/java/io/bitsquare/gui/components/Popups.java b/src/main/java/io/bitsquare/gui/components/Popups.java index 26adc61a526..0b2215ec08e 100644 --- a/src/main/java/io/bitsquare/gui/components/Popups.java +++ b/src/main/java/io/bitsquare/gui/components/Popups.java @@ -21,7 +21,7 @@ import io.bitsquare.gui.OverlayManager; import io.bitsquare.locale.BSResources; -import com.google.bitcoin.store.BlockStoreException; +import org.bitcoinj.store.BlockStoreException; import com.google.common.base.Throwables; diff --git a/src/main/java/io/bitsquare/gui/components/TxIdTextField.java b/src/main/java/io/bitsquare/gui/components/TxIdTextField.java index 6e8e9b0e311..eeaa607822e 100644 --- a/src/main/java/io/bitsquare/gui/components/TxIdTextField.java +++ b/src/main/java/io/bitsquare/gui/components/TxIdTextField.java @@ -21,7 +21,7 @@ import io.bitsquare.btc.listeners.TxConfidenceListener; import io.bitsquare.gui.components.confidence.ConfidenceProgressIndicator; -import com.google.bitcoin.core.TransactionConfidence; +import org.bitcoinj.core.TransactionConfidence; import java.awt.*; diff --git a/src/main/java/io/bitsquare/gui/main/account/arbitrator/registration/ArbitratorRegistrationViewCB.java b/src/main/java/io/bitsquare/gui/main/account/arbitrator/registration/ArbitratorRegistrationViewCB.java index 61300c6c06d..d7fa9ee32b9 100644 --- a/src/main/java/io/bitsquare/gui/main/account/arbitrator/registration/ArbitratorRegistrationViewCB.java +++ b/src/main/java/io/bitsquare/gui/main/account/arbitrator/registration/ArbitratorRegistrationViewCB.java @@ -31,12 +31,12 @@ import io.bitsquare.user.User; import io.bitsquare.util.DSAKeyUtil; -import com.google.bitcoin.core.Coin; -import com.google.bitcoin.core.ECKey; -import com.google.bitcoin.core.Transaction; -import com.google.bitcoin.core.Wallet; -import com.google.bitcoin.core.WalletEventListener; -import com.google.bitcoin.script.Script; +import org.bitcoinj.core.Coin; +import org.bitcoinj.core.ECKey; +import org.bitcoinj.core.Transaction; +import org.bitcoinj.core.Wallet; +import org.bitcoinj.core.WalletEventListener; +import org.bitcoinj.script.Script; import java.net.URL; diff --git a/src/main/java/io/bitsquare/gui/main/account/content/registration/RegistrationModel.java b/src/main/java/io/bitsquare/gui/main/account/content/registration/RegistrationModel.java index 66a45359a88..5f1a6b35a8e 100644 --- a/src/main/java/io/bitsquare/gui/main/account/content/registration/RegistrationModel.java +++ b/src/main/java/io/bitsquare/gui/main/account/content/registration/RegistrationModel.java @@ -25,9 +25,9 @@ import io.bitsquare.persistence.Persistence; import io.bitsquare.user.User; -import com.google.bitcoin.core.Coin; -import com.google.bitcoin.core.InsufficientMoneyException; -import com.google.bitcoin.core.Transaction; +import org.bitcoinj.core.Coin; +import org.bitcoinj.core.InsufficientMoneyException; +import org.bitcoinj.core.Transaction; import com.google.common.util.concurrent.FutureCallback; diff --git a/src/main/java/io/bitsquare/gui/main/account/content/registration/RegistrationPM.java b/src/main/java/io/bitsquare/gui/main/account/content/registration/RegistrationPM.java index a08ca41928d..56968d9e095 100644 --- a/src/main/java/io/bitsquare/gui/main/account/content/registration/RegistrationPM.java +++ b/src/main/java/io/bitsquare/gui/main/account/content/registration/RegistrationPM.java @@ -22,8 +22,8 @@ import io.bitsquare.gui.util.BSFormatter; import io.bitsquare.locale.BSResources; -import com.google.bitcoin.core.Address; -import com.google.bitcoin.core.Coin; +import org.bitcoinj.core.Address; +import org.bitcoinj.core.Coin; import com.google.inject.Inject; diff --git a/src/main/java/io/bitsquare/gui/main/account/content/restrictions/RestrictionsModel.java b/src/main/java/io/bitsquare/gui/main/account/content/restrictions/RestrictionsModel.java index 9bc2bfcd5a2..0f8979fe8cf 100644 --- a/src/main/java/io/bitsquare/gui/main/account/content/restrictions/RestrictionsModel.java +++ b/src/main/java/io/bitsquare/gui/main/account/content/restrictions/RestrictionsModel.java @@ -30,8 +30,8 @@ import io.bitsquare.user.User; import io.bitsquare.util.DSAKeyUtil; -import com.google.bitcoin.core.ECKey; -import com.google.bitcoin.core.Utils; +import org.bitcoinj.core.ECKey; +import org.bitcoinj.core.Utils; import com.google.inject.Inject; diff --git a/src/main/java/io/bitsquare/gui/main/funds/transactions/TransactionsListItem.java b/src/main/java/io/bitsquare/gui/main/funds/transactions/TransactionsListItem.java index f72e8c307c0..3263f9c015e 100644 --- a/src/main/java/io/bitsquare/gui/main/funds/transactions/TransactionsListItem.java +++ b/src/main/java/io/bitsquare/gui/main/funds/transactions/TransactionsListItem.java @@ -22,11 +22,11 @@ import io.bitsquare.gui.components.confidence.ConfidenceProgressIndicator; import io.bitsquare.gui.util.BSFormatter; -import com.google.bitcoin.core.Address; -import com.google.bitcoin.core.Coin; -import com.google.bitcoin.core.Transaction; -import com.google.bitcoin.core.TransactionConfidence; -import com.google.bitcoin.core.TransactionOutput; +import org.bitcoinj.core.Address; +import org.bitcoinj.core.Coin; +import org.bitcoinj.core.Transaction; +import org.bitcoinj.core.TransactionConfidence; +import org.bitcoinj.core.TransactionOutput; import javafx.beans.property.SimpleStringProperty; import javafx.beans.property.StringProperty; diff --git a/src/main/java/io/bitsquare/gui/main/funds/transactions/TransactionsViewCB.java b/src/main/java/io/bitsquare/gui/main/funds/transactions/TransactionsViewCB.java index f4f01ac29c1..a1f9aa33df8 100644 --- a/src/main/java/io/bitsquare/gui/main/funds/transactions/TransactionsViewCB.java +++ b/src/main/java/io/bitsquare/gui/main/funds/transactions/TransactionsViewCB.java @@ -22,7 +22,7 @@ import io.bitsquare.gui.components.Popups; import io.bitsquare.gui.util.BSFormatter; -import com.google.bitcoin.core.Transaction; +import org.bitcoinj.core.Transaction; import java.net.URL; diff --git a/src/main/java/io/bitsquare/gui/main/funds/withdrawal/WithdrawalListItem.java b/src/main/java/io/bitsquare/gui/main/funds/withdrawal/WithdrawalListItem.java index c4faa53e8b9..30f24c2381e 100644 --- a/src/main/java/io/bitsquare/gui/main/funds/withdrawal/WithdrawalListItem.java +++ b/src/main/java/io/bitsquare/gui/main/funds/withdrawal/WithdrawalListItem.java @@ -24,9 +24,9 @@ import io.bitsquare.gui.components.confidence.ConfidenceProgressIndicator; import io.bitsquare.gui.util.BSFormatter; -import com.google.bitcoin.core.Address; -import com.google.bitcoin.core.Coin; -import com.google.bitcoin.core.TransactionConfidence; +import org.bitcoinj.core.Address; +import org.bitcoinj.core.Coin; +import org.bitcoinj.core.TransactionConfidence; import javafx.beans.property.SimpleStringProperty; import javafx.beans.property.StringProperty; diff --git a/src/main/java/io/bitsquare/gui/main/funds/withdrawal/WithdrawalViewCB.java b/src/main/java/io/bitsquare/gui/main/funds/withdrawal/WithdrawalViewCB.java index ae972f2978e..98a70e06fb9 100644 --- a/src/main/java/io/bitsquare/gui/main/funds/withdrawal/WithdrawalViewCB.java +++ b/src/main/java/io/bitsquare/gui/main/funds/withdrawal/WithdrawalViewCB.java @@ -26,10 +26,10 @@ import io.bitsquare.gui.components.Popups; import io.bitsquare.gui.util.BSFormatter; -import com.google.bitcoin.core.AddressFormatException; -import com.google.bitcoin.core.Coin; -import com.google.bitcoin.core.InsufficientMoneyException; -import com.google.bitcoin.core.Transaction; +import org.bitcoinj.core.AddressFormatException; +import org.bitcoinj.core.Coin; +import org.bitcoinj.core.InsufficientMoneyException; +import org.bitcoinj.core.Transaction; import com.google.common.util.concurrent.FutureCallback; diff --git a/src/main/java/io/bitsquare/gui/main/orders/pending/PendingTradesModel.java b/src/main/java/io/bitsquare/gui/main/orders/pending/PendingTradesModel.java index 33933766e53..c5640c1314b 100644 --- a/src/main/java/io/bitsquare/gui/main/orders/pending/PendingTradesModel.java +++ b/src/main/java/io/bitsquare/gui/main/orders/pending/PendingTradesModel.java @@ -28,11 +28,11 @@ import io.bitsquare.trade.TradeManager; import io.bitsquare.user.User; -import com.google.bitcoin.core.AddressFormatException; -import com.google.bitcoin.core.Coin; -import com.google.bitcoin.core.InsufficientMoneyException; -import com.google.bitcoin.core.Transaction; -import com.google.bitcoin.core.TransactionConfidence; +import org.bitcoinj.core.AddressFormatException; +import org.bitcoinj.core.Coin; +import org.bitcoinj.core.InsufficientMoneyException; +import org.bitcoinj.core.Transaction; +import org.bitcoinj.core.TransactionConfidence; import com.google.common.util.concurrent.FutureCallback; diff --git a/src/main/java/io/bitsquare/gui/main/trade/TradeNavigator.java b/src/main/java/io/bitsquare/gui/main/trade/TradeNavigator.java index 6ade43dd5c6..e65a0cd3461 100644 --- a/src/main/java/io/bitsquare/gui/main/trade/TradeNavigator.java +++ b/src/main/java/io/bitsquare/gui/main/trade/TradeNavigator.java @@ -19,8 +19,8 @@ import io.bitsquare.trade.Offer; -import com.google.bitcoin.core.Coin; -import com.google.bitcoin.utils.Fiat; +import org.bitcoinj.core.Coin; +import org.bitcoinj.utils.Fiat; public interface TradeNavigator { void createOffer(Coin amount, Fiat price); diff --git a/src/main/java/io/bitsquare/gui/main/trade/TradeViewCB.java b/src/main/java/io/bitsquare/gui/main/trade/TradeViewCB.java index b852ec6f2a9..344095ec775 100644 --- a/src/main/java/io/bitsquare/gui/main/trade/TradeViewCB.java +++ b/src/main/java/io/bitsquare/gui/main/trade/TradeViewCB.java @@ -27,8 +27,8 @@ import io.bitsquare.trade.Offer; import io.bitsquare.util.ViewLoader; -import com.google.bitcoin.core.Coin; -import com.google.bitcoin.utils.Fiat; +import org.bitcoinj.core.Coin; +import org.bitcoinj.utils.Fiat; import java.io.IOException; diff --git a/src/main/java/io/bitsquare/gui/main/trade/createoffer/CreateOfferModel.java b/src/main/java/io/bitsquare/gui/main/trade/createoffer/CreateOfferModel.java index 53ba45273d1..2a11017fe46 100644 --- a/src/main/java/io/bitsquare/gui/main/trade/createoffer/CreateOfferModel.java +++ b/src/main/java/io/bitsquare/gui/main/trade/createoffer/CreateOfferModel.java @@ -32,9 +32,9 @@ import io.bitsquare.trade.TradeManager; import io.bitsquare.user.User; -import com.google.bitcoin.core.Coin; -import com.google.bitcoin.utils.ExchangeRate; -import com.google.bitcoin.utils.Fiat; +import org.bitcoinj.core.Coin; +import org.bitcoinj.utils.ExchangeRate; +import org.bitcoinj.utils.Fiat; import com.google.inject.Inject; diff --git a/src/main/java/io/bitsquare/gui/main/trade/createoffer/CreateOfferPM.java b/src/main/java/io/bitsquare/gui/main/trade/createoffer/CreateOfferPM.java index 159494a240b..d3b053297fc 100644 --- a/src/main/java/io/bitsquare/gui/main/trade/createoffer/CreateOfferPM.java +++ b/src/main/java/io/bitsquare/gui/main/trade/createoffer/CreateOfferPM.java @@ -26,9 +26,9 @@ import io.bitsquare.locale.BSResources; import io.bitsquare.trade.Direction; -import com.google.bitcoin.core.Address; -import com.google.bitcoin.core.Coin; -import com.google.bitcoin.utils.Fiat; +import org.bitcoinj.core.Address; +import org.bitcoinj.core.Coin; +import org.bitcoinj.utils.Fiat; import javax.inject.Inject; diff --git a/src/main/java/io/bitsquare/gui/main/trade/createoffer/CreateOfferViewCB.java b/src/main/java/io/bitsquare/gui/main/trade/createoffer/CreateOfferViewCB.java index a638c04b64a..4647802ca9b 100644 --- a/src/main/java/io/bitsquare/gui/main/trade/createoffer/CreateOfferViewCB.java +++ b/src/main/java/io/bitsquare/gui/main/trade/createoffer/CreateOfferViewCB.java @@ -33,8 +33,8 @@ import io.bitsquare.locale.BSResources; import io.bitsquare.trade.Direction; -import com.google.bitcoin.core.Coin; -import com.google.bitcoin.utils.Fiat; +import org.bitcoinj.core.Coin; +import org.bitcoinj.utils.Fiat; import java.net.URL; diff --git a/src/main/java/io/bitsquare/gui/main/trade/orderbook/OrderBookModel.java b/src/main/java/io/bitsquare/gui/main/trade/orderbook/OrderBookModel.java index cbfb4c0bc87..430942dcdbc 100644 --- a/src/main/java/io/bitsquare/gui/main/trade/orderbook/OrderBookModel.java +++ b/src/main/java/io/bitsquare/gui/main/trade/orderbook/OrderBookModel.java @@ -28,9 +28,9 @@ import io.bitsquare.trade.TradeManager; import io.bitsquare.user.User; -import com.google.bitcoin.core.Coin; -import com.google.bitcoin.utils.ExchangeRate; -import com.google.bitcoin.utils.Fiat; +import org.bitcoinj.core.Coin; +import org.bitcoinj.utils.ExchangeRate; +import org.bitcoinj.utils.Fiat; import com.google.inject.Inject; diff --git a/src/main/java/io/bitsquare/gui/main/trade/orderbook/OrderBookPM.java b/src/main/java/io/bitsquare/gui/main/trade/orderbook/OrderBookPM.java index 629591a0c98..d4e82b31872 100644 --- a/src/main/java/io/bitsquare/gui/main/trade/orderbook/OrderBookPM.java +++ b/src/main/java/io/bitsquare/gui/main/trade/orderbook/OrderBookPM.java @@ -26,8 +26,8 @@ import io.bitsquare.trade.Direction; import io.bitsquare.trade.Offer; -import com.google.bitcoin.core.Coin; -import com.google.bitcoin.utils.Fiat; +import org.bitcoinj.core.Coin; +import org.bitcoinj.utils.Fiat; import com.google.inject.Inject; diff --git a/src/main/java/io/bitsquare/gui/main/trade/takeoffer/TakeOfferModel.java b/src/main/java/io/bitsquare/gui/main/trade/takeoffer/TakeOfferModel.java index c8de51e6071..c374bfd724a 100644 --- a/src/main/java/io/bitsquare/gui/main/trade/takeoffer/TakeOfferModel.java +++ b/src/main/java/io/bitsquare/gui/main/trade/takeoffer/TakeOfferModel.java @@ -27,9 +27,9 @@ import io.bitsquare.trade.Trade; import io.bitsquare.trade.TradeManager; -import com.google.bitcoin.core.Coin; -import com.google.bitcoin.utils.ExchangeRate; -import com.google.bitcoin.utils.Fiat; +import org.bitcoinj.core.Coin; +import org.bitcoinj.utils.ExchangeRate; +import org.bitcoinj.utils.Fiat; import com.google.inject.Inject; diff --git a/src/main/java/io/bitsquare/gui/main/trade/takeoffer/TakeOfferPM.java b/src/main/java/io/bitsquare/gui/main/trade/takeoffer/TakeOfferPM.java index 5ec33bbb524..36602979f62 100644 --- a/src/main/java/io/bitsquare/gui/main/trade/takeoffer/TakeOfferPM.java +++ b/src/main/java/io/bitsquare/gui/main/trade/takeoffer/TakeOfferPM.java @@ -26,8 +26,8 @@ import io.bitsquare.trade.Direction; import io.bitsquare.trade.Offer; -import com.google.bitcoin.core.Address; -import com.google.bitcoin.core.Coin; +import org.bitcoinj.core.Address; +import org.bitcoinj.core.Coin; import javax.inject.Inject; diff --git a/src/main/java/io/bitsquare/gui/main/trade/takeoffer/TakeOfferViewCB.java b/src/main/java/io/bitsquare/gui/main/trade/takeoffer/TakeOfferViewCB.java index 1f2964cb05b..3f63df824af 100644 --- a/src/main/java/io/bitsquare/gui/main/trade/takeoffer/TakeOfferViewCB.java +++ b/src/main/java/io/bitsquare/gui/main/trade/takeoffer/TakeOfferViewCB.java @@ -35,7 +35,7 @@ import io.bitsquare.trade.Direction; import io.bitsquare.trade.Offer; -import com.google.bitcoin.core.Coin; +import org.bitcoinj.core.Coin; import java.net.URL; diff --git a/src/main/java/io/bitsquare/gui/util/BSFormatter.java b/src/main/java/io/bitsquare/gui/util/BSFormatter.java index 77a5e629e62..cba210a7a04 100644 --- a/src/main/java/io/bitsquare/gui/util/BSFormatter.java +++ b/src/main/java/io/bitsquare/gui/util/BSFormatter.java @@ -24,9 +24,9 @@ import io.bitsquare.trade.Offer; import io.bitsquare.user.User; -import com.google.bitcoin.core.Coin; -import com.google.bitcoin.utils.CoinFormat; -import com.google.bitcoin.utils.Fiat; +import org.bitcoinj.core.Coin; +import org.bitcoinj.utils.Fiat; +import org.bitcoinj.utils.MonetaryFormat; import java.math.BigDecimal; @@ -59,19 +59,19 @@ public class BSFormatter { private boolean useMilliBit; private int scale = 3; - // Format use 2 min decimal places and 2 more optional: 1.00 or 1.0010 + // Format use 2 min decimal places and 2 more optional: 1.00 or 1.0010 // There are not more then 4 decimals allowed. // We don't support localized formatting. Format is always using "." as decimal mark and no grouping separator. // Input of "," as decimal mark (like in german locale) will be replaced with ".". // Input of a group separator (1,123,45) lead to an validation error. - // Note: BtcFormat was intended to be used, but it lead to many problems (automatic format to mBit, + // Note: BtcFormat was intended to be used, but it lead to many problems (automatic format to mBit, // no way to remove grouping separator). It seems to be not optimal for user input formatting. - private CoinFormat coinFormat = CoinFormat.BTC.repeatOptionalDecimals(2, 1); + private MonetaryFormat coinFormat = MonetaryFormat.BTC.repeatOptionalDecimals(2, 1); private String currencyCode = Currency.getInstance(Locale.getDefault()).getCurrencyCode(); - // format is like: 1,00 never more then 2 decimals - private final CoinFormat fiatFormat = CoinFormat.FIAT.repeatOptionalDecimals(0, 0).code(0, currencyCode); + // format is like: 1,00 never more then 2 decimals + private final MonetaryFormat fiatFormat = MonetaryFormat.FIAT.repeatOptionalDecimals(0, 0).code(0, currencyCode); @Inject @@ -95,7 +95,7 @@ else if (user.currentBankAccountProperty().get() != null) public void useMilliBitFormat(boolean useMilliBit) { this.useMilliBit = useMilliBit; - coinFormat = getCoinFormat(); + coinFormat = getMonetaryFormat(); scale = useMilliBit ? 0 : 3; } @@ -106,11 +106,11 @@ public void setLocale(Locale locale) { this.locale = locale; } - private CoinFormat getCoinFormat() { + private MonetaryFormat getMonetaryFormat() { if (useMilliBit) - return CoinFormat.MBTC.repeatOptionalDecimals(2, 1); + return MonetaryFormat.MBTC.repeatOptionalDecimals(2, 1); else - return CoinFormat.BTC.repeatOptionalDecimals(2, 1); + return MonetaryFormat.BTC.repeatOptionalDecimals(2, 1); } public void setFiatCurrencyCode(String currencyCode) { @@ -134,7 +134,7 @@ public String formatCoin(Coin coin) { public String formatCoinWithCode(Coin coin) { try { - // we don't use the code feature from coinFormat as it does automatic switching between mBTC and BTC and + // we don't use the code feature from coinFormat as it does automatic switching between mBTC and BTC and // pre and post fixing return coinFormat.postfixCode().format(coin).toString(); } catch (Throwable t) { @@ -314,7 +314,7 @@ public String formatToPercent(double value) { private String cleanInput(String input) { input = input.replace(",", "."); - // don't use String.valueOf(Double.parseDouble(input)) as return value as it gives scientific + // don't use String.valueOf(Double.parseDouble(input)) as return value as it gives scientific // notation (1.0E-6) which screw up coinFormat.parse //noinspection ResultOfMethodCallIgnored Double.parseDouble(input); diff --git a/src/main/java/io/bitsquare/gui/util/validation/BtcAddressValidator.java b/src/main/java/io/bitsquare/gui/util/validation/BtcAddressValidator.java index fee62559ff5..13e8055d6cc 100644 --- a/src/main/java/io/bitsquare/gui/util/validation/BtcAddressValidator.java +++ b/src/main/java/io/bitsquare/gui/util/validation/BtcAddressValidator.java @@ -17,9 +17,9 @@ package io.bitsquare.gui.util.validation; -import com.google.bitcoin.core.Address; -import com.google.bitcoin.core.AddressFormatException; -import com.google.bitcoin.core.NetworkParameters; +import org.bitcoinj.core.Address; +import org.bitcoinj.core.AddressFormatException; +import org.bitcoinj.core.NetworkParameters; import javax.inject.Inject; diff --git a/src/main/java/io/bitsquare/gui/util/validation/BtcValidator.java b/src/main/java/io/bitsquare/gui/util/validation/BtcValidator.java index 87ad68a87ea..a81e1c682a0 100644 --- a/src/main/java/io/bitsquare/gui/util/validation/BtcValidator.java +++ b/src/main/java/io/bitsquare/gui/util/validation/BtcValidator.java @@ -19,7 +19,7 @@ import io.bitsquare.locale.BSResources; -import com.google.bitcoin.core.NetworkParameters; +import org.bitcoinj.core.NetworkParameters; import java.math.BigDecimal; diff --git a/src/main/java/io/bitsquare/gui/util/validation/OptionalBtcValidator.java b/src/main/java/io/bitsquare/gui/util/validation/OptionalBtcValidator.java index d8b439834c7..19443626d4c 100644 --- a/src/main/java/io/bitsquare/gui/util/validation/OptionalBtcValidator.java +++ b/src/main/java/io/bitsquare/gui/util/validation/OptionalBtcValidator.java @@ -19,7 +19,7 @@ import io.bitsquare.locale.BSResources; -import com.google.bitcoin.core.NetworkParameters; +import org.bitcoinj.core.NetworkParameters; import java.math.BigDecimal; diff --git a/src/main/java/io/bitsquare/persistence/Persistence.java b/src/main/java/io/bitsquare/persistence/Persistence.java index ecc86d101d9..8797f6b35db 100644 --- a/src/main/java/io/bitsquare/persistence/Persistence.java +++ b/src/main/java/io/bitsquare/persistence/Persistence.java @@ -20,7 +20,7 @@ import io.bitsquare.BitSquare; import io.bitsquare.util.FileUtil; -import com.google.bitcoin.utils.Threading; +import org.bitcoinj.utils.Threading; import java.io.File; import java.io.FileInputStream; diff --git a/src/main/java/io/bitsquare/settings/Settings.java b/src/main/java/io/bitsquare/settings/Settings.java index b67100133a0..78311741480 100644 --- a/src/main/java/io/bitsquare/settings/Settings.java +++ b/src/main/java/io/bitsquare/settings/Settings.java @@ -20,7 +20,7 @@ import io.bitsquare.arbitrator.Arbitrator; import io.bitsquare.locale.Country; -import com.google.bitcoin.utils.CoinFormat; +import org.bitcoinj.utils.MonetaryFormat; import java.io.Serializable; @@ -42,8 +42,8 @@ public class Settings implements Serializable { // which will be used for multiplying with the amount to get the collateral size in BTC. - private String btcDenominationString = CoinFormat.CODE_BTC; - final transient StringProperty btcDenomination = new SimpleStringProperty(CoinFormat.CODE_BTC); + private String btcDenominationString = MonetaryFormat.CODE_BTC; + final transient StringProperty btcDenomination = new SimpleStringProperty(MonetaryFormat.CODE_BTC); /////////////////////////////////////////////////////////////////////////////////////////// // Constructor diff --git a/src/main/java/io/bitsquare/trade/Contract.java b/src/main/java/io/bitsquare/trade/Contract.java index fe4ce101871..4b389c22113 100644 --- a/src/main/java/io/bitsquare/trade/Contract.java +++ b/src/main/java/io/bitsquare/trade/Contract.java @@ -20,7 +20,7 @@ import io.bitsquare.bank.BankAccount; import io.bitsquare.util.DSAKeyUtil; -import com.google.bitcoin.core.Coin; +import org.bitcoinj.core.Coin; import java.io.Serializable; diff --git a/src/main/java/io/bitsquare/trade/Offer.java b/src/main/java/io/bitsquare/trade/Offer.java index 4fb87a053c8..a1845760d7f 100644 --- a/src/main/java/io/bitsquare/trade/Offer.java +++ b/src/main/java/io/bitsquare/trade/Offer.java @@ -21,9 +21,9 @@ import io.bitsquare.bank.BankAccountType; import io.bitsquare.locale.Country; -import com.google.bitcoin.core.Coin; -import com.google.bitcoin.utils.ExchangeRate; -import com.google.bitcoin.utils.Fiat; +import org.bitcoinj.core.Coin; +import org.bitcoinj.utils.ExchangeRate; +import org.bitcoinj.utils.Fiat; import java.io.Serializable; diff --git a/src/main/java/io/bitsquare/trade/Trade.java b/src/main/java/io/bitsquare/trade/Trade.java index 12de10b78cd..125e6846930 100644 --- a/src/main/java/io/bitsquare/trade/Trade.java +++ b/src/main/java/io/bitsquare/trade/Trade.java @@ -17,9 +17,9 @@ package io.bitsquare.trade; -import com.google.bitcoin.core.Coin; -import com.google.bitcoin.core.Transaction; -import com.google.bitcoin.utils.Fiat; +import org.bitcoinj.core.Coin; +import org.bitcoinj.core.Transaction; +import org.bitcoinj.utils.Fiat; import java.io.Serializable; diff --git a/src/main/java/io/bitsquare/trade/TradeManager.java b/src/main/java/io/bitsquare/trade/TradeManager.java index b54a9f417e7..be337141915 100644 --- a/src/main/java/io/bitsquare/trade/TradeManager.java +++ b/src/main/java/io/bitsquare/trade/TradeManager.java @@ -41,9 +41,9 @@ import io.bitsquare.trade.protocol.trade.taker.messages.TakeOfferFeePayedMessage; import io.bitsquare.user.User; -import com.google.bitcoin.core.Coin; -import com.google.bitcoin.core.Transaction; -import com.google.bitcoin.utils.Fiat; +import org.bitcoinj.core.Coin; +import org.bitcoinj.core.Transaction; +import org.bitcoinj.utils.Fiat; import java.util.HashMap; import java.util.Map; diff --git a/src/main/java/io/bitsquare/trade/handlers/TransactionResultHandler.java b/src/main/java/io/bitsquare/trade/handlers/TransactionResultHandler.java index 254ba9015f6..20e4edc4ba2 100644 --- a/src/main/java/io/bitsquare/trade/handlers/TransactionResultHandler.java +++ b/src/main/java/io/bitsquare/trade/handlers/TransactionResultHandler.java @@ -17,7 +17,7 @@ package io.bitsquare.trade.handlers; -import com.google.bitcoin.core.Transaction; +import org.bitcoinj.core.Transaction; public interface TransactionResultHandler { void onResult(Transaction transaction); diff --git a/src/main/java/io/bitsquare/trade/protocol/createoffer/CreateOfferCoordinator.java b/src/main/java/io/bitsquare/trade/protocol/createoffer/CreateOfferCoordinator.java index f7cf05a5b8a..f47f2be6b5f 100644 --- a/src/main/java/io/bitsquare/trade/protocol/createoffer/CreateOfferCoordinator.java +++ b/src/main/java/io/bitsquare/trade/protocol/createoffer/CreateOfferCoordinator.java @@ -28,7 +28,7 @@ import io.bitsquare.trade.protocol.createoffer.tasks.PublishOfferToDHT; import io.bitsquare.trade.protocol.createoffer.tasks.VerifyOffer; -import com.google.bitcoin.core.Transaction; +import org.bitcoinj.core.Transaction; import java.io.Serializable; diff --git a/src/main/java/io/bitsquare/trade/protocol/createoffer/tasks/BroadCastOfferFeeTx.java b/src/main/java/io/bitsquare/trade/protocol/createoffer/tasks/BroadCastOfferFeeTx.java index 37bc8dcafe0..fc5a30f7635 100644 --- a/src/main/java/io/bitsquare/trade/protocol/createoffer/tasks/BroadCastOfferFeeTx.java +++ b/src/main/java/io/bitsquare/trade/protocol/createoffer/tasks/BroadCastOfferFeeTx.java @@ -21,7 +21,7 @@ import io.bitsquare.trade.handlers.FaultHandler; import io.bitsquare.trade.handlers.ResultHandler; -import com.google.bitcoin.core.Transaction; +import org.bitcoinj.core.Transaction; import com.google.common.util.concurrent.FutureCallback; diff --git a/src/main/java/io/bitsquare/trade/protocol/createoffer/tasks/CreateOfferFeeTx.java b/src/main/java/io/bitsquare/trade/protocol/createoffer/tasks/CreateOfferFeeTx.java index 2098de51345..4c944a0332e 100644 --- a/src/main/java/io/bitsquare/trade/protocol/createoffer/tasks/CreateOfferFeeTx.java +++ b/src/main/java/io/bitsquare/trade/protocol/createoffer/tasks/CreateOfferFeeTx.java @@ -21,7 +21,7 @@ import io.bitsquare.trade.handlers.FaultHandler; import io.bitsquare.trade.handlers.TransactionResultHandler; -import com.google.bitcoin.core.InsufficientMoneyException; +import org.bitcoinj.core.InsufficientMoneyException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/src/main/java/io/bitsquare/trade/protocol/trade/offerer/BuyerAcceptsOfferProtocol.java b/src/main/java/io/bitsquare/trade/protocol/trade/offerer/BuyerAcceptsOfferProtocol.java index 08b9e1c67bc..dcd806f6c6b 100644 --- a/src/main/java/io/bitsquare/trade/protocol/trade/offerer/BuyerAcceptsOfferProtocol.java +++ b/src/main/java/io/bitsquare/trade/protocol/trade/offerer/BuyerAcceptsOfferProtocol.java @@ -41,10 +41,10 @@ import io.bitsquare.trade.protocol.trade.taker.messages.TakeOfferFeePayedMessage; import io.bitsquare.user.User; -import com.google.bitcoin.core.Coin; -import com.google.bitcoin.core.ECKey; -import com.google.bitcoin.core.Transaction; -import com.google.bitcoin.core.Utils; +import org.bitcoinj.core.Coin; +import org.bitcoinj.core.ECKey; +import org.bitcoinj.core.Transaction; +import org.bitcoinj.core.Utils; import java.security.PublicKey; diff --git a/src/main/java/io/bitsquare/trade/protocol/trade/offerer/BuyerAcceptsOfferProtocolListener.java b/src/main/java/io/bitsquare/trade/protocol/trade/offerer/BuyerAcceptsOfferProtocolListener.java index 085a878ae6e..610600de2dc 100644 --- a/src/main/java/io/bitsquare/trade/protocol/trade/offerer/BuyerAcceptsOfferProtocolListener.java +++ b/src/main/java/io/bitsquare/trade/protocol/trade/offerer/BuyerAcceptsOfferProtocolListener.java @@ -19,7 +19,7 @@ import io.bitsquare.trade.Offer; -import com.google.bitcoin.core.Transaction; +import org.bitcoinj.core.Transaction; public interface BuyerAcceptsOfferProtocolListener { void onOfferAccepted(Offer offer); diff --git a/src/main/java/io/bitsquare/trade/protocol/trade/offerer/messages/BankTransferInitedMessage.java b/src/main/java/io/bitsquare/trade/protocol/trade/offerer/messages/BankTransferInitedMessage.java index 14f4d1ceb76..e242ff64b81 100644 --- a/src/main/java/io/bitsquare/trade/protocol/trade/offerer/messages/BankTransferInitedMessage.java +++ b/src/main/java/io/bitsquare/trade/protocol/trade/offerer/messages/BankTransferInitedMessage.java @@ -19,7 +19,7 @@ import io.bitsquare.trade.protocol.trade.TradeMessage; -import com.google.bitcoin.core.Coin; +import org.bitcoinj.core.Coin; import java.io.Serializable; diff --git a/src/main/java/io/bitsquare/trade/protocol/trade/offerer/tasks/CreateDepositTx.java b/src/main/java/io/bitsquare/trade/protocol/trade/offerer/tasks/CreateDepositTx.java index 7f82d23e058..fa15c22276c 100644 --- a/src/main/java/io/bitsquare/trade/protocol/trade/offerer/tasks/CreateDepositTx.java +++ b/src/main/java/io/bitsquare/trade/protocol/trade/offerer/tasks/CreateDepositTx.java @@ -20,10 +20,10 @@ import io.bitsquare.btc.WalletFacade; import io.bitsquare.trade.handlers.ExceptionHandler; -import com.google.bitcoin.core.Coin; -import com.google.bitcoin.core.InsufficientMoneyException; -import com.google.bitcoin.core.Transaction; -import com.google.bitcoin.core.Utils; +import org.bitcoinj.core.Coin; +import org.bitcoinj.core.InsufficientMoneyException; +import org.bitcoinj.core.Transaction; +import org.bitcoinj.core.Utils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/src/main/java/io/bitsquare/trade/protocol/trade/offerer/tasks/SendDepositTxIdToTaker.java b/src/main/java/io/bitsquare/trade/protocol/trade/offerer/tasks/SendDepositTxIdToTaker.java index 607314260db..2cb9bd81a35 100644 --- a/src/main/java/io/bitsquare/trade/protocol/trade/offerer/tasks/SendDepositTxIdToTaker.java +++ b/src/main/java/io/bitsquare/trade/protocol/trade/offerer/tasks/SendDepositTxIdToTaker.java @@ -23,8 +23,8 @@ import io.bitsquare.trade.handlers.ResultHandler; import io.bitsquare.trade.protocol.trade.offerer.messages.DepositTxPublishedMessage; -import com.google.bitcoin.core.Transaction; -import com.google.bitcoin.core.Utils; +import org.bitcoinj.core.Transaction; +import org.bitcoinj.core.Utils; import net.tomp2p.peers.PeerAddress; diff --git a/src/main/java/io/bitsquare/trade/protocol/trade/offerer/tasks/SendSignedPayoutTx.java b/src/main/java/io/bitsquare/trade/protocol/trade/offerer/tasks/SendSignedPayoutTx.java index 3aae8fcbd67..2f250d7b2b1 100644 --- a/src/main/java/io/bitsquare/trade/protocol/trade/offerer/tasks/SendSignedPayoutTx.java +++ b/src/main/java/io/bitsquare/trade/protocol/trade/offerer/tasks/SendSignedPayoutTx.java @@ -24,8 +24,8 @@ import io.bitsquare.trade.handlers.ResultHandler; import io.bitsquare.trade.protocol.trade.offerer.messages.BankTransferInitedMessage; -import com.google.bitcoin.core.Coin; -import com.google.bitcoin.core.ECKey; +import org.bitcoinj.core.Coin; +import org.bitcoinj.core.ECKey; import javafx.util.Pair; diff --git a/src/main/java/io/bitsquare/trade/protocol/trade/offerer/tasks/SetupListenerForBlockChainConfirmation.java b/src/main/java/io/bitsquare/trade/protocol/trade/offerer/tasks/SetupListenerForBlockChainConfirmation.java index 5d0dd4a5f5f..2a7128d84fc 100644 --- a/src/main/java/io/bitsquare/trade/protocol/trade/offerer/tasks/SetupListenerForBlockChainConfirmation.java +++ b/src/main/java/io/bitsquare/trade/protocol/trade/offerer/tasks/SetupListenerForBlockChainConfirmation.java @@ -20,8 +20,8 @@ import io.bitsquare.trade.handlers.ResultHandler; import io.bitsquare.trade.protocol.trade.offerer.BuyerAcceptsOfferProtocolListener; -import com.google.bitcoin.core.Transaction; -import com.google.bitcoin.core.TransactionConfidence; +import org.bitcoinj.core.Transaction; +import org.bitcoinj.core.TransactionConfidence; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/src/main/java/io/bitsquare/trade/protocol/trade/offerer/tasks/SignAndPublishDepositTx.java b/src/main/java/io/bitsquare/trade/protocol/trade/offerer/tasks/SignAndPublishDepositTx.java index 40877a31e7c..06fa14e8f1d 100644 --- a/src/main/java/io/bitsquare/trade/protocol/trade/offerer/tasks/SignAndPublishDepositTx.java +++ b/src/main/java/io/bitsquare/trade/protocol/trade/offerer/tasks/SignAndPublishDepositTx.java @@ -20,7 +20,7 @@ import io.bitsquare.btc.WalletFacade; import io.bitsquare.trade.handlers.ExceptionHandler; -import com.google.bitcoin.core.Transaction; +import org.bitcoinj.core.Transaction; import com.google.common.util.concurrent.FutureCallback; diff --git a/src/main/java/io/bitsquare/trade/protocol/trade/offerer/tasks/VerifyAndSignContract.java b/src/main/java/io/bitsquare/trade/protocol/trade/offerer/tasks/VerifyAndSignContract.java index 995607129ea..7caaa5d2e82 100644 --- a/src/main/java/io/bitsquare/trade/protocol/trade/offerer/tasks/VerifyAndSignContract.java +++ b/src/main/java/io/bitsquare/trade/protocol/trade/offerer/tasks/VerifyAndSignContract.java @@ -24,8 +24,8 @@ import io.bitsquare.trade.handlers.ExceptionHandler; import io.bitsquare.util.Utilities; -import com.google.bitcoin.core.Coin; -import com.google.bitcoin.core.ECKey; +import org.bitcoinj.core.Coin; +import org.bitcoinj.core.ECKey; import java.security.PublicKey; diff --git a/src/main/java/io/bitsquare/trade/protocol/trade/taker/SellerTakesOfferProtocol.java b/src/main/java/io/bitsquare/trade/protocol/trade/taker/SellerTakesOfferProtocol.java index 9bf7dbde15f..18df1e9fe6b 100644 --- a/src/main/java/io/bitsquare/trade/protocol/trade/taker/SellerTakesOfferProtocol.java +++ b/src/main/java/io/bitsquare/trade/protocol/trade/taker/SellerTakesOfferProtocol.java @@ -41,9 +41,9 @@ import io.bitsquare.trade.protocol.trade.taker.tasks.VerifyOffererAccount; import io.bitsquare.user.User; -import com.google.bitcoin.core.Coin; -import com.google.bitcoin.core.ECKey; -import com.google.bitcoin.core.Transaction; +import org.bitcoinj.core.Coin; +import org.bitcoinj.core.ECKey; +import org.bitcoinj.core.Transaction; import java.security.PublicKey; diff --git a/src/main/java/io/bitsquare/trade/protocol/trade/taker/SellerTakesOfferProtocolListener.java b/src/main/java/io/bitsquare/trade/protocol/trade/taker/SellerTakesOfferProtocolListener.java index fb2ced3f34a..94668771bd9 100644 --- a/src/main/java/io/bitsquare/trade/protocol/trade/taker/SellerTakesOfferProtocolListener.java +++ b/src/main/java/io/bitsquare/trade/protocol/trade/taker/SellerTakesOfferProtocolListener.java @@ -19,7 +19,7 @@ import io.bitsquare.trade.Trade; -import com.google.bitcoin.core.Transaction; +import org.bitcoinj.core.Transaction; public interface SellerTakesOfferProtocolListener { void onDepositTxPublished(Transaction depositTx); diff --git a/src/main/java/io/bitsquare/trade/protocol/trade/taker/messages/TakeOfferFeePayedMessage.java b/src/main/java/io/bitsquare/trade/protocol/trade/taker/messages/TakeOfferFeePayedMessage.java index 976d389c6e3..247d62fe4d1 100644 --- a/src/main/java/io/bitsquare/trade/protocol/trade/taker/messages/TakeOfferFeePayedMessage.java +++ b/src/main/java/io/bitsquare/trade/protocol/trade/taker/messages/TakeOfferFeePayedMessage.java @@ -19,7 +19,7 @@ import io.bitsquare.trade.protocol.trade.TradeMessage; -import com.google.bitcoin.core.Coin; +import org.bitcoinj.core.Coin; import java.io.Serializable; diff --git a/src/main/java/io/bitsquare/trade/protocol/trade/taker/tasks/CreateAndSignContract.java b/src/main/java/io/bitsquare/trade/protocol/trade/taker/tasks/CreateAndSignContract.java index f340c8b6264..54195001a4b 100644 --- a/src/main/java/io/bitsquare/trade/protocol/trade/taker/tasks/CreateAndSignContract.java +++ b/src/main/java/io/bitsquare/trade/protocol/trade/taker/tasks/CreateAndSignContract.java @@ -24,8 +24,8 @@ import io.bitsquare.trade.handlers.ExceptionHandler; import io.bitsquare.util.Utilities; -import com.google.bitcoin.core.Coin; -import com.google.bitcoin.core.ECKey; +import org.bitcoinj.core.Coin; +import org.bitcoinj.core.ECKey; import java.security.PublicKey; diff --git a/src/main/java/io/bitsquare/trade/protocol/trade/taker/tasks/PayDeposit.java b/src/main/java/io/bitsquare/trade/protocol/trade/taker/tasks/PayDeposit.java index ffbdc3d641f..dc8dd1fcf63 100644 --- a/src/main/java/io/bitsquare/trade/protocol/trade/taker/tasks/PayDeposit.java +++ b/src/main/java/io/bitsquare/trade/protocol/trade/taker/tasks/PayDeposit.java @@ -20,9 +20,9 @@ import io.bitsquare.btc.WalletFacade; import io.bitsquare.trade.handlers.ExceptionHandler; -import com.google.bitcoin.core.Coin; -import com.google.bitcoin.core.InsufficientMoneyException; -import com.google.bitcoin.core.Transaction; +import org.bitcoinj.core.Coin; +import org.bitcoinj.core.InsufficientMoneyException; +import org.bitcoinj.core.Transaction; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/src/main/java/io/bitsquare/trade/protocol/trade/taker/tasks/PayTakeOfferFee.java b/src/main/java/io/bitsquare/trade/protocol/trade/taker/tasks/PayTakeOfferFee.java index acfc9b1db6b..122f6a4287d 100644 --- a/src/main/java/io/bitsquare/trade/protocol/trade/taker/tasks/PayTakeOfferFee.java +++ b/src/main/java/io/bitsquare/trade/protocol/trade/taker/tasks/PayTakeOfferFee.java @@ -20,8 +20,8 @@ import io.bitsquare.btc.WalletFacade; import io.bitsquare.trade.handlers.ExceptionHandler; -import com.google.bitcoin.core.InsufficientMoneyException; -import com.google.bitcoin.core.Transaction; +import org.bitcoinj.core.InsufficientMoneyException; +import org.bitcoinj.core.Transaction; import com.google.common.util.concurrent.FutureCallback; diff --git a/src/main/java/io/bitsquare/trade/protocol/trade/taker/tasks/SendSignedTakerDepositTxAsHex.java b/src/main/java/io/bitsquare/trade/protocol/trade/taker/tasks/SendSignedTakerDepositTxAsHex.java index e226433fb22..b9bbe4d6e27 100644 --- a/src/main/java/io/bitsquare/trade/protocol/trade/taker/tasks/SendSignedTakerDepositTxAsHex.java +++ b/src/main/java/io/bitsquare/trade/protocol/trade/taker/tasks/SendSignedTakerDepositTxAsHex.java @@ -25,8 +25,8 @@ import io.bitsquare.trade.handlers.ResultHandler; import io.bitsquare.trade.protocol.trade.taker.messages.RequestOffererPublishDepositTxMessage; -import com.google.bitcoin.core.Transaction; -import com.google.bitcoin.core.Utils; +import org.bitcoinj.core.Transaction; +import org.bitcoinj.core.Utils; import java.security.PublicKey; diff --git a/src/main/java/io/bitsquare/trade/protocol/trade/taker/tasks/SendTakeOfferFeePayedTxId.java b/src/main/java/io/bitsquare/trade/protocol/trade/taker/tasks/SendTakeOfferFeePayedTxId.java index ad4807092fd..dc44a7cb716 100644 --- a/src/main/java/io/bitsquare/trade/protocol/trade/taker/tasks/SendTakeOfferFeePayedTxId.java +++ b/src/main/java/io/bitsquare/trade/protocol/trade/taker/tasks/SendTakeOfferFeePayedTxId.java @@ -23,7 +23,7 @@ import io.bitsquare.trade.handlers.ResultHandler; import io.bitsquare.trade.protocol.trade.taker.messages.TakeOfferFeePayedMessage; -import com.google.bitcoin.core.Coin; +import org.bitcoinj.core.Coin; import net.tomp2p.peers.PeerAddress; diff --git a/src/main/java/io/bitsquare/trade/protocol/trade/taker/tasks/SignAndPublishPayoutTx.java b/src/main/java/io/bitsquare/trade/protocol/trade/taker/tasks/SignAndPublishPayoutTx.java index f1eee155a51..38353fa8ef3 100644 --- a/src/main/java/io/bitsquare/trade/protocol/trade/taker/tasks/SignAndPublishPayoutTx.java +++ b/src/main/java/io/bitsquare/trade/protocol/trade/taker/tasks/SignAndPublishPayoutTx.java @@ -20,9 +20,9 @@ import io.bitsquare.btc.WalletFacade; import io.bitsquare.trade.handlers.ExceptionHandler; -import com.google.bitcoin.core.Coin; -import com.google.bitcoin.core.Transaction; -import com.google.bitcoin.core.Utils; +import org.bitcoinj.core.Coin; +import org.bitcoinj.core.Transaction; +import org.bitcoinj.core.Utils; import com.google.common.util.concurrent.FutureCallback; diff --git a/src/main/java/io/bitsquare/util/DSAKeyUtil.java b/src/main/java/io/bitsquare/util/DSAKeyUtil.java index 49b9fb6f2ea..a3ff525918d 100755 --- a/src/main/java/io/bitsquare/util/DSAKeyUtil.java +++ b/src/main/java/io/bitsquare/util/DSAKeyUtil.java @@ -17,7 +17,7 @@ package io.bitsquare.util; -import com.google.bitcoin.core.Utils; +import org.bitcoinj.core.Utils; import java.security.KeyPair; import java.security.KeyPairGenerator; diff --git a/src/main/java/io/bitsquare/util/FileUtil.java b/src/main/java/io/bitsquare/util/FileUtil.java index e0525f49110..99e8b7936e5 100644 --- a/src/main/java/io/bitsquare/util/FileUtil.java +++ b/src/main/java/io/bitsquare/util/FileUtil.java @@ -17,7 +17,7 @@ package io.bitsquare.util; -import com.google.bitcoin.core.Utils; +import org.bitcoinj.core.Utils; import java.io.File; import java.io.IOException; diff --git a/src/main/java/io/bitsquare/util/Utilities.java b/src/main/java/io/bitsquare/util/Utilities.java index 5d59d1e299e..ac4608b5fc8 100644 --- a/src/main/java/io/bitsquare/util/Utilities.java +++ b/src/main/java/io/bitsquare/util/Utilities.java @@ -63,7 +63,7 @@ public static Object deserializeHexStringToObject(String serializedHexString) { Object result = null; try { ByteArrayInputStream byteInputStream = - new ByteArrayInputStream(com.google.bitcoin.core.Utils.parseAsHexOrBase58(serializedHexString)); + new ByteArrayInputStream(org.bitcoinj.core.Utils.parseAsHexOrBase58(serializedHexString)); try (ObjectInputStream objectInputStream = new ObjectInputStream(byteInputStream)) { result = objectInputStream.readObject(); @@ -88,7 +88,7 @@ public static String serializeObjectToHexString(Serializable serializable) { ObjectOutputStream objectOutputStream = new ObjectOutputStream(byteArrayOutputStream); objectOutputStream.writeObject(serializable); - result = com.google.bitcoin.core.Utils.HEX.encode(byteArrayOutputStream.toByteArray()); + result = org.bitcoinj.core.Utils.HEX.encode(byteArrayOutputStream.toByteArray()); byteArrayOutputStream.close(); objectOutputStream.close(); diff --git a/src/main/java/io/bitsquare/util/Validator.java b/src/main/java/io/bitsquare/util/Validator.java index adbcf4867dd..348743bf3cb 100644 --- a/src/main/java/io/bitsquare/util/Validator.java +++ b/src/main/java/io/bitsquare/util/Validator.java @@ -17,7 +17,7 @@ package io.bitsquare.util; -import com.google.bitcoin.core.Coin; +import org.bitcoinj.core.Coin; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/src/main/resources/logback.xml b/src/main/resources/logback.xml index 63552395409..75ed2bdde64 100644 --- a/src/main/resources/logback.xml +++ b/src/main/resources/logback.xml @@ -25,7 +25,7 @@ - + @@ -37,16 +37,16 @@ diff --git a/src/test/java/io/bitsquare/btc/RestrictionsTest.java b/src/test/java/io/bitsquare/btc/RestrictionsTest.java index fa25bcef6c2..e08c7b3540e 100644 --- a/src/test/java/io/bitsquare/btc/RestrictionsTest.java +++ b/src/test/java/io/bitsquare/btc/RestrictionsTest.java @@ -17,8 +17,8 @@ package io.bitsquare.btc; -import com.google.bitcoin.core.Coin; -import com.google.bitcoin.core.Transaction; +import org.bitcoinj.core.Coin; +import org.bitcoinj.core.Transaction; import org.junit.Test; diff --git a/src/test/java/io/bitsquare/gui/main/trade/createoffer/CreateOfferPMTest.java b/src/test/java/io/bitsquare/gui/main/trade/createoffer/CreateOfferPMTest.java index 1e4965462f1..8e338515682 100644 --- a/src/test/java/io/bitsquare/gui/main/trade/createoffer/CreateOfferPMTest.java +++ b/src/test/java/io/bitsquare/gui/main/trade/createoffer/CreateOfferPMTest.java @@ -24,8 +24,8 @@ import io.bitsquare.locale.Country; import io.bitsquare.user.User; -import com.google.bitcoin.core.Coin; -import com.google.bitcoin.utils.Fiat; +import org.bitcoinj.core.Coin; +import org.bitcoinj.utils.Fiat; import java.util.Locale; diff --git a/src/test/java/io/bitsquare/gui/util/BSFormatterTest.java b/src/test/java/io/bitsquare/gui/util/BSFormatterTest.java index 69c33b44724..b8141c4a21a 100644 --- a/src/test/java/io/bitsquare/gui/util/BSFormatterTest.java +++ b/src/test/java/io/bitsquare/gui/util/BSFormatterTest.java @@ -19,7 +19,7 @@ import io.bitsquare.user.User; -import com.google.bitcoin.core.Coin; +import org.bitcoinj.core.Coin; import java.util.Locale; diff --git a/src/test/java/io/bitsquare/gui/util/validation/BtcValidatorTest.java b/src/test/java/io/bitsquare/gui/util/validation/BtcValidatorTest.java index b4bb0e8a693..6c2e28bfdee 100644 --- a/src/test/java/io/bitsquare/gui/util/validation/BtcValidatorTest.java +++ b/src/test/java/io/bitsquare/gui/util/validation/BtcValidatorTest.java @@ -17,8 +17,8 @@ package io.bitsquare.gui.util.validation; -import com.google.bitcoin.core.Coin; -import com.google.bitcoin.core.NetworkParameters; +import org.bitcoinj.core.Coin; +import org.bitcoinj.core.NetworkParameters; import org.junit.Test;