mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-04-19 15:26:03 -04:00
Refactor models for taker
This commit is contained in:
parent
74c085cb03
commit
276bbb2219
@ -36,7 +36,7 @@ public class CheckOfferAvailabilityProtocol {
|
||||
|
||||
private final CheckOfferAvailabilityModel model;
|
||||
private final ResultHandler resultHandler;
|
||||
private ErrorMessageHandler errorMessageHandler;
|
||||
private final ErrorMessageHandler errorMessageHandler;
|
||||
private final MessageHandler messageHandler;
|
||||
|
||||
private boolean isCanceled;
|
||||
|
@ -45,7 +45,7 @@ public class OfferSharedModel extends SharedModel {
|
||||
private final WalletService walletService;
|
||||
private final BlockChainService blockChainService;
|
||||
private final SignatureService signatureService;
|
||||
private Persistence persistence;
|
||||
private final Persistence persistence;
|
||||
|
||||
|
||||
// derived
|
||||
|
@ -53,7 +53,7 @@ import static io.bitsquare.util.Validator.nonEmptyStringOf;
|
||||
|
||||
public class SellerAsTakerProtocol {
|
||||
private static final Logger log = LoggerFactory.getLogger(SellerAsTakerProtocol.class);
|
||||
public static final int TIMEOUT_DELAY = 10000;
|
||||
private static final int TIMEOUT_DELAY = 10000;
|
||||
|
||||
private final SellerAsTakerModel model;
|
||||
private final MessageHandler messageHandler;
|
||||
|
@ -30,7 +30,7 @@ public class OffererModel {
|
||||
this.peer = peer;
|
||||
}
|
||||
|
||||
public Peer peer;
|
||||
public final Peer peer;
|
||||
public byte[] pubKey;
|
||||
public Coin payoutAmount;
|
||||
public String payoutAddress;
|
||||
|
@ -89,10 +89,6 @@ public class SellerAsTakerModel extends OfferSharedModel {
|
||||
this.takeOfferFeeTx = takeOfferFeeTx;
|
||||
}
|
||||
|
||||
public void setDepositTx(Transaction transaction) {
|
||||
|
||||
}
|
||||
|
||||
public Transaction getPayoutTx() {
|
||||
return payoutTx;
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ import org.bitcoinj.core.TransactionOutput;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class TakerModel {
|
||||
class TakerModel {
|
||||
|
||||
public List<TransactionOutput> connectedOutputsForAllInputs;
|
||||
public List<TransactionOutput> outputs;
|
||||
|
@ -43,7 +43,7 @@ public class ProcessBankTransferStartedMessage extends Task<SellerAsTakerModel>
|
||||
checkTradeId(model.getId(), model.getTradeMessage());
|
||||
BankTransferStartedMessage message = (BankTransferStartedMessage) model.getTradeMessage();
|
||||
|
||||
model.setDepositTx(checkNotNull(message.getDepositTx()));
|
||||
model.setPublishedDepositTx(checkNotNull(message.getDepositTx()));
|
||||
model.offerer.signature = checkNotNull(ECKey.ECDSASignature.decodeFromDER(message.getOffererSignature()));
|
||||
model.offerer.payoutAmount = positiveCoinOf(nonZeroCoinOf(message.getOffererPayoutAmount()));
|
||||
model.taker.payoutAmount = positiveCoinOf(nonZeroCoinOf(message.getTakerPayoutAmount()));
|
||||
|
Loading…
x
Reference in New Issue
Block a user