Exclude 2nd log binding, cleanup, reformat

This commit is contained in:
Manfred Karrer 2015-03-17 00:51:43 +01:00
parent c4d56d43f4
commit 8713f9d835
38 changed files with 82 additions and 60 deletions

View File

@ -192,6 +192,14 @@
<groupId>com.vinumeris</groupId>
<artifactId>updatefx</artifactId>
<version>1.2</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-jdk14</artifactId>
</exclusion>
</exclusions>
</dependency>
<!--

View File

@ -58,7 +58,7 @@ public class Arbitrator implements Serializable {
List<ID_VERIFICATION> idVerifications,
String webUrl,
String description) {
this.pubKey=pubKey;
this.pubKey = pubKey;
this.messagePubKeyAsHex = messagePubKeyAsHex;
this.name = name;
this.idType = idType;

View File

@ -53,12 +53,13 @@ class AddressBasedCoinSelector extends DefaultCoinSelector {
// Constructor
///////////////////////////////////////////////////////////////////////////////////////////
public AddressBasedCoinSelector(NetworkParameters params, AddressEntry addressEntry, boolean includePending) {
public AddressBasedCoinSelector(NetworkParameters params, AddressEntry addressEntry, @SuppressWarnings("SameParameterValue") boolean includePending) {
this.params = params;
this.addressEntry = addressEntry;
this.includePending = includePending;
}
@SuppressWarnings("WeakerAccess")
@VisibleForTesting
static void sortOutputs(ArrayList<TransactionOutput> outputs) {
Collections.sort(outputs, (a, b) -> {
@ -130,14 +131,14 @@ class AddressBasedCoinSelector extends DefaultCoinSelector {
}
private boolean matchesRequiredAddress(TransactionOutput transactionOutput) {
if (transactionOutput.getScriptPubKey().isSentToAddress() || transactionOutput.getScriptPubKey().isSentToP2SH
if (transactionOutput.getScriptPubKey().isSentToAddress() || transactionOutput.getScriptPubKey().isPayToScriptHash
()) {
Address addressOutput = transactionOutput.getScriptPubKey().getToAddress(params);
log.trace("matchesRequiredAddress?");
log.trace(addressOutput.toString());
log.trace(addressEntry.getAddress().toString());
if (addressEntry != null && addressOutput.equals(addressEntry.getAddress())) {
if (addressOutput.equals(addressEntry.getAddress())) {
return true;
}
log.warn("No match found at matchesRequiredAddress addressOutput/addressEntry " + addressOutput.toString

View File

@ -38,7 +38,7 @@ public class AddressEntry implements Serializable {
private final byte[] pubKey;
private final byte[] pubKeyHash;
public AddressEntry(DeterministicKey keyPair, NetworkParameters params, AddressContext addressContext) {
public AddressEntry(DeterministicKey keyPair, NetworkParameters params, @SuppressWarnings("SameParameterValue") AddressContext addressContext) {
this(keyPair, params, addressContext, null);
}

View File

@ -24,6 +24,7 @@ import javax.inject.Inject;
/**
* A service delivers blockchain functionality from the BitcoinJ library.
*/
@SuppressWarnings({"UnusedDeclaration", "UnusedParameters"})
public class BlockChainService {
@Inject
public BlockChainService() {
@ -31,36 +32,43 @@ public class BlockChainService {
}
//TODO
public boolean isAccountBlackListed(String accountID, BankAccount bankAccount) {
@SuppressWarnings("SameReturnValue")
public boolean isAccountBlackListed(String accountId, BankAccount bankAccount) {
return false;
}
//TODO
@SuppressWarnings("SameReturnValue")
public boolean verifyAccountRegistration() {
return true;
}
@SuppressWarnings("SameReturnValue")
private boolean findAddressInBlockChain(String address) {
// TODO lookup for address in blockchain
return true;
}
@SuppressWarnings("SameReturnValue")
private byte[] getDataForTxWithAddress(String address) {
// TODO return data after OP_RETURN
return null;
}
@SuppressWarnings("SameReturnValue")
private boolean isFeePayed(String address) {
// TODO check if fee is paid
return true;
}
@SuppressWarnings("SameReturnValue")
private boolean isAccountIDBlacklisted(String accountID) {
// TODO check if accountID is on blacklist
return false;
}
@SuppressWarnings("SameReturnValue")
private boolean isBankAccountBlacklisted(BankAccount bankAccount) {
// TODO check if accountID is on blacklist
return false;

View File

@ -80,8 +80,8 @@ public class TradeService {
private final NetworkParameters params;
private final Wallet wallet;
private WalletAppKit walletAppKit;
private FeePolicy feePolicy;
private final WalletAppKit walletAppKit;
private final FeePolicy feePolicy;
public TradeService(NetworkParameters params, Wallet wallet, WalletAppKit walletAppKit, FeePolicy feePolicy) {
this.params = params;
@ -136,7 +136,7 @@ public class TradeService {
// Trade
///////////////////////////////////////////////////////////////////////////////////////////
public TransactionDataResult offererCreatesDepositTxInputs(Coin inputAmount, AddressEntry addressInfo) throws InsufficientMoneyException,
public TransactionDataResult offererCreatesDepositTxInputs(Coin inputAmount, AddressEntry addressInfo) throws
TransactionVerificationException, WalletException {
// We pay the tx fee 2 times to the deposit tx:
@ -199,7 +199,7 @@ public class TradeService {
AddressEntry addressInfo,
byte[] offererPubKey,
byte[] takerPubKey,
byte[] arbitratorPubKey) throws InsufficientMoneyException, SigningException,
byte[] arbitratorPubKey) throws SigningException,
TransactionVerificationException, WalletException {
checkArgument(offererConnectedOutputsForAllInputs.size() > 0);
@ -308,7 +308,6 @@ public class TradeService {
}
// Add taker inputs and apply signature
List<TransactionInput> takerInputs = new ArrayList<>();
for (TransactionOutput connectedOutputForInput : takerConnectedOutputsForAllInputs) {
TransactionOutPoint outPoint = new TransactionOutPoint(params, connectedOutputForInput.getIndex(), connectedOutputForInput.getParentTransaction());
@ -319,7 +318,6 @@ public class TradeService {
throw new TransactionVerificationException("Inputs from taker not singed.");
TransactionInput transactionInput = new TransactionInput(params, depositTx, scriptProgram, outPoint, connectedOutputForInput.getValue());
takerInputs.add(transactionInput);
depositTx.addInput(transactionInput);
}
@ -372,7 +370,7 @@ public class TradeService {
Coin takerPayoutAmount,
String takerAddressString,
AddressEntry addressEntry)
throws AddressFormatException, TransactionVerificationException, WalletException {
throws AddressFormatException, TransactionVerificationException {
Transaction payoutTx = createPayoutTx(depositTx, offererPayoutAmount, takerPayoutAmount, addressEntry.getAddressString(), takerAddressString);
@ -442,7 +440,7 @@ public class TradeService {
return tx;
}
public static void printTxWithInputs(String tracePrefix, Transaction tx) {
private static void printTxWithInputs(String tracePrefix, Transaction tx) {
log.trace(tracePrefix + ": " + tx.toString());
for (TransactionInput input : tx.getInputs()) {
if (input.getConnectedOutput() != null)
@ -474,7 +472,7 @@ public class TradeService {
}
}
private void signInput(Transaction transaction, TransactionInput input, int inputIndex) throws SigningException, TransactionVerificationException {
private void signInput(Transaction transaction, TransactionInput input, int inputIndex) throws SigningException {
Script scriptPubKey = input.getConnectedOutput().getScriptPubKey();
ECKey sigKey = input.getOutpoint().getConnectedKey(wallet);
Sha256Hash hash = transaction.hashForSignature(inputIndex, scriptPubKey, Transaction.SigHash.ALL, false);
@ -510,7 +508,7 @@ public class TradeService {
}
}*/
private void removeSignatures(Transaction transaction) throws InsufficientMoneyException {
private void removeSignatures(Transaction transaction) {
for (TransactionInput input : transaction.getInputs()) {
input.setScriptSig(new Script(new byte[]{}));
}

View File

@ -211,7 +211,7 @@ public class WalletService {
wallet.addEventListener(walletEventListener);
Serializable serializable = persistence.read(this, "addressEntryList");
if (serializable instanceof List) {
if (serializable instanceof List<?>) {
List<AddressEntry> persistedAddressEntryList = (List<AddressEntry>) serializable;
for (AddressEntry persistedAddressEntry : persistedAddressEntryList) {
persistedAddressEntry.setDeterministicKey((DeterministicKey) wallet.findKeyFromPubHash(persistedAddressEntry.getPubKeyHash()));
@ -355,9 +355,6 @@ public class WalletService {
return null;
}
private void notifyConfidenceListeners(Transaction tx) {
}
private TransactionConfidence getTransactionConfidence(Transaction tx, Address address) {
List<TransactionOutput> mergedOutputs = getOutputsWithConnectedOutputs(tx);
List<TransactionConfidence> transactionConfidenceList = new ArrayList<>();
@ -412,6 +409,7 @@ public class WalletService {
}
@SuppressWarnings("UnusedDeclaration")
public boolean isRegistrationFeeConfirmed() {
TransactionConfidence transactionConfidence = null;
if (getRegistrationAddressEntry() != null) {
@ -442,7 +440,7 @@ public class WalletService {
return balance;
}
public Coin getWalletBalance() {
Coin getWalletBalance() {
return wallet.getBalance(Wallet.BalanceType.ESTIMATED);
}
@ -454,16 +452,19 @@ public class WalletService {
return getBalanceForAddress(getArbitratorDepositAddressEntry().getAddress());
}
@SuppressWarnings("UnusedDeclaration")
public boolean isRegistrationFeeBalanceNonZero() {
return getRegistrationBalance().compareTo(Coin.ZERO) > 0;
}
@SuppressWarnings("UnusedDeclaration")
public boolean isRegistrationFeeBalanceSufficient() {
return getRegistrationBalance().compareTo(FeePolicy.REGISTRATION_FEE) >= 0;
}
//TODO
public int getNumOfPeersSeenTx(String txID) {
@SuppressWarnings("SameReturnValue")
public int getNumOfPeersSeenTx(String txId) {
// TODO check from blockchain
// will be async
return 3;
@ -558,7 +559,7 @@ public class WalletService {
}
}
public static void printTxWithInputs(String tracePrefix, Transaction tx) {
private static void printTxWithInputs(String tracePrefix, Transaction tx) {
log.trace(tracePrefix + ": " + tx.toString());
for (TransactionInput input : tx.getInputs()) {
if (input.getConnectedOutput() != null)

View File

@ -21,14 +21,17 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class SigningException extends Exception {
private static final long serialVersionUID = -4585301671813918976L;
private static final Logger log = LoggerFactory.getLogger(SigningException.class);
public SigningException(String message) {
super(message);
}
@SuppressWarnings("WeakerAccess")
public SigningException(Throwable t) {
super(t);
}
}

View File

@ -21,6 +21,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class TransactionVerificationException extends Exception {
private static final long serialVersionUID = 4447301533313718296L;
private static final Logger log = LoggerFactory.getLogger(TransactionVerificationException.class);
public TransactionVerificationException(Throwable t) {

View File

@ -21,6 +21,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class WalletException extends Exception {
private static final long serialVersionUID = 4782095361220152803L;
private static final Logger log = LoggerFactory.getLogger(WalletException.class);
public WalletException(Throwable t) {

View File

@ -31,6 +31,7 @@ public class AddressConfidenceListener {
return address;
}
@SuppressWarnings("UnusedParameters")
public void onTransactionConfidenceChanged(TransactionConfidence confidence) {
}
}

View File

@ -34,6 +34,7 @@ public class BalanceListener {
return address;
}
@SuppressWarnings("UnusedParameters")
public void onBalanceChanged(Coin balance) {
}
}

View File

@ -30,6 +30,7 @@ public class TxConfidenceListener {
return txID;
}
@SuppressWarnings("UnusedParameters")
public void onTransactionConfidenceChanged(TransactionConfidence confidence) {
}
}

View File

@ -31,10 +31,10 @@ import io.bitsquare.trade.protocol.trade.offerer.tasks.ProcessPayoutTxPublishedM
import io.bitsquare.trade.protocol.trade.offerer.tasks.ProcessRequestOffererPublishDepositTxMessage;
import io.bitsquare.trade.protocol.trade.offerer.tasks.ProcessRequestTakeOfferMessage;
import io.bitsquare.trade.protocol.trade.offerer.tasks.ProcessTakeOfferFeePayedMessage;
import io.bitsquare.trade.protocol.trade.offerer.tasks.RequestDepositPayment;
import io.bitsquare.trade.protocol.trade.offerer.tasks.RespondToTakeOfferRequest;
import io.bitsquare.trade.protocol.trade.offerer.tasks.SendBankTransferStartedMessage;
import io.bitsquare.trade.protocol.trade.offerer.tasks.SendDepositTxIdToTaker;
import io.bitsquare.trade.protocol.trade.offerer.tasks.RequestDepositPayment;
import io.bitsquare.trade.protocol.trade.offerer.tasks.SetupListenerForBlockChainConfirmation;
import io.bitsquare.trade.protocol.trade.offerer.tasks.SignAndPublishDepositTx;
import io.bitsquare.trade.protocol.trade.offerer.tasks.SignPayoutTx;
@ -43,18 +43,18 @@ import io.bitsquare.trade.protocol.trade.offerer.tasks.VerifyTakeOfferFeePayment
import io.bitsquare.trade.protocol.trade.offerer.tasks.VerifyTakerAccount;
import io.bitsquare.trade.protocol.trade.taker.SellerAsTakerProtocol;
import io.bitsquare.trade.protocol.trade.taker.tasks.CreateAndSignContract;
import io.bitsquare.trade.protocol.trade.taker.tasks.TakerCreatesAndSignsDepositTx;
import io.bitsquare.trade.protocol.trade.taker.tasks.PayTakeOfferFee;
import io.bitsquare.trade.protocol.trade.taker.tasks.ProcessBankTransferStartedMessage;
import io.bitsquare.trade.protocol.trade.taker.tasks.ProcessDepositTxPublishedMessage;
import io.bitsquare.trade.protocol.trade.taker.tasks.ProcessRespondToTakeOfferRequestMessage;
import io.bitsquare.trade.protocol.trade.taker.tasks.ProcessRequestDepositPaymentMessage;
import io.bitsquare.trade.protocol.trade.taker.tasks.ProcessRespondToTakeOfferRequestMessage;
import io.bitsquare.trade.protocol.trade.taker.tasks.RequestTakeOffer;
import io.bitsquare.trade.protocol.trade.taker.tasks.SendPayoutTxToOfferer;
import io.bitsquare.trade.protocol.trade.taker.tasks.SendSignedTakerDepositTx;
import io.bitsquare.trade.protocol.trade.taker.tasks.SendTakeOfferFeePayedMessage;
import io.bitsquare.trade.protocol.trade.taker.tasks.SignAndPublishPayoutTx;
import io.bitsquare.trade.protocol.trade.taker.tasks.TakerCommitDepositTx;
import io.bitsquare.trade.protocol.trade.taker.tasks.TakerCreatesAndSignsDepositTx;
import io.bitsquare.trade.protocol.trade.taker.tasks.VerifyOfferFeePayment;
import io.bitsquare.trade.protocol.trade.taker.tasks.VerifyOffererAccount;
import io.bitsquare.util.taskrunner.Task;

View File

@ -2660,8 +2660,8 @@ is being used to size a border should also be in pixels.
}
/* Header Sort Arrows */
.table-view /*> column-header-background > nested-column-header >*/ .arrow,
.tree-table-view /*> column-header-background > nested-column-header >*/ .arrow {
.table-view /*> column-header-background > nested-column-header >*/ .arrow,
.tree-table-view /*> column-header-background > nested-column-header >*/ .arrow {
-fx-background-color: -fx-mark-color;
-fx-padding: 0.25em 0.3125em 0.25em 0.3125em; /* 3 3.75 3 3.75 */
-fx-shape: "M 0 0 h 7 l -3.5 4 z";

View File

@ -103,17 +103,17 @@ public class TradeManager {
this.offerBookService = offerBookService;
Object openOffersObject = persistence.read(this, "openOffers");
if (openOffersObject instanceof Map) {
if (openOffersObject instanceof Map<?, ?>) {
openOffers.putAll((Map<String, OpenOffer>) openOffersObject);
}
Object pendingTradesObject = persistence.read(this, "pendingTrades");
if (pendingTradesObject instanceof Map) {
if (pendingTradesObject instanceof Map<?, ?>) {
pendingTrades.putAll((Map<String, Trade>) pendingTradesObject);
}
Object closedTradesObject = persistence.read(this, "closedTrades");
if (closedTradesObject instanceof Map) {
if (closedTradesObject instanceof Map<?, ?>) {
closedTrades.putAll((Map<String, Trade>) closedTradesObject);
}

View File

@ -90,7 +90,7 @@ public class CheckOfferAvailabilityProtocol {
// Incoming message handling
///////////////////////////////////////////////////////////////////////////////////////////
private void handleMessage(Message message, @SuppressWarnings("UnusedParameters") Peer sender) {
private void handleMessage(Message message, Peer sender) {
if (!isCanceled) {
if (message instanceof ReportOfferAvailabilityMessage)
handleReportOfferAvailabilityMessage((ReportOfferAvailabilityMessage) message);

View File

@ -23,7 +23,7 @@ import java.io.Serializable;
public class ReportOfferAvailabilityMessage implements Serializable, OfferMessage {
private static final long serialVersionUID = 6177387534187739018L;
private final String offerId;
private final boolean isOfferOpen;

View File

@ -24,7 +24,7 @@ import java.io.Serializable;
// That msg is used to ping the offerer if he is online and if the offer is still available
public class RequestIsOfferAvailableMessage implements Serializable, OfferMessage {
private static final long serialVersionUID = 4630151440192191798L;
private final String offerId;
public RequestIsOfferAvailableMessage(String offerId) {

View File

@ -44,7 +44,7 @@ public class GetPeerAddress extends Task<CheckOfferAvailabilityModel> {
log.trace("Found peer: " + peer.toString());
model.setPeer(peer);
complete();
}

View File

@ -26,7 +26,7 @@ import java.io.Serializable;
public class BankTransferStartedMessage implements Serializable, TradeMessage {
private static final long serialVersionUID = -3479634129543632523L;
private final String tradeId;
private final Transaction depositTx;
private final byte[] offererSignature;

View File

@ -25,7 +25,7 @@ import java.io.Serializable;
public class DepositTxPublishedMessage implements Serializable, TradeMessage {
private static final long serialVersionUID = -1532231540167406581L;
private final String tradeId;
private final Transaction depositTx;

View File

@ -23,7 +23,7 @@ import java.io.Serializable;
public class RespondToTakeOfferRequestMessage implements Serializable, TradeMessage {
private static final long serialVersionUID = 6177387534087739018L;
private final String tradeId;
private final boolean offerIsAvailable;

View File

@ -42,7 +42,7 @@ public class GetOffererDepositTxInputs extends Task<BuyerAsOffererModel> {
Coin offererInputAmount = model.getTrade().getSecurityDeposit().add(FeePolicy.TX_FEE);
AddressEntry addressInfo = model.getAddressEntry();
TradeService.TransactionDataResult result = model.getTradeService().offererCreatesDepositTxInputs(offererInputAmount, addressInfo);
model.setOffererConnectedOutputsForAllInputs(result.getConnectedOutputsForAllInputs());
model.setOffererOutputs(result.getOutputs());

View File

@ -42,7 +42,7 @@ public class ProcessPayoutTxPublishedMessage extends Task<BuyerAsOffererModel> {
checkTradeId(model.getId(), model.getTradeMessage());
model.getTrade().setPayoutTx(checkNotNull(((PayoutTxPublishedMessage) model.getTradeMessage()).getPayoutTx()));
model.getTrade().setState(Trade.State.PAYOUT_PUBLISHED);
complete();

View File

@ -39,7 +39,7 @@ public class RespondToTakeOfferRequest extends Task<BuyerAsOffererModel> {
@Override
protected void doRun() {
offerIsAvailable = model.getOpenOffer().getState() == OpenOffer.State.OPEN;
if (offerIsAvailable) {
Trade trade = new Trade(model.getOpenOffer().getOffer());
model.setTrade(trade);

View File

@ -47,7 +47,7 @@ public class SetupListenerForBlockChainConfirmation extends Task<BuyerAsOffererM
model.getTrade().setState(Trade.State.DEPOSIT_CONFIRMED);
boolean removed = confidence.removeEventListener(this);
log.debug("listener removed? "+removed);
log.debug("listener removed? " + removed);
}
}
});

View File

@ -28,7 +28,6 @@ import io.bitsquare.trade.protocol.trade.offerer.messages.RequestDepositPaymentM
import io.bitsquare.trade.protocol.trade.offerer.messages.RespondToTakeOfferRequestMessage;
import io.bitsquare.trade.protocol.trade.taker.tasks.CreateAndSignContract;
import io.bitsquare.trade.protocol.trade.taker.tasks.GetPeerAddress;
import io.bitsquare.trade.protocol.trade.taker.tasks.TakerCreatesAndSignsDepositTx;
import io.bitsquare.trade.protocol.trade.taker.tasks.PayTakeOfferFee;
import io.bitsquare.trade.protocol.trade.taker.tasks.ProcessBankTransferStartedMessage;
import io.bitsquare.trade.protocol.trade.taker.tasks.ProcessDepositTxPublishedMessage;
@ -40,6 +39,7 @@ import io.bitsquare.trade.protocol.trade.taker.tasks.SendSignedTakerDepositTx;
import io.bitsquare.trade.protocol.trade.taker.tasks.SendTakeOfferFeePayedMessage;
import io.bitsquare.trade.protocol.trade.taker.tasks.SignAndPublishPayoutTx;
import io.bitsquare.trade.protocol.trade.taker.tasks.TakerCommitDepositTx;
import io.bitsquare.trade.protocol.trade.taker.tasks.TakerCreatesAndSignsDepositTx;
import io.bitsquare.trade.protocol.trade.taker.tasks.VerifyOfferFeePayment;
import io.bitsquare.trade.protocol.trade.taker.tasks.VerifyOffererAccount;
@ -196,12 +196,12 @@ public class SellerAsTakerProtocol {
// Massage dispatcher
///////////////////////////////////////////////////////////////////////////////////////////
private void handleMessage(Message message, @SuppressWarnings("UnusedParameters") Peer sender) {
private void handleMessage(Message message, Peer sender) {
log.trace("handleNewMessage: message = " + message.getClass().getSimpleName());
if (message instanceof TradeMessage) {
TradeMessage tradeMessage = (TradeMessage) message;
nonEmptyStringOf(tradeMessage.getTradeId());
if (tradeMessage.getTradeId().equals(model.getOffer().getId())) {
if (tradeMessage instanceof RespondToTakeOfferRequestMessage) {
handleRespondToTakeOfferRequestMessage((RespondToTakeOfferRequestMessage) tradeMessage);

View File

@ -25,7 +25,7 @@ import java.io.Serializable;
public class PayoutTxPublishedMessage implements Serializable, TradeMessage {
private static final long serialVersionUID = 1288653559218403873L;
private final String tradeId;
private final Transaction payoutTx;

View File

@ -23,7 +23,7 @@ import java.io.Serializable;
public class RequestTakeOfferMessage implements Serializable, TradeMessage {
private static final long serialVersionUID = 4660151440192191798L;
private final String tradeId;
public RequestTakeOfferMessage(String tradeId) {

View File

@ -25,7 +25,7 @@ import java.io.Serializable;
public class TakeOfferFeePayedMessage implements Serializable, TradeMessage {
private static final long serialVersionUID = -5057935061275354312L;
private final String tradeId;
private final Coin tradeAmount;
private final String takeOfferFeeTxID;

View File

@ -43,14 +43,14 @@ public class GetPeerAddress extends Task<SellerAsTakerModel> {
log.trace("Found peer: " + peer.toString());
model.setOfferer(peer);
complete();
}
@Override
public void onFailed() {
model.getOffer().setState(Offer.State.OFFERER_OFFLINE);
failed();
}
});

View File

@ -26,7 +26,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import static com.google.common.base.Preconditions.checkNotNull;
import static io.bitsquare.util.Validator.*;
import static io.bitsquare.util.Validator.checkTradeId;
public class ProcessDepositTxPublishedMessage extends Task<SellerAsTakerModel> {
private static final Logger log = LoggerFactory.getLogger(ProcessDepositTxPublishedMessage.class);

View File

@ -45,7 +45,7 @@ public class ProcessRequestDepositPaymentMessage extends Task<SellerAsTakerModel
checkArgument(message.getOffererConnectedOutputsForAllInputs().size() > 0);
model.setOffererOutputs(checkNotNull(message.getOffererOutputs()));
model.setOffererPubKey(checkNotNull(message.getOffererPubKey()));
model.setTakerBankAccount(checkNotNull(message.getBankAccount()));
model.setTakerAccountId(nonEmptyStringOf(message.getAccountId()));

View File

@ -52,7 +52,7 @@ public class TakerCreatesAndSignsDepositTx extends Task<SellerAsTakerModel> {
model.getTakerPubKey(),
model.getArbitratorPubKey());
model.setTakerConnectedOutputsForAllInputs(result.getConnectedOutputsForAllInputs());
model.setTakerOutputs(result.getOutputs());
model.setTakerDepositTx(result.getDepositTx());

View File

@ -20,7 +20,6 @@ package io.bitsquare.trade.tomp2p;
import io.bitsquare.network.tomp2p.TomP2PNode;
import io.bitsquare.trade.TradeMessageModule;
import io.bitsquare.trade.TradeMessageService;
import io.bitsquare.user.User;
import com.google.inject.Provider;
import com.google.inject.Singleton;
@ -47,8 +46,8 @@ class TomP2PTradeMessageServiceProvider implements Provider<TradeMessageService>
private final TradeMessageService tradeMessageService;
@Inject
public TomP2PTradeMessageServiceProvider(User user, TomP2PNode tomP2PNode) {
tradeMessageService = new TomP2PTradeMessageService(user, tomP2PNode);
public TomP2PTradeMessageServiceProvider(TomP2PNode tomP2PNode) {
tradeMessageService = new TomP2PTradeMessageService(tomP2PNode);
tradeMessageService.setExecutor(Platform::runLater);
}

View File

@ -25,7 +25,6 @@ import io.bitsquare.trade.TradeMessageService;
import io.bitsquare.trade.handlers.MessageHandler;
import io.bitsquare.trade.listeners.GetPeerAddressListener;
import io.bitsquare.trade.listeners.SendMessageListener;
import io.bitsquare.user.User;
import java.security.PublicKey;
@ -64,7 +63,7 @@ public class TomP2PTradeMessageService implements TradeMessageService {
// Constructor
///////////////////////////////////////////////////////////////////////////////////////////
public TomP2PTradeMessageService(User user, TomP2PNode tomP2PNode) {
public TomP2PTradeMessageService(TomP2PNode tomP2PNode) {
this.tomP2PNode = tomP2PNode;
}

View File

@ -96,7 +96,7 @@ public class PlaceOfferProtocolTest {
user.applyPersistedUser(null);
bootstrappedPeerBuilder = new BootstrappedPeerBuilder(Node.DEFAULT_PORT, false, bootstrapNode, "<unspecified>");
tomP2PNode = new TomP2PNode(bootstrappedPeerBuilder);
tradeMessageService = new TomP2PTradeMessageService(user, tomP2PNode);
tradeMessageService = new TomP2PTradeMessageService(tomP2PNode);
Observable<BootstrapState> messageObservable = tomP2PNode.bootstrap(user.getNetworkKeyPair(), tradeMessageService);
messageObservable.publish();