mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-24 15:10:44 +01:00
Rename WalletService to BitcoinWalletService
This commit is contained in:
parent
3654fa815e
commit
7357a1afd1
50 changed files with 152 additions and 152 deletions
|
@ -23,8 +23,8 @@ import io.bitsquare.app.Log;
|
||||||
import io.bitsquare.arbitration.messages.*;
|
import io.bitsquare.arbitration.messages.*;
|
||||||
import io.bitsquare.arbitration.payload.Attachment;
|
import io.bitsquare.arbitration.payload.Attachment;
|
||||||
import io.bitsquare.btc.AddressEntry;
|
import io.bitsquare.btc.AddressEntry;
|
||||||
|
import io.bitsquare.btc.BitcoinWalletService;
|
||||||
import io.bitsquare.btc.TradeWalletService;
|
import io.bitsquare.btc.TradeWalletService;
|
||||||
import io.bitsquare.btc.WalletService;
|
|
||||||
import io.bitsquare.btc.exceptions.TransactionVerificationException;
|
import io.bitsquare.btc.exceptions.TransactionVerificationException;
|
||||||
import io.bitsquare.btc.exceptions.WalletException;
|
import io.bitsquare.btc.exceptions.WalletException;
|
||||||
import io.bitsquare.common.Timer;
|
import io.bitsquare.common.Timer;
|
||||||
|
@ -69,7 +69,7 @@ public class DisputeManager {
|
||||||
private static final Logger log = LoggerFactory.getLogger(DisputeManager.class);
|
private static final Logger log = LoggerFactory.getLogger(DisputeManager.class);
|
||||||
|
|
||||||
private final TradeWalletService tradeWalletService;
|
private final TradeWalletService tradeWalletService;
|
||||||
private final WalletService walletService;
|
private final BitcoinWalletService walletService;
|
||||||
private final TradeManager tradeManager;
|
private final TradeManager tradeManager;
|
||||||
private ClosedTradableManager closedTradableManager;
|
private ClosedTradableManager closedTradableManager;
|
||||||
private final OpenOfferManager openOfferManager;
|
private final OpenOfferManager openOfferManager;
|
||||||
|
@ -93,7 +93,7 @@ public class DisputeManager {
|
||||||
@Inject
|
@Inject
|
||||||
public DisputeManager(P2PService p2PService,
|
public DisputeManager(P2PService p2PService,
|
||||||
TradeWalletService tradeWalletService,
|
TradeWalletService tradeWalletService,
|
||||||
WalletService walletService,
|
BitcoinWalletService walletService,
|
||||||
TradeManager tradeManager,
|
TradeManager tradeManager,
|
||||||
ClosedTradableManager closedTradableManager,
|
ClosedTradableManager closedTradableManager,
|
||||||
OpenOfferManager openOfferManager,
|
OpenOfferManager openOfferManager,
|
||||||
|
|
|
@ -57,7 +57,7 @@ public class BitcoinModule extends AppModule {
|
||||||
|
|
||||||
bind(AddressEntryList.class).in(Singleton.class);
|
bind(AddressEntryList.class).in(Singleton.class);
|
||||||
bind(TradeWalletService.class).in(Singleton.class);
|
bind(TradeWalletService.class).in(Singleton.class);
|
||||||
bind(WalletService.class).in(Singleton.class);
|
bind(BitcoinWalletService.class).in(Singleton.class);
|
||||||
bind(BlockchainService.class).in(Singleton.class);
|
bind(BlockchainService.class).in(Singleton.class);
|
||||||
|
|
||||||
bind(PriceFeedService.class).in(Singleton.class);
|
bind(PriceFeedService.class).in(Singleton.class);
|
||||||
|
|
|
@ -73,8 +73,8 @@ import static com.google.common.base.Preconditions.checkNotNull;
|
||||||
* WalletService handles all non trade specific wallet and bitcoin related services.
|
* WalletService handles all non trade specific wallet and bitcoin related services.
|
||||||
* It startup the wallet app kit and initialized the wallet.
|
* It startup the wallet app kit and initialized the wallet.
|
||||||
*/
|
*/
|
||||||
public class WalletService {
|
public class BitcoinWalletService {
|
||||||
private static final Logger log = LoggerFactory.getLogger(WalletService.class);
|
private static final Logger log = LoggerFactory.getLogger(BitcoinWalletService.class);
|
||||||
|
|
||||||
private static final long STARTUP_TIMEOUT_SEC = 60;
|
private static final long STARTUP_TIMEOUT_SEC = 60;
|
||||||
|
|
||||||
|
@ -113,14 +113,14 @@ public class WalletService {
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
public WalletService(RegTestHost regTestHost,
|
public BitcoinWalletService(RegTestHost regTestHost,
|
||||||
TradeWalletService tradeWalletService,
|
TradeWalletService tradeWalletService,
|
||||||
AddressEntryList addressEntryList,
|
AddressEntryList addressEntryList,
|
||||||
UserAgent userAgent,
|
UserAgent userAgent,
|
||||||
Preferences preferences,
|
Preferences preferences,
|
||||||
FeeService feeService,
|
FeeService feeService,
|
||||||
Socks5ProxyProvider socks5ProxyProvider,
|
Socks5ProxyProvider socks5ProxyProvider,
|
||||||
@Named(BtcOptionKeys.WALLET_DIR) File appDir) {
|
@Named(BtcOptionKeys.WALLET_DIR) File appDir) {
|
||||||
this.regTestHost = regTestHost;
|
this.regTestHost = regTestHost;
|
||||||
this.tradeWalletService = tradeWalletService;
|
this.tradeWalletService = tradeWalletService;
|
||||||
this.addressEntryList = addressEntryList;
|
this.addressEntryList = addressEntryList;
|
|
@ -167,7 +167,7 @@ public class TradeWalletService {
|
||||||
|
|
||||||
checkNotNull(wallet, "Wallet must not be null");
|
checkNotNull(wallet, "Wallet must not be null");
|
||||||
wallet.completeTx(sendRequest);
|
wallet.completeTx(sendRequest);
|
||||||
WalletService.printTxWithInputs("tradingFeeTx", tradingFeeTx);
|
BitcoinWalletService.printTxWithInputs("tradingFeeTx", tradingFeeTx);
|
||||||
|
|
||||||
return tradingFeeTx;
|
return tradingFeeTx;
|
||||||
}
|
}
|
||||||
|
@ -235,7 +235,7 @@ public class TradeWalletService {
|
||||||
|
|
||||||
verifyTransaction(dummyTX);
|
verifyTransaction(dummyTX);
|
||||||
|
|
||||||
WalletService.printTxWithInputs("dummyTX", dummyTX);
|
BitcoinWalletService.printTxWithInputs("dummyTX", dummyTX);
|
||||||
|
|
||||||
List<RawTransactionInput> rawTransactionInputList = dummyTX.getInputs().stream()
|
List<RawTransactionInput> rawTransactionInputList = dummyTX.getInputs().stream()
|
||||||
.map(e -> {
|
.map(e -> {
|
||||||
|
@ -403,7 +403,7 @@ public class TradeWalletService {
|
||||||
|
|
||||||
verifyTransaction(preparedDepositTx);
|
verifyTransaction(preparedDepositTx);
|
||||||
|
|
||||||
WalletService.printTxWithInputs("preparedDepositTx", preparedDepositTx);
|
BitcoinWalletService.printTxWithInputs("preparedDepositTx", preparedDepositTx);
|
||||||
|
|
||||||
return new PreparedDepositTxAndOffererInputs(offererRawTransactionInputs, preparedDepositTx.bitcoinSerialize());
|
return new PreparedDepositTxAndOffererInputs(offererRawTransactionInputs, preparedDepositTx.bitcoinSerialize());
|
||||||
}
|
}
|
||||||
|
@ -489,7 +489,7 @@ public class TradeWalletService {
|
||||||
|
|
||||||
// Add all outputs from offerersDepositTx to depositTx
|
// Add all outputs from offerersDepositTx to depositTx
|
||||||
offerersDepositTx.getOutputs().forEach(depositTx::addOutput);
|
offerersDepositTx.getOutputs().forEach(depositTx::addOutput);
|
||||||
WalletService.printTxWithInputs("offerersDepositTx", offerersDepositTx);
|
BitcoinWalletService.printTxWithInputs("offerersDepositTx", offerersDepositTx);
|
||||||
|
|
||||||
// Sign inputs
|
// Sign inputs
|
||||||
int start = takerIsSeller ? buyerInputs.size() : 0;
|
int start = takerIsSeller ? buyerInputs.size() : 0;
|
||||||
|
@ -503,7 +503,7 @@ public class TradeWalletService {
|
||||||
verifyTransaction(depositTx);
|
verifyTransaction(depositTx);
|
||||||
checkWalletConsistency();
|
checkWalletConsistency();
|
||||||
|
|
||||||
WalletService.printTxWithInputs("depositTx", depositTx);
|
BitcoinWalletService.printTxWithInputs("depositTx", depositTx);
|
||||||
|
|
||||||
// Broadcast depositTx
|
// Broadcast depositTx
|
||||||
checkNotNull(walletAppKit);
|
checkNotNull(walletAppKit);
|
||||||
|
@ -573,7 +573,7 @@ public class TradeWalletService {
|
||||||
|
|
||||||
verifyTransaction(preparedPayoutTx);
|
verifyTransaction(preparedPayoutTx);
|
||||||
|
|
||||||
WalletService.printTxWithInputs("preparedPayoutTx", preparedPayoutTx);
|
BitcoinWalletService.printTxWithInputs("preparedPayoutTx", preparedPayoutTx);
|
||||||
|
|
||||||
return sellerSignature.encodeToDER();
|
return sellerSignature.encodeToDER();
|
||||||
}
|
}
|
||||||
|
@ -647,7 +647,7 @@ public class TradeWalletService {
|
||||||
TransactionInput input = payoutTx.getInput(0);
|
TransactionInput input = payoutTx.getInput(0);
|
||||||
input.setScriptSig(inputScript);
|
input.setScriptSig(inputScript);
|
||||||
|
|
||||||
WalletService.printTxWithInputs("payoutTx", payoutTx);
|
BitcoinWalletService.printTxWithInputs("payoutTx", payoutTx);
|
||||||
|
|
||||||
verifyTransaction(payoutTx);
|
verifyTransaction(payoutTx);
|
||||||
checkWalletConsistency();
|
checkWalletConsistency();
|
||||||
|
@ -728,7 +728,7 @@ public class TradeWalletService {
|
||||||
|
|
||||||
verifyTransaction(preparedPayoutTx);
|
verifyTransaction(preparedPayoutTx);
|
||||||
|
|
||||||
WalletService.printTxWithInputs("preparedPayoutTx", preparedPayoutTx);
|
BitcoinWalletService.printTxWithInputs("preparedPayoutTx", preparedPayoutTx);
|
||||||
|
|
||||||
return arbitratorSignature.encodeToDER();
|
return arbitratorSignature.encodeToDER();
|
||||||
}
|
}
|
||||||
|
@ -817,7 +817,7 @@ public class TradeWalletService {
|
||||||
checkNotNull(input.getConnectedOutput(), "input.getConnectedOutput() must not be null");
|
checkNotNull(input.getConnectedOutput(), "input.getConnectedOutput() must not be null");
|
||||||
input.verify(input.getConnectedOutput());
|
input.verify(input.getConnectedOutput());
|
||||||
|
|
||||||
WalletService.printTxWithInputs("disputed payoutTx", payoutTx);
|
BitcoinWalletService.printTxWithInputs("disputed payoutTx", payoutTx);
|
||||||
|
|
||||||
// As we use lockTime the tx will not be relayed as it is not considered standard.
|
// As we use lockTime the tx will not be relayed as it is not considered standard.
|
||||||
// We need to broadcast on our own when we reached the block height. Both peers will do the broadcast.
|
// We need to broadcast on our own when we reached the block height. Both peers will do the broadcast.
|
||||||
|
@ -942,7 +942,7 @@ public class TradeWalletService {
|
||||||
TransactionInput input = payoutTx.getInput(0);
|
TransactionInput input = payoutTx.getInput(0);
|
||||||
input.setScriptSig(inputScript);
|
input.setScriptSig(inputScript);
|
||||||
|
|
||||||
WalletService.printTxWithInputs("payoutTx", payoutTx);
|
BitcoinWalletService.printTxWithInputs("payoutTx", payoutTx);
|
||||||
|
|
||||||
verifyTransaction(payoutTx);
|
verifyTransaction(payoutTx);
|
||||||
checkWalletConsistency();
|
checkWalletConsistency();
|
||||||
|
|
|
@ -25,8 +25,8 @@ import io.bitsquare.app.Log;
|
||||||
import io.bitsquare.app.Version;
|
import io.bitsquare.app.Version;
|
||||||
import io.bitsquare.arbitration.Arbitrator;
|
import io.bitsquare.arbitration.Arbitrator;
|
||||||
import io.bitsquare.arbitration.ArbitratorManager;
|
import io.bitsquare.arbitration.ArbitratorManager;
|
||||||
|
import io.bitsquare.btc.BitcoinWalletService;
|
||||||
import io.bitsquare.btc.TradeWalletService;
|
import io.bitsquare.btc.TradeWalletService;
|
||||||
import io.bitsquare.btc.WalletService;
|
|
||||||
import io.bitsquare.common.crypto.KeyRing;
|
import io.bitsquare.common.crypto.KeyRing;
|
||||||
import io.bitsquare.common.taskrunner.Model;
|
import io.bitsquare.common.taskrunner.Model;
|
||||||
import io.bitsquare.crypto.DecryptedMsgWithPubKey;
|
import io.bitsquare.crypto.DecryptedMsgWithPubKey;
|
||||||
|
@ -228,7 +228,7 @@ public abstract class Trade implements Tradable, Model {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void init(P2PService p2PService,
|
public void init(P2PService p2PService,
|
||||||
WalletService walletService,
|
BitcoinWalletService walletService,
|
||||||
TradeWalletService tradeWalletService,
|
TradeWalletService tradeWalletService,
|
||||||
ArbitratorManager arbitratorManager,
|
ArbitratorManager arbitratorManager,
|
||||||
TradeManager tradeManager,
|
TradeManager tradeManager,
|
||||||
|
|
|
@ -22,8 +22,8 @@ import io.bitsquare.app.Log;
|
||||||
import io.bitsquare.arbitration.ArbitratorManager;
|
import io.bitsquare.arbitration.ArbitratorManager;
|
||||||
import io.bitsquare.btc.AddressEntry;
|
import io.bitsquare.btc.AddressEntry;
|
||||||
import io.bitsquare.btc.AddressEntryException;
|
import io.bitsquare.btc.AddressEntryException;
|
||||||
|
import io.bitsquare.btc.BitcoinWalletService;
|
||||||
import io.bitsquare.btc.TradeWalletService;
|
import io.bitsquare.btc.TradeWalletService;
|
||||||
import io.bitsquare.btc.WalletService;
|
|
||||||
import io.bitsquare.btc.provider.price.PriceFeedService;
|
import io.bitsquare.btc.provider.price.PriceFeedService;
|
||||||
import io.bitsquare.common.UserThread;
|
import io.bitsquare.common.UserThread;
|
||||||
import io.bitsquare.common.crypto.KeyRing;
|
import io.bitsquare.common.crypto.KeyRing;
|
||||||
|
@ -81,7 +81,7 @@ public class TradeManager {
|
||||||
|
|
||||||
private final User user;
|
private final User user;
|
||||||
private final KeyRing keyRing;
|
private final KeyRing keyRing;
|
||||||
private final WalletService walletService;
|
private final BitcoinWalletService walletService;
|
||||||
private final TradeWalletService tradeWalletService;
|
private final TradeWalletService tradeWalletService;
|
||||||
private final OpenOfferManager openOfferManager;
|
private final OpenOfferManager openOfferManager;
|
||||||
private final ClosedTradableManager closedTradableManager;
|
private final ClosedTradableManager closedTradableManager;
|
||||||
|
@ -105,7 +105,7 @@ public class TradeManager {
|
||||||
@Inject
|
@Inject
|
||||||
public TradeManager(User user,
|
public TradeManager(User user,
|
||||||
KeyRing keyRing,
|
KeyRing keyRing,
|
||||||
WalletService walletService,
|
BitcoinWalletService walletService,
|
||||||
TradeWalletService tradeWalletService,
|
TradeWalletService tradeWalletService,
|
||||||
OpenOfferManager openOfferManager,
|
OpenOfferManager openOfferManager,
|
||||||
ClosedTradableManager closedTradableManager,
|
ClosedTradableManager closedTradableManager,
|
||||||
|
|
|
@ -21,8 +21,8 @@ import com.google.inject.Inject;
|
||||||
import io.bitsquare.app.DevFlags;
|
import io.bitsquare.app.DevFlags;
|
||||||
import io.bitsquare.app.Log;
|
import io.bitsquare.app.Log;
|
||||||
import io.bitsquare.btc.AddressEntry;
|
import io.bitsquare.btc.AddressEntry;
|
||||||
|
import io.bitsquare.btc.BitcoinWalletService;
|
||||||
import io.bitsquare.btc.TradeWalletService;
|
import io.bitsquare.btc.TradeWalletService;
|
||||||
import io.bitsquare.btc.WalletService;
|
|
||||||
import io.bitsquare.btc.provider.price.PriceFeedService;
|
import io.bitsquare.btc.provider.price.PriceFeedService;
|
||||||
import io.bitsquare.common.Timer;
|
import io.bitsquare.common.Timer;
|
||||||
import io.bitsquare.common.UserThread;
|
import io.bitsquare.common.UserThread;
|
||||||
|
@ -78,7 +78,7 @@ public class OpenOfferManager implements PeerManager.Listener, DecryptedDirectMe
|
||||||
private final KeyRing keyRing;
|
private final KeyRing keyRing;
|
||||||
private final User user;
|
private final User user;
|
||||||
private final P2PService p2PService;
|
private final P2PService p2PService;
|
||||||
private final WalletService walletService;
|
private final BitcoinWalletService walletService;
|
||||||
private final TradeWalletService tradeWalletService;
|
private final TradeWalletService tradeWalletService;
|
||||||
private final OfferBookService offerBookService;
|
private final OfferBookService offerBookService;
|
||||||
private final ClosedTradableManager closedTradableManager;
|
private final ClosedTradableManager closedTradableManager;
|
||||||
|
@ -98,7 +98,7 @@ public class OpenOfferManager implements PeerManager.Listener, DecryptedDirectMe
|
||||||
public OpenOfferManager(KeyRing keyRing,
|
public OpenOfferManager(KeyRing keyRing,
|
||||||
User user,
|
User user,
|
||||||
P2PService p2PService,
|
P2PService p2PService,
|
||||||
WalletService walletService,
|
BitcoinWalletService walletService,
|
||||||
TradeWalletService tradeWalletService,
|
TradeWalletService tradeWalletService,
|
||||||
OfferBookService offerBookService,
|
OfferBookService offerBookService,
|
||||||
ClosedTradableManager closedTradableManager,
|
ClosedTradableManager closedTradableManager,
|
||||||
|
|
|
@ -17,8 +17,8 @@
|
||||||
|
|
||||||
package io.bitsquare.trade.protocol.placeoffer;
|
package io.bitsquare.trade.protocol.placeoffer;
|
||||||
|
|
||||||
|
import io.bitsquare.btc.BitcoinWalletService;
|
||||||
import io.bitsquare.btc.TradeWalletService;
|
import io.bitsquare.btc.TradeWalletService;
|
||||||
import io.bitsquare.btc.WalletService;
|
|
||||||
import io.bitsquare.common.taskrunner.Model;
|
import io.bitsquare.common.taskrunner.Model;
|
||||||
import io.bitsquare.trade.offer.Offer;
|
import io.bitsquare.trade.offer.Offer;
|
||||||
import io.bitsquare.trade.offer.OfferBookService;
|
import io.bitsquare.trade.offer.OfferBookService;
|
||||||
|
@ -34,7 +34,7 @@ public class PlaceOfferModel implements Model {
|
||||||
public final Offer offer;
|
public final Offer offer;
|
||||||
public final Coin reservedFundsForOffer;
|
public final Coin reservedFundsForOffer;
|
||||||
public final boolean useSavingsWallet;
|
public final boolean useSavingsWallet;
|
||||||
public final WalletService walletService;
|
public final BitcoinWalletService walletService;
|
||||||
public final TradeWalletService tradeWalletService;
|
public final TradeWalletService tradeWalletService;
|
||||||
public final OfferBookService offerBookService;
|
public final OfferBookService offerBookService;
|
||||||
public final User user;
|
public final User user;
|
||||||
|
@ -44,7 +44,7 @@ public class PlaceOfferModel implements Model {
|
||||||
public PlaceOfferModel(Offer offer,
|
public PlaceOfferModel(Offer offer,
|
||||||
Coin reservedFundsForOffer,
|
Coin reservedFundsForOffer,
|
||||||
boolean useSavingsWallet,
|
boolean useSavingsWallet,
|
||||||
WalletService walletService,
|
BitcoinWalletService walletService,
|
||||||
TradeWalletService tradeWalletService,
|
TradeWalletService tradeWalletService,
|
||||||
OfferBookService offerBookService,
|
OfferBookService offerBookService,
|
||||||
User user) {
|
User user) {
|
||||||
|
|
|
@ -19,7 +19,7 @@ package io.bitsquare.trade.protocol.placeoffer.tasks;
|
||||||
|
|
||||||
import io.bitsquare.arbitration.Arbitrator;
|
import io.bitsquare.arbitration.Arbitrator;
|
||||||
import io.bitsquare.btc.AddressEntry;
|
import io.bitsquare.btc.AddressEntry;
|
||||||
import io.bitsquare.btc.WalletService;
|
import io.bitsquare.btc.BitcoinWalletService;
|
||||||
import io.bitsquare.common.taskrunner.Task;
|
import io.bitsquare.common.taskrunner.Task;
|
||||||
import io.bitsquare.common.taskrunner.TaskRunner;
|
import io.bitsquare.common.taskrunner.TaskRunner;
|
||||||
import io.bitsquare.p2p.NodeAddress;
|
import io.bitsquare.p2p.NodeAddress;
|
||||||
|
@ -49,7 +49,7 @@ public class CreateOfferFeeTx extends Task<PlaceOfferModel> {
|
||||||
log.debug("selectedArbitratorAddress " + selectedArbitratorNodeAddress);
|
log.debug("selectedArbitratorAddress " + selectedArbitratorNodeAddress);
|
||||||
Arbitrator selectedArbitrator = model.user.getAcceptedArbitratorByAddress(selectedArbitratorNodeAddress);
|
Arbitrator selectedArbitrator = model.user.getAcceptedArbitratorByAddress(selectedArbitratorNodeAddress);
|
||||||
checkNotNull(selectedArbitrator, "selectedArbitrator must not be null at CreateOfferFeeTx");
|
checkNotNull(selectedArbitrator, "selectedArbitrator must not be null at CreateOfferFeeTx");
|
||||||
WalletService walletService = model.walletService;
|
BitcoinWalletService walletService = model.walletService;
|
||||||
String id = offer.getId();
|
String id = offer.getId();
|
||||||
Transaction transaction = model.tradeWalletService.createTradingFeeTx(
|
Transaction transaction = model.tradeWalletService.createTradingFeeTx(
|
||||||
walletService.getOrCreateAddressEntry(id, AddressEntry.Context.OFFER_FUNDING).getAddress(),
|
walletService.getOrCreateAddressEntry(id, AddressEntry.Context.OFFER_FUNDING).getAddress(),
|
||||||
|
|
|
@ -19,8 +19,8 @@ package io.bitsquare.trade.protocol.trade;
|
||||||
|
|
||||||
import io.bitsquare.app.Version;
|
import io.bitsquare.app.Version;
|
||||||
import io.bitsquare.arbitration.ArbitratorManager;
|
import io.bitsquare.arbitration.ArbitratorManager;
|
||||||
|
import io.bitsquare.btc.BitcoinWalletService;
|
||||||
import io.bitsquare.btc.TradeWalletService;
|
import io.bitsquare.btc.TradeWalletService;
|
||||||
import io.bitsquare.btc.WalletService;
|
|
||||||
import io.bitsquare.btc.data.RawTransactionInput;
|
import io.bitsquare.btc.data.RawTransactionInput;
|
||||||
import io.bitsquare.common.crypto.KeyRing;
|
import io.bitsquare.common.crypto.KeyRing;
|
||||||
import io.bitsquare.common.crypto.PubKeyRing;
|
import io.bitsquare.common.crypto.PubKeyRing;
|
||||||
|
@ -60,7 +60,7 @@ public class ProcessModel implements Model, Serializable {
|
||||||
// Transient/Immutable
|
// Transient/Immutable
|
||||||
transient private TradeManager tradeManager;
|
transient private TradeManager tradeManager;
|
||||||
transient private OpenOfferManager openOfferManager;
|
transient private OpenOfferManager openOfferManager;
|
||||||
transient private WalletService walletService;
|
transient private BitcoinWalletService walletService;
|
||||||
transient private TradeWalletService tradeWalletService;
|
transient private TradeWalletService tradeWalletService;
|
||||||
transient private ArbitratorManager arbitratorManager;
|
transient private ArbitratorManager arbitratorManager;
|
||||||
transient private Offer offer;
|
transient private Offer offer;
|
||||||
|
@ -104,7 +104,7 @@ public class ProcessModel implements Model, Serializable {
|
||||||
TradeManager tradeManager,
|
TradeManager tradeManager,
|
||||||
OpenOfferManager openOfferManager,
|
OpenOfferManager openOfferManager,
|
||||||
P2PService p2PService,
|
P2PService p2PService,
|
||||||
WalletService walletService,
|
BitcoinWalletService walletService,
|
||||||
TradeWalletService tradeWalletService,
|
TradeWalletService tradeWalletService,
|
||||||
ArbitratorManager arbitratorManager,
|
ArbitratorManager arbitratorManager,
|
||||||
User user,
|
User user,
|
||||||
|
@ -139,7 +139,7 @@ public class ProcessModel implements Model, Serializable {
|
||||||
return openOfferManager;
|
return openOfferManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
public WalletService getWalletService() {
|
public BitcoinWalletService getWalletService() {
|
||||||
return walletService;
|
return walletService;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
package io.bitsquare.trade.protocol.trade.tasks.buyer;
|
package io.bitsquare.trade.protocol.trade.tasks.buyer;
|
||||||
|
|
||||||
import io.bitsquare.btc.AddressEntry;
|
import io.bitsquare.btc.AddressEntry;
|
||||||
import io.bitsquare.btc.WalletService;
|
import io.bitsquare.btc.BitcoinWalletService;
|
||||||
import io.bitsquare.btc.data.PreparedDepositTxAndOffererInputs;
|
import io.bitsquare.btc.data.PreparedDepositTxAndOffererInputs;
|
||||||
import io.bitsquare.common.crypto.Hash;
|
import io.bitsquare.common.crypto.Hash;
|
||||||
import io.bitsquare.common.taskrunner.TaskRunner;
|
import io.bitsquare.common.taskrunner.TaskRunner;
|
||||||
|
@ -53,7 +53,7 @@ public class OffererCreatesAndSignsDepositTxAsBuyer extends TradeTask {
|
||||||
|
|
||||||
byte[] contractHash = Hash.getHash(trade.getContractAsJson());
|
byte[] contractHash = Hash.getHash(trade.getContractAsJson());
|
||||||
trade.setContractHash(contractHash);
|
trade.setContractHash(contractHash);
|
||||||
WalletService walletService = processModel.getWalletService();
|
BitcoinWalletService walletService = processModel.getWalletService();
|
||||||
String id = processModel.getOffer().getId();
|
String id = processModel.getOffer().getId();
|
||||||
AddressEntry buyerMultiSigAddressEntry = walletService.getOrCreateAddressEntry(id, AddressEntry.Context.MULTI_SIG);
|
AddressEntry buyerMultiSigAddressEntry = walletService.getOrCreateAddressEntry(id, AddressEntry.Context.MULTI_SIG);
|
||||||
buyerMultiSigAddressEntry.setLockedTradeAmount(buyerInputAmount.subtract(trade.getTxFee()));
|
buyerMultiSigAddressEntry.setLockedTradeAmount(buyerInputAmount.subtract(trade.getTxFee()));
|
||||||
|
|
|
@ -19,7 +19,7 @@ package io.bitsquare.trade.protocol.trade.tasks.buyer;
|
||||||
|
|
||||||
import com.google.common.util.concurrent.FutureCallback;
|
import com.google.common.util.concurrent.FutureCallback;
|
||||||
import io.bitsquare.btc.AddressEntry;
|
import io.bitsquare.btc.AddressEntry;
|
||||||
import io.bitsquare.btc.WalletService;
|
import io.bitsquare.btc.BitcoinWalletService;
|
||||||
import io.bitsquare.btc.data.RawTransactionInput;
|
import io.bitsquare.btc.data.RawTransactionInput;
|
||||||
import io.bitsquare.common.crypto.Hash;
|
import io.bitsquare.common.crypto.Hash;
|
||||||
import io.bitsquare.common.taskrunner.TaskRunner;
|
import io.bitsquare.common.taskrunner.TaskRunner;
|
||||||
|
@ -55,7 +55,7 @@ public class SignAndPublishDepositTxAsBuyer extends TradeTask {
|
||||||
byte[] contractHash = Hash.getHash(trade.getContractAsJson());
|
byte[] contractHash = Hash.getHash(trade.getContractAsJson());
|
||||||
trade.setContractHash(contractHash);
|
trade.setContractHash(contractHash);
|
||||||
ArrayList<RawTransactionInput> buyerInputs = processModel.getRawTransactionInputs();
|
ArrayList<RawTransactionInput> buyerInputs = processModel.getRawTransactionInputs();
|
||||||
WalletService walletService = processModel.getWalletService();
|
BitcoinWalletService walletService = processModel.getWalletService();
|
||||||
AddressEntry buyerMultiSigAddressEntry = walletService.getOrCreateAddressEntry(processModel.getOffer().getId(), AddressEntry.Context.MULTI_SIG);
|
AddressEntry buyerMultiSigAddressEntry = walletService.getOrCreateAddressEntry(processModel.getOffer().getId(), AddressEntry.Context.MULTI_SIG);
|
||||||
buyerMultiSigAddressEntry.setLockedTradeAmount(Coin.valueOf(buyerInputs.stream().mapToLong(input -> input.value).sum()).subtract(trade.getTxFee()));
|
buyerMultiSigAddressEntry.setLockedTradeAmount(Coin.valueOf(buyerInputs.stream().mapToLong(input -> input.value).sum()).subtract(trade.getTxFee()));
|
||||||
walletService.saveAddressEntryList();
|
walletService.saveAddressEntryList();
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
package io.bitsquare.trade.protocol.trade.tasks.offerer;
|
package io.bitsquare.trade.protocol.trade.tasks.offerer;
|
||||||
|
|
||||||
import io.bitsquare.btc.AddressEntry;
|
import io.bitsquare.btc.AddressEntry;
|
||||||
import io.bitsquare.btc.WalletService;
|
import io.bitsquare.btc.BitcoinWalletService;
|
||||||
import io.bitsquare.btc.listeners.BalanceListener;
|
import io.bitsquare.btc.listeners.BalanceListener;
|
||||||
import io.bitsquare.common.UserThread;
|
import io.bitsquare.common.UserThread;
|
||||||
import io.bitsquare.common.taskrunner.TaskRunner;
|
import io.bitsquare.common.taskrunner.TaskRunner;
|
||||||
|
@ -51,7 +51,7 @@ public class SetupDepositBalanceListener extends TradeTask {
|
||||||
try {
|
try {
|
||||||
runInterceptHook();
|
runInterceptHook();
|
||||||
|
|
||||||
WalletService walletService = processModel.getWalletService();
|
BitcoinWalletService walletService = processModel.getWalletService();
|
||||||
Address address = walletService.getOrCreateAddressEntry(trade.getId(), AddressEntry.Context.RESERVED_FOR_TRADE).getAddress();
|
Address address = walletService.getOrCreateAddressEntry(trade.getId(), AddressEntry.Context.RESERVED_FOR_TRADE).getAddress();
|
||||||
balanceListener = new BalanceListener(address) {
|
balanceListener = new BalanceListener(address) {
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
package io.bitsquare.trade.protocol.trade.tasks.seller;
|
package io.bitsquare.trade.protocol.trade.tasks.seller;
|
||||||
|
|
||||||
import io.bitsquare.btc.AddressEntry;
|
import io.bitsquare.btc.AddressEntry;
|
||||||
import io.bitsquare.btc.WalletService;
|
import io.bitsquare.btc.BitcoinWalletService;
|
||||||
import io.bitsquare.btc.data.PreparedDepositTxAndOffererInputs;
|
import io.bitsquare.btc.data.PreparedDepositTxAndOffererInputs;
|
||||||
import io.bitsquare.common.crypto.Hash;
|
import io.bitsquare.common.crypto.Hash;
|
||||||
import io.bitsquare.common.taskrunner.TaskRunner;
|
import io.bitsquare.common.taskrunner.TaskRunner;
|
||||||
|
@ -53,7 +53,7 @@ public class OffererCreatesAndSignsDepositTxAsSeller extends TradeTask {
|
||||||
|
|
||||||
byte[] contractHash = Hash.getHash(trade.getContractAsJson());
|
byte[] contractHash = Hash.getHash(trade.getContractAsJson());
|
||||||
trade.setContractHash(contractHash);
|
trade.setContractHash(contractHash);
|
||||||
WalletService walletService = processModel.getWalletService();
|
BitcoinWalletService walletService = processModel.getWalletService();
|
||||||
String id = processModel.getOffer().getId();
|
String id = processModel.getOffer().getId();
|
||||||
AddressEntry sellerMultiSigAddressEntry = walletService.getOrCreateAddressEntry(id, AddressEntry.Context.MULTI_SIG);
|
AddressEntry sellerMultiSigAddressEntry = walletService.getOrCreateAddressEntry(id, AddressEntry.Context.MULTI_SIG);
|
||||||
sellerMultiSigAddressEntry.setLockedTradeAmount(sellerInputAmount.subtract(trade.getTxFee()));
|
sellerMultiSigAddressEntry.setLockedTradeAmount(sellerInputAmount.subtract(trade.getTxFee()));
|
||||||
|
|
|
@ -19,7 +19,7 @@ package io.bitsquare.trade.protocol.trade.tasks.seller;
|
||||||
|
|
||||||
import com.google.common.util.concurrent.FutureCallback;
|
import com.google.common.util.concurrent.FutureCallback;
|
||||||
import io.bitsquare.btc.AddressEntry;
|
import io.bitsquare.btc.AddressEntry;
|
||||||
import io.bitsquare.btc.WalletService;
|
import io.bitsquare.btc.BitcoinWalletService;
|
||||||
import io.bitsquare.btc.data.RawTransactionInput;
|
import io.bitsquare.btc.data.RawTransactionInput;
|
||||||
import io.bitsquare.common.crypto.Hash;
|
import io.bitsquare.common.crypto.Hash;
|
||||||
import io.bitsquare.common.taskrunner.TaskRunner;
|
import io.bitsquare.common.taskrunner.TaskRunner;
|
||||||
|
@ -54,7 +54,7 @@ public class SignAndPublishDepositTxAsSeller extends TradeTask {
|
||||||
trade.setContractHash(contractHash);
|
trade.setContractHash(contractHash);
|
||||||
|
|
||||||
ArrayList<RawTransactionInput> sellerInputs = processModel.getRawTransactionInputs();
|
ArrayList<RawTransactionInput> sellerInputs = processModel.getRawTransactionInputs();
|
||||||
WalletService walletService = processModel.getWalletService();
|
BitcoinWalletService walletService = processModel.getWalletService();
|
||||||
AddressEntry sellerMultiSigAddressEntry = walletService.getOrCreateAddressEntry(processModel.getOffer().getId(), AddressEntry.Context.MULTI_SIG);
|
AddressEntry sellerMultiSigAddressEntry = walletService.getOrCreateAddressEntry(processModel.getOffer().getId(), AddressEntry.Context.MULTI_SIG);
|
||||||
sellerMultiSigAddressEntry.setLockedTradeAmount(Coin.valueOf(sellerInputs.stream().mapToLong(input -> input.value).sum()).subtract(trade.getTxFee()));
|
sellerMultiSigAddressEntry.setLockedTradeAmount(Coin.valueOf(sellerInputs.stream().mapToLong(input -> input.value).sum()).subtract(trade.getTxFee()));
|
||||||
walletService.saveAddressEntryList();
|
walletService.saveAddressEntryList();
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
package io.bitsquare.trade.protocol.trade.tasks.seller;
|
package io.bitsquare.trade.protocol.trade.tasks.seller;
|
||||||
|
|
||||||
import io.bitsquare.btc.AddressEntry;
|
import io.bitsquare.btc.AddressEntry;
|
||||||
import io.bitsquare.btc.WalletService;
|
import io.bitsquare.btc.BitcoinWalletService;
|
||||||
import io.bitsquare.common.taskrunner.TaskRunner;
|
import io.bitsquare.common.taskrunner.TaskRunner;
|
||||||
import io.bitsquare.trade.Trade;
|
import io.bitsquare.trade.Trade;
|
||||||
import io.bitsquare.trade.protocol.trade.tasks.TradeTask;
|
import io.bitsquare.trade.protocol.trade.tasks.TradeTask;
|
||||||
|
@ -54,7 +54,7 @@ public class SignPayoutTx extends TradeTask {
|
||||||
lockTimeAsBlockHeight = processModel.getTradeWalletService().getLastBlockSeenHeight() + lockTime;
|
lockTimeAsBlockHeight = processModel.getTradeWalletService().getLastBlockSeenHeight() + lockTime;
|
||||||
trade.setLockTimeAsBlockHeight(lockTimeAsBlockHeight);
|
trade.setLockTimeAsBlockHeight(lockTimeAsBlockHeight);
|
||||||
|
|
||||||
WalletService walletService = processModel.getWalletService();
|
BitcoinWalletService walletService = processModel.getWalletService();
|
||||||
String id = processModel.getOffer().getId();
|
String id = processModel.getOffer().getId();
|
||||||
byte[] payoutTxSignature = processModel.getTradeWalletService().sellerSignsPayoutTx(
|
byte[] payoutTxSignature = processModel.getTradeWalletService().sellerSignsPayoutTx(
|
||||||
trade.getDepositTx(),
|
trade.getDepositTx(),
|
||||||
|
|
|
@ -19,7 +19,7 @@ package io.bitsquare.trade.protocol.trade.tasks.taker;
|
||||||
|
|
||||||
import io.bitsquare.arbitration.Arbitrator;
|
import io.bitsquare.arbitration.Arbitrator;
|
||||||
import io.bitsquare.btc.AddressEntry;
|
import io.bitsquare.btc.AddressEntry;
|
||||||
import io.bitsquare.btc.WalletService;
|
import io.bitsquare.btc.BitcoinWalletService;
|
||||||
import io.bitsquare.common.taskrunner.TaskRunner;
|
import io.bitsquare.common.taskrunner.TaskRunner;
|
||||||
import io.bitsquare.p2p.NodeAddress;
|
import io.bitsquare.p2p.NodeAddress;
|
||||||
import io.bitsquare.trade.Trade;
|
import io.bitsquare.trade.Trade;
|
||||||
|
@ -49,7 +49,7 @@ public class CreateTakeOfferFeeTx extends TradeTask {
|
||||||
log.debug("selectedArbitratorAddress " + selectedArbitratorNodeAddress);
|
log.debug("selectedArbitratorAddress " + selectedArbitratorNodeAddress);
|
||||||
Arbitrator selectedArbitrator = user.getAcceptedArbitratorByAddress(selectedArbitratorNodeAddress);
|
Arbitrator selectedArbitrator = user.getAcceptedArbitratorByAddress(selectedArbitratorNodeAddress);
|
||||||
checkNotNull(selectedArbitrator, "selectedArbitrator must not be null at CreateTakeOfferFeeTx");
|
checkNotNull(selectedArbitrator, "selectedArbitrator must not be null at CreateTakeOfferFeeTx");
|
||||||
WalletService walletService = processModel.getWalletService();
|
BitcoinWalletService walletService = processModel.getWalletService();
|
||||||
String id = model.getOffer().getId();
|
String id = model.getOffer().getId();
|
||||||
Transaction createTakeOfferFeeTx = processModel.getTradeWalletService().createTradingFeeTx(
|
Transaction createTakeOfferFeeTx = processModel.getTradeWalletService().createTradingFeeTx(
|
||||||
walletService.getOrCreateAddressEntry(id, AddressEntry.Context.OFFER_FUNDING).getAddress(),
|
walletService.getOrCreateAddressEntry(id, AddressEntry.Context.OFFER_FUNDING).getAddress(),
|
||||||
|
|
|
@ -23,8 +23,8 @@ import com.google.inject.Guice;
|
||||||
import com.google.inject.Injector;
|
import com.google.inject.Injector;
|
||||||
import io.bitsquare.alert.AlertManager;
|
import io.bitsquare.alert.AlertManager;
|
||||||
import io.bitsquare.arbitration.ArbitratorManager;
|
import io.bitsquare.arbitration.ArbitratorManager;
|
||||||
|
import io.bitsquare.btc.BitcoinWalletService;
|
||||||
import io.bitsquare.btc.TradeWalletService;
|
import io.bitsquare.btc.TradeWalletService;
|
||||||
import io.bitsquare.btc.WalletService;
|
|
||||||
import io.bitsquare.common.CommonOptionKeys;
|
import io.bitsquare.common.CommonOptionKeys;
|
||||||
import io.bitsquare.common.UserThread;
|
import io.bitsquare.common.UserThread;
|
||||||
import io.bitsquare.common.handlers.ResultHandler;
|
import io.bitsquare.common.handlers.ResultHandler;
|
||||||
|
@ -208,14 +208,14 @@ public class BitsquareApp extends Application {
|
||||||
} else if (new KeyCodeCombination(KeyCode.F, KeyCombination.ALT_DOWN).match(keyEvent)) {
|
} else if (new KeyCodeCombination(KeyCode.F, KeyCombination.ALT_DOWN).match(keyEvent)) {
|
||||||
showFPSWindow();
|
showFPSWindow();
|
||||||
} else if (new KeyCodeCombination(KeyCode.J, KeyCombination.ALT_DOWN).match(keyEvent)) {
|
} else if (new KeyCodeCombination(KeyCode.J, KeyCombination.ALT_DOWN).match(keyEvent)) {
|
||||||
WalletService walletService = injector.getInstance(WalletService.class);
|
BitcoinWalletService walletService = injector.getInstance(BitcoinWalletService.class);
|
||||||
if (walletService.getWallet() != null)
|
if (walletService.getWallet() != null)
|
||||||
new ShowWalletDataWindow(walletService).information("Wallet raw data").show();
|
new ShowWalletDataWindow(walletService).information("Wallet raw data").show();
|
||||||
else
|
else
|
||||||
new Popup<>().warning("The wallet is not initialized yet").show();
|
new Popup<>().warning("The wallet is not initialized yet").show();
|
||||||
} else if (DevFlags.DEV_MODE && new KeyCodeCombination(KeyCode.G, KeyCombination.ALT_DOWN).match(keyEvent)) {
|
} else if (DevFlags.DEV_MODE && new KeyCodeCombination(KeyCode.G, KeyCombination.ALT_DOWN).match(keyEvent)) {
|
||||||
TradeWalletService tradeWalletService = injector.getInstance(TradeWalletService.class);
|
TradeWalletService tradeWalletService = injector.getInstance(TradeWalletService.class);
|
||||||
WalletService walletService = injector.getInstance(WalletService.class);
|
BitcoinWalletService walletService = injector.getInstance(BitcoinWalletService.class);
|
||||||
if (walletService.getWallet() != null)
|
if (walletService.getWallet() != null)
|
||||||
new SpendFromDepositTxWindow(tradeWalletService).information("Emergency wallet tool").show();
|
new SpendFromDepositTxWindow(tradeWalletService).information("Emergency wallet tool").show();
|
||||||
else
|
else
|
||||||
|
@ -402,12 +402,12 @@ public class BitsquareApp extends Application {
|
||||||
injector.getInstance(TradeManager.class).shutDown();
|
injector.getInstance(TradeManager.class).shutDown();
|
||||||
injector.getInstance(OpenOfferManager.class).shutDown(() -> {
|
injector.getInstance(OpenOfferManager.class).shutDown(() -> {
|
||||||
injector.getInstance(P2PService.class).shutDown(() -> {
|
injector.getInstance(P2PService.class).shutDown(() -> {
|
||||||
injector.getInstance(WalletService.class).shutDownDone.addListener((ov, o, n) -> {
|
injector.getInstance(BitcoinWalletService.class).shutDownDone.addListener((ov, o, n) -> {
|
||||||
bitsquareAppModule.close(injector);
|
bitsquareAppModule.close(injector);
|
||||||
log.debug("Graceful shutdown completed");
|
log.debug("Graceful shutdown completed");
|
||||||
resultHandler.handleResult();
|
resultHandler.handleResult();
|
||||||
});
|
});
|
||||||
injector.getInstance(WalletService.class).shutDown();
|
injector.getInstance(BitcoinWalletService.class).shutDown();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
// we wait max 20 sec.
|
// we wait max 20 sec.
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
|
|
||||||
package io.bitsquare.gui.components;
|
package io.bitsquare.gui.components;
|
||||||
|
|
||||||
import io.bitsquare.btc.WalletService;
|
import io.bitsquare.btc.BitcoinWalletService;
|
||||||
import io.bitsquare.gui.util.BSFormatter;
|
import io.bitsquare.gui.util.BSFormatter;
|
||||||
import javafx.scene.control.TextField;
|
import javafx.scene.control.TextField;
|
||||||
import javafx.scene.effect.BlurType;
|
import javafx.scene.effect.BlurType;
|
||||||
|
@ -29,10 +29,10 @@ import org.bitcoinj.core.Coin;
|
||||||
|
|
||||||
public class BalanceTextField extends AnchorPane {
|
public class BalanceTextField extends AnchorPane {
|
||||||
|
|
||||||
private static WalletService walletService;
|
private static BitcoinWalletService walletService;
|
||||||
private Coin targetAmount;
|
private Coin targetAmount;
|
||||||
|
|
||||||
public static void setWalletService(WalletService walletService) {
|
public static void setWalletService(BitcoinWalletService walletService) {
|
||||||
BalanceTextField.walletService = walletService;
|
BalanceTextField.walletService = walletService;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
|
|
||||||
package io.bitsquare.gui.components;
|
package io.bitsquare.gui.components;
|
||||||
|
|
||||||
import io.bitsquare.btc.WalletService;
|
import io.bitsquare.btc.BitcoinWalletService;
|
||||||
import io.bitsquare.btc.listeners.AddressConfidenceListener;
|
import io.bitsquare.btc.listeners.AddressConfidenceListener;
|
||||||
import io.bitsquare.btc.listeners.BalanceListener;
|
import io.bitsquare.btc.listeners.BalanceListener;
|
||||||
import io.bitsquare.gui.components.indicator.TxConfidenceIndicator;
|
import io.bitsquare.gui.components.indicator.TxConfidenceIndicator;
|
||||||
|
@ -36,11 +36,11 @@ import org.bitcoinj.core.TransactionConfidence;
|
||||||
|
|
||||||
public class BalanceWithConfirmationTextField extends AnchorPane {
|
public class BalanceWithConfirmationTextField extends AnchorPane {
|
||||||
|
|
||||||
private static WalletService walletService;
|
private static BitcoinWalletService walletService;
|
||||||
private BalanceListener balanceListener;
|
private BalanceListener balanceListener;
|
||||||
private AddressConfidenceListener confidenceListener;
|
private AddressConfidenceListener confidenceListener;
|
||||||
|
|
||||||
public static void setWalletService(WalletService walletService) {
|
public static void setWalletService(BitcoinWalletService walletService) {
|
||||||
BalanceWithConfirmationTextField.walletService = walletService;
|
BalanceWithConfirmationTextField.walletService = walletService;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@ package io.bitsquare.gui.components;
|
||||||
|
|
||||||
import de.jensd.fx.fontawesome.AwesomeDude;
|
import de.jensd.fx.fontawesome.AwesomeDude;
|
||||||
import de.jensd.fx.fontawesome.AwesomeIcon;
|
import de.jensd.fx.fontawesome.AwesomeIcon;
|
||||||
import io.bitsquare.btc.WalletService;
|
import io.bitsquare.btc.BitcoinWalletService;
|
||||||
import io.bitsquare.btc.listeners.TxConfidenceListener;
|
import io.bitsquare.btc.listeners.TxConfidenceListener;
|
||||||
import io.bitsquare.common.util.Utilities;
|
import io.bitsquare.common.util.Utilities;
|
||||||
import io.bitsquare.gui.components.indicator.TxConfidenceIndicator;
|
import io.bitsquare.gui.components.indicator.TxConfidenceIndicator;
|
||||||
|
@ -43,9 +43,9 @@ public class TxIdTextField extends AnchorPane {
|
||||||
TxIdTextField.preferences = preferences;
|
TxIdTextField.preferences = preferences;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static WalletService walletService;
|
private static BitcoinWalletService walletService;
|
||||||
|
|
||||||
public static void setWalletService(WalletService walletService) {
|
public static void setWalletService(BitcoinWalletService walletService) {
|
||||||
TxIdTextField.walletService = walletService;
|
TxIdTextField.walletService = walletService;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -30,8 +30,8 @@ import io.bitsquare.arbitration.ArbitratorManager;
|
||||||
import io.bitsquare.arbitration.Dispute;
|
import io.bitsquare.arbitration.Dispute;
|
||||||
import io.bitsquare.arbitration.DisputeManager;
|
import io.bitsquare.arbitration.DisputeManager;
|
||||||
import io.bitsquare.btc.AddressEntry;
|
import io.bitsquare.btc.AddressEntry;
|
||||||
|
import io.bitsquare.btc.BitcoinWalletService;
|
||||||
import io.bitsquare.btc.TradeWalletService;
|
import io.bitsquare.btc.TradeWalletService;
|
||||||
import io.bitsquare.btc.WalletService;
|
|
||||||
import io.bitsquare.btc.listeners.BalanceListener;
|
import io.bitsquare.btc.listeners.BalanceListener;
|
||||||
import io.bitsquare.btc.provider.fee.FeeService;
|
import io.bitsquare.btc.provider.fee.FeeService;
|
||||||
import io.bitsquare.btc.provider.price.MarketPrice;
|
import io.bitsquare.btc.provider.price.MarketPrice;
|
||||||
|
@ -98,7 +98,7 @@ import java.util.stream.Collectors;
|
||||||
public class MainViewModel implements ViewModel {
|
public class MainViewModel implements ViewModel {
|
||||||
private static final Logger log = LoggerFactory.getLogger(MainViewModel.class);
|
private static final Logger log = LoggerFactory.getLogger(MainViewModel.class);
|
||||||
|
|
||||||
private final WalletService walletService;
|
private final BitcoinWalletService walletService;
|
||||||
private final TradeWalletService tradeWalletService;
|
private final TradeWalletService tradeWalletService;
|
||||||
private final ArbitratorManager arbitratorManager;
|
private final ArbitratorManager arbitratorManager;
|
||||||
private final P2PService p2PService;
|
private final P2PService p2PService;
|
||||||
|
@ -176,7 +176,7 @@ public class MainViewModel implements ViewModel {
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
public MainViewModel(WalletService walletService, TradeWalletService tradeWalletService,
|
public MainViewModel(BitcoinWalletService walletService, TradeWalletService tradeWalletService,
|
||||||
PriceFeedService priceFeedService,
|
PriceFeedService priceFeedService,
|
||||||
ArbitratorManager arbitratorManager, P2PService p2PService, TradeManager tradeManager,
|
ArbitratorManager arbitratorManager, P2PService p2PService, TradeManager tradeManager,
|
||||||
OpenOfferManager openOfferManager, DisputeManager disputeManager, Preferences preferences,
|
OpenOfferManager openOfferManager, DisputeManager disputeManager, Preferences preferences,
|
||||||
|
|
|
@ -21,7 +21,7 @@ import com.google.inject.Inject;
|
||||||
import io.bitsquare.arbitration.Arbitrator;
|
import io.bitsquare.arbitration.Arbitrator;
|
||||||
import io.bitsquare.arbitration.ArbitratorManager;
|
import io.bitsquare.arbitration.ArbitratorManager;
|
||||||
import io.bitsquare.btc.AddressEntry;
|
import io.bitsquare.btc.AddressEntry;
|
||||||
import io.bitsquare.btc.WalletService;
|
import io.bitsquare.btc.BitcoinWalletService;
|
||||||
import io.bitsquare.common.crypto.KeyRing;
|
import io.bitsquare.common.crypto.KeyRing;
|
||||||
import io.bitsquare.common.handlers.ErrorMessageHandler;
|
import io.bitsquare.common.handlers.ErrorMessageHandler;
|
||||||
import io.bitsquare.common.handlers.ResultHandler;
|
import io.bitsquare.common.handlers.ResultHandler;
|
||||||
|
@ -44,7 +44,7 @@ class ArbitratorRegistrationViewModel extends ActivatableViewModel {
|
||||||
private final ArbitratorManager arbitratorManager;
|
private final ArbitratorManager arbitratorManager;
|
||||||
private User user;
|
private User user;
|
||||||
private final P2PService p2PService;
|
private final P2PService p2PService;
|
||||||
private final WalletService walletService;
|
private final BitcoinWalletService walletService;
|
||||||
private final KeyRing keyRing;
|
private final KeyRing keyRing;
|
||||||
|
|
||||||
final BooleanProperty registrationEditDisabled = new SimpleBooleanProperty(true);
|
final BooleanProperty registrationEditDisabled = new SimpleBooleanProperty(true);
|
||||||
|
@ -67,7 +67,7 @@ class ArbitratorRegistrationViewModel extends ActivatableViewModel {
|
||||||
public ArbitratorRegistrationViewModel(ArbitratorManager arbitratorManager,
|
public ArbitratorRegistrationViewModel(ArbitratorManager arbitratorManager,
|
||||||
User user,
|
User user,
|
||||||
P2PService p2PService,
|
P2PService p2PService,
|
||||||
WalletService walletService,
|
BitcoinWalletService walletService,
|
||||||
KeyRing keyRing) {
|
KeyRing keyRing) {
|
||||||
this.arbitratorManager = arbitratorManager;
|
this.arbitratorManager = arbitratorManager;
|
||||||
this.user = user;
|
this.user = user;
|
||||||
|
|
|
@ -17,8 +17,8 @@
|
||||||
|
|
||||||
package io.bitsquare.gui.main.account.content.password;
|
package io.bitsquare.gui.main.account.content.password;
|
||||||
|
|
||||||
|
import io.bitsquare.btc.BitcoinWalletService;
|
||||||
import io.bitsquare.btc.TradeWalletService;
|
import io.bitsquare.btc.TradeWalletService;
|
||||||
import io.bitsquare.btc.WalletService;
|
|
||||||
import io.bitsquare.common.util.Tuple2;
|
import io.bitsquare.common.util.Tuple2;
|
||||||
import io.bitsquare.common.util.Tuple3;
|
import io.bitsquare.common.util.Tuple3;
|
||||||
import io.bitsquare.crypto.ScryptUtil;
|
import io.bitsquare.crypto.ScryptUtil;
|
||||||
|
@ -47,7 +47,7 @@ import static io.bitsquare.gui.util.FormBuilder.*;
|
||||||
public class PasswordView extends ActivatableView<GridPane, Void> {
|
public class PasswordView extends ActivatableView<GridPane, Void> {
|
||||||
|
|
||||||
private final PasswordValidator passwordValidator;
|
private final PasswordValidator passwordValidator;
|
||||||
private final WalletService walletService;
|
private final BitcoinWalletService walletService;
|
||||||
private final TradeWalletService tradeWalletService;
|
private final TradeWalletService tradeWalletService;
|
||||||
|
|
||||||
private PasswordTextField passwordField;
|
private PasswordTextField passwordField;
|
||||||
|
@ -65,7 +65,7 @@ public class PasswordView extends ActivatableView<GridPane, Void> {
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private PasswordView(PasswordValidator passwordValidator, WalletService walletService, TradeWalletService tradeWalletService) {
|
private PasswordView(PasswordValidator passwordValidator, BitcoinWalletService walletService, TradeWalletService tradeWalletService) {
|
||||||
this.passwordValidator = passwordValidator;
|
this.passwordValidator = passwordValidator;
|
||||||
this.walletService = walletService;
|
this.walletService = walletService;
|
||||||
this.tradeWalletService = tradeWalletService;
|
this.tradeWalletService = tradeWalletService;
|
||||||
|
|
|
@ -20,7 +20,7 @@ package io.bitsquare.gui.main.account.content.seedwords;
|
||||||
import com.google.common.base.Joiner;
|
import com.google.common.base.Joiner;
|
||||||
import com.google.common.base.Splitter;
|
import com.google.common.base.Splitter;
|
||||||
import io.bitsquare.app.BitsquareApp;
|
import io.bitsquare.app.BitsquareApp;
|
||||||
import io.bitsquare.btc.WalletService;
|
import io.bitsquare.btc.BitcoinWalletService;
|
||||||
import io.bitsquare.common.UserThread;
|
import io.bitsquare.common.UserThread;
|
||||||
import io.bitsquare.gui.common.view.ActivatableView;
|
import io.bitsquare.gui.common.view.ActivatableView;
|
||||||
import io.bitsquare.gui.common.view.FxmlView;
|
import io.bitsquare.gui.common.view.FxmlView;
|
||||||
|
@ -54,7 +54,7 @@ import static javafx.beans.binding.Bindings.createBooleanBinding;
|
||||||
|
|
||||||
@FxmlView
|
@FxmlView
|
||||||
public class SeedWordsView extends ActivatableView<GridPane, Void> {
|
public class SeedWordsView extends ActivatableView<GridPane, Void> {
|
||||||
private final WalletService walletService;
|
private final BitcoinWalletService walletService;
|
||||||
private final WalletPasswordWindow walletPasswordWindow;
|
private final WalletPasswordWindow walletPasswordWindow;
|
||||||
private Preferences preferences;
|
private Preferences preferences;
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@ public class SeedWordsView extends ActivatableView<GridPane, Void> {
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private SeedWordsView(WalletService walletService, WalletPasswordWindow walletPasswordWindow, Preferences preferences) {
|
private SeedWordsView(BitcoinWalletService walletService, WalletPasswordWindow walletPasswordWindow, Preferences preferences) {
|
||||||
this.walletService = walletService;
|
this.walletService = walletService;
|
||||||
this.walletPasswordWindow = walletPasswordWindow;
|
this.walletPasswordWindow = walletPasswordWindow;
|
||||||
this.preferences = preferences;
|
this.preferences = preferences;
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
|
|
||||||
package io.bitsquare.gui.main.dao.wallet.dashboard;
|
package io.bitsquare.gui.main.dao.wallet.dashboard;
|
||||||
|
|
||||||
import io.bitsquare.btc.WalletService;
|
import io.bitsquare.btc.BitcoinWalletService;
|
||||||
import io.bitsquare.gui.common.view.ActivatableView;
|
import io.bitsquare.gui.common.view.ActivatableView;
|
||||||
import io.bitsquare.gui.common.view.FxmlView;
|
import io.bitsquare.gui.common.view.FxmlView;
|
||||||
import io.bitsquare.gui.util.BSFormatter;
|
import io.bitsquare.gui.util.BSFormatter;
|
||||||
|
@ -47,7 +47,7 @@ public class TokenDashboardView extends ActivatableView<GridPane, Void> {
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private TokenDashboardView(WalletService walletService, BSFormatter formatter) {
|
private TokenDashboardView(BitcoinWalletService walletService, BSFormatter formatter) {
|
||||||
tokenWallet = walletService.getTokenWallet();
|
tokenWallet = walletService.getTokenWallet();
|
||||||
this.formatter = formatter;
|
this.formatter = formatter;
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
package io.bitsquare.gui.main.dao.wallet.receive;
|
package io.bitsquare.gui.main.dao.wallet.receive;
|
||||||
|
|
||||||
import io.bitsquare.app.DevFlags;
|
import io.bitsquare.app.DevFlags;
|
||||||
import io.bitsquare.btc.WalletService;
|
import io.bitsquare.btc.BitcoinWalletService;
|
||||||
import io.bitsquare.common.UserThread;
|
import io.bitsquare.common.UserThread;
|
||||||
import io.bitsquare.gui.common.view.ActivatableView;
|
import io.bitsquare.gui.common.view.ActivatableView;
|
||||||
import io.bitsquare.gui.common.view.FxmlView;
|
import io.bitsquare.gui.common.view.FxmlView;
|
||||||
|
@ -64,7 +64,7 @@ public class TokenReceiveView extends ActivatableView<GridPane, Void> {
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private TokenReceiveView(WalletService walletService, BSFormatter formatter) {
|
private TokenReceiveView(BitcoinWalletService walletService, BSFormatter formatter) {
|
||||||
tokenWallet = walletService.getTokenWallet();
|
tokenWallet = walletService.getTokenWallet();
|
||||||
this.formatter = formatter;
|
this.formatter = formatter;
|
||||||
paymentLabelString = "Fund Bitsquare token wallet";
|
paymentLabelString = "Fund Bitsquare token wallet";
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
package io.bitsquare.gui.main.funds.deposit;
|
package io.bitsquare.gui.main.funds.deposit;
|
||||||
|
|
||||||
import io.bitsquare.btc.AddressEntry;
|
import io.bitsquare.btc.AddressEntry;
|
||||||
import io.bitsquare.btc.WalletService;
|
import io.bitsquare.btc.BitcoinWalletService;
|
||||||
import io.bitsquare.btc.listeners.BalanceListener;
|
import io.bitsquare.btc.listeners.BalanceListener;
|
||||||
import io.bitsquare.btc.listeners.TxConfidenceListener;
|
import io.bitsquare.btc.listeners.TxConfidenceListener;
|
||||||
import io.bitsquare.gui.components.indicator.TxConfidenceIndicator;
|
import io.bitsquare.gui.components.indicator.TxConfidenceIndicator;
|
||||||
|
@ -37,7 +37,7 @@ public class DepositListItem {
|
||||||
private final Logger log = LoggerFactory.getLogger(this.getClass());
|
private final Logger log = LoggerFactory.getLogger(this.getClass());
|
||||||
|
|
||||||
private final StringProperty balance = new SimpleStringProperty();
|
private final StringProperty balance = new SimpleStringProperty();
|
||||||
private final WalletService walletService;
|
private final BitcoinWalletService walletService;
|
||||||
private Coin balanceAsCoin;
|
private Coin balanceAsCoin;
|
||||||
private final TxConfidenceIndicator txConfidenceIndicator;
|
private final TxConfidenceIndicator txConfidenceIndicator;
|
||||||
private final Tooltip tooltip;
|
private final Tooltip tooltip;
|
||||||
|
@ -46,7 +46,7 @@ public class DepositListItem {
|
||||||
private TxConfidenceListener txConfidenceListener;
|
private TxConfidenceListener txConfidenceListener;
|
||||||
private int numTxOutputs = 0;
|
private int numTxOutputs = 0;
|
||||||
|
|
||||||
public DepositListItem(AddressEntry addressEntry, WalletService walletService, BSFormatter formatter) {
|
public DepositListItem(AddressEntry addressEntry, BitcoinWalletService walletService, BSFormatter formatter) {
|
||||||
this.walletService = walletService;
|
this.walletService = walletService;
|
||||||
|
|
||||||
addressString = addressEntry.getAddressString();
|
addressString = addressEntry.getAddressString();
|
||||||
|
|
|
@ -20,7 +20,7 @@ package io.bitsquare.gui.main.funds.deposit;
|
||||||
import de.jensd.fx.fontawesome.AwesomeIcon;
|
import de.jensd.fx.fontawesome.AwesomeIcon;
|
||||||
import io.bitsquare.app.DevFlags;
|
import io.bitsquare.app.DevFlags;
|
||||||
import io.bitsquare.btc.AddressEntry;
|
import io.bitsquare.btc.AddressEntry;
|
||||||
import io.bitsquare.btc.WalletService;
|
import io.bitsquare.btc.BitcoinWalletService;
|
||||||
import io.bitsquare.btc.listeners.BalanceListener;
|
import io.bitsquare.btc.listeners.BalanceListener;
|
||||||
import io.bitsquare.btc.provider.fee.FeeService;
|
import io.bitsquare.btc.provider.fee.FeeService;
|
||||||
import io.bitsquare.common.UserThread;
|
import io.bitsquare.common.UserThread;
|
||||||
|
@ -82,7 +82,7 @@ public class DepositView extends ActivatableView<VBox, Void> {
|
||||||
private Label addressLabel, amountLabel;
|
private Label addressLabel, amountLabel;
|
||||||
private InputTextField amountTextField;
|
private InputTextField amountTextField;
|
||||||
|
|
||||||
private final WalletService walletService;
|
private final BitcoinWalletService walletService;
|
||||||
private FeeService feeService;
|
private FeeService feeService;
|
||||||
private final BSFormatter formatter;
|
private final BSFormatter formatter;
|
||||||
private final Preferences preferences;
|
private final Preferences preferences;
|
||||||
|
@ -99,7 +99,7 @@ public class DepositView extends ActivatableView<VBox, Void> {
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private DepositView(WalletService walletService,
|
private DepositView(BitcoinWalletService walletService,
|
||||||
FeeService feeService,
|
FeeService feeService,
|
||||||
BSFormatter formatter,
|
BSFormatter formatter,
|
||||||
Preferences preferences) {
|
Preferences preferences) {
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
package io.bitsquare.gui.main.funds.locked;
|
package io.bitsquare.gui.main.funds.locked;
|
||||||
|
|
||||||
import io.bitsquare.btc.AddressEntry;
|
import io.bitsquare.btc.AddressEntry;
|
||||||
import io.bitsquare.btc.WalletService;
|
import io.bitsquare.btc.BitcoinWalletService;
|
||||||
import io.bitsquare.btc.listeners.BalanceListener;
|
import io.bitsquare.btc.listeners.BalanceListener;
|
||||||
import io.bitsquare.gui.util.BSFormatter;
|
import io.bitsquare.gui.util.BSFormatter;
|
||||||
import io.bitsquare.trade.Tradable;
|
import io.bitsquare.trade.Tradable;
|
||||||
|
@ -40,12 +40,12 @@ public class LockedListItem {
|
||||||
private final Label balanceLabel;
|
private final Label balanceLabel;
|
||||||
private final Trade trade;
|
private final Trade trade;
|
||||||
private final AddressEntry addressEntry;
|
private final AddressEntry addressEntry;
|
||||||
private final WalletService walletService;
|
private final BitcoinWalletService walletService;
|
||||||
private final BSFormatter formatter;
|
private final BSFormatter formatter;
|
||||||
private final String addressString;
|
private final String addressString;
|
||||||
private Coin balance;
|
private Coin balance;
|
||||||
|
|
||||||
public LockedListItem(Trade trade, AddressEntry addressEntry, WalletService walletService, BSFormatter formatter) {
|
public LockedListItem(Trade trade, AddressEntry addressEntry, BitcoinWalletService walletService, BSFormatter formatter) {
|
||||||
this.trade = trade;
|
this.trade = trade;
|
||||||
this.addressEntry = addressEntry;
|
this.addressEntry = addressEntry;
|
||||||
this.walletService = walletService;
|
this.walletService = walletService;
|
||||||
|
|
|
@ -19,7 +19,7 @@ package io.bitsquare.gui.main.funds.locked;
|
||||||
|
|
||||||
import de.jensd.fx.fontawesome.AwesomeIcon;
|
import de.jensd.fx.fontawesome.AwesomeIcon;
|
||||||
import io.bitsquare.btc.AddressEntry;
|
import io.bitsquare.btc.AddressEntry;
|
||||||
import io.bitsquare.btc.WalletService;
|
import io.bitsquare.btc.BitcoinWalletService;
|
||||||
import io.bitsquare.btc.listeners.BalanceListener;
|
import io.bitsquare.btc.listeners.BalanceListener;
|
||||||
import io.bitsquare.gui.common.view.ActivatableView;
|
import io.bitsquare.gui.common.view.ActivatableView;
|
||||||
import io.bitsquare.gui.common.view.FxmlView;
|
import io.bitsquare.gui.common.view.FxmlView;
|
||||||
|
@ -58,7 +58,7 @@ public class LockedView extends ActivatableView<VBox, Void> {
|
||||||
@FXML
|
@FXML
|
||||||
TableColumn<LockedListItem, LockedListItem> dateColumn, detailsColumn, addressColumn, balanceColumn, confidenceColumn;
|
TableColumn<LockedListItem, LockedListItem> dateColumn, detailsColumn, addressColumn, balanceColumn, confidenceColumn;
|
||||||
|
|
||||||
private final WalletService walletService;
|
private final BitcoinWalletService walletService;
|
||||||
private final TradeManager tradeManager;
|
private final TradeManager tradeManager;
|
||||||
private final OpenOfferManager openOfferManager;
|
private final OpenOfferManager openOfferManager;
|
||||||
private final Preferences preferences;
|
private final Preferences preferences;
|
||||||
|
@ -77,7 +77,7 @@ public class LockedView extends ActivatableView<VBox, Void> {
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private LockedView(WalletService walletService, TradeManager tradeManager, OpenOfferManager openOfferManager, Preferences preferences,
|
private LockedView(BitcoinWalletService walletService, TradeManager tradeManager, OpenOfferManager openOfferManager, Preferences preferences,
|
||||||
BSFormatter formatter, OfferDetailsWindow offerDetailsWindow, TradeDetailsWindow tradeDetailsWindow) {
|
BSFormatter formatter, OfferDetailsWindow offerDetailsWindow, TradeDetailsWindow tradeDetailsWindow) {
|
||||||
this.walletService = walletService;
|
this.walletService = walletService;
|
||||||
this.tradeManager = tradeManager;
|
this.tradeManager = tradeManager;
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
package io.bitsquare.gui.main.funds.reserved;
|
package io.bitsquare.gui.main.funds.reserved;
|
||||||
|
|
||||||
import io.bitsquare.btc.AddressEntry;
|
import io.bitsquare.btc.AddressEntry;
|
||||||
import io.bitsquare.btc.WalletService;
|
import io.bitsquare.btc.BitcoinWalletService;
|
||||||
import io.bitsquare.btc.listeners.BalanceListener;
|
import io.bitsquare.btc.listeners.BalanceListener;
|
||||||
import io.bitsquare.gui.util.BSFormatter;
|
import io.bitsquare.gui.util.BSFormatter;
|
||||||
import io.bitsquare.trade.Tradable;
|
import io.bitsquare.trade.Tradable;
|
||||||
|
@ -40,12 +40,12 @@ public class ReservedListItem {
|
||||||
private final Label balanceLabel;
|
private final Label balanceLabel;
|
||||||
private final OpenOffer openOffer;
|
private final OpenOffer openOffer;
|
||||||
private final AddressEntry addressEntry;
|
private final AddressEntry addressEntry;
|
||||||
private final WalletService walletService;
|
private final BitcoinWalletService walletService;
|
||||||
private final BSFormatter formatter;
|
private final BSFormatter formatter;
|
||||||
private final String addressString;
|
private final String addressString;
|
||||||
private Coin balance;
|
private Coin balance;
|
||||||
|
|
||||||
public ReservedListItem(OpenOffer openOffer, AddressEntry addressEntry, WalletService walletService, BSFormatter formatter) {
|
public ReservedListItem(OpenOffer openOffer, AddressEntry addressEntry, BitcoinWalletService walletService, BSFormatter formatter) {
|
||||||
this.openOffer = openOffer;
|
this.openOffer = openOffer;
|
||||||
this.addressEntry = addressEntry;
|
this.addressEntry = addressEntry;
|
||||||
this.walletService = walletService;
|
this.walletService = walletService;
|
||||||
|
|
|
@ -19,7 +19,7 @@ package io.bitsquare.gui.main.funds.reserved;
|
||||||
|
|
||||||
import de.jensd.fx.fontawesome.AwesomeIcon;
|
import de.jensd.fx.fontawesome.AwesomeIcon;
|
||||||
import io.bitsquare.btc.AddressEntry;
|
import io.bitsquare.btc.AddressEntry;
|
||||||
import io.bitsquare.btc.WalletService;
|
import io.bitsquare.btc.BitcoinWalletService;
|
||||||
import io.bitsquare.btc.listeners.BalanceListener;
|
import io.bitsquare.btc.listeners.BalanceListener;
|
||||||
import io.bitsquare.gui.common.view.ActivatableView;
|
import io.bitsquare.gui.common.view.ActivatableView;
|
||||||
import io.bitsquare.gui.common.view.FxmlView;
|
import io.bitsquare.gui.common.view.FxmlView;
|
||||||
|
@ -58,7 +58,7 @@ public class ReservedView extends ActivatableView<VBox, Void> {
|
||||||
@FXML
|
@FXML
|
||||||
TableColumn<ReservedListItem, ReservedListItem> dateColumn, detailsColumn, addressColumn, balanceColumn, confidenceColumn;
|
TableColumn<ReservedListItem, ReservedListItem> dateColumn, detailsColumn, addressColumn, balanceColumn, confidenceColumn;
|
||||||
|
|
||||||
private final WalletService walletService;
|
private final BitcoinWalletService walletService;
|
||||||
private final TradeManager tradeManager;
|
private final TradeManager tradeManager;
|
||||||
private final OpenOfferManager openOfferManager;
|
private final OpenOfferManager openOfferManager;
|
||||||
private final Preferences preferences;
|
private final Preferences preferences;
|
||||||
|
@ -77,7 +77,7 @@ public class ReservedView extends ActivatableView<VBox, Void> {
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private ReservedView(WalletService walletService, TradeManager tradeManager, OpenOfferManager openOfferManager, Preferences preferences,
|
private ReservedView(BitcoinWalletService walletService, TradeManager tradeManager, OpenOfferManager openOfferManager, Preferences preferences,
|
||||||
BSFormatter formatter, OfferDetailsWindow offerDetailsWindow, TradeDetailsWindow tradeDetailsWindow) {
|
BSFormatter formatter, OfferDetailsWindow offerDetailsWindow, TradeDetailsWindow tradeDetailsWindow) {
|
||||||
this.walletService = walletService;
|
this.walletService = walletService;
|
||||||
this.tradeManager = tradeManager;
|
this.tradeManager = tradeManager;
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
|
|
||||||
package io.bitsquare.gui.main.funds.transactions;
|
package io.bitsquare.gui.main.funds.transactions;
|
||||||
|
|
||||||
import io.bitsquare.btc.WalletService;
|
import io.bitsquare.btc.BitcoinWalletService;
|
||||||
import io.bitsquare.btc.listeners.TxConfidenceListener;
|
import io.bitsquare.btc.listeners.TxConfidenceListener;
|
||||||
import io.bitsquare.gui.components.indicator.TxConfidenceIndicator;
|
import io.bitsquare.gui.components.indicator.TxConfidenceIndicator;
|
||||||
import io.bitsquare.gui.util.BSFormatter;
|
import io.bitsquare.gui.util.BSFormatter;
|
||||||
|
@ -39,7 +39,7 @@ public class TransactionsListItem {
|
||||||
private String dateString;
|
private String dateString;
|
||||||
private final Date date;
|
private final Date date;
|
||||||
private final String txId;
|
private final String txId;
|
||||||
private final WalletService walletService;
|
private final BitcoinWalletService walletService;
|
||||||
private final TxConfidenceIndicator txConfidenceIndicator;
|
private final TxConfidenceIndicator txConfidenceIndicator;
|
||||||
private final Tooltip tooltip;
|
private final Tooltip tooltip;
|
||||||
@Nullable
|
@Nullable
|
||||||
|
@ -62,7 +62,7 @@ public class TransactionsListItem {
|
||||||
txId = null;
|
txId = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public TransactionsListItem(Transaction transaction, WalletService walletService, Optional<Tradable> tradableOptional, BSFormatter formatter) {
|
public TransactionsListItem(Transaction transaction, BitcoinWalletService walletService, Optional<Tradable> tradableOptional, BSFormatter formatter) {
|
||||||
this.formatter = formatter;
|
this.formatter = formatter;
|
||||||
txId = transaction.getHashAsString();
|
txId = transaction.getHashAsString();
|
||||||
this.walletService = walletService;
|
this.walletService = walletService;
|
||||||
|
|
|
@ -20,7 +20,7 @@ package io.bitsquare.gui.main.funds.transactions;
|
||||||
import com.googlecode.jcsv.writer.CSVEntryConverter;
|
import com.googlecode.jcsv.writer.CSVEntryConverter;
|
||||||
import de.jensd.fx.fontawesome.AwesomeIcon;
|
import de.jensd.fx.fontawesome.AwesomeIcon;
|
||||||
import io.bitsquare.arbitration.DisputeManager;
|
import io.bitsquare.arbitration.DisputeManager;
|
||||||
import io.bitsquare.btc.WalletService;
|
import io.bitsquare.btc.BitcoinWalletService;
|
||||||
import io.bitsquare.common.util.Tuple2;
|
import io.bitsquare.common.util.Tuple2;
|
||||||
import io.bitsquare.common.util.Tuple4;
|
import io.bitsquare.common.util.Tuple4;
|
||||||
import io.bitsquare.common.util.Utilities;
|
import io.bitsquare.common.util.Utilities;
|
||||||
|
@ -79,7 +79,7 @@ public class TransactionsView extends ActivatableView<VBox, Void> {
|
||||||
private final ObservableList<TransactionsListItem> observableList = FXCollections.observableArrayList();
|
private final ObservableList<TransactionsListItem> observableList = FXCollections.observableArrayList();
|
||||||
private final SortedList<TransactionsListItem> sortedList = new SortedList<>(observableList);
|
private final SortedList<TransactionsListItem> sortedList = new SortedList<>(observableList);
|
||||||
|
|
||||||
private final WalletService walletService;
|
private final BitcoinWalletService walletService;
|
||||||
private final TradeManager tradeManager;
|
private final TradeManager tradeManager;
|
||||||
private final OpenOfferManager openOfferManager;
|
private final OpenOfferManager openOfferManager;
|
||||||
private final ClosedTradableManager closedTradableManager;
|
private final ClosedTradableManager closedTradableManager;
|
||||||
|
@ -99,7 +99,7 @@ public class TransactionsView extends ActivatableView<VBox, Void> {
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private TransactionsView(WalletService walletService, TradeManager tradeManager, OpenOfferManager openOfferManager,
|
private TransactionsView(BitcoinWalletService walletService, TradeManager tradeManager, OpenOfferManager openOfferManager,
|
||||||
ClosedTradableManager closedTradableManager, FailedTradesManager failedTradesManager,
|
ClosedTradableManager closedTradableManager, FailedTradesManager failedTradesManager,
|
||||||
BSFormatter formatter, Preferences preferences, TradeDetailsWindow tradeDetailsWindow,
|
BSFormatter formatter, Preferences preferences, TradeDetailsWindow tradeDetailsWindow,
|
||||||
DisputeManager disputeManager, Stage stage,
|
DisputeManager disputeManager, Stage stage,
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
package io.bitsquare.gui.main.funds.withdrawal;
|
package io.bitsquare.gui.main.funds.withdrawal;
|
||||||
|
|
||||||
import io.bitsquare.btc.AddressEntry;
|
import io.bitsquare.btc.AddressEntry;
|
||||||
import io.bitsquare.btc.WalletService;
|
import io.bitsquare.btc.BitcoinWalletService;
|
||||||
import io.bitsquare.btc.listeners.BalanceListener;
|
import io.bitsquare.btc.listeners.BalanceListener;
|
||||||
import io.bitsquare.gui.util.BSFormatter;
|
import io.bitsquare.gui.util.BSFormatter;
|
||||||
import javafx.scene.control.Label;
|
import javafx.scene.control.Label;
|
||||||
|
@ -30,12 +30,12 @@ public class WithdrawalListItem {
|
||||||
private final BalanceListener balanceListener;
|
private final BalanceListener balanceListener;
|
||||||
private final Label balanceLabel;
|
private final Label balanceLabel;
|
||||||
private final AddressEntry addressEntry;
|
private final AddressEntry addressEntry;
|
||||||
private final WalletService walletService;
|
private final BitcoinWalletService walletService;
|
||||||
private final BSFormatter formatter;
|
private final BSFormatter formatter;
|
||||||
private Coin balance;
|
private Coin balance;
|
||||||
private final String addressString;
|
private final String addressString;
|
||||||
|
|
||||||
public WithdrawalListItem(AddressEntry addressEntry, WalletService walletService,
|
public WithdrawalListItem(AddressEntry addressEntry, BitcoinWalletService walletService,
|
||||||
BSFormatter formatter) {
|
BSFormatter formatter) {
|
||||||
this.addressEntry = addressEntry;
|
this.addressEntry = addressEntry;
|
||||||
this.walletService = walletService;
|
this.walletService = walletService;
|
||||||
|
|
|
@ -22,8 +22,8 @@ import de.jensd.fx.fontawesome.AwesomeIcon;
|
||||||
import io.bitsquare.app.DevFlags;
|
import io.bitsquare.app.DevFlags;
|
||||||
import io.bitsquare.btc.AddressEntry;
|
import io.bitsquare.btc.AddressEntry;
|
||||||
import io.bitsquare.btc.AddressEntryException;
|
import io.bitsquare.btc.AddressEntryException;
|
||||||
|
import io.bitsquare.btc.BitcoinWalletService;
|
||||||
import io.bitsquare.btc.InsufficientFundsException;
|
import io.bitsquare.btc.InsufficientFundsException;
|
||||||
import io.bitsquare.btc.WalletService;
|
|
||||||
import io.bitsquare.btc.listeners.BalanceListener;
|
import io.bitsquare.btc.listeners.BalanceListener;
|
||||||
import io.bitsquare.btc.provider.fee.FeeService;
|
import io.bitsquare.btc.provider.fee.FeeService;
|
||||||
import io.bitsquare.common.UserThread;
|
import io.bitsquare.common.UserThread;
|
||||||
|
@ -75,7 +75,7 @@ public class WithdrawalView extends ActivatableView<VBox, Void> {
|
||||||
@FXML
|
@FXML
|
||||||
TableColumn<WithdrawalListItem, WithdrawalListItem> addressColumn, balanceColumn, selectColumn;
|
TableColumn<WithdrawalListItem, WithdrawalListItem> addressColumn, balanceColumn, selectColumn;
|
||||||
|
|
||||||
private final WalletService walletService;
|
private final BitcoinWalletService walletService;
|
||||||
private final TradeManager tradeManager;
|
private final TradeManager tradeManager;
|
||||||
private final ClosedTradableManager closedTradableManager;
|
private final ClosedTradableManager closedTradableManager;
|
||||||
private final FailedTradesManager failedTradesManager;
|
private final FailedTradesManager failedTradesManager;
|
||||||
|
@ -100,7 +100,7 @@ public class WithdrawalView extends ActivatableView<VBox, Void> {
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private WithdrawalView(WalletService walletService, TradeManager tradeManager,
|
private WithdrawalView(BitcoinWalletService walletService, TradeManager tradeManager,
|
||||||
ClosedTradableManager closedTradableManager,
|
ClosedTradableManager closedTradableManager,
|
||||||
FailedTradesManager failedTradesManager,
|
FailedTradesManager failedTradesManager,
|
||||||
BSFormatter formatter, Preferences preferences,
|
BSFormatter formatter, Preferences preferences,
|
||||||
|
|
|
@ -22,8 +22,8 @@ import io.bitsquare.app.DevFlags;
|
||||||
import io.bitsquare.app.Version;
|
import io.bitsquare.app.Version;
|
||||||
import io.bitsquare.arbitration.Arbitrator;
|
import io.bitsquare.arbitration.Arbitrator;
|
||||||
import io.bitsquare.btc.AddressEntry;
|
import io.bitsquare.btc.AddressEntry;
|
||||||
|
import io.bitsquare.btc.BitcoinWalletService;
|
||||||
import io.bitsquare.btc.TradeWalletService;
|
import io.bitsquare.btc.TradeWalletService;
|
||||||
import io.bitsquare.btc.WalletService;
|
|
||||||
import io.bitsquare.btc.blockchain.BlockchainService;
|
import io.bitsquare.btc.blockchain.BlockchainService;
|
||||||
import io.bitsquare.btc.listeners.BalanceListener;
|
import io.bitsquare.btc.listeners.BalanceListener;
|
||||||
import io.bitsquare.btc.provider.fee.FeeService;
|
import io.bitsquare.btc.provider.fee.FeeService;
|
||||||
|
@ -63,7 +63,7 @@ import static com.google.common.base.Preconditions.checkNotNull;
|
||||||
*/
|
*/
|
||||||
class CreateOfferDataModel extends ActivatableDataModel {
|
class CreateOfferDataModel extends ActivatableDataModel {
|
||||||
private final OpenOfferManager openOfferManager;
|
private final OpenOfferManager openOfferManager;
|
||||||
final WalletService walletService;
|
final BitcoinWalletService walletService;
|
||||||
final TradeWalletService tradeWalletService;
|
final TradeWalletService tradeWalletService;
|
||||||
private final Preferences preferences;
|
private final Preferences preferences;
|
||||||
private final User user;
|
private final User user;
|
||||||
|
@ -121,7 +121,7 @@ class CreateOfferDataModel extends ActivatableDataModel {
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
CreateOfferDataModel(OpenOfferManager openOfferManager, WalletService walletService, TradeWalletService tradeWalletService,
|
CreateOfferDataModel(OpenOfferManager openOfferManager, BitcoinWalletService walletService, TradeWalletService tradeWalletService,
|
||||||
Preferences preferences, User user, KeyRing keyRing, P2PService p2PService, PriceFeedService priceFeedService,
|
Preferences preferences, User user, KeyRing keyRing, P2PService p2PService, PriceFeedService priceFeedService,
|
||||||
FeeService feeService, Navigation navigation, BlockchainService blockchainService, BSFormatter formatter) {
|
FeeService feeService, Navigation navigation, BlockchainService blockchainService, BSFormatter formatter) {
|
||||||
this.openOfferManager = openOfferManager;
|
this.openOfferManager = openOfferManager;
|
||||||
|
|
|
@ -21,8 +21,8 @@ import com.google.inject.Inject;
|
||||||
import io.bitsquare.app.DevFlags;
|
import io.bitsquare.app.DevFlags;
|
||||||
import io.bitsquare.arbitration.Arbitrator;
|
import io.bitsquare.arbitration.Arbitrator;
|
||||||
import io.bitsquare.btc.AddressEntry;
|
import io.bitsquare.btc.AddressEntry;
|
||||||
|
import io.bitsquare.btc.BitcoinWalletService;
|
||||||
import io.bitsquare.btc.TradeWalletService;
|
import io.bitsquare.btc.TradeWalletService;
|
||||||
import io.bitsquare.btc.WalletService;
|
|
||||||
import io.bitsquare.btc.blockchain.BlockchainService;
|
import io.bitsquare.btc.blockchain.BlockchainService;
|
||||||
import io.bitsquare.btc.listeners.BalanceListener;
|
import io.bitsquare.btc.listeners.BalanceListener;
|
||||||
import io.bitsquare.btc.provider.fee.FeeService;
|
import io.bitsquare.btc.provider.fee.FeeService;
|
||||||
|
@ -60,7 +60,7 @@ import static com.google.common.base.Preconditions.checkNotNull;
|
||||||
class TakeOfferDataModel extends ActivatableDataModel {
|
class TakeOfferDataModel extends ActivatableDataModel {
|
||||||
private final TradeManager tradeManager;
|
private final TradeManager tradeManager;
|
||||||
final TradeWalletService tradeWalletService;
|
final TradeWalletService tradeWalletService;
|
||||||
final WalletService walletService;
|
final BitcoinWalletService walletService;
|
||||||
private final User user;
|
private final User user;
|
||||||
private final FeeService feeService;
|
private final FeeService feeService;
|
||||||
private final Preferences preferences;
|
private final Preferences preferences;
|
||||||
|
@ -103,7 +103,7 @@ class TakeOfferDataModel extends ActivatableDataModel {
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
TakeOfferDataModel(TradeManager tradeManager, TradeWalletService tradeWalletService,
|
TakeOfferDataModel(TradeManager tradeManager, TradeWalletService tradeWalletService,
|
||||||
WalletService walletService, User user, FeeService feeService,
|
BitcoinWalletService walletService, User user, FeeService feeService,
|
||||||
Preferences preferences, PriceFeedService priceFeedService, BlockchainService blockchainService,
|
Preferences preferences, PriceFeedService priceFeedService, BlockchainService blockchainService,
|
||||||
BSFormatter formatter) {
|
BSFormatter formatter) {
|
||||||
this.tradeManager = tradeManager;
|
this.tradeManager = tradeManager;
|
||||||
|
|
|
@ -21,8 +21,8 @@ import io.bitsquare.arbitration.Dispute;
|
||||||
import io.bitsquare.arbitration.DisputeManager;
|
import io.bitsquare.arbitration.DisputeManager;
|
||||||
import io.bitsquare.arbitration.DisputeResult;
|
import io.bitsquare.arbitration.DisputeResult;
|
||||||
import io.bitsquare.btc.AddressEntry;
|
import io.bitsquare.btc.AddressEntry;
|
||||||
|
import io.bitsquare.btc.BitcoinWalletService;
|
||||||
import io.bitsquare.btc.TradeWalletService;
|
import io.bitsquare.btc.TradeWalletService;
|
||||||
import io.bitsquare.btc.WalletService;
|
|
||||||
import io.bitsquare.btc.exceptions.TransactionVerificationException;
|
import io.bitsquare.btc.exceptions.TransactionVerificationException;
|
||||||
import io.bitsquare.common.UserThread;
|
import io.bitsquare.common.UserThread;
|
||||||
import io.bitsquare.common.util.Tuple2;
|
import io.bitsquare.common.util.Tuple2;
|
||||||
|
@ -63,7 +63,7 @@ public class DisputeSummaryWindow extends Overlay<DisputeSummaryWindow> {
|
||||||
|
|
||||||
private final BSFormatter formatter;
|
private final BSFormatter formatter;
|
||||||
private final DisputeManager disputeManager;
|
private final DisputeManager disputeManager;
|
||||||
private final WalletService walletService;
|
private final BitcoinWalletService walletService;
|
||||||
private final TradeWalletService tradeWalletService;
|
private final TradeWalletService tradeWalletService;
|
||||||
private Dispute dispute;
|
private Dispute dispute;
|
||||||
private Optional<Runnable> finalizeDisputeHandlerOptional = Optional.empty();
|
private Optional<Runnable> finalizeDisputeHandlerOptional = Optional.empty();
|
||||||
|
@ -93,7 +93,7 @@ public class DisputeSummaryWindow extends Overlay<DisputeSummaryWindow> {
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
public DisputeSummaryWindow(BSFormatter formatter, DisputeManager disputeManager, WalletService walletService, TradeWalletService tradeWalletService) {
|
public DisputeSummaryWindow(BSFormatter formatter, DisputeManager disputeManager, BitcoinWalletService walletService, TradeWalletService tradeWalletService) {
|
||||||
this.formatter = formatter;
|
this.formatter = formatter;
|
||||||
this.disputeManager = disputeManager;
|
this.disputeManager = disputeManager;
|
||||||
this.walletService = walletService;
|
this.walletService = walletService;
|
||||||
|
|
|
@ -18,8 +18,8 @@
|
||||||
package io.bitsquare.gui.main.overlays.windows;
|
package io.bitsquare.gui.main.overlays.windows;
|
||||||
|
|
||||||
import io.bitsquare.app.DevFlags;
|
import io.bitsquare.app.DevFlags;
|
||||||
|
import io.bitsquare.btc.BitcoinWalletService;
|
||||||
import io.bitsquare.btc.Restrictions;
|
import io.bitsquare.btc.Restrictions;
|
||||||
import io.bitsquare.btc.WalletService;
|
|
||||||
import io.bitsquare.common.UserThread;
|
import io.bitsquare.common.UserThread;
|
||||||
import io.bitsquare.common.util.Tuple2;
|
import io.bitsquare.common.util.Tuple2;
|
||||||
import io.bitsquare.gui.components.InputTextField;
|
import io.bitsquare.gui.components.InputTextField;
|
||||||
|
@ -50,7 +50,7 @@ import static io.bitsquare.gui.util.FormBuilder.*;
|
||||||
|
|
||||||
public class EmptyWalletWindow extends Overlay<EmptyWalletWindow> {
|
public class EmptyWalletWindow extends Overlay<EmptyWalletWindow> {
|
||||||
private static final Logger log = LoggerFactory.getLogger(EmptyWalletWindow.class);
|
private static final Logger log = LoggerFactory.getLogger(EmptyWalletWindow.class);
|
||||||
private final WalletService walletService;
|
private final BitcoinWalletService walletService;
|
||||||
private final WalletPasswordWindow walletPasswordWindow;
|
private final WalletPasswordWindow walletPasswordWindow;
|
||||||
private OpenOfferManager openOfferManager;
|
private OpenOfferManager openOfferManager;
|
||||||
private final BSFormatter formatter;
|
private final BSFormatter formatter;
|
||||||
|
@ -64,7 +64,7 @@ public class EmptyWalletWindow extends Overlay<EmptyWalletWindow> {
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
public EmptyWalletWindow(WalletService walletService, WalletPasswordWindow walletPasswordWindow,
|
public EmptyWalletWindow(BitcoinWalletService walletService, WalletPasswordWindow walletPasswordWindow,
|
||||||
OpenOfferManager openOfferManager, BSFormatter formatter) {
|
OpenOfferManager openOfferManager, BSFormatter formatter) {
|
||||||
this.walletService = walletService;
|
this.walletService = walletService;
|
||||||
this.walletPasswordWindow = walletPasswordWindow;
|
this.walletPasswordWindow = walletPasswordWindow;
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
|
|
||||||
package io.bitsquare.gui.main.overlays.windows;
|
package io.bitsquare.gui.main.overlays.windows;
|
||||||
|
|
||||||
import io.bitsquare.btc.WalletService;
|
import io.bitsquare.btc.BitcoinWalletService;
|
||||||
import io.bitsquare.common.util.Tuple2;
|
import io.bitsquare.common.util.Tuple2;
|
||||||
import io.bitsquare.common.util.Utilities;
|
import io.bitsquare.common.util.Utilities;
|
||||||
import io.bitsquare.gui.main.overlays.Overlay;
|
import io.bitsquare.gui.main.overlays.Overlay;
|
||||||
|
@ -34,14 +34,14 @@ import static io.bitsquare.gui.util.FormBuilder.addLabelTextArea;
|
||||||
|
|
||||||
public class ShowWalletDataWindow extends Overlay<ShowWalletDataWindow> {
|
public class ShowWalletDataWindow extends Overlay<ShowWalletDataWindow> {
|
||||||
private static final Logger log = LoggerFactory.getLogger(ShowWalletDataWindow.class);
|
private static final Logger log = LoggerFactory.getLogger(ShowWalletDataWindow.class);
|
||||||
private WalletService walletService;
|
private BitcoinWalletService walletService;
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
// Public API
|
// Public API
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
public ShowWalletDataWindow(WalletService walletService) {
|
public ShowWalletDataWindow(BitcoinWalletService walletService) {
|
||||||
this.walletService = walletService;
|
this.walletService = walletService;
|
||||||
type = Type.Attention;
|
type = Type.Attention;
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,7 @@ package io.bitsquare.gui.main.overlays.windows;
|
||||||
|
|
||||||
import com.google.common.base.Splitter;
|
import com.google.common.base.Splitter;
|
||||||
import io.bitsquare.app.BitsquareApp;
|
import io.bitsquare.app.BitsquareApp;
|
||||||
import io.bitsquare.btc.WalletService;
|
import io.bitsquare.btc.BitcoinWalletService;
|
||||||
import io.bitsquare.common.UserThread;
|
import io.bitsquare.common.UserThread;
|
||||||
import io.bitsquare.common.util.Tuple2;
|
import io.bitsquare.common.util.Tuple2;
|
||||||
import io.bitsquare.crypto.ScryptUtil;
|
import io.bitsquare.crypto.ScryptUtil;
|
||||||
|
@ -67,7 +67,7 @@ import static javafx.beans.binding.Bindings.createBooleanBinding;
|
||||||
|
|
||||||
public class WalletPasswordWindow extends Overlay<WalletPasswordWindow> {
|
public class WalletPasswordWindow extends Overlay<WalletPasswordWindow> {
|
||||||
private static final Logger log = LoggerFactory.getLogger(WalletPasswordWindow.class);
|
private static final Logger log = LoggerFactory.getLogger(WalletPasswordWindow.class);
|
||||||
private final WalletService walletService;
|
private final BitcoinWalletService walletService;
|
||||||
private Button unlockButton;
|
private Button unlockButton;
|
||||||
private AesKeyHandler aesKeyHandler;
|
private AesKeyHandler aesKeyHandler;
|
||||||
private PasswordTextField passwordTextField;
|
private PasswordTextField passwordTextField;
|
||||||
|
@ -95,7 +95,7 @@ public class WalletPasswordWindow extends Overlay<WalletPasswordWindow> {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
public WalletPasswordWindow(WalletService walletService) {
|
public WalletPasswordWindow(BitcoinWalletService walletService) {
|
||||||
this.walletService = walletService;
|
this.walletService = walletService;
|
||||||
type = Type.Attention;
|
type = Type.Attention;
|
||||||
width = 800;
|
width = 800;
|
||||||
|
|
|
@ -22,8 +22,8 @@ import io.bitsquare.app.Log;
|
||||||
import io.bitsquare.arbitration.Arbitrator;
|
import io.bitsquare.arbitration.Arbitrator;
|
||||||
import io.bitsquare.arbitration.Dispute;
|
import io.bitsquare.arbitration.Dispute;
|
||||||
import io.bitsquare.arbitration.DisputeManager;
|
import io.bitsquare.arbitration.DisputeManager;
|
||||||
|
import io.bitsquare.btc.BitcoinWalletService;
|
||||||
import io.bitsquare.btc.TradeWalletService;
|
import io.bitsquare.btc.TradeWalletService;
|
||||||
import io.bitsquare.btc.WalletService;
|
|
||||||
import io.bitsquare.btc.provider.fee.FeeService;
|
import io.bitsquare.btc.provider.fee.FeeService;
|
||||||
import io.bitsquare.common.crypto.KeyRing;
|
import io.bitsquare.common.crypto.KeyRing;
|
||||||
import io.bitsquare.common.handlers.ErrorMessageHandler;
|
import io.bitsquare.common.handlers.ErrorMessageHandler;
|
||||||
|
@ -68,7 +68,7 @@ import static com.google.common.base.Preconditions.checkNotNull;
|
||||||
|
|
||||||
public class PendingTradesDataModel extends ActivatableDataModel {
|
public class PendingTradesDataModel extends ActivatableDataModel {
|
||||||
public final TradeManager tradeManager;
|
public final TradeManager tradeManager;
|
||||||
public final WalletService walletService;
|
public final BitcoinWalletService walletService;
|
||||||
private final TradeWalletService tradeWalletService;
|
private final TradeWalletService tradeWalletService;
|
||||||
private FeeService feeService;
|
private FeeService feeService;
|
||||||
private final User user;
|
private final User user;
|
||||||
|
@ -94,7 +94,7 @@ public class PendingTradesDataModel extends ActivatableDataModel {
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
public PendingTradesDataModel(TradeManager tradeManager, WalletService walletService, TradeWalletService tradeWalletService, FeeService feeService,
|
public PendingTradesDataModel(TradeManager tradeManager, BitcoinWalletService walletService, TradeWalletService tradeWalletService, FeeService feeService,
|
||||||
User user, KeyRing keyRing, DisputeManager disputeManager, Preferences preferences, P2PService p2PService,
|
User user, KeyRing keyRing, DisputeManager disputeManager, Preferences preferences, P2PService p2PService,
|
||||||
Navigation navigation, WalletPasswordWindow walletPasswordWindow, NotificationCenter notificationCenter) {
|
Navigation navigation, WalletPasswordWindow walletPasswordWindow, NotificationCenter notificationCenter) {
|
||||||
this.tradeManager = tradeManager;
|
this.tradeManager = tradeManager;
|
||||||
|
|
|
@ -164,7 +164,7 @@ public class BuyerStep5View extends TradeStepView {
|
||||||
|
|
||||||
private void reviewWithdrawal() {
|
private void reviewWithdrawal() {
|
||||||
Coin amount = trade.getPayoutAmount();
|
Coin amount = trade.getPayoutAmount();
|
||||||
WalletService walletService = model.dataModel.walletService;
|
BitcoinWalletService walletService = model.dataModel.walletService;
|
||||||
|
|
||||||
AddressEntry fromAddressesEntry = walletService.getOrCreateAddressEntry(trade.getId(), AddressEntry.Context.TRADE_PAYOUT);
|
AddressEntry fromAddressesEntry = walletService.getOrCreateAddressEntry(trade.getId(), AddressEntry.Context.TRADE_PAYOUT);
|
||||||
String fromAddresses = fromAddressesEntry.getAddressString();
|
String fromAddresses = fromAddressesEntry.getAddressString();
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
package io.bitsquare.gui.main.settings.network;
|
package io.bitsquare.gui.main.settings.network;
|
||||||
|
|
||||||
import io.bitsquare.app.BitsquareApp;
|
import io.bitsquare.app.BitsquareApp;
|
||||||
import io.bitsquare.btc.WalletService;
|
import io.bitsquare.btc.BitcoinWalletService;
|
||||||
import io.bitsquare.common.Clock;
|
import io.bitsquare.common.Clock;
|
||||||
import io.bitsquare.common.UserThread;
|
import io.bitsquare.common.UserThread;
|
||||||
import io.bitsquare.gui.common.model.Activatable;
|
import io.bitsquare.gui.common.model.Activatable;
|
||||||
|
@ -67,7 +67,7 @@ public class NetworkSettingsView extends ActivatableViewAndModel<GridPane, Activ
|
||||||
TableColumn<P2pNetworkListItem, String> onionAddressColumn, connectionTypeColumn, creationDateColumn,
|
TableColumn<P2pNetworkListItem, String> onionAddressColumn, connectionTypeColumn, creationDateColumn,
|
||||||
roundTripTimeColumn, sentBytesColumn, receivedBytesColumn, peerTypeColumn;
|
roundTripTimeColumn, sentBytesColumn, receivedBytesColumn, peerTypeColumn;
|
||||||
|
|
||||||
private final WalletService walletService;
|
private final BitcoinWalletService walletService;
|
||||||
private final Preferences preferences;
|
private final Preferences preferences;
|
||||||
private Clock clock;
|
private Clock clock;
|
||||||
private final BSFormatter formatter;
|
private final BSFormatter formatter;
|
||||||
|
@ -81,7 +81,7 @@ public class NetworkSettingsView extends ActivatableViewAndModel<GridPane, Activ
|
||||||
private String btcNodesPreFocusText;
|
private String btcNodesPreFocusText;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
public NetworkSettingsView(WalletService walletService, P2PService p2PService, Preferences preferences, Clock clock,
|
public NetworkSettingsView(BitcoinWalletService walletService, P2PService p2PService, Preferences preferences, Clock clock,
|
||||||
BSFormatter formatter) {
|
BSFormatter formatter) {
|
||||||
super();
|
super();
|
||||||
this.walletService = walletService;
|
this.walletService = walletService;
|
||||||
|
|
|
@ -8,7 +8,7 @@ import io.bitsquare.app.BitsquareEnvironment;
|
||||||
import io.bitsquare.app.Log;
|
import io.bitsquare.app.Log;
|
||||||
import io.bitsquare.app.Version;
|
import io.bitsquare.app.Version;
|
||||||
import io.bitsquare.arbitration.ArbitratorManager;
|
import io.bitsquare.arbitration.ArbitratorManager;
|
||||||
import io.bitsquare.btc.WalletService;
|
import io.bitsquare.btc.BitcoinWalletService;
|
||||||
import io.bitsquare.common.CommonOptionKeys;
|
import io.bitsquare.common.CommonOptionKeys;
|
||||||
import io.bitsquare.common.UserThread;
|
import io.bitsquare.common.UserThread;
|
||||||
import io.bitsquare.common.handlers.ResultHandler;
|
import io.bitsquare.common.handlers.ResultHandler;
|
||||||
|
@ -135,12 +135,12 @@ public class Headless {
|
||||||
injector.getInstance(ArbitratorManager.class).shutDown();
|
injector.getInstance(ArbitratorManager.class).shutDown();
|
||||||
injector.getInstance(OpenOfferManager.class).shutDown(() -> {
|
injector.getInstance(OpenOfferManager.class).shutDown(() -> {
|
||||||
injector.getInstance(P2PService.class).shutDown(() -> {
|
injector.getInstance(P2PService.class).shutDown(() -> {
|
||||||
injector.getInstance(WalletService.class).shutDownDone.addListener((ov, o, n) -> {
|
injector.getInstance(BitcoinWalletService.class).shutDownDone.addListener((ov, o, n) -> {
|
||||||
headlessModule.close(injector);
|
headlessModule.close(injector);
|
||||||
log.debug("Graceful shutdown completed");
|
log.debug("Graceful shutdown completed");
|
||||||
resultHandler.handleResult();
|
resultHandler.handleResult();
|
||||||
});
|
});
|
||||||
injector.getInstance(WalletService.class).shutDown();
|
injector.getInstance(BitcoinWalletService.class).shutDown();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
// we wait max 5 sec.
|
// we wait max 5 sec.
|
||||||
|
|
|
@ -8,7 +8,7 @@ import io.bitsquare.app.BitsquareEnvironment;
|
||||||
import io.bitsquare.app.Log;
|
import io.bitsquare.app.Log;
|
||||||
import io.bitsquare.app.Version;
|
import io.bitsquare.app.Version;
|
||||||
import io.bitsquare.arbitration.ArbitratorManager;
|
import io.bitsquare.arbitration.ArbitratorManager;
|
||||||
import io.bitsquare.btc.WalletService;
|
import io.bitsquare.btc.BitcoinWalletService;
|
||||||
import io.bitsquare.common.CommonOptionKeys;
|
import io.bitsquare.common.CommonOptionKeys;
|
||||||
import io.bitsquare.common.UserThread;
|
import io.bitsquare.common.UserThread;
|
||||||
import io.bitsquare.common.handlers.ResultHandler;
|
import io.bitsquare.common.handlers.ResultHandler;
|
||||||
|
@ -138,12 +138,12 @@ public class Monitor {
|
||||||
injector.getInstance(ArbitratorManager.class).shutDown();
|
injector.getInstance(ArbitratorManager.class).shutDown();
|
||||||
injector.getInstance(OpenOfferManager.class).shutDown(() -> {
|
injector.getInstance(OpenOfferManager.class).shutDown(() -> {
|
||||||
injector.getInstance(P2PService.class).shutDown(() -> {
|
injector.getInstance(P2PService.class).shutDown(() -> {
|
||||||
injector.getInstance(WalletService.class).shutDownDone.addListener((ov, o, n) -> {
|
injector.getInstance(BitcoinWalletService.class).shutDownDone.addListener((ov, o, n) -> {
|
||||||
monitorModule.close(injector);
|
monitorModule.close(injector);
|
||||||
log.debug("Graceful shutdown completed");
|
log.debug("Graceful shutdown completed");
|
||||||
resultHandler.handleResult();
|
resultHandler.handleResult();
|
||||||
});
|
});
|
||||||
injector.getInstance(WalletService.class).shutDown();
|
injector.getInstance(BitcoinWalletService.class).shutDown();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
// we wait max 5 sec.
|
// we wait max 5 sec.
|
||||||
|
|
|
@ -8,7 +8,7 @@ import io.bitsquare.app.BitsquareEnvironment;
|
||||||
import io.bitsquare.app.Log;
|
import io.bitsquare.app.Log;
|
||||||
import io.bitsquare.app.Version;
|
import io.bitsquare.app.Version;
|
||||||
import io.bitsquare.arbitration.ArbitratorManager;
|
import io.bitsquare.arbitration.ArbitratorManager;
|
||||||
import io.bitsquare.btc.WalletService;
|
import io.bitsquare.btc.BitcoinWalletService;
|
||||||
import io.bitsquare.common.CommonOptionKeys;
|
import io.bitsquare.common.CommonOptionKeys;
|
||||||
import io.bitsquare.common.UserThread;
|
import io.bitsquare.common.UserThread;
|
||||||
import io.bitsquare.common.handlers.ResultHandler;
|
import io.bitsquare.common.handlers.ResultHandler;
|
||||||
|
@ -104,12 +104,12 @@ public class SeedNode {
|
||||||
injector.getInstance(ArbitratorManager.class).shutDown();
|
injector.getInstance(ArbitratorManager.class).shutDown();
|
||||||
injector.getInstance(OpenOfferManager.class).shutDown(() -> {
|
injector.getInstance(OpenOfferManager.class).shutDown(() -> {
|
||||||
injector.getInstance(P2PService.class).shutDown(() -> {
|
injector.getInstance(P2PService.class).shutDown(() -> {
|
||||||
injector.getInstance(WalletService.class).shutDownDone.addListener((ov, o, n) -> {
|
injector.getInstance(BitcoinWalletService.class).shutDownDone.addListener((ov, o, n) -> {
|
||||||
seedNodeModule.close(injector);
|
seedNodeModule.close(injector);
|
||||||
log.debug("Graceful shutdown completed");
|
log.debug("Graceful shutdown completed");
|
||||||
resultHandler.handleResult();
|
resultHandler.handleResult();
|
||||||
});
|
});
|
||||||
injector.getInstance(WalletService.class).shutDown();
|
injector.getInstance(BitcoinWalletService.class).shutDown();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
// we wait max 5 sec.
|
// we wait max 5 sec.
|
||||||
|
|
|
@ -8,7 +8,7 @@ import io.bitsquare.app.BitsquareEnvironment;
|
||||||
import io.bitsquare.app.Log;
|
import io.bitsquare.app.Log;
|
||||||
import io.bitsquare.app.Version;
|
import io.bitsquare.app.Version;
|
||||||
import io.bitsquare.arbitration.ArbitratorManager;
|
import io.bitsquare.arbitration.ArbitratorManager;
|
||||||
import io.bitsquare.btc.WalletService;
|
import io.bitsquare.btc.BitcoinWalletService;
|
||||||
import io.bitsquare.btc.provider.price.PriceFeedService;
|
import io.bitsquare.btc.provider.price.PriceFeedService;
|
||||||
import io.bitsquare.common.CommonOptionKeys;
|
import io.bitsquare.common.CommonOptionKeys;
|
||||||
import io.bitsquare.common.UserThread;
|
import io.bitsquare.common.UserThread;
|
||||||
|
@ -117,12 +117,12 @@ public class Statistics {
|
||||||
injector.getInstance(ArbitratorManager.class).shutDown();
|
injector.getInstance(ArbitratorManager.class).shutDown();
|
||||||
injector.getInstance(OpenOfferManager.class).shutDown(() -> {
|
injector.getInstance(OpenOfferManager.class).shutDown(() -> {
|
||||||
injector.getInstance(P2PService.class).shutDown(() -> {
|
injector.getInstance(P2PService.class).shutDown(() -> {
|
||||||
injector.getInstance(WalletService.class).shutDownDone.addListener((ov, o, n) -> {
|
injector.getInstance(BitcoinWalletService.class).shutDownDone.addListener((ov, o, n) -> {
|
||||||
statisticsModule.close(injector);
|
statisticsModule.close(injector);
|
||||||
log.debug("Graceful shutdown completed");
|
log.debug("Graceful shutdown completed");
|
||||||
resultHandler.handleResult();
|
resultHandler.handleResult();
|
||||||
});
|
});
|
||||||
injector.getInstance(WalletService.class).shutDown();
|
injector.getInstance(BitcoinWalletService.class).shutDown();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
// we wait max 5 sec.
|
// we wait max 5 sec.
|
||||||
|
|
Loading…
Add table
Reference in a new issue