mirror of
https://github.com/haveno-dex/haveno.git
synced 2024-10-01 01:35:48 -04:00
move redundant deposit tx from ProcessModel to getSelf().getDepositTx()
This commit is contained in:
parent
74b0e42dae
commit
5c9a6b9ed6
@ -111,7 +111,7 @@ public class ProcessModel implements Model, PersistablePayload {
|
||||
// After successful verified we copy that over to the trade.tradePeerAddress
|
||||
@Nullable
|
||||
@Setter
|
||||
private NodeAddress tempTradePeerNodeAddress; // TODO (woodser): remove entirely?
|
||||
private NodeAddress tempTradePeerNodeAddress;
|
||||
|
||||
// Added in v.1.1.6
|
||||
@Nullable
|
||||
@ -123,8 +123,6 @@ public class ProcessModel implements Model, PersistablePayload {
|
||||
private long sellerPayoutAmountFromMediation;
|
||||
|
||||
// Added for XMR integration
|
||||
@Getter
|
||||
transient private MoneroTxWallet takeOfferFeeTx; // TODO (woodser): remove
|
||||
@Setter
|
||||
transient private TradeMessage tradeMessage;
|
||||
@Getter
|
||||
@ -136,9 +134,6 @@ public class ProcessModel implements Model, PersistablePayload {
|
||||
transient private MoneroTxWallet reserveTx;
|
||||
@Getter
|
||||
@Setter
|
||||
transient private MoneroTxWallet depositTxXmr;
|
||||
@Getter
|
||||
@Setter
|
||||
transient private MoneroTxWallet unsignedPayoutTx;
|
||||
@Nullable
|
||||
@Getter
|
||||
|
@ -68,7 +68,7 @@ public class MaybeSendSignContractRequest extends TradeTask {
|
||||
}
|
||||
|
||||
// skip if deposit tx already created
|
||||
if (processModel.getDepositTxXmr() != null) {
|
||||
if (trade.getSelf().getDepositTx() != null) {
|
||||
complete();
|
||||
return;
|
||||
}
|
||||
@ -90,7 +90,6 @@ public class MaybeSendSignContractRequest extends TradeTask {
|
||||
for (MoneroOutput input : depositTx.getInputs()) reservedKeyImages.add(input.getKeyImage().getHex());
|
||||
|
||||
// save process state
|
||||
processModel.setDepositTxXmr(depositTx); // TODO: redundant with trade.getSelf().setDepositTx(), remove?
|
||||
trade.getSelf().setDepositTx(depositTx);
|
||||
trade.getSelf().setDepositTxHash(depositTx.getHash());
|
||||
trade.getSelf().setDepositTxFee(depositTx.getFee());
|
||||
|
@ -76,7 +76,6 @@ public class ProcessSignContractRequest extends TradeTask {
|
||||
}
|
||||
|
||||
// sign contract only when both deposit txs hashes known
|
||||
// TODO (woodser): remove makerDepositTxId and takerDepositTxId from Trade
|
||||
if (processModel.getMaker().getDepositTxHash() == null || processModel.getTaker().getDepositTxHash() == null) {
|
||||
complete();
|
||||
return;
|
||||
|
@ -80,8 +80,8 @@ public class ProcessSignContractResponse extends TradeTask {
|
||||
Version.getP2PMessageVersion(),
|
||||
new Date().getTime(),
|
||||
trade.getSelf().getContractSignature(),
|
||||
processModel.getDepositTxXmr().getFullHex(),
|
||||
processModel.getDepositTxXmr().getKey(),
|
||||
trade.getSelf().getDepositTx().getFullHex(),
|
||||
trade.getSelf().getDepositTx().getKey(),
|
||||
trade.getSelf().getPaymentAccountKey());
|
||||
|
||||
// send request to arbitrator
|
||||
|
Loading…
Reference in New Issue
Block a user